Android Question GameView Question

SternFaun

Member
Licensed User
Hello everybody,

I read the gameview tutorial, but I dont get it. Probably because of my english skills.

I want an activity which is as followed:

Black background. In the left corner at the bottow there is a small yellow field (bitmap picture: just a yellow page). if i press the yellow field it should expand animated to the size of the screen.
could someone please give me the code for that, shouldnt be so much.
 

SternFaun

Member
Licensed User
I tried this
B4X:
Dim Ansicht as GameView
Dim Yellow as BitmapData
Dim timer1 as timer

If FirstTime Then
Yellow.Bitmap = LoadBitmap(File.DirAssets, "yellow.gif")
    Yellow.DestRect.Initialize(100dip,100dip,100dip,100dip)
timer1.Initialize("Timer2",10)
   
    End If
   
    Ansicht.Initialize("Ansicht")
    Activity.AddView(Ansicht,0,0,1000dip,1000dip)
    Ansicht.BitmapsData.Add(Gelb)
    Ansicht.Invalidate

Why is the bitmap ("Yellow") not shown on the screen?
 
Upvote 0

somed3v3loper

Well-Known Member
Licensed User
Longtime User
Try changing this
B4X:
Yellow.DestRect.Initialize(100dip,100dip,100dip,100dip)
into something like this
B4X:
Yellow.DestRect.Initialize(0,0,20%x,20%y)
 
Upvote 0
Top