SlideShare a Scribd company logo
1 of 151
Download to read offline
- -
<Button

style="@style/Widget.AppCompat.Button.Small"

android:layout_width="wrap_content"

android:layout_height="wrap_content" />
<activity

android:name=".SampleActivity"

android:theme="@style/AppTheme" />
<Button

style="@style/Widget.AppCompat.Button.Small"

android:layout_width="wrap_content"

android:layout_height="wrap_content" />
<EditText

android:textColor="#333333" />
<EditText

style="@style/MyTextView" />
<style name="MyTextView">

<item name="android:textColor">#333333</item>

</style>
<style name="AppTheme" parent="…">

<item name="editTextColor">#333333</item>

</style>
<style name="Theme.AppCompat.NoActionBar">

<item name="windowActionBar">false</item>

<item name="windowNoTitle">true</item>

</style>
<style name=“Theme.AppCompat" parent="Base.Theme.AppCompat"/>
<style name="Theme.AppCompat.DialogWhenLarge"
parent="Base.Theme.AppCompat.DialogWhenLarge">

values/values.xml
<style name="Base.Theme.AppCompat.DialogWhenLarge"
parent="Theme.AppCompat"/>

values-large/values-large.xml
<style name="Base.Theme.AppCompat.DialogWhenLarge"
parent="Base.Theme.AppCompat.Dialog.FixedSize"/>
<style name="Base.Theme.AppCompat.Dialog.FixedSize">

<item name="windowFixedWidthMajor">@dimen/abc_dialog_fixed_width_major</item>

<item name="windowFixedWidthMinor">@dimen/abc_dialog_fixed_width_minor</item>

<item name="windowFixedHeightMajor">@dimen/abc_dialog_fixed_height_major</item>
<item name="windowFixedHeightMinor">@dimen/abc_dialog_fixed_height_minor</item>
</style>
values/values.xml
<item name="abc_dialog_fixed_height_major" type="dimen">80%</item>

<item name="abc_dialog_fixed_height_minor" type="dimen">100%</item>

<item name="abc_dialog_fixed_width_major" type="dimen">320dp</item>

<item name="abc_dialog_fixed_width_minor" type="dimen">320dp</item>

values-large/values-large.xml
<item name="abc_dialog_fixed_height_major" type="dimen">60%</item>

<item name="abc_dialog_fixed_height_minor" type="dimen">90%</item>

<item name="abc_dialog_fixed_width_major" type="dimen">60%</item>

<item name="abc_dialog_fixed_width_minor" type="dimen">90%</item>

values-xlarge/values-xlarge.xml
<item name="abc_dialog_fixed_height_major" type="dimen">60%</item>

<item name="abc_dialog_fixed_height_minor" type="dimen">90%</item>

<item name="abc_dialog_fixed_width_major" type="dimen">50%</item>

<item name="abc_dialog_fixed_width_minor" type="dimen">70%</item>
<style name="Theme.DroidKaigi.DialogWhenLarge"
parent="Theme.AppCompat.DialogWhenLarge">

<item name="windowActionBar">false</item>

<item name="windowNoTitle">true</item>

</style>
<style name="Theme.DroidKaigi.DialogWhenLarge"
parent="Theme.AppCompat.DialogWhenLarge">

<item name="windowActionBar">false</item>

<item name="windowNoTitle">true</item>

</style>
<!-- 黒系 -->

<style name="Theme.DroidKaigi" parent="Theme.AppCompat">

</style>



<style name="Theme.DroidKaigi.NoActionBar">

<item name="windowActionBar">false</item>

<item name="windowNoTitle">true</item>

</style>



<!-- 白系 -->

<style name="Theme.DroidKaigi.Light"
parent="Theme.AppCompat.Light.DarkActionBar">

</style>



<style name="Theme.DroidKaigi.Light.NoActionBar">

<item name="windowActionBar">false</item>

<item name="windowNoTitle">true</item>

</style>
<!-- 黒系 -->

<style name="Theme.DroidKaigi" parent="Theme.AppCompat">

</style>



<style name="Theme.DroidKaigi.NoActionBar">

<item name="windowActionBar">false</item>

<item name="windowNoTitle">true</item>

</style>



<!-- 白系 -->

<style name=“Theme.DroidKaigi.Light"
parent="Theme.AppCompat.Light.DarkActionBar">

</style>



<style name="Theme.DroidKaigi.Light.NoActionBar">

<item name="windowActionBar">false</item>

<item name="windowNoTitle">true</item>

</style>
<!-- textAppearance -->

<style name="TextAppearance.DroidKaigi.Title"
parent="TextAppearance.AppCompat.Title">

<item name="android:textSize">21sp</item>

</style>



<style name="TextAppearance.DroidKaigi.Title.Inverse"
parent="TextAppearance.AppCompat.Title.Inverse">

<item name="android:textSize">21sp</item>

</style>



<style name="TextAppearance.DroidKaigi.Subhead"
parent="TextAppearance.AppCompat.Subhead">

<item name="android:textSize">17sp</item>

</style>



<style name="TextAppearance.DroidKaigi.Subhead.Inverse"
parent="TextAppearance.AppCompat.Subhead.Inverse">

<item name="android:textSize">17sp</item>

</style>
<style name="TextAppearance.DroidKaigi.Body2"
parent="TextAppearance.AppCompat.Body2">

<item name="android:textSize">15sp</item>

</style>



<style name="TextAppearance.DroidKaigi.Body1"
parent="TextAppearance.AppCompat.Body1">

