Bug 1061508 - Change FadedTextView to be a ThemedTextView (r=bnicholson)
authorLucas Rocha <lucasr@mozilla.com>
Wed, 24 Sep 2014 18:27:43 +0100
changeset 206900 0f2bceed4532aca7e1368cd46b507c4c4cc67800
parent 206899 15fb93c010c8df66fb5bf0a1ad0a24062323aed7
child 206901 556258d3b939ad5f0ca82ba9810e78ad943662af
push id27543
push userryanvm@gmail.com
push dateWed, 24 Sep 2014 20:02:22 +0000
treeherdermozilla-central@435732392989 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1061508 - Change FadedTextView to be a ThemedTextView (r=bnicholson)
--- a/mobile/android/base/widget/FadedTextView.java
+++ b/mobile/android/base/widget/FadedTextView.java
@@ -8,42 +8,38 @@ package org.mozilla.gecko.widget;
 import android.content.Context;
 import android.content.res.TypedArray;
 import android.graphics.Canvas;
 import android.graphics.LinearGradient;
 import android.graphics.Shader;
 import android.graphics.drawable.Drawable;
 import android.text.Layout;
 import android.util.AttributeSet;
-import android.widget.TextView;
 import org.mozilla.gecko.R;
+import org.mozilla.gecko.widget.ThemedTextView;
  * FadedTextView fades the ends of the text by fadeWidth amount,
  * if the text is too long and requires an ellipsis.
-public class FadedTextView extends TextView {
+public class FadedTextView extends ThemedTextView {
     // Width of the fade effect from end of the view.
     private final int mFadeWidth;
     // Shader for the fading edge.
     private FadedTextGradient mTextGradient;
     public FadedTextView(Context context) {
         this(context, null);
     public FadedTextView(Context context, AttributeSet attrs) {
-        this(context, attrs, android.R.attr.textViewStyle);
-    }
-    public FadedTextView(Context context, AttributeSet attrs, int defStyle) {
-        super(context, attrs, defStyle);
+        super(context, attrs);
         TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.FadedTextView);
         mFadeWidth = a.getDimensionPixelSize(R.styleable.FadedTextView_fadeWidth, 0);