Android系統顏色的適用範圍

###All Clickable Views:android

  • ripple effect (Lollipop only) — 「colorControlHighlight」

###Status Bar:orm

  • background (Lollipop only) – 「colorPrimaryDark」

###Navigation Bar:ip

  • background (Lollipop only) – 「android:navigationBarColor」

###EditText:it

  • underline (unfocused) — 「colorControlNormal」
  • underline overlay (focus) — 「colorAccent」
  • cursor — 「colorAccent」
  • text color — 「android:textColorPrimary」

###TextView:io

  • text color — 「android:textColorPrimary」

###CheckBox:sed

  • box unchecked — 「colorControlNormal」
  • box checked — 「colorAccent」

###RadioButton:select

  • unselected — 「colorControlNormal」
  • selected — 「colorAccent」
  • ripple effect (Lollipop only) — 「colorControlHighlight」

###SwitchCompat:im

  • thumb switch off — 「colorSwitchThumbNormal」
  • thumb switch on — 「colorAccent」
  • track overlay (when switched on) — 「colorAccent」

###Spinner:di

  • indicator (not pressed) — 「colorControlNormal」
  • indicator (pressed) — 「colorAccent」
  • selected entry text color (Lollipop only) — 「android:textColorPrimary」

###Button:vi

  • background — 「colorButtonNormal」
  • text color — 「android:textColorPrimary」

###ActionBar:

  • background — 「colorPrimary」
  • title color — 「android:textColorPrimary」
  • overflow icon — 「android:textColorPrimary」
  • up button — 「android:textColorPrimary」
  • action icons — 「android:textColorPrimary」 †
  • overflow menu background — 「android:colorBackground」
  • overflow text color — 「android:textColorPrimary」

###Toolbar (Theme Overlay should be used):

  • background — must be set manually in XML. Can do (android:background=」?attr/colorPrimary」)
  • overflow icon — 「android:textColorPrimary」
  • navigation icon — 「android:textColorPrimary」 †
  • action icons — 「android:textColorPrimary」 †
  • overflow menu background — 「android:colorBackground」
  • overflow text color — 「android:textColorPrimary」
相關文章
相關標籤/搜索