Android Question Activity Title Bar

taylorw

Active Member
Licensed User
B4X:
cs.Initialize.Append("").Color(Colors.red).PopAll
   
    'Do not forget to load the layout file created with the visual designer. For example:
    Activity.LoadLayout("Layout_Order")
    Activity.Title = cs

i using this coding but still same?
 
Upvote 0

taylorw

Active Member
Licensed User
B4X:
Dim cs As CSBuilder

Activity.LoadLayout("Layout_Order")
Activity.Title = cs.Initialize.Color(Colors.Red).Append(Activity.Title).PopAll

Erel, that problem still same, my title bar color still is default color
 
Upvote 0

taylorw

Active Member
Licensed User
Sorry Erel, i think is my mistake i mean is this one title bar background color.
upload_2017-6-8_16-44-34.png
 
Upvote 0

ronell

Well-Known Member
Licensed User
Longtime User
oh, i see so Ronell for your experience you suggest what view?
sample.png

B4X:
    dim lbltitle as label
    lbltitle.Initialize("")
  
    Activity.AddView(lbltitle,0,0,100%x,50dip)
    lbltitle.Text = "Activity title"
    lbltitle.TextColor = Colors.Black
    lbltitle.Gravity = Gravity.CENTER_VERTICAL
    lbltitle.TextSize = 20
    Dim cd As ColorDrawable
    cd.Initialize(Colors.Red,0)
    lbltitle.Background = cd
 
Upvote 0

taylorw

Active Member
Licensed User
Thanks, erel and ronell, my dream activity title bar like this, may i do that? If got order item then show like that cart, and have a menu item on right hand side.
upload_2017-6-8_20-55-5.png
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
That is easier done using a "custom" title bar.
Use a panel, that way you can mimic the title bar and have all the extras you need
 
Upvote 0

udg

Expert
Licensed User
Longtime User
Have a look at an old lib of mine, dgActionBar. It may be of inspiration.

udg
 
Upvote 0
Top