4

Is there a way to add theme and style to a Layout with Anko? Thanks

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

1 Answers1

4

I just Google for same question, and find the answer here

Themes

Anko support theme override (the xml way is adding android:theme parameter >to any view) too by themed prefix before any view or layout:

kotlin themedLinearLayout(ThemeOverlay_AppCompat_Dark) { 
  orientation = VERTICAL   
  gravity = BOTTOM 
}
Trenton Tyler
  • 1,692
  • 3
  • 24
  • 53
Ali
  • 626
  • 1
  • 11
  • 29