A AR_B4X Member Licensed User Sep 8, 2018 #1 Kind of new with B4x. I am trying to implement button animation, i.e., when button is clicked, the text should fade. Found this link on the forum https://www.b4x.com/android/forum/threads/animation-fade-in-and-out.63610/ The MeowMeow.zip over here https://www.b4x.com/android/forum/attachments/meowmeow-test-zip.41624/ works fine. But in the Manifest editor, if I change the minsdkversion to 7 and targetsdkversion to 23. And add the following lines, Code: Copy SetApplicationAttribute("android:theme", "@style/AppTheme") CreateResource(values, theme.xml, <resources> <style name="AppTheme" parent="android:Theme.Material.Light"> </style> </resources> ) the animation doesnt seem to work. I am using version 7.8 Thank you.
Kind of new with B4x. I am trying to implement button animation, i.e., when button is clicked, the text should fade. Found this link on the forum https://www.b4x.com/android/forum/threads/animation-fade-in-and-out.63610/ The MeowMeow.zip over here https://www.b4x.com/android/forum/attachments/meowmeow-test-zip.41624/ works fine. But in the Manifest editor, if I change the minsdkversion to 7 and targetsdkversion to 23. And add the following lines, Code: Copy SetApplicationAttribute("android:theme", "@style/AppTheme") CreateResource(values, theme.xml, <resources> <style name="AppTheme" parent="android:Theme.Material.Light"> </style> </resources> ) the animation doesnt seem to work. I am using version 7.8 Thank you.
Erel B4X founder Staff member Licensed User Longtime User Sep 9, 2018 #2 You need to set targetSdkVersion to 26 if you want to upload your app to Google Play. 1. This is not a good example. It doesn't follow best practices and it doesn't handle the timer correctly. 2. Buttons in the material theme are elevated so the button hides the label. You can put the label in an elevated panel. It will be simpler top put the label in a panel without a button at all: Almost complete code: Code: Copy Sub Panel1_Click Label1.SetVisibleAnimated(1000, Not(Label1.Visible)) End Sub Project is attached. It will require some changes to work with B4A v7.8. Attachments 1.zip 1.zip 8.9 KB · Views: 294 Upvote 0
You need to set targetSdkVersion to 26 if you want to upload your app to Google Play. 1. This is not a good example. It doesn't follow best practices and it doesn't handle the timer correctly. 2. Buttons in the material theme are elevated so the button hides the label. You can put the label in an elevated panel. It will be simpler top put the label in a panel without a button at all: Almost complete code: Code: Copy Sub Panel1_Click Label1.SetVisibleAnimated(1000, Not(Label1.Visible)) End Sub Project is attached. It will require some changes to work with B4A v7.8.
A AR_B4X Member Licensed User Sep 9, 2018 #3 Thank you very much. Your solution worked. The trick was to replace Button with Panel. Upvote 0