This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyCustomView extends View { | |
public MyCustomView(Context context) { this(context, R.style.MyCustomView); } | |
public MyCustomView(Context context, AttributeSet attrs) { this(context, attrs, 0); } | |
public MyCustomView(Context context, AttributeSet attrs, int defStyle) { | |
super(context, attrs, defStyle); | |
final int defStyleRes = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.support.v7.app.AppCompatActivity; | |
//import android.app.Activity; // import this if you don't want to use the AppComat package. | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.view.ViewParent; | |
import android.view.Window; | |
import android.view.WindowManager; | |
/** | |
* the activity with a Dialog theme doesn't really respect the "wrap_content" params. |
NewerOlder