安卓自定义theme以及attrs,styles资源文件详解(一)

@android:color/primary_text_light

@android:color/secondary_text_light

@android:color/tertiary_text_light

@android:color/primary_text_dark

@android:color/secondary_text_dark

@android:color/tertiary_text_dark

@android:color/primary_text_light_disable_only

@android:color/primary_text_dark_disable_only

@android:color/primary_text_light_nodisable

@android:color/secondary_text_light_nodisable

@android:color/primary_text_dark_nodisable

@android:color/secondary_text_dark_nodisable

@android:color/hint_foreground_light

@android:color/hint_foreground_dark

@android:style/Widget.PopupWindow

@android:drawable/indicator_check_mark_light

@android:drawable/indicator_check_mark_dark

@android:style/Widget.GestureOverlayView.White

@android:style/Widget.ExpandableListView.White

@android:style/Widget.ListView.White

@drawable/divider_horizontal_bright

@android:style/Widget.TextView.ListSeparator.White

@android:style/Widget.ProgressBar.Inverse

@android:style/Widget.ProgressBar.Small.Inverse

@android:style/Widget.ProgressBar.Large.Inverse

@android:style/Widget.ProgressBar

@android:style/Widget.ProgressBar.Small

@android:style/Widget.ProgressBar.Large

`

可以看出,主题都是通过定义各个控件的样式实现,指向其他的资源文件。

我们可以通过继承另一个主题自定义主题样式。

三、自定义主题样式

在values下新建一个themes文件夹,里面自定义各种主题。

如下例所示:

  • 7
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值