FileDocCategorySizeDatePackage
ExceptionTextView.javaAPI DocAndroid 5.1 API2012Thu Mar 12 22:22:12 GMT 2015android.widget.layout.linear

ExceptionTextView

public class ExceptionTextView extends android.widget.EditText
A special EditText that sets {@link #isFailed()} to true as its internal makeNewLayout() method is called with a width lower than 0. This is used to fail the unit test in BaselineAlignmentZeroWidthAndWeightTest.

Fields Summary
private boolean
mFailed
Constructors Summary
public ExceptionTextView(android.content.Context context)


       
        super(context);
    
public ExceptionTextView(android.content.Context context, android.util.AttributeSet attrs)

        super(context, attrs);
    
public ExceptionTextView(android.content.Context context, android.util.AttributeSet attrs, int defStyle)

        super(context, attrs, defStyle);
    
Methods Summary
public booleanisFailed()

        return mFailed;
    
protected voidmakeNewLayout(int w, int hintWidth, BoringLayout.Metrics boring, BoringLayout.Metrics hintMetrics, int ellipsizedWidth, boolean bringIntoView)

        if (w < 0) {
            mFailed = true;
            w = 100;
        }

        super.makeNewLayout(w, hintWidth, boring, hintMetrics, ellipsizedWidth,
                            bringIntoView);