Hi to everybody
Is posible to set text gravity in toggleBtutton??
I am trying this code to do a graphic togglebutton but text style vertical alignment not work:
As you can see the attached image, also I set the property in the designer, but does not work properly.
Is there any solution?
Thanks in advance
Is posible to set text gravity in toggleBtutton??
I am trying this code to do a graphic togglebutton but text style vertical alignment not work:
B4X:
Dim PnlHome_BtnBt As ToggleButton
Dim BackBtnBtOn, BackBtnBtOff As BitmapDrawable
BackBtnBtOn.Initialize(LoadBitmap(File.DirAssets, "pnlhome_btnbton.png"))
BackBtnBtOn.Gravity = Gravity.CENTER_HORIZONTAL + Gravity.TOP
BackBtnBtOff.Initialize(LoadBitmap(File.DirAssets, "pnlhome_btnbtoff.png"))
BackBtnBtOff.Gravity = Gravity.CENTER_HORIZONTAL + Gravity.TOP
Dim BackBtnBt As StateListDrawable
BackBtnBt.Initialize
BackBtnBt.AddState(BackBtnBt.State_Checked, BackBtnBtOn)
BackBtnBt.AddState(BackBtnBt.State_Unchecked, BackBtnBtOff)
PnlHome_BtnBt.Background = BackBtnBt
PnlHome_BtnBt.Gravity = Gravity.CENTER_HORIZONTAL + Gravity.BOTTOM
As you can see the attached image, also I set the property in the designer, but does not work properly.
Is there any solution?
Thanks in advance