I have a custom list view displaying contacts from the phone book with
checkbox on each name row. when user checks on an item I need to
display "Done" button at the bottom of the screen.

My custom Activity extends ListAcvitity through adapter populates each
row with the checbox. Custom layout as below
===========
layout.xml
===========
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:id="@id/android:list"    xmlns:android="http://
schemas.android.com/apk/res/android"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:orientation="horizontal">

        <CheckBox android:text=""
                android:id="@+id/checkBox"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textSize="25sp"/>
        <TextView
                android:id="@+id/number"
                android:layout_width="wrap_content"
                android:layout_height="fill_parent"
                 android:layout_below="@id/checkBox"
                android:layout_alignBottom="@id/number"
                android:textSize="15sp"/>

        </RelativeLayout>

have two fold question
1)how can I display a button at the bottom of the screen (not at the
end of the list). I understand since I extend ListActivity can't use
setContentView(R.layout.main)  where main.xml could have a button but
can't really mix it with custom layout.

2)Need to display "Done" button only when at least one item is checked
in the list. This is exactly same as how Gmail app on Android works.
when you check an item it displays "Archive Delete Labels" buttons.
and if none item is checked there shouldn't be a button on the
screen.

Any ideas?

Thanks,

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to