<item name="android:textSize">15sp</item>

</style>



<style name="TextAppearance.DroidKaigi.Caption"
parent="TextAppearance.AppCompat.Caption">

<item name="android:textSize">13sp</item>

</style>



<style name="TextAppearance.DroidKaigi.Button"
parent="TextAppearance.AppCompat.Button">

<item name="android:textSize">15sp</item>

</style>
カスタムビューをつくるときはこれらを継承する
Button
<style name="Base.Widget.AppCompat.Button" parent="android:Widget">

<item name="android:background">@drawable/abc_btn_default_mtrl_shape</item>

<item name="android:textAppearance">?android:attr/textAppearanceButton</item>

<item name="android:minHeight">48dip</item>

<item name="android:minWidth">88dip</item>

<item name="android:focusable">true</item>

<item name="android:clickable">true</item>

<item name="android:gravity">center_vertical|center_horizontal</item>

</style>

<style name="Base.Widget.AppCompat.Button.Borderless">

<item name="android:background">@drawable/abc_btn_borderless_material</item>

</style>

<style name="Base.Widget.AppCompat.Button.Borderless.Colored">

<item name="android:textColor">?attr/colorAccent</item>

</style>

<style name="Base.Widget.AppCompat.Button.Colored">

<item name="android:background">@drawable/abc_btn_colored_material</item>

<item name="android:textAppearance">@style/
TextAppearance.AppCompat.Widget.Button.Inverse</item>

</style>

<style name="Base.Widget.AppCompat.Button.Small">

<item name="android:minHeight">48dip</item>

<item name="android:minWidth">48dip</item>

</style>
<style name="AppTheme.ButtonOverlay">

<item name="colorAccent">#FF4081</item>

</style>
<Button

style="@style/Widget.AppCompat.Button.Colored"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="b"

android:theme="@style/AppTheme.ButtonOverlay" />
CompoundButton
<style name="Base.Widget.AppCompat.CompoundButton.CheckBox"
parent="android:Widget.CompoundButton.CheckBox">

<item name="android:button">?android:attr/listChoiceIndicatorMultiple</item>

<item name="android:background">?attr/controlBackground</item>

</style>

<style name="Base.Widget.AppCompat.CompoundButton.RadioButton"
parent="android:Widget.CompoundButton.RadioButton">

<item name="android:button">?android:attr/listChoiceIndicatorSingle</item>

<item name="android:background">?attr/controlBackground</item>

</style>

<style name="Base.Widget.AppCompat.CompoundButton.Switch"
parent="android:Widget.CompoundButton">

<item name="track">@drawable/abc_switch_track_mtrl_alpha</item>

<item name="android:thumb">@drawable/abc_switch_thumb_material</item>

<item name="switchTextAppearance">@style/
TextAppearance.AppCompat.Widget.Switch</item>

<item name="android:background">?attr/controlBackground</item>

<item name="showText">false</item>

<item name="switchPadding">@dimen/abc_switch_padding</item>

<item name="android:textOn">@string/abc_capital_on</item>

<item name="android:textOff">@string/abc_capital_off</item>

</style>
TintManager の TINT_CHECKABLE_BUTTON_LIST
<style name="AppTheme" parent="Theme.AppCompat">

<item name="colorControlActivated">#FF4081</item>

<item name="colorControlNormal">#3F51B5</item>

</style>
<style name="AppTheme" parent="Theme.AppCompat">

<item name="colorControlActivated">#FF4081</item>

<item name="android:colorForeground">#3F51B5</item>

<item name="colorSwitchThumbNormal">@color/switch_thumb</item>

</style>
<?xml version="1.0" encoding="utf-8"?>

<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="#66303F9F" android:state_enabled="false" />

<item android:color="#FFFFFF" />

</selector>
EditText
<style name="Base.V7.Widget.AppCompat.EditText" parent="android:Widget.EditText">

<item name="android:background">?attr/editTextBackground</item>

<item name="android:textColor">?attr/editTextColor</item>

<item name="android:textAppearance">?android:attr/
textAppearanceMediumInverse</item>

</style>
<style name="AppTheme" parent="Theme.AppCompat">

<item name="colorControlActivated">#FF4081</item>

<item name="colorControlNormal">#3F51B5</item>

</style>
<style name="Theme.DroidKaigi" parent="Theme.AppCompat">

<item name="editTextStyle">@style/Widget.DroidKaigi.EditText</item>

<!-- ↑だけで十分だが、プレビューに適用させるにはこれも必要 -->

<item name="android:editTextStyle">@style/Widget.DroidKaigi.EditText</item>

</style>

<style name="Widget.DroidKaigi.EditText" parent="Widget.AppCompat.EditText">

<item name="android:textAppearance">@style/
TextAppearance.DroidKaigi.Widget.EditText</item>

</style>
<style name="TextAppearance.DroidKaigi.Widget.EditText"
parent="TextAppearance.AppCompat.Medium.Inverse">

<item name="android:textSize">17sp</item>

</style>
<style name="Platform.AppCompat" parent="android:Theme">

…
<item name="android:textColorHint">@color/
hint_foreground_material_dark</item>

<item name="android:textColorHintInverse">@color/
hint_foreground_material_light</item>
…
</style>
<color name="hint_foreground_material_dark">@color/
bright_foreground_disabled_material_dark</color>

<color name="hint_foreground_material_light">@color/
bright_foreground_disabled_material_light</color>

<color name="bright_foreground_disabled_material_dark">#80ffffff</color>
<color name="bright_foreground_disabled_material_light">#80000000</color
<style name="Theme.DroidKaigi.Light" parent="...">

