Download Progress Bar as LinearLayout Background - android

I have an app where students at my school can download course content that professors upload. Everything works great, except I have no progress bar dialog. I recently switched the app over to using fragments, so the old dialog I was using broke.
Anyway, I was thinking that instead of having a dialog display the progress bar, I could use the background of the item that was clicked as the progress bar.
Here is a screenshot of the app:
http://dl.dropbox.com/u/4439149/Screenshot_2012-09-27-15-06-43.png
And here is a mocup of how I imagine it working:
http://dl.dropbox.com/u/4439149/42an8-CTWBJpw391zDSBs5MAiuIhibcsRWhZGwdvmTE%20copy.png
I cannot for the life of me think of how this should be done. I am hoping someone could just give me a push in the right direction.
Thanks,
David

Check out Clip Drawable. You can set the background of your row to a ClipDrawable that holds the color or another drawable that you want to show for progress, then set the level (progress) while downloading.

Have you tried changing your row.xml to be a frame layout and just have a ProgressBar that fills the entire row? You can then put this behind the layout you currently have in your row.xml.

Related

How to create progress indicator without filling color?

I have a viewpager with many images in my app. Below viewpager I need to show a progress indicator as shown in image. whenever the image is changed the dark blue part also will change its position accordingly. I am not sure which component to use here. Does it require a custom component? Will customizing progress bar work? Any help would be appreciated.

Android progress bar with color plate

Does any one knows any way to change background of a progress bar to sth like this image?
As you can see there is a color plate in background which starts from green to red and there is an indicator which shows a title. I have no idea how to make it or if there is some keywords to search about it or even some liberaries.
thanks very much
P.S: It seems this is what I need.
https://github.com/ademar111190/android-phased-seek-bar
You can use seekbar for the indicator with thumb image changes and background as progress drawable in your xml.
Search for customizing seekbar and see whatever suits the best for your requirement.

Indeterminate progress bar like iPhone GMAIL app in android

I'm new to android. I want to make indeterminate progress bar like iPhone GMAIL app in android.As attached below with animation.
EDIT :: In android is it possible to have animation [like][1]
[1]: http://jsfiddle.net/gh/gist/library/pure/4547132/enter code here
You have the spinner in the palette (see the image attached below). I think it´s similar to what you want. But if you want to make this progress bar using this exactly image, you can add the image and using animation make it rotate.
Hope it´s useful!!

Android Progressbar not allowing to switch tab

I have two tabs in my app.First tab displays the details of user and the second tab displays the applications that are installed on his device.I have used Package manager for getting the installed apps and it is running ins background thread. If the user clicked the second tab before the background thread completes I want to show a progressdialog.But the problem is if progressdialog is displayed on the screen user can't switch to next tab.Is there any way to solve this issue.Thanks in advance.
Progress dialogue by default works in dialogue mode and freezes any operations until the progress bar is gone.
I had faced issues with controlling progress bar (though my requirements were more than yours like customizing looks and showing/ hiding/ freezing bar at will), so I ended up creating a custom progress bar.
It is pretty simple
Create 2 straight straight bars, one black and other of any color (if you want something more fancy, it is upto you)
Add the bars to drawable and then to your layout xml in hidden mode. The colored bar exactly on top (superimpose) of black bar
Now where you want to show the progress bar, make the black bar visible first, and adjust the width of colored bar (on top of black bar) as per the progress.
This will give you proper functionality of the progress bar.
As you are playing around only with imageviews, you have full control over when to show or hide the bar. Also by default it will not freeze the view. You can freeze at will by capturing onTouch event.

Android ABS shows large ProgressBar

I use setSupportProgressBarIndeterminateVisibility(true); in my activity to show a Indertiminate ProgressBar. This shows a large ProgressBar in the ActionBar. I want to use a small progress bar . How can i do this ?
Kind Regards,
You need to create a style in order to get a small progressbar.
See this link, where explains how to change the Default Indeterminate Progress Size in ActionBarSherlock
http://thanksmister.com/2012/03/30/change-default-progress-actionbarsherlock/

Categories

Resources