Android Question application title

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
hello,
first thing when i run my app it shows the application title
how can i hide it ?

thanks
 

Ohanian

Active Member
Licensed User
Longtime User
Hi,

B4X:
#Region  Activity Attributes 
    #FullScreen: False
    #IncludeTitle: False '<<<<<<< Hides the app title
#End Region
 
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
Hi,

B4X:
#Region  Activity Attributes
    #FullScreen: False
    #IncludeTitle: False '<<<<<<< Hides the app title
#End Region

thanks,
this exactly what i use but the application title is shown when i run the app
if i just remove the title it will show b4a example

the problem is with new devicesand the notch - it shows the title on first row so it is half shown and half hidden by notch

so if i can set the location of the title is also good but i rather hide it
 
Upvote 0

Semen Matusovskiy

Well-Known Member
Licensed User
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 a code bellow.
In my app I build a layout in Activity_Resume event:

B4X:
#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
 
Last edited:
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User

Yippee ki-yay !!
THANK YOU !

Your referral to Erel's sample was the thing I was looking for
This completely solved my problem
Once again – thank you so much…

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

Any ideas ?
 
Upvote 0

Semen Matusovskiy

Well-Known Member
Licensed User

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.
 
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User

thanks.
speed testing i do only on release version so bridge is not involved.
i install it and then run it as normal from the launcher.
i try it on a few different devices on ZUK Z1, Huawei MATE 9 & POCOPHONE
i measure speed very simple - i tap on the icon and see how fast (or slow) it takes until i get the app on screen
in your link i saw that a cold run may take up to 5 seconds - in my opinion it is very long
i test only on cold as on hot it comes immediatelly.
my app takes approx 3 seconds to load and i think it is slow
my app size is almost 16MB... (apk size)
 
Upvote 0

Semen Matusovskiy

Well-Known Member
Licensed User
I agree that 3 seconds is a long period. 16 MB - so large code or a lot of pictures ?
Unfortunatelly, Android is not a Windows, where it's enough simple to reduce start time - for example, using dynamic DLL.

Probably you need to read articles with advices. Alone problem that many recommendations are directly relative to Android Studio.
 
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
Thanks
I did check other apps, seems some are fast and some are even slower to load.
There are a few pics but tiny more of icons etc...

Thanks for your help
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…