<item name="android:textColorHint">#61000000</item>

</style>
Spinner
<style name="Base.Widget.AppCompat.Spinner"
parent="Platform.Widget.AppCompat.Spinner">

<item name="android:background">@drawable/abc_spinner_mtrl_am_alpha</item>

<item name="android:popupBackground">@drawable/abc_popup_background_mtrl_mult</
item>

<item name="android:dropDownSelector">?attr/listChoiceBackgroundIndicator</item>

<item name="android:dropDownVerticalOffset">0dip</item>

<item name="android:dropDownHorizontalOffset">0dip</item>

<item name="android:dropDownWidth">wrap_content</item>

<item name="android:clickable">true</item>

<item name="android:gravity">left|start|center_vertical</item>

<item name="overlapAnchor">true</item>

</style>

<style name="Base.Widget.AppCompat.Spinner.Underlined">

<item name="android:background">@drawable/
abc_spinner_textfield_background_material</item>

</style>
<style name="Base.Widget.AppCompat.TextView.SpinnerItem"
parent="android:Widget.TextView.SpinnerItem">

<item name="android:textAppearance">@style/
TextAppearance.AppCompat.Widget.TextView.SpinnerItem</item>

<item name="android:paddingLeft">8dp</item>

<item name="android:paddingRight">8dp</item>

</style>
<resources>

<string-array name="android">

<item>Donuts</item>

<item>Eclair</item>

<item>Froyo</item>

</string-array>

</resources>
<Spinner

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:entries="@array/android" />
public AbsSpinner(Context context, AttributeSet attrs, int defStyleAttr, int defSt
super(context, attrs, defStyleAttr, defStyleRes);

initAbsSpinner();



final TypedArray a = context.obtainStyledAttributes(

attrs, R.styleable.AbsSpinner, defStyleAttr, defStyleRes);



final CharSequence[] entries = a.getTextArray(R.styleable.AbsSpinner_entries);
if (entries != null) {

final ArrayAdapter<CharSequence> adapter = new ArrayAdapter<CharSequence>(
context, R.layout.simple_spinner_item, entries);

adapter.setDropDownViewResource(R.layout.simple_spinner_dropdown_item);

setAdapter(adapter);

}



a.recycle();

}
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"

style="?android:attr/spinnerItemStyle"

android:singleLine="true"

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:ellipsize="marquee"

android:textAlignment="inherit"/>
<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/an
android:id="@android:id/text1"

style="?android:attr/spinnerDropDownItemStyle"

android:singleLine="true"

android:layout_width="match_parent"

android:layout_height="?android:attr/dropdownListPreferredItemHei
android:ellipsize="marquee"/>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"

style="?android:attr/spinnerItemStyle"

android:singleLine="true"

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:ellipsize="marquee"

android:textAlignment="inherit"/>
<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/an
android:id="@android:id/text1"

style="?android:attr/spinnerDropDownItemStyle"

android:singleLine="true"

android:layout_width="match_parent"

android:layout_height="?android:attr/dropdownListPreferredItemHei
android:ellipsize="marquee"/>
Widget.AppCompat.TextView.SpinnerItem
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"

style="?android:attr/spinnerItemStyle"

android:singleLine="true"

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:ellipsize="marquee"

android:textAlignment="inherit"/>
<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/an
android:id="@android:id/text1"

style="?android:attr/spinnerDropDownItemStyle"

android:singleLine="true"

android:layout_width="match_parent"

android:layout_height="?android:attr/dropdownListPreferredItemHei
android:ellipsize="marquee"/>
Widget.AppCompat.TextView.SpinnerItem
Widget.AppCompat.ListView.DropDown
<style name="Theme.DroidKaigi" parent="Theme.AppCompat">

<item name="android:spinnerItemStyle">@style/
Widget.DroidKaigi.TextView.SpinnerItem</item>

</style>

<style name="Widget.DroidKaigi.TextView.SpinnerItem"
parent="Widget.AppCompat.TextView.SpinnerItem">

<item name="android:minHeight">?attr/
listPreferredItemHeightSmall</item>

<item name="android:gravity">center_vertical</item>

</style>
SeekBar
<style name="Base.Widget.AppCompat.SeekBar" parent="android:Widget">

<item name="android:indeterminateOnly">false</item>

<item name="android:progressDrawable">@drawable/
abc_seekbar_track_material</item>

<item name="android:indeterminateDrawable">@drawable/
abc_seekbar_track_material</item>

<item name="android:thumb">@drawable/abc_seekbar_thumb_material</item>

<item name="android:focusable">true</item>

<item name="android:paddingLeft">16dip</item>

<item name="android:paddingRight">16dip</item>

</style>
<style name="AppTheme" parent="Theme.AppCompat">

<item name="colorControlActivated">#FF4081</item>

<item name="colorControlNormal">#3F51B5</item>

</style>
ProgressBar
ActionBar
<style name="Platform.ThemeOverlay.AppCompat" parent=""/>

<style name="Platform.ThemeOverlay.AppCompat.Dark">

<!-- Action Bar styles -->

<item name="actionBarItemBackground">@drawable/abc_item_background_holo_dark</item>

<item name="actionDropDownStyle">@style/Widget.AppCompat.Spinner.DropDown.ActionBar</ite
<item name="selectableItemBackground">@drawable/abc_item_background_holo_dark</item>



<!-- SearchView styles -->

