android - Images and text go into the header when I scroll -


every time scroll down screen, images , text keep going header , interfering header, can tell went wrong in xml file? i'm pretty sure it's small thing can't seem see it. thank you

screenshot

 <scrollview         xmlns:android="http://schemas.android.com/apk/res/android"         xmlns:tools="http://schemas.android.com/tools"         android:layout_height="match_parent"         android:layout_width="match_parent">     <linearlayout         xmlns:android="http://schemas.android.com/apk/res/android"         xmlns:app="http://schemas.android.com/apk/res-auto"         xmlns:tools="http://schemas.android.com/tools"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:paddingbottom="@dimen/activity_vertical_margin"         android:paddingleft="@dimen/activity_horizontal_margin"         android:paddingright="@dimen/activity_horizontal_margin"         android:paddingtop="@dimen/activity_vertical_margin"         app:layout_behavior="@string/appbar_scrolling_view_behavior"         tools:context="ie.example.artur.projectrepeat.scrollactivity"         android:orientation="vertical"         android:weightsum="1">            <textview             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:textappearance="?android:attr/textappearancelarge"             android:text="potatoe"             android:id="@+id/textview6"             android:layout_weight="0.95"             />          <imageview             android:layout_width="178dp"             android:layout_height="71dp"             android:id="@+id/imageview3"             android:layout_gravity="center_horizontal"             android:src="@mipmap/potatoe"             android:layout_weight="0.61"             android:contentdescription="potatoe1" />           <textview             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:textappearance="?android:attr/textappearancelarge"             android:text="tomatoe"             android:id="@+id/textview7" />          <imageview             android:layout_width="178dp"             android:layout_height="71dp"             android:id="@+id/imageview4"             android:layout_gravity="center_horizontal"             android:src="@mipmap/tomatoe"             android:layout_weight="0.44" />          <textview             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:textappearance="?android:attr/textappearancelarge"             android:text="carrots"             android:id="@+id/textview8" />          <imageview             android:layout_width="178dp"             android:layout_height="71dp"             android:id="@+id/imageview5"             android:layout_gravity="center_horizontal"             android:src="@drawable/carrot"             android:layout_weight="0.61" />          <textview             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:textappearance="?android:attr/textappearancelarge"             android:text="onions"             android:id="@+id/textview9" />          <imageview             android:layout_width="178dp"             android:layout_height="71dp"             android:id="@+id/imageview6"             android:layout_gravity="center_horizontal"             android:src="@mipmap/potatoe"             android:layout_weight="0.36" />          <textview             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:textappearance="?android:attr/textappearancelarge"             android:text="apples"             android:id="@+id/textview10" />          <imageview             android:layout_width="178dp"             android:layout_height="71dp"             android:id="@+id/imageview7"             android:layout_gravity="center_horizontal"             android:src="@drawable/apples"             android:layout_weight="0.30" />          <textview             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:textappearance="?android:attr/textappearancelarge"             android:text="oranges"             android:id="@+id/textview11" />          <imageview             android:layout_width="178dp"             android:layout_height="71dp"             android:id="@+id/imageview8"             android:layout_gravity="center_horizontal"             android:src="@drawable/oranges" />          <textview             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:textappearance="?android:attr/textappearancelarge"             android:text="strawberries"             android:id="@+id/textview12" />          <imageview             android:layout_width="178dp"             android:layout_height="71dp"             android:id="@+id/imageview9"             android:layout_gravity="center_horizontal"             android:src="@drawable/strawberry" />          <textview             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:textappearance="?android:attr/textappearancelarge"             android:text="bananas"             android:id="@+id/textview13" />          <imageview             android:layout_width="178dp"             android:layout_height="71dp"             android:id="@+id/imageview10"             android:layout_gravity="center_horizontal"             android:src="@drawable/bananas" />          <textview             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:textappearance="?android:attr/textappearancelarge"             android:text="lettuce"             android:id="@+id/textview14" />          <imageview             android:layout_width="178dp"             android:layout_height="71dp"             android:id="@+id/imageview11"             android:layout_gravity="center_horizontal"             android:src="@drawable/letucce" />          <textview             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:textappearance="?android:attr/textappearancelarge"             android:text="pears"             android:id="@+id/textview15" />          <imageview             android:layout_width="178dp"             android:layout_height="71dp"             android:id="@+id/imageview12"             android:layout_gravity="center_horizontal"             android:src="@drawable/pears" />      </linearlayout>     </scrollview> 

the problem not xml. it's on main layout.

  • your toolbar must last element in xml
  • or have use relativelayout , android:layout_below
  • or have use linearlayout , orientation="vertical"

Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -