Progress Bar inside TabHost in android - android

i want to show a progress bar in the tabhost , while the image in the tabhost is loading ,, is this possible , i made this sample image in Paint just to give an idea of the UI in my mind regarding tab host..
how can i achieve this,, the progress bar should appear inside the tabhost.

Try this.See you need progress bar while loading the tab.For that you can use AsyncTask while loading the view so until your complete view is not loaded it will show progress bar if you define it at proper place in your code.
And another thing is you can use selector .This my help you.Please read this post http://www.mkyong.com/android/android-imagebutton-selector-example/ and let me know it it works or not.
Hope this helps you. :)

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.

how to make this segmented custom bar with indicator

I am trying to make a custom bar like this
However those red boxes are actually images ( nicely designed segments) and the arrow is an image indicator to clarify the progress. I am just showing the image above as an illustration.
I know how to do custom progress bar using gredients and colors but in case of something like that with images. How would I do it? Can it be done through xml or should I create custom view and override the ondraw method to do things from scratch? Any design help is appreciated
Thanks

How to set drawables on actionbar of my android application

I'm developing an application in which I have to put drawables on top of the actionbar and have to update then from time to time. Here is a layout what I want it to look like.
I want to put a drawable as shown in the picture atttached(The green color drawable not the notification thing). Is that possible to achieve this kind of screen in android? If, so please guide me how to achieve this.
Any kind of help will be appreciated.
This is easy using a custom view. Let me explain you the steps briefly:
Create your custom view in the layout folder. For example, an ImageButton.
Set this view as the custom view of the action bar in your activity. You can do this by calling
getSupportActionBar().setCustomView(R.layout.your_custom_view);
(or getActionBar() instead of getSupportActionBar())
Call setDisplayOptions() with the ActionBar.DISPLAY_SHOW_HOME and ActionBar.DISPLAY_SHOW_CUSTOM options.
If you have other standard buttons in the action bar, inflate the menu.
You can finally set the OnClickListener for your custom view.
This worked for me, hope it helps you!
Create custom view
Use it as ActionView in ActionBar
In onCreateOptionsMenu get a reference to your view and update it when needed

Download Progress Bar as LinearLayout Background

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.

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