<item name="android:autoCompleteTextViewStyle">@style/Widget.AppCompat.AutoCompleteTextV
<item name="android:dropDownItemStyle">@style/Widget.AppCompat.DropDownItem.Spinner</ite
</style>

<style name="Platform.ThemeOverlay.AppCompat.Light">

<item name="actionBarItemBackground">@drawable/abc_item_background_holo_light</item>

<item name="actionDropDownStyle">@style/Widget.AppCompat.Light.Spinner.DropDown.ActionBa
<item name="selectableItemBackground">@drawable/abc_item_background_holo_light</item>



<!-- SearchView attributes -->

<item name="android:autoCompleteTextViewStyle">@style/Widget.AppCompat.Light.AutoComplet
<item name="android:dropDownItemStyle">@style/Widget.AppCompat.DropDownItem.Spinner</ite
</style>
ベーステーマなし
ActionBar系のスタイルだけ指定
<style name="Base.ThemeOverlay.AppCompat" parent="Platform.ThemeOverlay.AppCompat"/>

<style name="Base.ThemeOverlay.AppCompat.ActionBar">

<item name="colorControlNormal">?android:attr/textColorPrimary</item>

<item name="searchViewStyle">@style/Widget.AppCompat.SearchView.ActionBar</item>

</style>
<style name="Base.ThemeOverlay.AppCompat" parent="Platform.ThemeOverlay.AppCompat"/>

<style name="Base.ThemeOverlay.AppCompat.ActionBar">

<item name="colorControlNormal">?android:attr/textColorPrimary</item>

<item name="searchViewStyle">@style/Widget.AppCompat.SearchView.ActionBar</item>

</style>
ActionBar の ←, オーバーフローアイコンの色
<style name="Base.ThemeOverlay.AppCompat.Dark" parent="Platform.ThemeOverlay.AppCompat.Dark"
<item name="android:windowBackground">@color/background_material_dark</item>

<item name="android:colorForeground">@color/foreground_material_dark</item>

<item name="android:colorForegroundInverse">@color/foreground_material_light</item>

<item name="android:colorBackground">@color/background_material_dark</item>

<item name="android:colorBackgroundCacheHint">@color/abc_background_cache_hint_selector_


<item name="android:textColorPrimary">@color/abc_primary_text_material_dark</item>

<item name="android:textColorPrimaryInverse">@color/abc_primary_text_material_light</ite
<item name="android:textColorPrimaryDisableOnly">@color/abc_primary_text_disable_only_ma
<item name="android:textColorSecondary">@color/abc_secondary_text_material_dark</item>

<item name="android:textColorSecondaryInverse">@color/abc_secondary_text_material_light<
<item name="android:textColorTertiary">@color/abc_secondary_text_material_dark</item>

<item name="android:textColorTertiaryInverse">@color/abc_secondary_text_material_light</
<item name="android:textColorHint">@color/hint_foreground_material_dark</item>

<item name="android:textColorHintInverse">@color/hint_foreground_material_light</item>

<item name="android:textColorHighlight">@color/highlighted_text_material_dark</item>



<item name="colorControlNormal">?android:attr/textColorSecondary</item>

<item name="colorControlHighlight">@color/ripple_material_dark</item>

<item name="colorButtonNormal">@color/button_material_dark</item>

<item name="colorSwitchThumbNormal">@color/switch_thumb_material_dark</item>



<!-- Used by MediaRouter -->

<item name="isLightTheme">false</item>

</style>
<style name="Base.ThemeOverlay.AppCompat.Dark.ActionBar">

<item name="colorControlNormal">?android:attr/textColorPrimary</item>

<item name="searchViewStyle">@style/Widget.AppCompat.SearchView.ActionBar</item>

</style>
<style name="Base.ThemeOverlay.AppCompat.Dark" parent="Platform.ThemeOverlay.AppCompat.Dark"
<item name="android:windowBackground">@color/background_material_dark</item>

<item name="android:colorForeground">@color/foreground_material_dark</item>

<item name="android:colorForegroundInverse">@color/foreground_material_light</item>

<item name="android:colorBackground">@color/background_material_dark</item>

<item name="android:colorBackgroundCacheHint">@color/abc_background_cache_hint_selector_


<item name="android:textColorPrimary">@color/abc_primary_text_material_dark</item>

<item name="android:textColorPrimaryInverse">@color/abc_primary_text_material_light</ite
<item name="android:textColorPrimaryDisableOnly">@color/abc_primary_text_disable_only_ma
<item name="android:textColorSecondary">@color/abc_secondary_text_material_dark</item>

<item name="android:textColorSecondaryInverse">@color/abc_secondary_text_material_light<
<item name="android:textColorTertiary">@color/abc_secondary_text_material_dark</item>

<item name="android:textColorTertiaryInverse">@color/abc_secondary_text_material_light</
<item name="android:textColorHint">@color/hint_foreground_material_dark</item>

<item name="android:textColorHintInverse">@color/hint_foreground_material_light</item>

<item name="android:textColorHighlight">@color/highlighted_text_material_dark</item>



<item name="colorControlNormal">?android:attr/textColorSecondary</item>

<item name="colorControlHighlight">@color/ripple_material_dark</item>

<item name="colorButtonNormal">@color/button_material_dark</item>

<item name="colorSwitchThumbNormal">@color/switch_thumb_material_dark</item>



<!-- Used by MediaRouter -->

<item name="isLightTheme">false</item>

</style>
<style name="Base.ThemeOverlay.AppCompat.Dark.ActionBar">

<item name="colorControlNormal">?android:attr/textColorPrimary</item>

