Android - Animate views that are programatically added to the layout -


i creating couple of textviews programmatically , adding linear layout.everything works fine.

now want add animations on textviews. after adding textviews trying add animations on them using viewpropertyanimator. don't see animations. if add them in xml testing, works fine.

i found thing need add event when textview attached screen , code animation here. have set of animations run on each textview , after done need start animations on other.

any ideas or pointers how can achieve this?

my code thing like,

-- create textviews(invisible) in loop , add them layout.
-- after above step trying animate below each of text views 1 one. need chain need fade in 1 one.

        tv1.setvisibility(view.visible);         tv1.animate().alpha(1).setduration(500); 

but animations not working.

thanks help.

the viewpropertyanimator animates properties current value specified value. since alpha of newly instantiated views 1, animation animate alpha 1 1. should first set alpha 0 rather setting visibility:

tv1.setalpha(0); tv1.animate().alpha(1).setduration(500); 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -