SlideShare ist ein Scribd-Unternehmen logo
1 von 151
Downloaden Sie, um offline zu lesen
- -
<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

Weitere ähnliche Inhalte

Was ist angesagt?

Angular - Chapter 7 - HTTP Services
Angular - Chapter 7 - HTTP ServicesAngular - Chapter 7 - HTTP Services
Angular - Chapter 7 - HTTP ServicesWebStackAcademy
 
AEM Rich Text Editor (RTE) Deep Dive
AEM Rich Text Editor (RTE) Deep DiveAEM Rich Text Editor (RTE) Deep Dive
AEM Rich Text Editor (RTE) Deep DiveHanish Bansal
 
Angular 2.0 Dependency injection
Angular 2.0 Dependency injectionAngular 2.0 Dependency injection
Angular 2.0 Dependency injectionEyal Vardi
 
Angular Best Practices - Perfomatix
Angular Best Practices - PerfomatixAngular Best Practices - Perfomatix
Angular Best Practices - PerfomatixPerfomatix Solutions
 
Jpa 잘 (하는 척) 하기
Jpa 잘 (하는 척) 하기Jpa 잘 (하는 척) 하기
Jpa 잘 (하는 척) 하기경원 이
 
AWS Lambda를 통한 Tensorflow 및 Keras 기반 추론 모델 서비스하기 :: 이준범 :: AWS Summit Seoul 2018
AWS Lambda를 통한 Tensorflow 및 Keras 기반 추론 모델 서비스하기 :: 이준범 :: AWS Summit Seoul 2018AWS Lambda를 통한 Tensorflow 및 Keras 기반 추론 모델 서비스하기 :: 이준범 :: AWS Summit Seoul 2018
AWS Lambda를 통한 Tensorflow 및 Keras 기반 추론 모델 서비스하기 :: 이준범 :: AWS Summit Seoul 2018Amazon Web Services Korea
 
JavaScript & Dom Manipulation
JavaScript & Dom ManipulationJavaScript & Dom Manipulation
JavaScript & Dom ManipulationMohammed Arif
 
Angular Dependency Injection
Angular Dependency InjectionAngular Dependency Injection
Angular Dependency InjectionNir Kaufman
 
DVGA writeup
DVGA writeupDVGA writeup
DVGA writeupYu Iwama
 
Javascript 入門 - 前端工程開發實務訓練
Javascript 入門 - 前端工程開發實務訓練Javascript 入門 - 前端工程開發實務訓練
Javascript 入門 - 前端工程開發實務訓練Joseph Chiang
 
React hooks Episode #1: An introduction.
React hooks Episode #1: An introduction.React hooks Episode #1: An introduction.
React hooks Episode #1: An introduction.ManojSatishKumar
 
Basics of React Hooks.pptx.pdf
Basics of React Hooks.pptx.pdfBasics of React Hooks.pptx.pdf
Basics of React Hooks.pptx.pdfKnoldus Inc.
 
Routing & Navigating Pages in Angular 2
Routing & Navigating Pages in Angular 2Routing & Navigating Pages in Angular 2
Routing & Navigating Pages in Angular 2Knoldus Inc.
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJSDavid Parsons
 

Was ist angesagt? (20)

Angular 9
Angular 9 Angular 9
Angular 9
 
Reactjs
ReactjsReactjs
Reactjs
 
Angular - Chapter 7 - HTTP Services
Angular - Chapter 7 - HTTP ServicesAngular - Chapter 7 - HTTP Services
Angular - Chapter 7 - HTTP Services
 
AEM Rich Text Editor (RTE) Deep Dive
AEM Rich Text Editor (RTE) Deep DiveAEM Rich Text Editor (RTE) Deep Dive
AEM Rich Text Editor (RTE) Deep Dive
 
Angular 2.0 Dependency injection
Angular 2.0 Dependency injectionAngular 2.0 Dependency injection
Angular 2.0 Dependency injection
 
React js
React jsReact js
React js
 
React workshop
React workshopReact workshop
React workshop
 
Angular Best Practices - Perfomatix
Angular Best Practices - PerfomatixAngular Best Practices - Perfomatix
Angular Best Practices - Perfomatix
 
Jpa 잘 (하는 척) 하기
Jpa 잘 (하는 척) 하기Jpa 잘 (하는 척) 하기
Jpa 잘 (하는 척) 하기
 