<item name="searchViewStyle">@style/Widget.AppCompat.SearchView.ActionBar</item>

</style>
背景と色を指定
<style name="Base.ThemeOverlay.AppCompat.Light" parent="Platform.ThemeOverlay.AppCompat.Ligh
<item name="android:windowBackground">@color/background_material_light</item>

<item name="android:colorForeground">@color/foreground_material_light</item>

<item name="android:colorForegroundInverse">@color/foreground_material_dark</item>

<item name="android:colorBackground">@color/background_material_light</item>

<item name="android:colorBackgroundCacheHint">@color/abc_background_cache_hint_selector_


<item name="android:textColorPrimary">@color/abc_primary_text_material_light</item>

<item name="android:textColorPrimaryInverse">@color/abc_primary_text_material_dark</item
<item name="android:textColorSecondary">@color/abc_secondary_text_material_light</item>

<item name="android:textColorSecondaryInverse">@color/abc_secondary_text_material_dark</
<item name="android:textColorTertiary">@color/abc_secondary_text_material_light</item>

<item name="android:textColorTertiaryInverse">@color/abc_secondary_text_material_dark</i
<item name="android:textColorPrimaryDisableOnly">@color/abc_primary_text_disable_only_ma
<item name="android:textColorPrimaryInverseDisableOnly">@color/abc_primary_text_disable_
<item name="android:textColorHint">@color/hint_foreground_material_light</item>

<item name="android:textColorHintInverse">@color/hint_foreground_material_dark</item>

<item name="android:textColorHighlight">@color/highlighted_text_material_light</item>



<item name="colorControlNormal">?android:attr/textColorSecondary</item>

<item name="colorControlHighlight">@color/ripple_material_light</item>

<item name="colorButtonNormal">@color/button_material_light</item>

<item name="colorSwitchThumbNormal">@color/switch_thumb_material_light</item>



<!-- Used by MediaRouter -->

<item name="isLightTheme">true</item>

</style>
<style name="Base.ThemeOverlay.AppCompat.Light" parent="Platform.ThemeOverlay.AppCompat.Ligh
<item name="android:windowBackground">@color/background_material_light</item>

<item name="android:colorForeground">@color/foreground_material_light</item>

<item name="android:colorForegroundInverse">@color/foreground_material_dark</item>

<item name="android:colorBackground">@color/background_material_light</item>

<item name="android:colorBackgroundCacheHint">@color/abc_background_cache_hint_selector_


<item name="android:textColorPrimary">@color/abc_primary_text_material_light</item>

<item name="android:textColorPrimaryInverse">@color/abc_primary_text_material_dark</item
<item name="android:textColorSecondary">@color/abc_secondary_text_material_light</item>

<item name="android:textColorSecondaryInverse">@color/abc_secondary_text_material_dark</
<item name="android:textColorTertiary">@color/abc_secondary_text_material_light</item>

<item name="android:textColorTertiaryInverse">@color/abc_secondary_text_material_dark</i
<item name="android:textColorPrimaryDisableOnly">@color/abc_primary_text_disable_only_ma
<item name="android:textColorPrimaryInverseDisableOnly">@color/abc_primary_text_disable_
<item name="android:textColorHint">@color/hint_foreground_material_light</item>

<item name="android:textColorHintInverse">@color/hint_foreground_material_dark</item>

<item name="android:textColorHighlight">@color/highlighted_text_material_light</item>



<item name="colorControlNormal">?android:attr/textColorSecondary</item>

<item name="colorControlHighlight">@color/ripple_material_light</item>

<item name="colorButtonNormal">@color/button_material_light</item>

<item name="colorSwitchThumbNormal">@color/switch_thumb_material_light</item>



<!-- Used by MediaRouter -->

<item name="isLightTheme">true</item>

</style>
背景と色を指定
<style name="Theme.DroidKaigi.Light"
parent="Theme.AppCompat.Light.DarkActionBar">

<item name=“actionBarTheme”>@style/
ThemeOverlay.DroidKaigi.Dark.ActionBar</item>

</style>



<style name="ThemeOverlay.DroidKaigi.Dark.ActionBar"
parent="ThemeOverlay.AppCompat.Dark.ActionBar">

<item name="colorControlNormal">#FF4081</item>

</style>
<android.support.design.widget.AppBarLayout

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:theme="@style/ThemeOverlay.DroidKaigi.Dark.ActionBar">



<android.support.v7.widget.Toolbar

android:id="@+id/toolbar"

android:layout_width="match_parent"

android:layout_height="wrap_content"

app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />



</android.support.design.widget.AppBarLayout>
<item name="android:windowTranslucentStatus">true</item>
<style name="Theme.DroidKaigi.TranslucentStatusBar"
parent="Theme.DroidKaigi.Light.NoActionBar" />
<style name="Theme.DroidKaigi.TranslucentStatusBar" parent="...">

<item name="android:windowTranslucentStatus">true</item>

</style>
<style name="Theme.DroidKaigi.TranslucentStatusBar"
parent="Theme.DroidKaigi.Light.NoActionBar" />
<style name="Theme.DroidKaigi.TranslucentStatusBar" parent="...">

<item name="android:windowTranslucentStatus">true</item>

</style>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/andr
android:layout_width="match_parent"

android:layout_height="match_parent"

android:fitsSystemWindows="true"

android:orientation="vertical">



<Button

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="New Button" />



</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/andr
android:layout_width="match_parent"

android:layout_height="match_parent"

android:fitsSystemWindows="true"

android:orientation="vertical">



