FileDocCategorySizeDatePackage
MockView.javaAPI DocAndroid 5.1 API1577Thu Mar 12 22:22:44 GMT 2015com.android.layoutlib.bridge

MockView

public class MockView extends android.widget.TextView
Base class for mocked views. TODO: implement onDraw and draw a rectangle in a random color with the name of the class (or better the id of the view).

Fields Summary
Constructors Summary
public MockView(android.content.Context context, android.util.AttributeSet attrs, int defStyle)

        this(context, attrs, defStyle, 0);
    
public MockView(android.content.Context context, android.util.AttributeSet attrs, int defStyleAttr, int defStyleRes)

        super(context, attrs, defStyleAttr, defStyleRes);

        setText(this.getClass().getSimpleName());
        setTextColor(0xFF000000);
        setGravity(Gravity.CENTER);
    
Methods Summary
public voidonDraw(android.graphics.Canvas canvas)

        canvas.drawARGB(0xFF, 0x7F, 0x7F, 0x7F);

        super.onDraw(canvas);