Bug 1061508 - Change FadedTextView to be a ThemedTextView (r=bnicholson)
authorLucas Rocha <lucasr@mozilla.com>
Wed, 24 Sep 2014 18:27:43 +0100
changeset 206829 0f2bceed4532aca7e1368cd46b507c4c4cc67800
parent 206828 15fb93c010c8df66fb5bf0a1ad0a24062323aed7
child 206830 556258d3b939ad5f0ca82ba9810e78ad943662af
push id8965
push userlrocha@mozilla.com
push dateWed, 24 Sep 2014 17:28:17 +0000
treeherderfx-team@556258d3b939 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbnicholson
bugs1061508
milestone35.0a1
Bug 1061508 - Change FadedTextView to be a ThemedTextView (r=bnicholson)
mobile/android/base/widget/FadedTextView.java
--- 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);
 
         setSingleLine(true);
         setEllipsize(null);
 
         TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.FadedTextView);
         mFadeWidth = a.getDimensionPixelSize(R.styleable.FadedTextView_fadeWidth, 0);
         a.recycle();
     }