Appcelerator titanium - Splash screen with progress bar - android

I'm trying to setup a custom splash screen that comes up when my ios & android app, built with titanium, loads up for the first time.
The screen would be similar to the default appcelerator splash png that shows up when the app is launched on the emulator.
The screen would have
1. Custom background
2. App logo
3. Progress bar that animates from 0 to 100%
Any idea how this can be done?

There is no way to put a progress bar on the "Splash screen".
The only way is to have your first window set it's background to the same as the splash screen image with a progress bar on it. The do your long running start up and close the window when done. Generally, however, it is bets not to have long running start ups ;)

I don't know about Android, but on the iPhone you can't add anything to the splash screen (Default.png), you can however add a UIImageView subview to the key window so that when the splash screen goes away, the user can't tell, and then you can add a progress bar to THAT. If you code your program to load most of it's contents afterwards you could have some form of progress bar on the 'splash' screen..
I use the same method to make the splash screen appear to "fade away" when my apps load.

Related

What is the name of bar that contains hardware back button on android emulator and how to show it when it disappeared?

I am making a small app with React-Native.
Then when I navigate to the next page, the android bottom bar (contains hardware back button) disappears.
What is the name of this bar, and how to show it when it disappears?
This is an inactive state.
This is an active state.
How to show this bar? And how do we call this bar?
I solved it.
I am answering my question.
The reason why the bar does not appear on the next page is that the page is a page that plays video or music. (uses react-native-video)
That's why it converted into a full-screen method.

How get rig of the starting non-seen activity?

I have an app where I used the dark theme. I have also added a splash screen where I have added an animation. The background of the SplashActivity is white. When I first start the app, I get a dark screen and then the splash screen is displayed. How to get rid of that dark screen and see directly the splash screen? Thanks
Its related to Cold Start. It happens when your app starts for the first time as explained in the android documentation. However to deal with it I prefer the solution of having background drawable and set it to app theme if your Splash screen is static but in your case as you are using animations you need to use mixture of both techniques i.e. setting the splash screen theme as drawable which is loaded during cold start and later on when it finishes you render your animated stuff.

Is making Activity theme translucent correct to avoid white Screen?

After a long time search in Google, I found many users saying to make the main Activity as translucent to avoid the white screen while opening the application.
Also, I observed that clicking on the app icon in then menu takes time to open the app when translucent is used.
Is this the correct way to avoid the white screen?

Kindle Fire status bar and soft key bar bug

I am developing a magazine reader application aimed at the Kindle Fire. In landscape mode the built in softkey bar and status bar in the Kindle's operating system leave little room for my content so I have opted to run the activity in fullscreen mode using the following theme for the activity:
android:theme="#android:style/Theme.NoTitleBar.Fullscreen"
This works fine, the status bar is hidden and the softbar is minimized like so:
I can bring up the menu bar by dragging it up like so:
The bug arises when I then click somewhere on screen to dismiss the softkey bar. The bottom bar slides back away, the top one does too but the space that it took up becomes a black void and my app is pushed down underneath it so my tab bar at the bottom of the app is now unusable:
I am using a tabhost activity here and the tab I am on in these screenshots is the actual reader section of the app. This subactivity uses a PDF viewer widget which is written using native code and this bug only happens on this tab. If I switch to one of the other tabs which contain no JNI code this bug does not happen so I'm pretty sure its the combination of the Kindle Fire OS, the fullscreen activity and the use of JNI code.
Has anyone else experience this issue?
Any help much appreciated!
Thanks
There are a couple of fullscreen modes for the Fire (at least the new ICS based ones) - check out https://developer.amazon.com/sdk/fire/cx-guidelines.html#Fullscreen for the options. I suspect the ICS Full Screen mode will be what you need
Also it's probably worth trapping the onOrientationChanged and onSizeChanged events to make sure you re-draw the screen correctly when the menu/toolbars appear and disappear per the screen layout sample at https://developer.amazon.com/sdk/fire/samples.html

Android Navigation bar appearing when in full screen

In my application, I have set it up in the XML so it is in full screen using
android:theme="#android:style/Theme.NoTitleBar.Fullscreen"
Now this works fine when the app opens, however if while using the app, I use the home button to back out of the app, and then open it again, when it opens, a black navigation bar will appear for a second or two before disappearing. This does not occur if I exit the app using the back button, just the home button.
Does anyone know why this happens? I have tried doing it from code instead using
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
//Remove notification bar
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
However, what this does is removes the title bar, but the black bar is there at the top, just nothing is in it.
I.e. this bar
I tried combining the code, by putting the full screen line of code in the XML and also adding the code I showed above into the app, but same thing happens. If I back out of the app with home button and enter it again, that black bar will appear for two seconds temporarily pushing the app and its contents down before righting itself again.
How do I go about fixing this? I have been trying loads of different solutions, but nothing seems to work.
Thanks in advance
Seems to a bug with Android OS. Only way to fix it is go to device, settings animation, and disable animations.
try to remove animation by setting->brightness->animation
set no animation there

Categories

Resources