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

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -