Use declare styleable to set custom component input type
Lets say you have a custom view named InputView, which is not a TextView (lets say its a RelativeLayout). In your attrs.xml: <declare-styleable name=”InputView”> <!– any custom attributes –> <attr name=”title” format=”string” /> <!– standart attributes, note android: prefix and no format attribute –> <attr name=”android:imeOptions”/> <attr name=”android:inputType”/> </declare-styleable> In an xml layout where you …