Hi all,
This is my first try with b4a and I'm running into a little bit of cosmetic challenges. I have taken the RotatingNeedle package and altered the content.
First challenge:
- How do I get the other PNG to be recognized by the project so it can be called by Activity_Create? I created a new ImageView in Designer and added the new PNG as a quick workaround. I then removed that Imageview again. This works but what is the 'normal' way of doing this?
By the way that reminds me, why don't I see the Imageview in Designer when I open the RotatingNeedle package?
Second challenge:
- I created a new circle PNG with transparant sides, but when I run the package, the circle show up with white edges. Those edges are transparant so I probably messed up somewhere. I used the following code:
Did I mess up with Gimp or with the code? :sign0104:
This is my first try with b4a and I'm running into a little bit of cosmetic challenges. I have taken the RotatingNeedle package and altered the content.
First challenge:
- How do I get the other PNG to be recognized by the project so it can be called by Activity_Create? I created a new ImageView in Designer and added the new PNG as a quick workaround. I then removed that Imageview again. This works but what is the 'normal' way of doing this?
By the way that reminds me, why don't I see the Imageview in Designer when I open the RotatingNeedle package?
Second challenge:
- I created a new circle PNG with transparant sides, but when I run the package, the circle show up with white edges. Those edges are transparant so I probably messed up somewhere. I used the following code:
B4X:
Sub Activity_Create(FirstTime As Boolean)
Dim x, y As Float
Activity.LoadLayout("Layout1")
bmpCompass.Initialize(File.DirAssets,"CircleNova.png")
Imageview1.Initialize("")
Imageview1.Color=Colors.Transparent
Imageview1.Bitmap = bmpCompass
x = 200
y = 200
'Activity.AddView(Imageview1, 200, 200, bmpCompass.Width, bmpCompass.Height)
Activity.AddView(Imageview1, 20, 20, x, y)
csvCompass.Initialize(Imageview1)
RectCompass.Initialize(0, 0, bmpCompass.Width, bmpCompass.Height)
Timer1.Initialize("Timer1",200)
Timer1_Tick
End Sub
Did I mess up with Gimp or with the code? :sign0104: