Android Question Color animation by xml ?

Discussion in 'Android Questions' started by ArminKH, Aug 20, 2015.

  1. ArminKH

    ArminKH Well-Known Member

    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
    <?xml version="1.0" encoding="utf-8"?>
    <set xmlns:android=
    and in b4a side
    Anim = XML.LoadAnimation("search_view_entered","search_view_entered")
    but this error appared
    java.lang.RuntimeException: Unknown animation name: objectAnimator
    as you can see in following link
    we have also a java code
    AnimatorSet set = (AnimatorSet) AnimatorInflater.loadAnimator(myContext,
    but i'm not familar with java to convert this part of code for b4a
    what is the solution?
  2. Erel

    Erel Administrator Staff Member Licensed User

    You can use View.SetColorAnimated to animate the color.
    ArminKH likes this.
  3. ArminKH

    ArminKH Well-Known Member

    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
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice