I'm trying to change the style of the EditText? Is it possible to achieve that? If so I'll appreciate being told about it, otherwise what alternative ways are available.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How can I create this custom Bottom Navigation on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
You can use the attribute
style="@style/your_style"
that is defined for any widget.To define your style you have to create a file called
style.xml
in the values folder (i.e.\res\values\styles.xml
) and use the following syntax:The attribute
parent="@android:style/Widget.EditText"
is important because it will ensure that the style being defined extends the basic AndroidEditText
style, thus only properties different from the default style need to be defined.Yes, it is definitely possible. See http://developer.android.com/guide/topics/ui/themes.html (Raghu already postet that link) for more details.
You can also but a background in it, see this post: http://www.anddev.org/tutorial_buttons_with_niceley_stretched_background-t4369.html It only covers buttons, but it is exactly the same for edittexts.