Here's a short exemple :

The XML file :

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >

    <ScrollView xmlns:android="http://schemas.android.com/apk/res/
android"
        android:id="@+id/formScrollView"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:background="#FF00FF"
        android:scrollbars="none"
        android:layout_weight="1"
    >

                <LinearLayout
                        android:id="@+id/contentLayout"
                        android:layout_width="fill_parent"
                        android:layout_height="fill_parent"
                        android:orientation="vertical"
                        android:padding="6px"
                        android:background="@drawable/pj_bkg">

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="fdsfsd"
                            />
                        <Button
                            android:id="@+id/myButton"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="click me !"
                            />
                </LinearLayout>
        </ScrollView>
</LinearLayout>

when the button is clicked, i apply this animation to my linearlayout:

<set xmlns:android="http://schemas.android.com/apk/res/android";
                android:interpolator="@android:anim/accelerate_interpolator"
                android:fillAfter="true" >

        <scale
             android:fromXScale="1.0" android:toXScale="1.0"
             android:fromYScale="1.0" android:toYScale="1.5"
             android:pivotX="0%" android:pivotY="0%"
             android:duration="700"/>
</set>

The LinearLayout is scaled and the button is scaled too. Is there a
way to avoid the button and the textview to be resized.
Or is there a way to play an animation which resize the height of my
LinearLayout without modifying its content ?

On 2 avr, 23:13, droozen <droozenr...@gmail.com> wrote:
> Would you post your xml for your layout? If the children of avieware
> using the android:layout_height or android:layout_width property, for
> example, in a way that is tied to the parent (such as,
> android:layout_height="fill_parent") then I imagine changing the size
> of the parent should, as defined in the xml, change the size of the
> children. If this is how your xml is set up and you don't want this
> behavior, you should probably change the xml for the children.
>
> On Apr 2, 3:50 pm, Ovuca <bruno.lev...@gmail.com> wrote:
>
> > Hi,
>
> > I need to resize the height of a layout so i tried to apply ascale
> > animation. Theviewis resized but its children are resized too. Is
> > there a way to resize the layout without resizing its children?
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to