Mark M. |
has entered the room |
Mark M. |
turned on guest access |
Apr 2 |
9:05 AM |
trocchietto_Ivano |
has entered the room |
Mark M. |
hello, Ivano!
|
Mark M. |
how can I help you today?
|
trocchietto_Ivano |
Hallo Mark! I have a custom numeric keyboard
|
trocchietto_Ivano |
numbers 1234567890
|
trocchietto_Ivano |
everybutiton if clicked takes as value the text inside, so that if you click 1 you get as value 1
|
trocchietto_Ivano |
I have to add to the keys some letters, as in the telephone keyboards
|
trocchietto_Ivano |
so for instance the button 2 will have ABC behind the number 2
|
Apr 2 |
9:10 AM |
trocchietto_Ivano |
if I just add an image on top then the sensitivity of the button is obfuscated by the view
|
trocchietto_Ivano |
so I thought to add this attribute to the button
|
trocchietto_Ivano |
android:drawableBottom=@drawable
|
trocchietto_Ivano |
now my question iis : 1)I am doing in the right way?
|
Mark M. |
I can't really answer that
|
trocchietto_Ivano |
2) can I give to the drawable resource a textview?
|
Mark M. |
no
|
trocchietto_Ivano |
so that instead of a drawable image with various cirlce
|
trocchietto_Ivano |
I design ABC
|
trocchietto_Ivano |
how could I solve this problem?
|
Mark M. |
you could create a custom view that draws everything using a Canvas
|
Mark M. |
or, you could create a custom view as a ConstraintLayout that holds a couple of TextViews
|
Mark M. |
or, you could use an image for your drawableBottom
|
Mark M. |
you might consider looking to see how other input method editors handle their keys
|
Mark M. |
I have never spent much time with input method editors, so I do not know what techniques are favored there
|
trocchietto_Ivano |
I see thank you for all your hints
|
Apr 2 |
9:15 AM |
Mark M. |
since an input method editor is a type of service, not an activity, there may be some limitations on the available techniques
|
trocchietto_Ivano |
I see thanks
|
trocchietto_Ivano |
Possibly in future will be created some ad hoc attribute
|
trocchietto_Ivano |
in <Button
|
trocchietto_Ivano |
after all `<Button extends TextView
|
Apr 2 |
9:20 AM |
trocchietto_Ivano |
BTW, SO is touching in these days with this retro look
|
trocchietto_Ivano |
pity they did not put a midi as in the old times
|
Mark M. |
yeah, I'm not certain how long they will keep it up
|
trocchietto_Ivano |
:)
|
trocchietto_Ivano |
have a nice day
|
trocchietto_Ivano |
I am at work
|
Mark M. |
you too!
|
trocchietto_Ivano |
thanks
|
Apr 2 |
9:40 AM |
trocchietto_Ivano |
has left the room |
Apr 2 |
10:00 AM |
Mark M. |
turned off guest access |