new_cost_data.xml
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:gravity="center" android:layout_height="match_parent"> <EditText android:id="@+id/et_cost_title" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="4dp" android:hint="Cost Title"/> <EditText android:id="@+id/et_cost_money" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="4dp" android:hint="Cost Money"/> <DatePicker android:id="@+id/dp_cost_date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="4dp" android:datePickerMode="spinner" android:calendarViewShown="false"/> <!-- <LinearLayout--> <!-- android:layout_width="wrap_content"--> <!-- android:layout_height="wrap_content"--> <!-- android:orientation="horizontal">--> <!-- <TextView--> <!-- android:layout_width="match_parent"--> <!-- android:layout_height="wrap_content"--> <!-- android:text="交易类型:"--> <!-- android:textSize="20dp"--> <!-- android:height="100px"/>--> <!-- <RadioGroup--> <!-- android:id="@+id/et_cost_kind"--> <!-- android:layout_width="wrap_content"--> <!-- android:layout_height="wrap_content"--> <!-- android:orientation="horizontal">--> <!-- <RadioButton--> <!-- android:id="@+id/et_cost_kind_in"--> <!-- android:layout_width="wrap_content"--> <!-- android:layout_height="wrap_content"--> <!-- android:text="收入"/>--> <!-- <RadioButton--> <!-- android:id="@+id/et_cost_kind_out"--> <!-- android:layout_width="wrap_content"--> <!-- android:layout_height="wrap_content"--> <!-- android:text="支出"/>--> <!-- </RadioGroup>--> <!-- </LinearLayout>--> </LinearLayout>
CostBean.java
package com.example.family; import java.io.Serializable; public class CostBean implements Serializable{ public String costTitle; public String costDate; public String costMoney; }