Ale*_*xis 12 android android-theme actionbarsherlock android-actionbar android-holo-everywhere
我正在构建一个应该在android 2.3上运行的应用程序,我添加了ActionBarSherlock和HoloEverywhere库.
为了使用ActionBarSherlock,我必须像这样使用Theme.Sherlock:
<application
...
android:theme="@style/Theme.Sherlock"
... >
Run Code Online (Sandbox Code Playgroud)
那没关系.
我的主要活动非常简单:只有一个包含5行的ListView(我不使用ListAcivity).
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ListView
android:id="@+id/menuListView"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
因为它是android 2.3,我仍然有橙色和黑色主题(当然除了ActionBar).现在我想通过修改我的清单来添加HoloEverywhere主题:
<application
...
android:theme="@style/Theme.HoloEverywhereDark.Sherlock"
... >
Run Code Online (Sandbox Code Playgroud)
但这并没有改变任何事情......我错过了什么?
为默认情况下为HoloEverywhere库的styles.xml文件中的每个ListView启用Holo主题,我通过添加以下行来修改"ListViewStyle"元素:
<item name="android:listSelector">@drawable/list_selector_holo_dark</item>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
9447 次 |
| 最近记录: |