Create your account

Already have an account? Login here

Note: By joining, you will receive periodic emails from Coursetro. You can unsubscribe from these emails.

Create account

89. Custom Styles For Dialog and Toolbar

Design + Code an Android App from Scratch

Woah, wait a second..

Scrounge up some loose change to become a pro member, or login to your account to view this lesson.

Alright, join now. Or login to your account if you're already a pro member.

This video shows how to customise the Dialog and Toolbar using custom styles. We first explore the Android source code to see what Theme.AppCompat contains. We then explore the Android Studio Theme Editor to customise the Dialog background using the android:windowBackground attribute that lets us set a transparent colour and the android:windowNoTitle attribute that lets us prevent the Dialog from showing a title. We then call the setStyle method to use this style for our Dialog. We add the android:windowIsFloating attribute to ensure the Dialog takes up the entire screen. We finally customise the Toolbar by using the android:colorBackground attribute to give a green background colour and the android:textColor attribute to give a blue text colour.

Course Cirriculum