Refactored Report - New ‘Layout’
We now rework Report to render the actual donations - held in the Base class list.
First some layout additions. Include these new string in strings.xml
1. <string name="defaultAmount">00</string>
2. <string name="defaultMethod">N/A</string>
This is a new layout - to be called ‘row_donate.xml’. Place this in the ‘layout’ folder.
1. <?xml version="1.0" encoding="utf-8"?>
2. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3. android:layout_width="match_parent"
4. android:layout_height="match_parent" >
6. <TextView
7. android:id="@+id/row_amount"
8. android:layout_width="wrap_content"
9. android:layout_height="wrap_content"
10. android:layout_alignParentLeft="true"
11. android:layout_alignParentTop="true"
12. android:layout_marginLeft="48dp"
13. android:layout_marginTop="20dp"
14. android:text="@string/defaultAmount" />
16. <TextView
17. android:id="@+id/row_method"
18. android:layout_width="wrap_content"
19. android:layout_height="wrap_content"
20. android:layout_alignBaseline="@+id/row_amount"
21. android:layout_alignBottom="@+id/row_amount"
22. android:layout_marginLeft="106dp"
23. android:layout_toRightOf="@+id/row_amount"
24. android:text="@string/defaultMethod" />
26. </RelativeLayout>