<Button

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="New Button" />



</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/andr
xmlns:tools="http://schemas.android.com/tools"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:fitsSystemWindows="true">



<ImageView

android:layout_width="match_parent"

android:layout_height="match_parent"

android:scaleType="centerCrop"

android:src="@drawable/cover"

tools:ignore="ContentDescription" />



<Button

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="New Button" />



</FrameLayout>
<?xml version="1.0" encoding="utf-8"?>

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/andr
xmlns:tools="http://schemas.android.com/tools"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:fitsSystemWindows="true">



<ImageView

android:layout_width="match_parent"

android:layout_height="match_parent"

android:scaleType="centerCrop"

android:src="@drawable/cover"

tools:ignore="ContentDescription" />



<Button

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="New Button" />



</FrameLayout>
<?xml version="1.0" encoding="utf-8"?>

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/andr
xmlns:tools="http://schemas.android.com/tools"

android:layout_width="match_parent"

android:layout_height="match_parent">



<ImageView

android:layout_width="match_parent"

android:layout_height="match_parent"

android:scaleType="centerCrop"

android:src="@drawable/cover"

tools:ignore="ContentDescription" />



<Button

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:fitsSystemWindows="true"

android:text="New Button" />



</FrameLayout>
<?xml version="1.0" encoding="utf-8"?>

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/andr
xmlns:tools="http://schemas.android.com/tools"

android:layout_width="match_parent"

android:layout_height="match_parent">



<ImageView

android:layout_width="match_parent"

android:layout_height="match_parent"

android:scaleType="centerCrop"

android:src="@drawable/cover"

tools:ignore="ContentDescription" />



<Button

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:fitsSystemWindows="true"

android:text="New Button" />



</FrameLayout>
<?xml version="1.0" encoding="utf-8"?>

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/andr
xmlns:tools="http://schemas.android.com/tools"

android:layout_width="match_parent"

android:layout_height="match_parent">



<ImageView

... />



<FrameLayout

android:layout_width="match_parent"

android:layout_height="match_parent"

android:fitsSystemWindows="true">



<Button

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="New Button" />



</FrameLayout>



</FrameLayout>
<?xml version="1.0" encoding="utf-8"?>

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/andr
xmlns:tools="http://schemas.android.com/tools"

android:layout_width="match_parent"

android:layout_height="match_parent">



<ImageView

... />



<FrameLayout

android:layout_width="match_parent"

android:layout_height="match_parent"

android:fitsSystemWindows="true">



<Button

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="New Button" />



</FrameLayout>



</FrameLayout>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<style name="Theme.DroidKaigi.TranslucentStatusBar" parent="...">

<item name="android:statusBarColor">@android:color/transparent</ite
<item name="android:windowDrawsSystemBarBackgrounds">false</item>

</style>
<item name="android:statusBarColor">@android:color/transparent</item>
<style name=“Theme.Material">
...

<item name="windowDrawsSystemBarBackgrounds">true</item>

...

</style>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<style name="Theme.DroidKaigi.TranslucentStatusBar" parent="...">

<item name="android:statusBarColor">@android:color/transparent</it
<item name="android:windowTranslucentStatus">true</item>

</style>
<style name="Theme.DroidKaigi.TranslucentStatusBar" parent="...">

<item name="android:statusBarColor">@android:color/transparent</it
</style>
@Override

protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);



findViewById(android.R.id.content).setSystemUiVisibility(

View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
View.SYSTEM_UI_FLAG_LAYOUT_STABLE);

}
<item name="android:windowLightStatusBar">true</item>
<style name="Theme.DroidKaigi.TranslucentStatusBar" parent="...">

<item name="android:statusBarColor">@android:color/transparent</it
<item name="android:windowLightStatusBar">true</item>

</style>
<style name="Theme.DroidKaigi.TranslucentStatusBar" parent="...">

<item name="android:statusBarColor">@android:color/transparent</item>

<item name="android:windowLightStatusBar">true</item>

</style>
<style name=“Theme.DroidKaigi.TranslucentStatusBar"
parent="Theme.DroidKaigi.Light.NoActionBar" />
<style name="Theme.DroidKaigi.TranslucentStatusBar" parent="...">

<item name="android:windowTranslucentStatus">true</item>

</style>
<style name="Theme.DroidKaigi.TranslucentStatusBar" parent="...">

<item name="android:statusBarColor">@android:color/transparent</item>

</style>
@Override

protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);



findViewById(android.R.id.content).setSystemUiVisibility(

View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
View.SYSTEM_UI_FLAG_LAYOUT_STABLE);

}
Customizing Theme and Style for Material Design : Droid Kaigi 2016

More Related Content

What's hot

Surviving the Java Deserialization Apocalypse // OWASP AppSecEU 2016
Surviving the Java Deserialization Apocalypse // OWASP AppSecEU 2016Surviving the Java Deserialization Apocalypse // OWASP AppSecEU 2016
Surviving the Java Deserialization Apocalypse // OWASP AppSecEU 2016
Christian Schneider
 
Build Your Own CMS with Apache Sling
Build Your Own CMS with Apache SlingBuild Your Own CMS with Apache Sling
Build Your Own CMS with Apache Sling
Bob Paulin
 
jpa-hibernate-presentation
jpa-hibernate-presentationjpa-hibernate-presentation
jpa-hibernate-presentation
John Slick
 
