How To Make A Progressbar Stay In The Center Of Screen Despite Scrolling
I have a ProgressBar in a ScrollView, and I'd like it to stay centered vertically despite the user scrolling down or up. However, I'm not sure how to accomplish this. Here's the co
Solution 1:
Put it outside of the ScrollView. Just have the ScrollView and the ProgressBar overlap.
You can read about how to overlap views here: Overlapping Views in Android
There's a couple of ways to do it, ranging from GridLayouts to RelativeLayouts and then programatic ways to do it.
Solution 2:
You need the ScrollView to be at same level as ProgressDialog in your Layout.
Here it is in concept:
<RelativeLayout><ProgressDialog><ScrollView><RelativeLayout>
Solution 3:
you can insert this into the scrollview tag
android:fillViewport="true"
Post a Comment for "How To Make A Progressbar Stay In The Center Of Screen Despite Scrolling"