1

I am developing softkeyboard in android my question, how can i create my custom Attributes on xml keyboardview?

<Layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res/your.package.ProjectName"
    .../>
    ...
    <your.package.projectname.CustomKeyboard
        android:id="@+id/my_keyboard"
        ...
        app:alternative_key_label="F">
    </your.package.projectname.CustomKeyboard>
</Layout>

How do I declare an Android UI element using XML? like above xml app:alternative_key_label

Sonu Kumar
  • 969
  • 1
  • 11
  • 36

1 Answers1

1

You will need to extend the keboard view class and declare your custom attributes in res/values/ see this: Custom view and attributes

mchouhan_google
  • 1,775
  • 1
  • 20
  • 28