Solved. Add
this.setWillNotDraw(false);
in constructor
More Related Contents:
- How to make bitmap invisible ontouch in android? [closed]
- What does android:layout_weight mean?
- How to display count of notifications in app launcher icon [duplicate]
- Placing/Overlapping(z-index) a view above another view in android
- Getting View’s coordinates relative to the root layout
- Show AlertDialog in any position of the screen
- How did Google manage to do this? Slide ActionBar in Android application
- Adding Table rows Dynamically in Android
- What is the role of content_main.xml in android studio 1.4?
- Appcompatv7 – v21 Navigation drawer not showing hamburger icon
- Wrap_content view inside a ConstraintLayout stretches outside the screen
- How to use RadioGroup in ListView custom adapter?
- how to design any screen size and – density in Android(Multi screen for mobiles in Android)
- android:windowSoftInputMode=”adjustResize” doesn’t make any difference?
- How to Show Circular Text using TextView in Android
- Android: programmatically adding buttons to a layout
- How to create always-top fullscreen overlay activity in Android
- Can’t find Toolbar in an included layout
- java.lang.NullPointerException: Attempt to invoke virtual method ‘int android.view.View.getImportantForAccessibility()’ on a null object reference
- Android – Inner element must either be a resource reference or empty
- Designing an android tablet-only app [duplicate]
- Passing touch events to the parent view
- Android LinearLayout with color resource: What am I doing wrong?
- Extending RelativeLayout, and overriding dispatchDraw() to create a zoomable ViewGroup
- getSize() giving me errors
- Put buttons at bottom of screen with LinearLayout?
- Should use “sp” instead of “dp” for text sizes
- Android Layout: Horizontal Recyclerview inside a Vertical Recyclerview inside a Viewpager with Scroll Behaviors
- Popup over incoming-call screen
- Different row layouts in ListView