O omoba Active Member Licensed User Longtime User Mar 2, 2013 #1 Hi, Pls what is wrong with my code/device (Motorola Photon)? When I click the volume control the volume control also acts as the return key. If KeyCode = KeyCodes.KEYCODE_BACK AND m =1 Then Return False Else MP.Play bd.Initialize(LoadBitmap(File.DirAssets, "bkg.jpg")) Activity.Background = bd m =1 Return True End If End Sub
Hi, Pls what is wrong with my code/device (Motorola Photon)? When I click the volume control the volume control also acts as the return key. If KeyCode = KeyCodes.KEYCODE_BACK AND m =1 Then Return False Else MP.Play bd.Initialize(LoadBitmap(File.DirAssets, "bkg.jpg")) Activity.Background = bd m =1 Return True End If End Sub
Erel B4X founder Staff member Licensed User Longtime User Mar 3, 2013 #2 Please use [ code ] [ /code ] tags (without spaces) when posting code. If I understand the question correctly then your code should be: Code: Copy If KeyCode = KeyCodes.KEYCODE_BACK Then If m =1 Then Return False Else MP.Play bd.Initialize(LoadBitmap(File.DirAssets, "bkg.jpg")) Activity.Background = bd m =1 Return True End If Return False End If Upvote 0
Please use [ code ] [ /code ] tags (without spaces) when posting code. If I understand the question correctly then your code should be: Code: Copy If KeyCode = KeyCodes.KEYCODE_BACK Then If m =1 Then Return False Else MP.Play bd.Initialize(LoadBitmap(File.DirAssets, "bkg.jpg")) Activity.Background = bd m =1 Return True End If Return False End If