Android Question [sloved]why BringToFront and SendToBack no effect

Maodge

Member
Licensed User
Hello Alls,
In project, I try to a imageview and a label on a button. code like this
B4X:
    Button1...properties set
    Button1.SendToBack

    ImageView1...properties set
    ImageView1.BringToFront

    Label1...properties set
    Label1.BringToFront
test on android 4.X ,it display ok.
but on android 8.0 (huawei), it does not display img and label text.
So why button BringToFront and SendToBack no effect ?

and thanks

I test using a label replay button like. And project on android 8.0 (huawei),
img and text display ok.

B4X:
Button1...properties set
    Button1.SendToBack

'use label replace button
    Button1.Visible =False
    Dim lbl As Label
    lbl.Initialize("lbl")
    Activity.AddView(lbl,Button1.Left,Button1.Top,Button1.Width,Button1.Height)
    Dim cd2 As ColorDrawable
    cd2.Initialize2(Colors.DarkGray,8dip,2dip,Colors.White)
    lbl.Background = cd2
    lbl.SendToBack

    ImageView1...properties set
    ImageView1.BringToFront

    Label1...properties set
    Label1.BringToFront
 

Attachments

  • test_display_err.zip
    11.8 KB · Views: 108
  • display err.jpg
    display err.jpg
    15.3 KB · Views: 121
  • display ok android 4.x.png
    display ok android 4.x.png
    40.6 KB · Views: 130
  • display ok.zip
    11.9 KB · Views: 118
  • display ok android8.0.jpg
    display ok android8.0.jpg
    18.9 KB · Views: 133
Last edited:
Top