0

I have a little layout problem, im my app, i need to anim some elements, for example, scaling imageView from 0 to 1. the problem is: i hope make this using easings functions, but in andriod, and element never causes "overflow", then if use an bounce transition, the animated elemement is cut in some frames of transition

the element i want to animate is: layoutChatSearchIAvatarItem

im my xml:

<LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:paddingBottom="@dimen/ulife_gutter"
        android:paddingTop="@dimen/ulife_gutter"
        android:weightSum="100"
        android:clipChildren="true"
        android:clipToPadding="true">

        <EditText
            android:id="@+id/inputChatPeopleSearchInput"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_gravity="center_vertical|left"
            android:layout_marginLeft="@dimen/ulife_gutter"
            android:background="@color/white"
            android:gravity="center_vertical"
            android:hint="@string/hint_chat_search"
            android:selectAllOnFocus="true"
            android:textColor="@color/black"
            android:textColorHint="@color/lightGray"
            android:textSize="@dimen/ulife_paragraph_medium_size"
            android:layout_weight="35" />

        <FrameLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="65"
            android:clipToPadding="true"
            android:clipChildren="true">

            <HorizontalScrollView
                android:id="@+id/horizontalScrollView"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:isScrollContainer="true"
                android:scrollbars="none"
                android:clipChildren="true"
                android:clipToPadding="true">

                <LinearLayout
                    android:layout_width="wrap_content"
                    android:layout_height="fill_parent"
                    android:orientation="horizontal"
                    android:paddingLeft="@dimen/ulife_gutter"
                    android:paddingRight="@dimen/ulife_gutter"
                    android:id="@+id/layoutChatSearchIAvatarContainer"
                    android:clipChildren="true"
                    android:clipToPadding="true">

                    <FrameLayout
                        android:id="@+id/layoutChatSearchIAvatarItem"
                        android:layout_width="fill_parent"
                        android:layout_height="fill_parent"
                        android:layout_gravity="center_vertical"
                        android:layout_marginRight="@dimen/ulife_half_gutter">

                        <br.com.animaeducacao.ulife.Core.view.PorterShapeImageView
                            android:id="@+id/imageActivitieOwnerAvatar"
                            android:layout_width="@dimen/ulife_ic_size"
                            android:layout_height="@dimen/ulife_ic_size"
                            android:layout_gravity="right|top"
                            android:contentDescription="@string/alt_activitie_picture"
                            android:longClickable="false"
                            android:maxHeight="@dimen/ulife_max_height"
                            android:src="@drawable/user_avatar_03"
                            app:siShape="@drawable/mask_border_radius_avatar_stroke" />

                        <ImageView
                            android:id="@+id/imageView6"
                            android:layout_width="@dimen/ulife_ic_tiny_size"
                            android:layout_height="@dimen/ulife_ic_tiny_size"
                            android:layout_gravity="bottom|right"
                            android:background="@drawable/image_radius_gray"
                            android:src="@drawable/icon_x"
                            android:tint="@color/white" />

                    </FrameLayout>

                </LinearLayout>
            </HorizontalScrollView>

            <View
                android:layout_width="1dp"
                android:layout_height="@dimen/ulife_ic_size"
                android:background="@color/whiteSmoke" />

            <ImageView
                android:id="@+id/imageView7"
                android:layout_width="wrap_content"
                android:layout_height="@dimen/ulife_ic_size"
                android:layout_gravity="center_vertical|left"
                android:adjustViewBounds="true"
                android:src="@drawable/gradient_overlay_small_left" />

            <ImageView
                android:id="@+id/imageView8"
                android:layout_width="wrap_content"
                android:layout_height="@dimen/ulife_ic_size"
                android:layout_gravity="center_vertical|right"
                android:adjustViewBounds="true"
                android:src="@drawable/gradient_overlay_small_right" />
        </FrameLayout>

    </LinearLayout>

1 Answers1

0

check out clipChildren and clipToPadding attributes on the parent ViewGroup

http://developer.android.com/reference/android/view/ViewGroup.html#attr_android:clipChildren

darnmason
  • 2,672
  • 1
  • 17
  • 23
  • well, this is embarassing, i read the documentation and these attributes not works for me, i dont know if it's because my xml is veeeery long or whatever – feliperohde Jan 30 '15 at 12:53
  • Have you applied the attributes to the parent of the views you're animating? Both set to false? And apply them to the parent of the parent and so on until you get to the root element in the xml layout – darnmason Jan 30 '15 at 16:23
  • ok, i applied these attributes to all parents and works fine! tanks :) – feliperohde Feb 03 '15 at 19:22