AWS Lambda를 통한 Tensorflow 및 Keras 기반 추론 모델 서비스하기 :: 이준범 :: AWS Summit Seoul 2018
AWS Lambda를 통한 Tensorflow 및 Keras 기반 추론 모델 서비스하기 :: 이준범 :: AWS Summit Seoul 2018AWS Lambda를 통한 Tensorflow 및 Keras 기반 추론 모델 서비스하기 :: 이준범 :: AWS Summit Seoul 2018
AWS Lambda를 통한 Tensorflow 및 Keras 기반 추론 모델 서비스하기 :: 이준범 :: AWS Summit Seoul 2018
 
JavaScript & Dom Manipulation
JavaScript & Dom ManipulationJavaScript & Dom Manipulation
JavaScript & Dom Manipulation
 
Angular Dependency Injection
Angular Dependency InjectionAngular Dependency Injection
Angular Dependency Injection
 
Introduction to Angularjs
Introduction to AngularjsIntroduction to Angularjs
Introduction to Angularjs
 
DVGA writeup
DVGA writeupDVGA writeup
DVGA writeup
 
Javascript 入門 - 前端工程開發實務訓練
Javascript 入門 - 前端工程開發實務訓練Javascript 入門 - 前端工程開發實務訓練
Javascript 入門 - 前端工程開發實務訓練
 
React hooks Episode #1: An introduction.
React hooks Episode #1: An introduction.React hooks Episode #1: An introduction.
React hooks Episode #1: An introduction.
 
Basics of React Hooks.pptx.pdf
Basics of React Hooks.pptx.pdfBasics of React Hooks.pptx.pdf
Basics of React Hooks.pptx.pdf
 
AEM - Client Libraries
AEM - Client LibrariesAEM - Client Libraries
AEM - Client Libraries
 
Routing & Navigating Pages in Angular 2
Routing & Navigating Pages in Angular 2Routing & Navigating Pages in Angular 2
Routing & Navigating Pages in Angular 2
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 

Mehr von Yuki Anzai

droidgirls Recyclerview
droidgirls Recyclerviewdroidgirls Recyclerview
droidgirls RecyclerviewYuki Anzai
 
Androidオールスターズ2016 yanzm
Androidオールスターズ2016 yanzmAndroidオールスターズ2016 yanzm
Androidオールスターズ2016 yanzmYuki Anzai
 
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 FukuokaYuki Anzai
 
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 FukuokaYuki Anzai
 
How to read "marble diagram"
How to read "marble diagram"How to read "marble diagram"
How to read "marble diagram"Yuki Anzai
 
Master of RecyclerView
Master of RecyclerViewMaster of RecyclerView
Master of RecyclerViewYuki Anzai
 
Activity, Fragment, CustomView の使い分け - マッチョなActivityにさよならする方法 -
Activity, Fragment, CustomView の使い分け - マッチョなActivityにさよならする方法 -Activity, Fragment, CustomView の使い分け - マッチョなActivityにさよならする方法 -
Activity, Fragment, CustomView の使い分け - マッチョなActivityにさよならする方法 -Yuki Anzai
 
Watch face アプリを公開してみた
Watch face アプリを公開してみたWatch face アプリを公開してみた
Watch face アプリを公開してみたYuki Anzai
 
"あんざいゆき" x "秋葉ちひろ" はカンファレンスアプリをどう作るのか?
"あんざいゆき" x "秋葉ちひろ" はカンファレンスアプリをどう作るのか?"あんざいゆき" x "秋葉ちひろ" はカンファレンスアプリをどう作るのか?
"あんざいゆき" x "秋葉ちひろ" はカンファレンスアプリをどう作るのか?Yuki Anzai
 
Android Pattern Cookbook で見るトレンドの変遷
Android Pattern Cookbook で見るトレンドの変遷Android Pattern Cookbook で見るトレンドの変遷
Android Pattern Cookbook で見るトレンドの変遷Yuki Anzai
 
Sublime Text 2 で始める ReVIEW
Sublime Text 2 で始める ReVIEWSublime Text 2 で始める ReVIEW
Sublime Text 2 で始める ReVIEWYuki 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
 
マルチスクリーン対応と最近のアプリの傾向
マルチスクリーン対応と最近のアプリの傾向マルチスクリーン対応と最近のアプリの傾向
マルチスクリーン対応と最近のアプリの傾向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 Cookbook Seminor
Android Layout Cookbook SeminorAndroid Layout Cookbook Seminor
Android Layout Cookbook SeminorYuki Anzai
 
ボクの開発スタイル
ボクの開発スタイルボクの開発スタイル
ボクの開発スタイルYuki Anzai
 
Android Layout 3分クッキング
Android Layout 3分クッキングAndroid Layout 3分クッキング
Android Layout 3分クッキングYuki Anzai
 
application Next Generation presented by android女子部
application Next Generation presented by android女子部application Next Generation presented by android女子部
application Next Generation presented by android女子部Yuki Anzai
 

Mehr von 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