I have an activity that contains a scrollview and that has a two child but when the activity loads it doesn't show the top part and start from the top of gridview !
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/activityBackground" tools:context="com.test.app.fragment.HomeFragment"> <ScrollView android:layout_width="fill_parent" android:layout_height="fill_parent" android:fillViewport="true"> <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical"> <RelativeLayout android:layout_width="fill_parent" android:layout_height="60dp" android:background="@color/ColorPrimaryDark"/> <com.test.app.util.ExpandableHeightGridView android:id="@+id/homeNormalGridView" android:layout_width="fill_parent" android:layout_height="wrap_content" android:numColumns="2" android:padding="5dp" android:stretchMode="columnWidth" /> </LinearLayout> </ScrollView> <fr.castorflex.android.circularprogressbar.CircularProgressBar xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/homeProgress" android:layout_width="80dp" android:layout_height="80dp" android:indeterminate="true" app:cpb_color="@color/ColorPrimary" app:cpb_max_sweep_angle="300" app:cpb_min_sweep_angle="10" app:cpb_rotation_speed="1.0" app:cpb_stroke_width="4dp" app:cpb_sweep_speed="1.0" /> </RelativeLayout> as you see i have GridView and RelativeLayout as a child of scrollview but i haven't any idea why the relativeLayout is going to hide !