ArminKH Well-Known Member Aug 20, 2015 #1 hi i want to use a color animation which is in a xml file this animation will changed the background color of a view here is my xml animation code B4X: <?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android"> <objectAnimator android:propertyName="backgroundColor" android:duration="3000" android:valueFrom="#FFFF8080" android:valueTo="#FF8080FF"/> </set> and in b4a side B4X: Anim = XML.LoadAnimation("search_view_entered","search_view_entered") Anim.Start(T8SearchTop) but this error appared B4X: java.lang.RuntimeException: Unknown animation name: objectAnimator ,... as you can see in following link http://stackoverflow.com/questions/...tor-to-make-a-textview-blink-different-colors we have also a java code B4X: AnimatorSet set = (AnimatorSet) AnimatorInflater.loadAnimator(myContext, R.anim.property_animator); set.setTarget(myTextView); set.start(); but i'm not familar with java to convert this part of code for b4a what is the solution?
hi i want to use a color animation which is in a xml file this animation will changed the background color of a view here is my xml animation code B4X: <?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android"> <objectAnimator android:propertyName="backgroundColor" android:duration="3000" android:valueFrom="#FFFF8080" android:valueTo="#FF8080FF"/> </set> and in b4a side B4X: Anim = XML.LoadAnimation("search_view_entered","search_view_entered") Anim.Start(T8SearchTop) but this error appared B4X: java.lang.RuntimeException: Unknown animation name: objectAnimator ,... as you can see in following link http://stackoverflow.com/questions/...tor-to-make-a-textview-blink-different-colors we have also a java code B4X: AnimatorSet set = (AnimatorSet) AnimatorInflater.loadAnimator(myContext, R.anim.property_animator); set.setTarget(myTextView); set.start(); but i'm not familar with java to convert this part of code for b4a what is the solution?
Erel B4X founder Staff member Licensed User Longtime User Aug 21, 2015 #2 You can use View.SetColorAnimated to animate the color. Upvote 0
ArminKH Well-Known Member Aug 21, 2015 #3 Erel said: You can use View.SetColorAnimated to animate the color. Click to expand... I know erel But i want to use that for android lower than 3 This function is support android 3 and above Can u please correct my code? Last edited: Aug 21, 2015 Upvote 0
Erel said: You can use View.SetColorAnimated to animate the color. Click to expand... I know erel But i want to use that for android lower than 3 This function is support android 3 and above Can u please correct my code?