Android Question Application icon on B4XMainPage

Sergey_New

Well-Known Member
Licensed User
Longtime User
How to install it like it was in B4A?
Only B4XMainPage needs this.
 

Sergey_New

Well-Known Member
Licensed User
Longtime User
Go to Manifest Editor and edit as following:
Thank you!
The icon appeared on all pages of the application.
How can I make it appear only on B4XMainPage?
 

Attachments

  • ThreePages.zip
    9.1 KB · Views: 122
Upvote 0

aeric

Expert
Licensed User
Longtime User
Search the forum.

B4X:
Sub B4XPage_Appear
    ShowHideIcon(True)
    txtUser.Text = ""
End Sub

Sub B4XPage_Disappear
    ShowHideIcon(False)
End Sub

Sub ShowHideIcon (Show As Boolean)
    Dim StdAB As StdActionBar
    StdAB.Initialize("StdAB")
    If Show Then
        Dim AndroidResources1 As AndroidResources
        Dim Mydrawable1 As BitmapDrawable
        Mydrawable1 = AndroidResources1.GetApplicationDrawable("icon")
        StdAB.Icon = Mydrawable1.Bitmap
    Else
        StdAB.Icon = Null
        StdAB.ShowUpIndicator = False
    End If
End Sub

 

Attachments

  • B4AProject.zip
    14.4 KB · Views: 140
Upvote 0

ilan

Expert
Licensed User
Longtime User
Thank you!
The icon appeared on all pages of the application.
How can I make it appear only on B4XMainPage?
just a question

would not it be simpler to put a panel on the top page and an imageview with your icon. it looks like you want something to be done in the UI why do you need to do it this way?

just use a panel and an imageview thats it
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
just a question

would not it be simpler to put a panel on the top page and an imageview with your icon. it looks like you want something to be done in the UI why do you need to do it this way?

just use a panel and an imageview thats it
This is what I also thought of but I guess the OP is asking about the way he used to do during the older days.

In my current projects, I am using panel and it is much easier to do the design.
 
Upvote 0

Sergey_New

Well-Known Member
Licensed User
Longtime User
Thank you all so much for your help!
In my project with B4A, I used my own panel, which I used when installing each page
B4X:
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: False
#End Region
Now I decided to try to transfer the project to B4XPage.
It turned out that using the proposed panels in B4XPage is quite difficult. I think I'll keep my approach the same.
In my current projects, I am using panel
Did you do as I described above?
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
Now I decided to try to transfer the project to B4XPage.
you are not using b4xpages for no reason. the whole idea is to make it cross platform so the only way to do it cross platform is using a simple panel and an imageview.
like this it will work on b4a/b4i/b4j

i dont understand why you try so hard to choose the complicated way and not choosing the simple and right way to archive what you are asking.
 
Upvote 0

Sabotto

Well-Known Member
Licensed User
just a question

would not it be simpler to put a panel on the top page and an imageview with your icon. it looks like you want something to be done in the UI why do you need to do it this way?

just use a panel and an imageview thats it
just to learn: Wouldn't just Imageview be enough?
Why is the panel also needed?
 
Upvote 0

Sergey_New

Well-Known Member
Licensed User
Longtime User
just to learn: Wouldn't just Imageview be enough?
Why is the panel also needed?
I started this topic with something simple as it seemed to me, adding, an icon.
In general, I have several Views on my panel.
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
just to learn: Wouldn't just Imageview be enough?
Why is the panel also needed?
I normally like to separate my ui to parts. Top panel middle panel bottom panel etc. some panels are fix some changes.. so it is more organized like this. Like u do with html element <div>

it is also simpler like this for screen size scaling
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
B4X:
#Region  Activity Attributes
    #FullScreen: True
    #IncludeTitle: False
#End Region

1699020304872.png
 

Attachments

  • B4A.zip
    22.3 KB · Views: 101
Upvote 0

Sergey_New

Well-Known Member
Licensed User
Longtime User
Either you or me need a new glasses.
Let's try without glasses :)
In message #29 you said that you use FullScreen: True, without mentioning that #IncludeTitle: False is also needed.
This misled me.
Are you asking why your code not work or mine?
Your and my options work correctly.
In the last message I wanted to clarify which option is better - yours or mine and for what reason.
 
Upvote 0
Top