Ok i have built my app on a chinese android box and the graphics look right
In Activity_Create
Then to draw the information i want
Now the icon (cCurrent.pIcon) is 64x64 in size
The time i wanted in a larger font but i wanted this right justified and in line with the top of the icon
The Channel name i wanted to be under the Icon in line with left hand edge of the icon
And the Channel number i wanted just to the right of the icon.
All this is working but when i move to a different device it all gets messed up. the ratios especially the font sizes and positions dont look the same
Any help on this?
joolz
In Activity_Create
B4X:
channelInfo.Initialize("channelInfo")
channelInfo.Color = Colors.ARGB( 1, 128, 128, 128)
Activity.AddView( channelInfo, 0%x, 70%y, 100%x, 24%y)
Then to draw the information i want
B4X:
rect1.Initialize(5%x, 2%y, 11%x, 13%y)
canvas1.DrawBitmap( cCurrent.pIcon, Null, rect1)
canvas1.DrawText( cCurrent.cNumber, 12%x, 10%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, 16%y, Typeface.DEFAULT_BOLD, 30dip, Colors.White, "RIGHT")
Now the icon (cCurrent.pIcon) is 64x64 in size
The time i wanted in a larger font but i wanted this right justified and in line with the top of the icon
The Channel name i wanted to be under the Icon in line with left hand edge of the icon
And the Channel number i wanted just to the right of the icon.
All this is working but when i move to a different device it all gets messed up. the ratios especially the font sizes and positions dont look the same
Any help on this?
joolz