An Introduction to NLP4L - Natural Language Processing Tool for Apache Lucene...
An Introduction to NLP4L - Natural Language Processing Tool for Apache Lucene...An Introduction to NLP4L - Natural Language Processing Tool for Apache Lucene...
An Introduction to NLP4L - Natural Language Processing Tool for Apache Lucene...
Lucidworks
 

What's hot (20)

Thick Client Testing Advanced
Thick Client Testing AdvancedThick Client Testing Advanced
Thick Client Testing Advanced
 
Surviving the Java Deserialization Apocalypse // OWASP AppSecEU 2016
Surviving the Java Deserialization Apocalypse // OWASP AppSecEU 2016Surviving the Java Deserialization Apocalypse // OWASP AppSecEU 2016
Surviving the Java Deserialization Apocalypse // OWASP AppSecEU 2016
 
C sharp
C sharpC sharp
C sharp
 
AEM hacker - approaching Adobe Experience Manager webapps in bug bounty programs
AEM hacker - approaching Adobe Experience Manager webapps in bug bounty programsAEM hacker - approaching Adobe Experience Manager webapps in bug bounty programs
AEM hacker - approaching Adobe Experience Manager webapps in bug bounty programs
 
Build Your Own CMS with Apache Sling
Build Your Own CMS with Apache SlingBuild Your Own CMS with Apache Sling
Build Your Own CMS with Apache Sling
 
Typescript in React: HOW & WHY?
Typescript in React: HOW & WHY?Typescript in React: HOW & WHY?
Typescript in React: HOW & WHY?
 
Catch Me If You Can: PowerShell Red vs Blue
Catch Me If You Can: PowerShell Red vs BlueCatch Me If You Can: PowerShell Red vs Blue
Catch Me If You Can: PowerShell Red vs Blue
 
OWASP AppSecCali 2015 - Marshalling Pickles
OWASP AppSecCali 2015 - Marshalling PicklesOWASP AppSecCali 2015 - Marshalling Pickles
OWASP AppSecCali 2015 - Marshalling Pickles
 
Defending against Java Deserialization Vulnerabilities
 Defending against Java Deserialization Vulnerabilities Defending against Java Deserialization Vulnerabilities
Defending against Java Deserialization Vulnerabilities
 
jpa-hibernate-presentation
jpa-hibernate-presentationjpa-hibernate-presentation
jpa-hibernate-presentation
 
Deep dive into Coroutines on JVM @ KotlinConf 2017
Deep dive into Coroutines on JVM @ KotlinConf 2017Deep dive into Coroutines on JVM @ KotlinConf 2017
Deep dive into Coroutines on JVM @ KotlinConf 2017
 
OWASP SD: Deserialize My Shorts: Or How I Learned To Start Worrying and Hate ...
OWASP SD: Deserialize My Shorts: Or How I Learned To Start Worrying and Hate ...OWASP SD: Deserialize My Shorts: Or How I Learned To Start Worrying and Hate ...
OWASP SD: Deserialize My Shorts: Or How I Learned To Start Worrying and Hate ...
 
Hunting for security bugs in AEM webapps
Hunting for security bugs in AEM webappsHunting for security bugs in AEM webapps
Hunting for security bugs in AEM webapps
 
Deep Exploit@Black Hat Europe 2018 Arsenal
Deep Exploit@Black Hat Europe 2018 ArsenalDeep Exploit@Black Hat Europe 2018 Arsenal
Deep Exploit@Black Hat Europe 2018 Arsenal
 
Encapsulation C++
Encapsulation C++Encapsulation C++
Encapsulation C++
 
XXE: How to become a Jedi
XXE: How to become a JediXXE: How to become a Jedi
XXE: How to become a Jedi
 
An Introduction to NLP4L - Natural Language Processing Tool for Apache Lucene...
An Introduction to NLP4L - Natural Language Processing Tool for Apache Lucene...An Introduction to NLP4L - Natural Language Processing Tool for Apache Lucene...
An Introduction to NLP4L - Natural Language Processing Tool for Apache Lucene...
 
Automate MariaDB Galera clusters deployments with Ansible
Automate MariaDB Galera clusters deployments with AnsibleAutomate MariaDB Galera clusters deployments with Ansible
Automate MariaDB Galera clusters deployments with Ansible
 
Exploiting Deserialization Vulnerabilities in Java
Exploiting Deserialization Vulnerabilities in JavaExploiting Deserialization Vulnerabilities in Java
Exploiting Deserialization Vulnerabilities in Java
 
Asp.Net Identity
Asp.Net IdentityAsp.Net Identity
Asp.Net Identity
 

More from Yuki Anzai

Master of RecyclerView
Master of RecyclerViewMaster of RecyclerView
Master of RecyclerView
Yuki Anzai
 
Activity, Fragment, CustomView の使い分け - マッチョなActivityにさよならする方法 -
Activity, Fragment, CustomView の使い分け - マッチョなActivityにさよならする方法 -Activity, Fragment, CustomView の使い分け - マッチョなActivityにさよならする方法 -
Activity, Fragment, CustomView の使い分け - マッチョなActivityにさよならする方法 -
Yuki Anzai
 
Sublime Text 2 で始める ReVIEW
Sublime Text 2 で始める ReVIEWSublime Text 2 で始める ReVIEW
Sublime Text 2 で始める ReVIEW
Yuki Anzai
 
ABC2013 Autumn あんざいゆき x 小太刀御禄 対談
ABC2013 Autumn あんざいゆき x 小太刀御禄 対談ABC2013 Autumn あんざいゆき x 小太刀御禄 対談
ABC2013 Autumn あんざいゆき x 小太刀御禄 対談
Yuki Anzai
 
