0

So, I have an activity with Buttons ,TextViews and networkimageview inside of a RecyclerView. THe app loads images from a remote database and displays in a feed three at a time so after first 3 images have been loaded and you scroll down, three more images load. For some reason when i try to scroll down to load more images after the first 3 images load when i open the app, nothing happens and in the console it gives me this message: Skipped 75 frames! The application may be doing too much work on its main thread. When I remove the button the images loads up normally? Does anyone know why?

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

    <android.support.v7.widget.CardView
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <LinearLayout
            android:padding="@dimen/activity_horizontal_margin"
            android:orientation="vertical"
            android:layout_width="match_parent"
            android:layout_height="match_parent" >

            <com.android.volley.toolbox.NetworkImageView
                android:layout_width="match_parent"
                android:layout_height="400dp"
                android:scaleType="fitCenter"
                android:id="@+id/imageViewHero" />

            <TableLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <TableRow>
                    <TextView
                        android:text="Name"
                        android:paddingRight="10dp"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        />

                    <TextView
                        android:id="@+id/textViewName"
                        android:textStyle="bold"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        />

                </TableRow>

                <TableRow>
                    <TextView
                        android:text="Publisher"
                        android:paddingRight="10dp"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        />

                    <TextView
                        android:id="@+id/textViewPublisher"
                        android:textStyle="bold"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        />

                </TableRow>
                <TableRow>
                    <Button
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:text="Upload Image"
                        android:id="@+id/buttonUpload" />



                </TableRow>
            </TableLayout>
        </LinearLayout>
    </android.support.v7.widget.CardView>

</RelativeLayout>
Pfil Mintz
  • 161
  • 6
  • 16

0 Answers0