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

--HG--
extra : commitid : DfuP5LK7rpu
extra : rebase_source : acf0438312c2ed48f94ea2388fbaf719bd5e4314
This commit is contained in:
Sebastian Kaspari 2015-10-22 20:31:16 +02:00
parent 2f6fba6f3b
commit 9b7981b86c
2 changed files with 15 additions and 1 deletions

View File

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

View File

@ -3,7 +3,7 @@
- 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/. -->
<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.
@ -293,6 +293,18 @@
<item name="android:textSize">14sp</item>
</style>
<!--
We are overriding the snackbar message style to guarantee a consistent style across Android versions (bug 1217416).
-->
<style name="TextAppearance.Design.Snackbar.Message" parent="android:TextAppearance" tools:override="true">
<!--
This is the value of "design_snackbar_text_size". As long as B2Gdroid does not include the
Android Design Support Library we cannot reference it here directly.
-->
<item name="android:textSize">14sp</item>
<item name="android:textColor">@android:color/white</item>
</style>
<!--
TextAppearance
Note: Gecko uses light theme as default, while Android uses dark.