Bug 1217416 - Override Snackbar.Message style in base theme. r=margaret

This commit is contained in:
Sebastian Kaspari 2015-10-23 21:16:37 +02:00
parent 590ddf5027
commit 01600ad25d
2 changed files with 8 additions and 1 deletions

View File

@ -72,6 +72,7 @@ import android.os.StrictMode;
import android.provider.ContactsContract; import android.provider.ContactsContract;
import android.provider.MediaStore.Images.Media; import android.provider.MediaStore.Images.Media;
import android.support.design.widget.Snackbar; import android.support.design.widget.Snackbar;
import android.support.v4.content.ContextCompat;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.AttributeSet; import android.util.AttributeSet;
import android.util.Base64; import android.util.Base64;
@ -851,6 +852,7 @@ public abstract class GeckoApp
final SnackbarEventCallback snackbarCallback = new SnackbarEventCallback(callback); final SnackbarEventCallback snackbarCallback = new SnackbarEventCallback(callback);
snackbar.setAction(action, snackbarCallback); snackbar.setAction(action, snackbarCallback);
snackbar.setActionTextColor(ContextCompat.getColor(this, R.color.fennec_ui_orange));
snackbar.setCallback(snackbarCallback); snackbar.setCallback(snackbarCallback);
} }

View File

@ -3,7 +3,7 @@
- License, v. 2.0. If a copy of the MPL was not distributed with this - License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<resources xmlns:android="http://schemas.android.com/apk/res/android"> <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
<!-- <!--
Base application styles. This could be overridden in other res/values-XXX/themes.xml. Base application styles. This could be overridden in other res/values-XXX/themes.xml.
@ -293,6 +293,11 @@
<item name="android:textSize">14sp</item> <item name="android:textSize">14sp</item>
</style> </style>
<style name="TextAppearance.Design.Snackbar.Message" parent="android:TextAppearance" tools:override="true">
<item name="android:textSize">@dimen/design_snackbar_text_size</item>
<item name="android:textColor">@android:color/white</item>
</style>
<!-- <!--
TextAppearance TextAppearance
Note: Gecko uses light theme as default, while Android uses dark. Note: Gecko uses light theme as default, while Android uses dark.