Sub Globals
Dim bmp1, bmp2 As Bitmap
Dim Panel1 As Panel
Dim imvTest As ImageView
Dim cvsTest As Canvas
Dim skbTest As SeekBar
Dim ABExtDrawas As ABExtDrawing
Dim ABExtPaint As ABPaint
Dim rectDest As Rect
Dim Alpha As Int
End Sub
Sub Activity_Create(FirstTime As Boolean)
imvTest.Initialize("")
Activity.AddView(imvTest, 10%x , 10%x, 80%x, 53%x)
skbTest.Initialize("skbTest")
Activity.AddView(skbTest, 10%x , 60%x, 80%x, 30dip)
skbTest.Max = 255
skbTest.Top = 70%x
bmp1.Initialize(File.DirAssets, "image0.jpg")
bmp2.Initialize(File.DirAssets, "image2.jpg")
Alpha = 0
skbTest.Value = 0
rectDest.Initialize(0, 0, imvTest.Width, imvTest.Height)
cvsTest.Initialize(imvTest)
ABExtPaint.Initialize
ABExtPaint.SetAlpha(255 - Alpha)
ABExtDrawas.drawBitmap(cvsTest, bmp1, Null, rectDest, ABExtPaint)
ABExtPaint.Initialize
ABExtPaint.SetAlpha(Alpha)
ABExtDrawas.drawBitmap(cvsTest, bmp2, Null, rectDest, ABExtPaint)
End Sub
Sub skbTest_ValueChanged (Value As Int, UserChanged As Boolean)
If UserChanged Then
Alpha = Value
imvTest.RemoveView
imvTest.Initialize("")
Activity.AddView(imvTest, 10%x , 10%x, 80%x, 53%x)
cvsTest.Initialize(imvTest)
ABExtPaint.Initialize
ABExtPaint.SetAlpha(255 - Alpha)
ABExtDrawas.drawBitmap(cvsTest, bmp1, Null, rectDest, ABExtPaint)
ABExtPaint.Initialize
ABExtPaint.SetAlpha(Alpha)
ABExtDrawas.drawBitmap(cvsTest, bmp2, Null, rectDest, ABExtPaint)
imvTest.Invalidate
End If
End Sub