hello,
first thing when i run my app it shows the application title
how can i hide it ?
thanks
first thing when i run my app it shows the application title
how can i hide it ?
thanks
Hi,
B4X:#Region Activity Attributes #FullScreen: False #IncludeTitle: False '<<<<<<< Hides the app title #End Region
#If Java
import android.os.Build;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
public void _onResume () {
View decorView = getWindow ().getDecorView ();
int flags = View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
if (Build.VERSION.SDK_INT >= 19) { flags = flags | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY; };
decorView.setSystemUiVisibility (flags);
getWindow ().addFlags (WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
#End IF
You are making recommendations that will not work properly.Probably, you are interesting in immersive mode. If you will search forum, you will find Erel's sample. Personally I add to activity following:
Take a look Erel's sample https://www.b4x.com/android/forum/attachments/appcompatexample-zip.56248/
Open Visual Designer. Remove checkmark for Visible property of ACToolBarLight1 and run.
The same you can do in run-time (visible = true / false)
Probably, you are interesting in immersive mode. If you will search forum, you will find Erel's sample. Personally I add to activity following:
B4X:#If Java import android.os.Build; import android.view.View; import android.view.Window; import android.view.WindowManager; public void _onCreate () { View decorView = getWindow ().getDecorView (); int flags = View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION; if (Build.VERSION.SDK_INT >= 19) { flags = flags | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY; }; decorView.setSystemUiVisibility (flags); getWindow ().addFlags (WindowManager.LayoutParams.FLAG_FULLSCREEN); } #End IF
You are making recommendations that will not work properly.
Correct way to set immersive mode: Immersive Mode - hide the navigation bar
Using full screen theme: https://www.b4x.com/android/forum/threads/full-screen-theme.93892/#content
Now if I may – there is another issue I have –
When I launch the app it takes some time to see the first form I load
I load it immediately in activity_create
There is no delay or any kind of internal processing but it takes some time to get the form on screen
And it is a very simple form with one label and one button only
Once it is shown all the rest is flying smoothly only the initial phase somehow takes time
1) You need to start another topic.
2) There is general explanation https://developer.android.com/topic/performance/vitals/launch-time and a lot of articles with advices. But I did not see magic recomendations - mostly reduce resources and etc.
Like smartphone user I can say that if you have a good CPU and memory, all starts quickly. For example my program includes 30-40 activities, the size of apk is about 5MB. The start time on my OnePlus 5t is much less than 1 sec.
How do you measure startup time ? How long starts B4A Bridge is one question and how long starts a Launcher is another.