Android - displaying text in center of progress bar -


i have made horizontal progress bar , works perfectly. display textview or similar right in middle of showing countdown bar loading. keep in mind not progress dialog, progress bar resides inside activity , shows countdown timer. can me out, whats best way , how can accomplish this?

if progressbar , textview inside relativelayout can give progressbar id, , align textview progressbar using that. should show on top of progressbar. make sure background transparent can still see progressbar

for example:

<relativelayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:tools="http://schemas.android.com/tools"     android:layout_width="match_parent"     android:layout_height="match_parent"     >     <progressbar         android:layout_width="match_parent"         android:layout_height="match_parent"         // other attributes         android:id="@+id/progress_bar"     >     <textview         android:background="#00000000" // transparent         // other attributes         android:layout_alignleft="@id/progress_bar"         android:layout_aligntop="@id/progress_bar"         android:layout_alignright="@id/progress_bar"         android:layout_alignbottom="@id/progress_bar"     > </relativelayout> 

Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -