ProgressBar in ActionBar on Android L Preview - android

Today I started porting an app to Android L preview in order to have it almost ready when the final product launches. One problem I found is that I can't have an indeterminate progressbar on the ActionBar. It doesn't show at all and throws this error on logcat:
E/PhoneWindow﹕ Circular progress bar not located in current window decor
I'm using this code, which works in <4.4:
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setProgressBarIndeterminateVisibility(true);
Is there any way to get it working again in Android L or should I use an external ProgressBar?

I've just found this question and checked the bug report.
It seems that the dev team had concluded that the issue won't be fixed.
That is:
intended as the progress bar features are not supported on Material action bars.
The "Material action bar" should mean 4.4 (API19) or later's action bar.

Related

What to consider when making a custom progress bar in android studio?

I have a question about progress bars in the android studio. I have been searching the web but can't seem to find enough information on custom progress bars. I would like to make a progress bar that fills a cup with liquid and I need guidance on how to do just that. is there a way to change the progress bar attribute within the android studio to do that or would I have to make an animation and link it using levels so that it acts as a progress bar?
I am not looking for the code to solve my problem I simply need some guidelines.
Thanks in advance

Progress Bar lollipop style

I need to display a progress like the image displayed below, but without arrow in that.How to do it ? Its not given in design specs but have seen some apps implementing that, is it possible ?
Design Specs
For such circular process bar in older SDK level, you can use this custom view ,
MaterialLoadingProgressBar

Android HTC One Bottom Action Bar

I’m using a HTC One (engineering sample) Android phone running Android 4.x
In any app made with Xamarin I see the action bar (red square) at the bottom of the screen. Even when having my own action bar (picture right), the bottom action bar is there. In this case, both action bars can be clicked (settings).
Some 3rd party apps have the same action bar problem, others (FaceBook etc.) don’t.
How can I get rid of this bottom action bar?
The sample you see here is the Xamarin ActionBarSherlock sample.
How can I get rid of this bottom action bar?
Set your android:targetSdkVersion to 14 or higher. What you are seeing is the "legacy menu button of shame".
I have a bit more on this topic in this year-old blog post.

ProgressDialog near application label

I noticed that some applications have ProgressDialog near application label which i marked with red circle in the image below -
does somebody know how can i get ProgressDialog there?
You are talking about the so called Action Bar. This UI concept allows developers to place their menu and contextual information regarding to the currently displayed screen in a separate bar at the top, including the indeterminate progress indicator you mentioned. Natively, this bar isn't available on older android versions, but there is an excellent library that allows you to use the action bar and still target older versions: ActionBarSherlock
You can take a look at the capabilities of the action bar with the ActionBarSherlock Demo

ActionBarSherlock wrong tabs position on android 2.2.2

I'm having serious problems getting tabs in actionbarsherlock below main action bar tabs to work in an app that runs from Android 2.2 up and looks like Android 4. (see link)
Tabs position
Have you tried running the official Demos app of ActionBar Sherlock? (https://github.com/downloads/JakeWharton/ActionBarSherlock/ActionBarSherlock-Sample-Demos-4.2.0.apk) It should contain a demo for the actionbar with Tabs.
If that works on Android 2.2 then you know the problem is in your code and you can check the Demos source code to see what you are doing differently (https://github.com/JakeWharton/ActionBarSherlock/tree/master/samples).
It's usual behavior of action bar (actionbarsherlock just simulate it). Use
ActionBar act = getSupportActionBar();
act.setStackedBackgroundDrawable(getResources().getDrawable(R.drawable.mytab_base_t));
to avoid white color in top bar (this option you can't access from any theme item yet). You can also monitor action bar height to change custom view of tabs on-fly, but you can't change action bar behavior, forget it. Otherwise please use PagerTitleStrip against action bar tabs.

Categories

Resources