ListView implementation of the list, if it is editable, can be deleted, the general need to provide bulk deletion, otherwise, a delete experience is very bad, but also to the user brought a lot of trouble.
Implementation of the effect diagram
Specific implementation code
Select.xml
The main layout file contains a ListView and a hidden layout that contains two button one TextView, the default layout is gone, when the supervisor hears the long response event display.
<?xml version= "1.0" encoding= "Utf-8"?> <linearlayout xmlns:android= "http://schemas.android.com/apk/res/" Android "Android:layout_width=" Match_parent "android:layout_height=" match_parent "android:orientation=" Vertica
L "> <listview android:id=" @+id/list "android:layout_width=" Match_parent "
android:layout_height= "Match_parent" android:layout_weight= "1" android:cachecolorhint= "#FFF" >
</ListView> <relativelayout android:id= "@+id/relative" Android:layout_width= "Fill_parent" android:layout_height= "50DP" android:gravity= "Bottom" Android:
background= "@color/lemonchiffon" android:visibility= "Gone" > <button Android:id= "@+id/cancle" android:layout_width= "wrap_content" android:layout_height= "Wrap_con" Tent "android:text=" retreatPin | "
Android:textsize= "20SP" android:background= "@null" android:layout_centervertical= "true" /> <textview android:id= "@+id/txtcount" Android: Layout_width= "Wrap_content" android:layout_height= "wrap_content" android:text= "Total" and
Roid:textsize= "15SP" android:layout_centerinparent= "true"/>
<button android:id= "@+id/delete" android:layout_width= "Wrap_content" android:layout_height= "wrap_content" android:text= "| Delete the "android:textsize=" 20sp android:background= "@null" android:layout_alignparentright = "true" android:layout_centervertical= "true"/> </relativelayo Ut> </LinearLayout>