Skip to content

Commit

Permalink
Make summary view scrollable.
Browse files Browse the repository at this point in the history
  • Loading branch information
inguin committed Mar 10, 2013
1 parent aa5c87d commit 04756f3
Showing 1 changed file with 138 additions and 130 deletions.
268 changes: 138 additions & 130 deletions res/layout/summary.xml
Original file line number Diff line number Diff line change
@@ -1,145 +1,153 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/summary"
android:textAppearance="?android:attr/textAppearanceLarge" />

<TextView
android:id="@+id/no_expenses"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
android:text="@string/no_expenses"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="8dp" />

<TableLayout
android:id="@+id/summary_table"
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="8dp" >

<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/first_date"
android:textAppearance="?android:attr/textAppearanceMedium" />

<TextView
android:id="@+id/first_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:textAppearance="?android:attr/textAppearanceMedium" />
</TableRow>

<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/last_date"
android:textAppearance="?android:attr/textAppearanceMedium" />

<TextView
android:id="@+id/last_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:textAppearance="?android:attr/textAppearanceMedium" />
</TableRow>

<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
android:orientation="vertical" >

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/duration"
android:textAppearance="?android:attr/textAppearanceMedium" />

<TextView
android:id="@+id/duration"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:textAppearance="?android:attr/textAppearanceMedium" />
</TableRow>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/summary"
android:textAppearance="?android:attr/textAppearanceLarge" />

<TableRow
<TextView
android:id="@+id/no_expenses"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="8dp"
android:text="@string/no_expenses"
android:textAppearance="?android:attr/textAppearanceMedium"
android:visibility="gone" />

<TableLayout
android:id="@+id/summary_table"
android:layout_width="match_parent"
android:layout_height="wrap_content" >

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/num_expenses"
android:textAppearance="?android:attr/textAppearanceMedium" />

<TextView
android:id="@+id/num_expenses"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="8dp" >

<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/first_date"
android:textAppearance="?android:attr/textAppearanceMedium" />

<TextView
android:id="@+id/first_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:textAppearance="?android:attr/textAppearanceMedium" />
</TableRow>

<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/last_date"
android:textAppearance="?android:attr/textAppearanceMedium" />

<TextView
android:id="@+id/last_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:textAppearance="?android:attr/textAppearanceMedium" />
</TableRow>

<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/duration"
android:textAppearance="?android:attr/textAppearanceMedium" />

<TextView
android:id="@+id/duration"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:textAppearance="?android:attr/textAppearanceMedium" />
</TableRow>

<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/num_expenses"
android:textAppearance="?android:attr/textAppearanceMedium" />

<TextView
android:id="@+id/num_expenses"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:textAppearance="?android:attr/textAppearanceMedium" />
</TableRow>

<TableRow
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:textAppearance="?android:attr/textAppearanceMedium" />
</TableRow>

<TableRow
android:layout_height="wrap_content" >

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/total_amount"
android:textAppearance="?android:attr/textAppearanceMedium" />

<TextView
android:id="@+id/total_amount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:textAppearance="?android:attr/textAppearanceMedium" />
</TableRow>
</TableLayout>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content" >

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/total_amount"
android:textAppearance="?android:attr/textAppearanceMedium" />
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="@string/expenses_consumption"
android:textAppearance="?android:attr/textAppearanceLarge" />

<TextView
android:id="@+id/total_amount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:textAppearance="?android:attr/textAppearanceMedium" />
</TableRow>
</TableLayout>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="@string/expenses_consumption"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TableLayout
android:id="@+id/results_table"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="8dp" >
</TableLayout>

<TableLayout
android:id="@+id/results_table"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="8dp" >
</TableLayout>
</LinearLayout>

</LinearLayout>
</ScrollView>

0 comments on commit 04756f3

Please sign in to comment.