• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Animating view inflation

JamTheMan

Well-Known Member
Hi all...

This is the first time I post on this forum, so bare with me :-)

I am currently working on an app (API 7) that in its main activity has a LinearLayout defined as follows:

Code:
<LinearLayout
  android:orientation="vertical"
  android:layout_width="fill_parent"
  android:layout_height="wrap_content"
  android:id="@+id/asslayout"
/>

In my code i then add different View's (from XML's) to the LinearLayout using the SystemService LAYOUT_INFLATER_SERVICE, eg. like this:


Code:
if (findViewById(R.id.watsan_status_header) == null) {
  inflate = inflater.inflate(R.layout.watsan_status, null);
  layout.addView(inflate, 0, new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
}

It all works perfectly and I have the new views added in the top of the LinearLayout. But to make it look better I am trying to figure out how to animate the added view into the LinearLayout. Nothing fancy, just an animation from height = 0 to height = wrap_content.

Could anyone give me a pointer on how to do this?
 
Back
Top Bottom