I was wondering if there is any way to create my own header with my own drawable, and then put the progress bar in the header layout so that it works as a built-in Android progress indicator.
In my code - I want to be able to call setProgressBarIndeterminateVisibility(true) and display a progress bar in my custom title bar.
Is it possible?
I configured my application theme to use a custom header, but I donβt know how and where to put the progress bar in this layout.
Thanks in advance.
EDIT: right now I'm using my own theme, which looks something like this:
<style parent="android:Theme.Light.NoTitleBar" name="BaseTheme"> <item name="android:windowBackground">@drawable/splash_bg</item> <item name="android:windowTitleStyle">@style/TitleBackground</item> </style>
With header background type as:
<style name="TitleBackground" parent="android:WindowTitleBackground"> <item name="android:background">@drawable/title_bar</item> </style>
To give everyone a better idea - something like this. 
android user-interface
hwrdprkns
source share