[英]How do I theme my slidingDrawer so it have a nice dark bar?
I have a sliding drawer and I am trying to create the dark bar used in most application. 我有一个滑动抽屉,我正在尝试创建大多数应用程序中使用的暗条。 But I have no idea how Android Themeing works:
但是我不知道Android Themeing是如何工作的:
<SlidingDrawer
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:orientation="horizontal"
android:handle="@+id/SliderHeader"
android:content="@+id/SliderContent"
style="@style/DarkThemeSelector">
<RelativeLayout
android:id="@id/SliderHeader"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:src="@android:drawable/ic_media_pause" />
</RelativeLayout >
<RelativeLayout
android:id="@id/SliderContent"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</RelativeLayout>
</SlidingDrawer>
Here is what I have: 这是我所拥有的:
<style name="DarkThemeSelector" parent="android:Theme.Dark">
</style>
This doesn't work as there is no such thing as android:Theme.Dark 这不起作用,因为没有android:Theme.Dark这样的东西
Here use this theme generator:- 这里使用这个主题生成器:
Android Holo Colors Theme Generator Android Holo颜色主题生成器
Change whatever color you like & add generated components to respective folder... 更改您喜欢的任何颜色并将生成的组件添加到相应的文件夹...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.