EditText中文本的大底部填充

时间:2013-05-05 14:50:09

标签: android android-edittext

我在EditText中有一个大底部填充文本的问题。这只发生在Gingerbread和较低的ROM中。在ICS及以上,一切都还好。 这就是我的意思: http://i.stack.imgur.com/BisvZ.jpg

这是EditText的代码:

                   <EditText
                    android:id="@+id/height2"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignBottom="@+id/textView13"
                    android:layout_alignLeft="@+id/diag"
                    android:digits="1234567890."
                    android:minWidth="80dp"
                    android:imeOptions="flagNoExtractUi"
                    android:inputType="numberSigned" />

正如您所看到的,没有为文本设置填充。 自定义布局xml:        

<item android:state_multiline="true" android:state_window_focused="false" android:state_enabled="true" android:drawable="@drawable/textfield_multiline_default_holo_light" />
<item android:state_multiline="true" android:state_window_focused="false" android:state_enabled="false" android:drawable="@drawable/textfield_multiline_disabled_holo_light" />
<item android:state_multiline="true" android:state_enabled="true" android:state_focused="true" android:drawable="@drawable/textfield_multiline_activated_holo_light" />
<item android:state_multiline="true" android:state_enabled="true" android:state_activated="true" android:drawable="@drawable/textfield_multiline_focused_holo_light" />
<item android:state_multiline="true" android:state_enabled="true" android:drawable="@drawable/textfield_multiline_default_holo_light" />
<item android:state_multiline="true" android:state_focused="true" android:drawable="@drawable/textfield_multiline_disabled_focused_holo_light" />
<item android:state_multiline="true" android:drawable="@drawable/textfield_multiline_disabled_holo_light" />

<item android:state_window_focused="false" android:state_enabled="true" android:drawable="@drawable/textfield_default_holo_light" />
<item android:state_window_focused="false" android:state_enabled="false" android:drawable="@drawable/textfield_disabled_holo_light" />
<item android:state_enabled="true" android:state_focused="true" android:drawable="@drawable/textfield_activated_holo_light" />
<iten android:state_enabled="true" android:state_activated="true" android:drawable="@drawable/textfield_focused_holo_light" />
<item android:state_enabled="true" android:drawable="@drawable/textfield_default_holo_light" />
<item android:state_focused="true" android:drawable="@drawable/textfield_disabled_focused_holo_light" />
<item android:drawable="@drawable/textfield_disabled_holo_light" />

0 个答案:

没有答案