android - Elements overlapping on top of each other -


    <android.support.v7.widget.searchview     android:id="@+id/view1"     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:queryhint="search.."     ></android.support.v7.widget.searchview>  <android.support.v7.widget.searchview     android:id="@+id/view2"     android:layout_below="@+id/view1"     android:layout_width="match_parent"     android:layout_height="wrap_content"     ></android.support.v7.widget.searchview> 

i have 2 search views need place 1 below other. used "android:layout_below="@+id/view1" method place second view under 1st view. both views overlapping on top of each other. can tell me solution this?

how using linearlayout rootlayout of searchviews instead of relativelayout?

your code looked alike this:

<linearlayout     android:orientation="vertical"     android:layout_width="match_parent"     android:layout_height="match_parent">     <android.support.v7.widget.searchview         android:id="@+id/view1"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:queryhint="search.."         ></android.support.v7.widget.searchview>      <android.support.v7.widget.searchview         android:id="@+id/view2"         android:layout_width="match_parent"         android:layout_height="wrap_content"         ></android.support.v7.widget.searchview>  </linearlayout> 

this make sure both of search views won't overlapped


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -