react-native-smart-splash-screen android status-bar issue - android

I am using
react native smart splash screen.
my question is
is there any way to hide status-bar on splash screen in android ?
(its working fine in ios).

On MainActivity.java, just like that:
#Override
protected void onCreate(Bundle savedInstanceState) {
SplashScreen.show(this, true); // <- second parameter is true, to hide StatusBar
super.onCreate(savedInstanceState);
}
source: https://github.com/crazycodeboy/react-native-splash-screen/issues/105#issuecomment-401966983

Related

Indeterminate Progress displayed by default in Android 4.0.3

So I have this small code which enables the indeterminate progress feature:
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setContentView(R.layout.activity_main);
}
And I know that unless setProgressBarIndeterminateVisibility(true); is not called, the progress bar is not displayed. However this does not seem to be true when the above code runs on a device with Android 4.0.3. On this device the progress bar is displayed permanently without issuing a call to explicitly set the progress bar visibility to true.
Any ideas why and how to fix this?
Did you try these
supportRequestWindowFeature(Window.FEATURE_PROGRESS);
requestWindowFeature(android.view.Window.FEATURE_PROGRESS);
requestWindowFeature(android.view.Window.FEATURE_INDETERMINATE_PROGRESS);
supportRequestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);

Phonegap: blank page before showing splash screen

I want to use splash screen in my application when running the app but when I launch the app in android device first shows me the blank activity at 0.5 second then shows up the splash screen this is my code I'm using.
public class MyActivity extends DroidGap {
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.setIntegerProperty("splashscreen", R.drawable.splash);
super.loadUrl("file:///android_asset/www/index.html", 3000);
}
}
Try this :
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.init();
super.clearCache();
super.clearHistory();
super.setIntegerProperty("splashscreen", R.drawable.splash);
super.loadUrl("file:///android_asset/www/index.html");
}
Although a bit of delay is quite usual, try deploying app to phone and check.
The first blank/black screen that appear before any splashscreen of your app is normal.
That black screen is a sort of Android internal base screen that Android shows for your app while it fork a process in the Dalvik JVM and load your resources/classes. it happen for any Android app. it is not related to Phonegap. Android make this to give the user the impression of a "fast app launch" while it instead is still loading your code.
Anyway you can style that black screen to make it appear as near as possible to the theme of your app so the user have the impression the app is ready and launched but it is loading internal content.
You can read more about it here: http://cyrilmottier.com/2013/01/23/android-app-launching-made-gorgeous/
In the file res/values/themes.xml enter the code:
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="YourTheme" parent="#style/YourParentTheme">
<item name="android:windowDisablePreview">true</item>
</style>
</resources>

overridePendingTransition(R.anim.fadein,R.anim.fadeout);

this code runs after startActivity, but setting it after:
#Override
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
keep old (default) android animation. Why?
Because by the time your activity starts and has a chance to overridePendingTransition, the transition has already taken place. You should change the window transitions in a Theme, and set the Activity theme at the manifest.

Showing indeterminate progress in Sherlock Action Bar

i`m trying to show indeterminate progress bar in ABS v. 4.0.2 by following code
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setContentView(R.layout.main);
getSherlock().setProgressBarIndeterminateVisibility(true);
}
on ICS virtual device it works fine, but progress do not shows in device with Android 2.1.
what i`m doing wrong?
Make sure you import com.actionbarsherlock.view.Window, not android.view.Window.
Try setSupportProgressBarIndeterminateVisibility(boolean) to get backward compatibility.
do this:
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setContentView(R.layout.section_one1);
setSupportProgressBarIndeterminateVisibility(false);
on anything clickable like starting an activity via intent or adapters or whatever
show your progressbar on click
setSupportProgressBarIndeterminateVisibility(true);
but using this method when the user goes back to the activity the progress dialog will be visible still. There are many ways to stop it but the easiest one is just to use
#Override
public void onBackPressed()
{
NavUtils.navigateUpFromSameTask(this);
super.onBackPressed();
}

How to switch to real full screen on Android 2.2?

I found bunch of samples how to remove title/notification bar on Android. However, it's still not a full screen.
I still see a panel on my table with search, home, back and some other button.
Do you have any ideas how to hide this panel?
Generally speaking, I want kind of kiosk mode.
Use this code in onCreate of activity:
getWindow().setFlags(LayoutParams.FLAG_FULLSCREEN, LayoutParams.FLAG_FULLSCREEN);
Sample code for a fullscreen activity:
public class HellofullActivity extends Activity {
/** Called when the activity is first created. */
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.main);
}
}
where you request that the window has not the green title bar and take full screen.
The core problem was device specific. I was doing development for Archos and Archos has it's own bar, which isn't not removed by FLAG_FULLSCREEN and FEATURE_NO_TITLE

Categories

Resources