「Android アプリのガチ開 発者が Mobile Backend Starter を使ってみた」
「Android アプリのガチ開 発者が Mobile Backend Starter を使ってみた」「Android アプリのガチ開 発者が Mobile Backend Starter を使ってみた」
「Android アプリのガチ開 発者が Mobile Backend Starter を使ってみた」
Yuki Anzai
 
アプリのUIを改善するための7ステップ ∼Bump Recorder の UI を設計してみたよ編∼
アプリのUIを改善するための7ステップ ∼Bump Recorder の UI を設計してみたよ編∼ アプリのUIを改善するための7ステップ ∼Bump Recorder の UI を設計してみたよ編∼
アプリのUIを改善するための7ステップ ∼Bump Recorder の UI を設計してみたよ編∼
Yuki Anzai
 
Fragment を使ってみよう
Fragment を使ってみようFragment を使ってみよう
Fragment を使ってみよう
Yuki Anzai
 
Android Layout 3分クッキング
Android Layout 3分クッキングAndroid Layout 3分クッキング
Android Layout 3分クッキング
Yuki Anzai
 

More from Yuki Anzai (20)

droidgirls Recyclerview
droidgirls Recyclerviewdroidgirls Recyclerview
droidgirls Recyclerview
 
Androidオールスターズ2016 yanzm
Androidオールスターズ2016 yanzmAndroidオールスターズ2016 yanzm
Androidオールスターズ2016 yanzm
 
Whats's new in Android Studio at Google I/O extended in Fukuoka
Whats's new in Android Studio at Google I/O extended in FukuokaWhats's new in Android Studio at Google I/O extended in Fukuoka
Whats's new in Android Studio at Google I/O extended in Fukuoka
 
What's new in Android N at Google I/O extended in Fukuoka
What's new in Android N at Google I/O extended in FukuokaWhat's new in Android N at Google I/O extended in Fukuoka
What's new in Android N at Google I/O extended in Fukuoka
 
How to read "marble diagram"
How to read "marble diagram"How to read "marble diagram"
How to read "marble diagram"
 
Master of RecyclerView
Master of RecyclerViewMaster of RecyclerView
Master of RecyclerView
 
Activity, Fragment, CustomView の使い分け - マッチョなActivityにさよならする方法 -
Activity, Fragment, CustomView の使い分け - マッチョなActivityにさよならする方法 -Activity, Fragment, CustomView の使い分け - マッチョなActivityにさよならする方法 -
Activity, Fragment, CustomView の使い分け - マッチョなActivityにさよならする方法 -
 
Watch face アプリを公開してみた
Watch face アプリを公開してみたWatch face アプリを公開してみた
Watch face アプリを公開してみた
 
"あんざいゆき" x "秋葉ちひろ" はカンファレンスアプリをどう作るのか?
"あんざいゆき" x "秋葉ちひろ" はカンファレンスアプリをどう作るのか?"あんざいゆき" x "秋葉ちひろ" はカンファレンスアプリをどう作るのか?
"あんざいゆき" x "秋葉ちひろ" はカンファレンスアプリをどう作るのか?
 
Android Pattern Cookbook で見るトレンドの変遷
Android Pattern Cookbook で見るトレンドの変遷Android Pattern Cookbook で見るトレンドの変遷
Android Pattern Cookbook で見るトレンドの変遷
 
Sublime Text 2 で始める ReVIEW
Sublime Text 2 で始める ReVIEWSublime Text 2 で始める ReVIEW
Sublime Text 2 で始める ReVIEW
 
ABC2013 Autumn あんざいゆき x 小太刀御禄 対談
ABC2013 Autumn あんざいゆき x 小太刀御禄 対談ABC2013 Autumn あんざいゆき x 小太刀御禄 対談
ABC2013 Autumn あんざいゆき x 小太刀御禄 対談
 
「Android アプリのガチ開 発者が Mobile Backend Starter を使ってみた」
「Android アプリのガチ開 発者が Mobile Backend Starter を使ってみた」「Android アプリのガチ開 発者が Mobile Backend Starter を使ってみた」
「Android アプリのガチ開 発者が Mobile Backend Starter を使ってみた」
 
マルチスクリーン対応と最近のアプリの傾向
マルチスクリーン対応と最近のアプリの傾向マルチスクリーン対応と最近のアプリの傾向
マルチスクリーン対応と最近のアプリの傾向
 
アプリのUIを改善するための7ステップ ∼Bump Recorder の UI を設計してみたよ編∼
アプリのUIを改善するための7ステップ ∼Bump Recorder の UI を設計してみたよ編∼ アプリのUIを改善するための7ステップ ∼Bump Recorder の UI を設計してみたよ編∼
アプリのUIを改善するための7ステップ ∼Bump Recorder の UI を設計してみたよ編∼
 
Fragment を使ってみよう
Fragment を使ってみようFragment を使ってみよう
Fragment を使ってみよう
 
Android Layout Cookbook Seminor
Android Layout Cookbook SeminorAndroid Layout Cookbook Seminor
Android Layout Cookbook Seminor
 
ボクの開発スタイル
ボクの開発スタイルボクの開発スタイル
ボクの開発スタイル
 
Android Layout 3分クッキング
Android Layout 3分クッキングAndroid Layout 3分クッキング
Android Layout 3分クッキング
 
application Next Generation presented by android女子部
application Next Generation presented by android女子部application Next Generation presented by android女子部
application Next Generation presented by android女子部
 

Customizing Theme and Style for Material Design : Droid Kaigi 2016