How to add a padding to a KeyboardView in Android? -


i have row of keys. each key 18.5% width 2% gap. want gap on first key 10% , gap on last key 10% on right side. it's simple set horizontalgap on each key achieve effect, except see no way set right side gap.

the spacing want follows (bracketed items keys, else it's gap):

10% [18.5%] 2% [18.5%] 2% [18.5%] 2% [18.5%] 10% 

i have tried:

<keyboard xmlns:android="http://schemas.android.com/apk/res/android"     android:keywidth="18.5%p"     android:horizontalgap="2%"     android:keyheight="7%p">      <row>         <key android:codes="1" android:keylabel="1" android:horizontalgap="10%p" />         <key android:codes="2" android:keylabel="2" />         <key android:codes="3" android:keylabel="3" />         <key android:codes="4" android:keylabel="4"  />     </row> </keyboard> 

this not give me 10% gap despite keyboardview width set fill_parent. how can keyboard have 10% gap after keys in row?

set width wrap_content , center horizontally within parent.


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -