android - How to keep ListView on the Frame Layout bottoms -


i need place small rectangle above listview. used frame layout achieve it.

   item1              item1             item1    item2              item2             item2 +----------------------------------------------+ |  item3              item3             item3  | +----------------------------------------------+    item4              item4             item4 

now have problem each time scroll list pops hiding the rectangle , returns background when click list again.

is there way keep rectangle on top of list? there other ways besides frame layout overlay views?

thanks.

<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"     tools:context=".mainactivity" >      <edittext         android:id="@+id/edittextsubject"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:layout_marginbottom="@dimen/activity_horizontal_margin"         android:hint="@string/hint_remind" />      <framelayout         android:layout_width="match_parent"         android:layout_height="wrap_content" >          <view             android:id="@+id/rectselecttime"             android:layout_width="match_parent"             android:layout_height="72dp"             android:layout_gravity="center_vertical|center_horizontal|fill_horizontal"             android:background="@drawable/select_rect"             android:clickable="true"             android:importantforaccessibility="yes" />          <linearlayout             android:layout_width="match_parent"             android:layout_height="@dimen/scroller_height"             android:layout_marginbottom="@dimen/activity_horizontal_margin"             android:baselinealigned="false"             android:orientation="horizontal" >              <listview                 android:id="@+id/listviewtimeinterval"                 android:layout_width="0dp"                 android:layout_height="match_parent"                 android:layout_weight="1"                 android:focusable="false"                 android:focusableintouchmode="false"                 android:scrollbars="none"                 android:tag="timeinterval" >             </listview>              <listview                 android:id="@+id/listviewhour"                 android:layout_width="0dp"                 android:layout_height="match_parent"                 android:layout_weight="1"                 android:scrollbars="none"                 android:tag="hour" >             </listview>              <listview                 android:id="@+id/listviewminute"                 android:layout_width="0dp"                 android:layout_height="match_parent"                 android:layout_weight="1"                 android:scrollbars="none"                 android:tag="minute" >             </listview>         </linearlayout>     </framelayout>  </linearlayout> 

ok here solved code. image on top:

<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"     tools:context=".mainactivity" >      <edittext         android:id="@+id/edittextsubject"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:layout_marginbottom="@dimen/activity_horizontal_margin"         android:hint="@string/app_name" />      <framelayout         android:layout_width="match_parent"         android:layout_height="wrap_content" >            <linearlayout             android:layout_width="match_parent"             android:layout_height="match_parent"             android:layout_marginbottom="@dimen/activity_horizontal_margin"             android:baselinealigned="false"             android:orientation="horizontal" >              <listview                 android:id="@+id/listviewtimeinterval"                 android:layout_width="0dp"                 android:layout_height="match_parent"                 android:layout_weight="1"                 android:focusable="false"                 android:focusableintouchmode="false"                 android:scrollbars="none"                 android:tag="timeinterval" >             </listview>              <listview                 android:id="@+id/listviewhour"                 android:layout_width="0dp"                 android:layout_height="match_parent"                 android:layout_weight="1"                 android:scrollbars="none"                 android:tag="hour" >             </listview>              <listview                 android:id="@+id/listviewminute"                 android:layout_width="0dp"                 android:layout_height="match_parent"                 android:layout_weight="1"                 android:scrollbars="none"                 android:tag="minute" >             </listview>         </linearlayout>          <view             android:id="@+id/rectselecttime"             android:layout_width="match_parent"             android:layout_height="72dp"             android:layout_gravity="center_vertical|center_horizontal|fill_horizontal"             android:background="@drawable/ic_launcher"             android:clickable="true"             android:importantforaccessibility="yes" />     </framelayout>  </linearlayout> 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -