Private Sub Base_Resize (Width As Double, Height As Double)
mWidth=Width
mHeight=Height
End Sub
Private Sub Panel1_Resize (Width As Double, Height As Double)
Log("bbb")
mWidth=Width
mHeight=Height
[B] Panel1.Width=mWidth[/B]
Panel1.Height=mHeight
Dim size As Int=mHeight
Panel3.Top=0
Panel3.Height=size
Panel3.Width=size
Panel3.Left=mBase.Width-size
Dim size1 As Int=mHeight*2/3
ImageView1.Height=size1
ImageView1.Width=size1
ImageView1.Top=(mHeight-size1)/2
ImageView1.Left=(size-size1)/2
Dim lwidth As Double=mBase.Width-Label1.Left-size
Label1.Width=lwidth
Label1.Height=mHeight
End Sub
Private Sub InitClass
mBase.RemoveAllViews
mBase.LoadLayout("View")
TouchPanel.RemoveView
mParent.AddView(TouchPanel,0,0,mParent.Width,mParent.Height)
mBase.As(Panel).Elevation=10dip
Log("aaa")
Panel1_Resize(mWidth,mHeight)
Label1.Typeface=mFont
Label1.Text=mText
Label1.TextColor=IIf(mEnabled=False,Colors.LightGray,mTextColor)
Label1.TextSize=mTextSize
Alignment=gmap.GetDefault(mAlignment,Array As String("CENTER","LEFT"))
Label1.As(B4XView).SetTextAlignment(Alignment(0),Alignment(1))
Panel1.Color=mBackgroundColor
Panel1.As(B4XView).SetColorAndBorder(mBackgroundColor,mBorderSize,mBorderColor,mBorderRadius)
cvsBase.Initialize(mBase)
rectBase.Initialize(0, 0, mBase.Width, mBase.Height)
DateView_Initialize
End Sub