Devv Active Member Licensed User Longtime User Oct 10, 2018 #1 I am facing a strange problem that i never faced before the objects depth order is appearing in the visual designer in one way and after compilation it apperas in another way i have 8 buttons that are working perfectly when i try to put anything above then (anything except another button) it will appear behind it not matter what it is, i tried label and progress bar in this screenshot you can see that label1 is a the top then comes button1 then the 8 buttons but after compiling the app and running it in my phone it appears label1 --> 8 buttons --> Button1 "label1 is that black small rectangle below button1" i cant in anyway make any label above these buttons which is very strange any ideas are appreciated
I am facing a strange problem that i never faced before the objects depth order is appearing in the visual designer in one way and after compilation it apperas in another way i have 8 buttons that are working perfectly when i try to put anything above then (anything except another button) it will appear behind it not matter what it is, i tried label and progress bar in this screenshot you can see that label1 is a the top then comes button1 then the 8 buttons but after compiling the app and running it in my phone it appears label1 --> 8 buttons --> Button1 "label1 is that black small rectangle below button1" i cant in anyway make any label above these buttons which is very strange any ideas are appreciated
techknight Well-Known Member Licensed User Longtime User Oct 10, 2018 #2 Are you setting the Elevation in the designer? That always works for me. You can even set it programatically if you wish. Upvote 0
Are you setting the Elevation in the designer? That always works for me. You can even set it programatically if you wish.
Devv Active Member Licensed User Longtime User Oct 10, 2018 #3 techknight said: Are you setting the Elevation in the designer? That always works for me. You can even set it programatically if you wish. Click to expand... my friend what do you mean by Elevation i never saw it in the designer please clarify Upvote 0
techknight said: Are you setting the Elevation in the designer? That always works for me. You can even set it programatically if you wish. Click to expand... my friend what do you mean by Elevation i never saw it in the designer please clarify
DonManfred Expert Licensed User Longtime User Oct 10, 2018 #4 Put label on a panel and change the panel elevation. It has a property Last edited: Oct 11, 2018 Upvote 0
Devv Active Member Licensed User Longtime User Oct 10, 2018 #5 DonManfred said: Put label on a panel and changw tha panel rlevation. It has a property Click to expand... Maybe that will solve the problem But I don't want to use a panel Why would I need a panel to but a label on a button Upvote 0
DonManfred said: Put label on a panel and changw tha panel rlevation. It has a property Click to expand... Maybe that will solve the problem But I don't want to use a panel Why would I need a panel to but a label on a button
Emme Developer Well-Known Member Licensed User Longtime User Oct 10, 2018 #6 Devv said: Maybe that will solve the problem But I don't want to use a panel Why would I need a panel to but a label on a button Click to expand... Because button has by default an elevation greater than a panel. You can also change manually the elevation of label by using reflection or java object, but putting it in a panel is simpler Upvote 0
Devv said: Maybe that will solve the problem But I don't want to use a panel Why would I need a panel to but a label on a button Click to expand... Because button has by default an elevation greater than a panel. You can also change manually the elevation of label by using reflection or java object, but putting it in a panel is simpler
MarkusR Well-Known Member Licensed User Longtime User Oct 10, 2018 #7 or u use a imageview (instead of a button) it have also a click event. seems a label can be above a image Upvote 0
or u use a imageview (instead of a button) it have also a click event. seems a label can be above a image
Devv Active Member Licensed User Longtime User Oct 10, 2018 #8 MarkusR said: or u use a imageview (instead of a button) it have also a click event. seems a label can be above a image Click to expand... Yes imageview seems to be the easiest way but it does not support while pressed color or image Upvote 0
MarkusR said: or u use a imageview (instead of a button) it have also a click event. seems a label can be above a image Click to expand... Yes imageview seems to be the easiest way but it does not support while pressed color or image
MarkusR Well-Known Member Licensed User Longtime User Oct 10, 2018 #9 or u make a gap between the buttons where the label should appear. your label is a description of the image in the buton? Upvote 0
or u make a gap between the buttons where the label should appear. your label is a description of the image in the buton?
Semen Matusovskiy Well-Known Member Licensed User Oct 11, 2018 #10 Visual Designer works in Windows. Android has own mind about Z-order. About all buttons. No reason to add labels. Buttons support text and icon. For example, Code: Copy ' Set image as background Dim bkg As BitmapDrawable bkg.Initialize (LoadBitmap(File.DirAssets, "1.jpg")) Button1.Background = bkg ' Set text Button1.Text = "Some text" Button1.Gravity = Bit.Or (Gravity.BOTTOM, Gravity.CENTER_HORIZONTAL) ... About "central button". Unlike elevation helps, it seems to me to use popup windows is more elegant way. I posted some days ago a library and a sample https://www.b4x.com/android/forum/t...pper-for-popupwindow-class.97879/#post-616872 Initialize function expects panel, you can place a button over it. Upvote 0
Visual Designer works in Windows. Android has own mind about Z-order. About all buttons. No reason to add labels. Buttons support text and icon. For example, Code: Copy ' Set image as background Dim bkg As BitmapDrawable bkg.Initialize (LoadBitmap(File.DirAssets, "1.jpg")) Button1.Background = bkg ' Set text Button1.Text = "Some text" Button1.Gravity = Bit.Or (Gravity.BOTTOM, Gravity.CENTER_HORIZONTAL) ... About "central button". Unlike elevation helps, it seems to me to use popup windows is more elegant way. I posted some days ago a library and a sample https://www.b4x.com/android/forum/t...pper-for-popupwindow-class.97879/#post-616872 Initialize function expects panel, you can place a button over it.
Erel B4X founder Staff member Licensed User Longtime User Oct 11, 2018 #11 Just to clarify as it is already written above, buttons have an elevation of 2dip. This means that they will appear above all other views. You should add a panel and put all the views that you want inside. Set the panel elevation to 2 or more (in the designer). Upvote 0
Just to clarify as it is already written above, buttons have an elevation of 2dip. This means that they will appear above all other views. You should add a panel and put all the views that you want inside. Set the panel elevation to 2 or more (in the designer).
Devv Active Member Licensed User Longtime User Oct 11, 2018 #12 MarkusR said: or u make a gap between the buttons where the label should appear. your label is a description of the image in the buton? Click to expand... Yes it is description Upvote 0
MarkusR said: or u make a gap between the buttons where the label should appear. your label is a description of the image in the buton? Click to expand... Yes it is description