Ok making progress.
Sub ShowChannelInfo
Dim rect1 As Rect
rect1.Initialize(5%x, 2%y, 5%x+64, 2%y+64)
canvas1.DrawBitmap( cCurrent.pIcon, Null, rect1)
'canvas1.DrawLine( 10,10,500,50,Colors.Blue,5dip)
canvas1.DrawText( cCurrent.cNumber, 5%x, 18%y, Typeface.DEFAULT_BOLD, 24, Colors.White, "LEFT")
canvas1.DrawText( cCurrent.cName, 5%x, 22%y, Typeface.DEFAULT_BOLD, 24, Colors.White, "LEFT")
canvas1.DrawText( DateTime.Time(DateTime.Now).SubString2(0,5), 97%x, 5%y, Typeface.DEFAULT_BOLD, 30, Colors.White, "RIGHT")
rect1.Initialize(30%x, 2%y, 90%x, 20%y)
canvas1.DrawRect( rect1, Colors.LightGray, True, 1dip)
channelInfo.Invalidate
End Sub
But the problem is that when i change channel the old information is still there and the new stuff adds on top of it.
Whats the correct wat of clearing the old text and bitmaps?
I tried this but i lose my transparency
canvas1.DrawColor( Colors.ARGB( 255, 128, 128, 128))
I tired this but no difference
canvas1.DrawColor( Colors.ARGB( 255, 128, 128, 128))
canvas1.DrawColor( Colors.ARGB( 127, 128, 128, 128))
Also a 2nd question, how do i make this code work on different sized displays, just tried on my Galaxy 3 and everything is too big, mostly in the right place, just too large
joolz
Sub ShowChannelInfo
Dim rect1 As Rect
rect1.Initialize(5%x, 2%y, 5%x+64, 2%y+64)
canvas1.DrawBitmap( cCurrent.pIcon, Null, rect1)
'canvas1.DrawLine( 10,10,500,50,Colors.Blue,5dip)
canvas1.DrawText( cCurrent.cNumber, 5%x, 18%y, Typeface.DEFAULT_BOLD, 24, Colors.White, "LEFT")
canvas1.DrawText( cCurrent.cName, 5%x, 22%y, Typeface.DEFAULT_BOLD, 24, Colors.White, "LEFT")
canvas1.DrawText( DateTime.Time(DateTime.Now).SubString2(0,5), 97%x, 5%y, Typeface.DEFAULT_BOLD, 30, Colors.White, "RIGHT")
rect1.Initialize(30%x, 2%y, 90%x, 20%y)
canvas1.DrawRect( rect1, Colors.LightGray, True, 1dip)
channelInfo.Invalidate
End Sub
But the problem is that when i change channel the old information is still there and the new stuff adds on top of it.
Whats the correct wat of clearing the old text and bitmaps?
I tried this but i lose my transparency
canvas1.DrawColor( Colors.ARGB( 255, 128, 128, 128))
I tired this but no difference
canvas1.DrawColor( Colors.ARGB( 255, 128, 128, 128))
canvas1.DrawColor( Colors.ARGB( 127, 128, 128, 128))
Also a 2nd question, how do i make this code work on different sized displays, just tried on my Galaxy 3 and everything is too big, mostly in the right place, just too large
joolz