Android Customtitlebar issue? - android

I am Developing an application which consists of custom-title-bar.
1.I have implemented custom title bar in my application,until here every thing is working fine for me.
2.I have removed the custom title bar in splash screen,when i am loading the application in emulator, Before the splash screen,custom-title-bar is loading and then splash screen is displayed.
3.my requirement is i need to display the custom-title-bar before the splash-screen.

What I understand from your problem is, your main(launcher) activity contains custom title bar, it launches splash screen which is not containing title bar. So it is obvious that title bar is gonna hide behind splash screen. If you dont wanna implement custom title bar in splash screen then it is advisable that you make your splash screen background's(image's) top "white and transparent"(with the help of photoshop) so that title bar of main activity is visible behind the splash screen.

Related

How to make my fragment container fit along with the app bar

my problem is my floating action button is cut when the app runs. Is there any way I can make it fit within the screen?

hiding application logo and title displayed for a fraction of seconds before starting of activity if custom action bar layout is used

With reference to question raised at SO link :
Hide application launcher icon in title bar when activity starts in android
What should I do if I don't want to use even a logo ?
What should I do if I don't want to use even a logo ?
You can use Toolbar instead of old ActionBar. Here's a great and quick tutorial for Toolbar implementation.

Smooth transition between full-screen-activity and one with notification-bar and action bar

Background
I have an app that has 2 activities :
splash activity, which is shown in full screen (no action bar, no notification bar)
main activity, which has both an action bar (uses actionBarSherlock) and a notification bar.
The problem
For some reason, when going from the first activity to the second, there is a "jumpy" layout process, which shows the content of the second activity without the action bar and notification bar, and a moment later it shows them both.
This causes the content below to move too, which is very noticeable.
Possible solution
As I've seen, a possible solution would be to hide the action bar and show it a bit later (500ms later), but this seems like a bad solution (making it slower and hiding for no reason), plus I need to get the actionBar items positions for another purpose (for showing a tutorial).
The question
Is it possible to avoid the "jumpiness"? One that doesn't involve such a weird workaround?
I've solved my problem doing the following:
1.- I have to optimize all the screens where the AB was shown. In some cases I used ListViews which weren't correctly implemented and that caused a noticeable load time in the activity.
2.- I have shown the status bar BEFORE starting the new activity. I mean: I've shown the status bar in the fullscreen activity just before starting the non-fullscreen one. With that I achieved that the layout of the second activity (non-fullscreen) was never resized.
With this two little changes now the AB transition is much more smoother.
You can find the complete post with my answer at: Smoother transition from fullscreen activity using ActionBarSherlock
Why don't you use some other animation slide transitions rather than default popping one?
something like this?
overridePendingTransition(android.R.anim.accelerate_interpolator, android.R.anim.slide_out_right);
Here is the Animation lists that you can use
http://developer.android.com/reference/android/R.anim.html

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.

How to show a webview progress bar at the bottom of the app?

Is there a way to show, only while loading, a webview's progress bar, at the bottom of the app ?
Currently, my progress bar is showed in the title bar. But I don't want it there. I want it at the botton of the app.
Is there a way to do it ?
Thanks!
A solution is to hide the title bar (not necessary but it will save screen space), and add your own progress bar at the bottom of your layout.
But it goes against the normal user interface standards and could be confusing to users so I wouldn't recommend to change the progress bar location.

Categories

Resources