[Solved] How to design this Grid view xml page?


As per your design you need scrollview for 2 above components and your BottomNavigationView is fix (not movable).

In your code you are not using scrollview first and second i’m not sure why you’re using framelayout!

Here’s my code which is exactly as per your given design try this if any concern you can ask! 🙂

Here’s my code:

<?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:orientation="vertical">

    <ScrollView
        android:id="@+id/scroll"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
       android:layout_above="@+id/bottom_gallery">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical">

            <LinearLayout
                android:id="@+id/rel_titleHolder"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="#dadada"
                android:gravity="center"
                android:orientation="vertical">

                <ImageView
                    android:id="@+id/profile_image"
                    android:layout_width="100dp"
                    android:layout_height="100dp"
                    android:src="https://stackoverflow.com/questions/45457890/@mipmap/ic_launcher" />

                <TextView
                    android:id="@+id/amsc_txt_fbusername"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="2dp"
                    android:gravity="center"
                    android:text="TextView" />

            </LinearLayout>

            <GridView
                android:id="@+id/grid_test"
                android:layout_width="match_parent"
                android:layout_height="400dp"
                android:columnWidth="85dp"
                android:horizontalSpacing="2dp"
                android:numColumns="3"/>
        </LinearLayout>

    </ScrollView>

    <android.support.design.widget.BottomNavigationView
        android:id="@+id/bottom_gallery"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="#ffffff"
        android:layout_alignParentBottom="true" />

</RelativeLayout>

2

solved How to design this Grid view xml page?