Sub Activity_Create(FirstTime As Boolean)
Private pi As Phone
pi.SetScreenBrightness(1)
If 100%y > 100%x Then
Activity.LoadLayout("Preview")
Else
Activity.LoadLayout("previewLandscape")
End If
If Info.licensed=False Then
adInt.Initialize("mwadi","ca-app-pub-49399549238*****/868696****")
adInt.LoadAd
End If
Dim exif As ExifData
exif.Initialize(Main.dir,Main.filename)
Log(exif.getAttribute(exif.TAG_ORIENTATION))
If exif.getAttribute(exif.TAG_ORIENTATION) = 1 Then
Dim newImage As Bitmap = RotateImage(LoadBitmap(Main.dir,Main.filename),0,1)
Else If exif.getAttribute(exif.TAG_ORIENTATION) = 3 Then
Dim newImage As Bitmap = RotateImage(LoadBitmap(Main.dir,Main.filename),180,2)
Else If exif.getAttribute(exif.TAG_ORIENTATION) = 6 Then
Dim newImage As Bitmap = RotateImage(LoadBitmap(Main.dir,Main.filename),90,3)
Else If exif.getAttribute(exif.TAG_ORIENTATION) = 8 Then
Dim newImage As Bitmap = RotateImage(LoadBitmap(Main.dir,Main.filename),-90,3)
End If
saveImage=newImage
pnlPhoto.SetBackgroundImage(newImage)
Dim bm As BitmapDrawable
bm.Initialize(LoadBitmap(File.DirAssets,"ic_action_share.png"))
btnShare.BackgroundColor=Colors.ARGB(200,30,144,255)
btnShare.TextColor=Colors.White
btnShare.Text="Share"
btnShare.setIcon(True,bm)
Dim bm As BitmapDrawable
bm.Initialize(LoadBitmap(File.DirAssets,"ic_action_download.png"))
btnSave.BackgroundColor=Colors.ARGB(200,0,128,0)
btnSave.TextColor=Colors.White
btnSave.Text="Save"
btnSave.setIcon(True,bm)
Dim bm As BitmapDrawable
bm.Initialize(LoadBitmap(File.DirAssets,"ic_action_cancel.png"))
btnDelete.TextColor=Colors.White
btnDelete.BackgroundColor=Colors.ARGB(200,255,0,0)
btnDelete.Text="Delete"
btnDelete.setIcon(True,bm)
ProgressDialogHide
End Sub