问题
I'm starting my second Android app and find that I would like to mostly use HOLO dark theme for app.
EXCEPT for the EditTexts, I would prefer to use the old Gingerbread style ones (looking closer to iOS) with some rounded corner.
I'm a bit lost as to how I can achieve this. If anyone could drop some hints or links that would be HIGHLY appreciated
回答1:
In your Theme:
<style name="myTheme" parent="android:Theme.Holo">
<item name="editTextStyle">@style/MyWidget.EditText</item>
</style>
<style name="MyWidget.EditText" parent="android:Widget.EditText">
<item name="android:background">@drawable/edit_text</item>
</style>
Now you can get the referenced drawable from Github(from the Gingerbread branch of the framework)
来源:https://stackoverflow.com/questions/14056191/mixing-android-widget-old-new-themes