Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 083f2714 authored by Deepanshu Gupta's avatar Deepanshu Gupta Committed by Android (Google) Code Review
Browse files

Merge "Fix SurfaceView in LayoutLib." into lmp-preview-dev

parents 47c20a16 367a0ce9
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -45,6 +45,10 @@ public class SurfaceView extends MockView {
        super(context, attrs, defStyle);
        super(context, attrs, defStyle);
    }
    }


    public SurfaceView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
        super(context, attrs, defStyleAttr, defStyleRes);
    }

    public SurfaceHolder getHolder() {
    public SurfaceHolder getHolder() {
        return mSurfaceHolder;
        return mSurfaceHolder;
    }
    }
+5 −1
Original line number Original line Diff line number Diff line
@@ -31,7 +31,11 @@ import android.widget.TextView;
public class MockView extends TextView {
public class MockView extends TextView {


    public MockView(Context context, AttributeSet attrs, int defStyle) {
    public MockView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
        this(context, attrs, defStyle, 0);
    }

    public MockView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
        super(context, attrs, defStyleAttr, defStyleRes);


        setText(this.getClass().getSimpleName());
        setText(this.getClass().getSimpleName());
        setTextColor(0xFF000000);
        setTextColor(0xFF000000);