Hello,
I have two panels in my app which are quite complex views. A single
panel contains a ListView and some smaller views. I want them to
scroll horizontally as smooth as possible. I've decided to use the
ViewPager, but scrolling is not somooth as it should be. I have also
noticed a drop in performance of scrolling the ListView. When not in
the ViewPager the list scrolls very smooth, though.

I tried playing with drawing cache but it doesn't change anything. Or
maybe am I doing something wrong? Does the complexity of the view
makes difference? If yes, what should I do with that?

Here is the panel layout. There are two such panels in the ViewPager.

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_weight="1">

        <RelativeLayout
            android:id="@+id/topbar"
                android:layout_width="fill_parent"
                android:layout_height="35dp"
                android:background="@drawable/topbar"
                android:gravity="center_vertical"
                android:paddingLeft="5dp"
                android:paddingRight="5dp">
                <ImageView
                                android:id="@+id/explorer_icon"
                                android:layout_width="20dp"
                                android:layout_centerVertical="true"
                                android:layout_height="20dp"/>
                <HorizontalScrollView
                                android:layout_width="fill_parent"
                                android:layout_height="fill_parent"
                                android:id="@+id/topbar_scroll"
                                android:scrollbars="none"
                                android:layout_toRightOf="@+id/explorer_icon">
                                <LinearLayout
                                                android:id="@+id/topbar_path"
                                                android:orientation="horizontal"
                                            android:layout_width="fill_parent"
                                                
android:layout_height="fill_parent"
                                                >
                                                        <!-- aktualna sciezka 
-->
                                </LinearLayout>
                </HorizontalScrollView>
        </RelativeLayout>

        <RelativeLayout
            android:id="@+id/list_container"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent">

            <!--  list view inserted from code -->


                <RelativeLayout
                        android:layout_width="fill_parent"
                        android:layout_height="fill_parent"
                        android:id="@+id/browsing_progress"
                        android:visibility="gone"
                        android:clickable="true">
                        <ProgressBar
                            style="@android:style/Widget.ProgressBar.Inverse"
                                android:id="@+id/browsing_progress_circle"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:indeterminateOnly="true"
                                android:layout_centerInParent="true"/>

                </RelativeLayout>
                <LinearLayout
                    android:id="@+id/text_filter_container"
                    android:layout_width="match_parent"
                    android:orientation="horizontal"
                    android:layout_margin="20dp"
                    android:visibility="gone"
                    android:layout_alignParentBottom="true"
                        android:layout_height="wrap_content">
                        <EditText
                            android:id="@+id/text_filter"
                            android:layout_width="fill_parent"
                            android:layout_height="wrap_content"
                            android:background="@color/translucent_black"
                            android:layout_weight="1"
                            android:padding="10dp"/>

                        <ToggleButton
                            android:id="@+id/text_filter_mode_toggle"
                            android:layout_width="wrap_content"
                            android:layout_height="fill_parent"
                            android:text="abcd" />

                </LinearLayout>

        </RelativeLayout>

</LinearLayout>

Any advices will be appreciated.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to