Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/kotlin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 安科主题与风格_Android_Kotlin_Anko - Fatal编程技术网

Android 安科主题与风格

Android 安科主题与风格,android,kotlin,anko,Android,Kotlin,Anko,有没有办法通过Anko向版面中添加主题和风格?谢谢 <RelativeLayout android:id="@+id/rlHeaderLayout" style="?defaultStyle" android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="?topBarThemeContext"> 我只是用谷歌搜索同一个问题,然后找到答案 主题 Anko支持主题覆盖(x

有没有办法通过Anko向版面中添加主题风格?谢谢

<RelativeLayout
android:id="@+id/rlHeaderLayout"
style="?defaultStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="?topBarThemeContext">

我只是用谷歌搜索同一个问题,然后找到答案

主题 Anko支持主题覆盖(xml方式是在任何视图中添加
android:theme
parameter>),在任何视图或布局之前添加
theme
前缀:

kotlin themedLinearLayout(ThemeOverlay_AppCompat_Dark) { 
  orientation = VERTICAL   
  gravity = BOTTOM 
}