效果图:
布局文件xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/Layout2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="10dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:id="@+id/btn_startInventory"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:background="@drawable/button_style_org"
android:text="@string/btn_startInventory"
android:textColor="@color/white"
android:textSize="15sp" />
<Button
android:id="@+id/btn_stopInventory"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:background="@drawable/button_style_org"
android:text="@string/btn_stopInventory"
android:textColor="@color/white"
android:textSize="15sp" />
<Button
android:id="@+id/btn_clearList"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:background="@drawable/button_style_org"
android:text="@