I am desi开发者_运维百科gning an android user interface I am facing some problem in designing it can anybody guide me.
I need UI same as the above where there is not space between 2 EditText.
Regards
Altaf
You need to change its background. The default Android EditText
has padding because of its background.
Here's the EditText
's background xml description:
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_focused="true"
android:drawable="@drawable/editbox_background_focus_yellow"/>
<item android:drawable="@drawable/editbox_background_normal"/>
</selector>
Just provide image for these states, create a similar drawable xml file in your project and you'll be able to change how EditText
s look like.
You need to set the background to either your own drawable or a color. Try setting the background
of each EditText to #FFFFFFFF, and make sure there are no margins set. That will cause them to be flush next to each other.
For the grey separator between the 2, add a View
(just plain View
) with layout_height of 1dp and layout_width of fill_parent between the two EditTexts. Then set the background color of that to #FF868686.
精彩评论