Found it on the android-developers Google group. You simply have to add :
setWillNotDraw(false)
To the constructor. Now if someone could explain me why, that would be greatly appreciated.
More Related Contents:
- Android Drawing Separator/Divider Line in Layout?
- Draw in Canvas by finger, Android
- Marquee text in Android
- TimePicker in PreferenceScreen
- What’s onCreate(Bundle savedInstanceState)
- Android AudioRecord example [closed]
- Google Play services out of date. Requires 3159100 but found 3158130
- Android SQLite issue – table … has no column named
- How to create a RelativeLayout programmatically with two buttons one on top of the other?
- ActionBarActivity cannot resolve a symbol
- How to perform collection group query using document ID in Cloud Firestore
- How to determine if an Android Service is running in the foreground?
- Android: setSelection having no effect on Spinner
- Adding content to a linear layout dynamically?
- How do I request root access in Android?
- Multiple selection in custom ListView with CAB
- Rotate MapView in Android
- How to deal with different aspect ratios in libGDX?
- Create a Generic Base Adapter?
- Do android support multiple languages?
- Jetpack Compose how does SubcomposeLayout work?
- How to fix BOOT_COMPLETED not working Android
- What is more efficient? Static, data Passing, shared preferences, Database…?
- Android: UnknownHostException
- Error : No resource found that matches the given name (at ‘icon’ with value ‘@drawable/icon’)
- How should I handle “No internet connection” with Retrofit on Android
- Rounded corners on material button
- Calling one Activity from another in Android
- How to get whatsapp Contacts from Android Programmatically?
- Admob ads not loading – Failed to load ad: 0