How can I fix the spinner widget at the top of the page in Android? -


i using spinner drop down in android app. but, problem when user scrolls down, spinner moves , becomes invisible. want fix spinner @ top of page user can select page.

here scrollbar:

with scroll bar

on scrolling down disappears:

on scrolling down

edit 1: layout file:

<scrollview     android:layout_width="match_parent"     android:layout_height="match_parent"     android:orientation="vertical"     android:background="@color/backgroundcolor"     xmlns:android="http://schemas.android.com/apk/res/android"> <linearlayout 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:paddingleft="@dimen/activity_horizontal_margin"     android:paddingright="@dimen/activity_horizontal_margin"     android:paddingtop="@dimen/activity_vertical_margin"      android:scrollbars="vertical"     android:paddingbottom="@dimen/activity_vertical_margin"     tools:context="com.example.shiza.dailyquranverses.quran">       <spinner         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:id="@+id/selectchapter">     </spinner>     <textview         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:id="@+id/verse"         android:maxlines = "2000"         android:textsize="@dimen/verse_font_chapter"         android:text="hello quran"         android:scrollbars="vertical"         />     </linearlayout> </scrollview> 

<?xml version="1.0" encoding="utf-8"?> <linearlayout 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:orientation="vertical">      <spinner         android:id="@+id/selectchapter"         android:layout_width="wrap_content"         android:layout_height="wrap_content" />      <scrollview         android:layout_width="match_parent"         android:layout_height="match_parent"         android:orientation="vertical">          <linearlayout             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"             android:scrollbars="vertical"             tools:context="com.example.shiza.dailyquranverses.quran">              <textview                 android:id="@+id/verse"                 android:layout_width="wrap_content"                 android:layout_height="wrap_content"                 android:maxlines="2000"                 android:scrollbars="vertical"                 android:text="hello quran" />         </linearlayout>     </scrollview> </linearlayout> 

Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -