Skip to content
This repository was archived by the owner on Jun 27, 2020. It is now read-only.

Commit 73d7d1b

Browse files
author
Evgenii Kanivets
committed
#24[30m]. Remove some redundant things.
1 parent 4407e64 commit 73d7d1b

10 files changed

+113
-173
lines changed

app/src/main/res/layout/activity_add_exchange_rate.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
android:layout_width="wrap_content"
1212
android:layout_height="wrap_content"
1313
android:gravity="center"
14-
android:text="1" />
14+
android:text="@string/one" />
1515

1616
<android.support.v7.widget.AppCompatSpinner
1717
android:id="@+id/spinner_from_currency"
@@ -25,7 +25,7 @@
2525
android:layout_height="wrap_content"
2626
android:layout_weight="1"
2727
android:gravity="center"
28-
android:text="=" />
28+
android:text="@string/equal" />
2929

3030
<EditText
3131
android:id="@+id/et_amount"
@@ -41,7 +41,7 @@
4141
android:layout_height="wrap_content"
4242
android:layout_weight="1"
4343
android:gravity="center"
44-
android:text="*" />
44+
android:text="@string/multiply" />
4545

4646
<android.support.v7.widget.AppCompatSpinner
4747
android:id="@+id/spinner_to_currency"

app/src/main/res/layout/activity_add_record.xml

Lines changed: 98 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -7,118 +7,106 @@
77
android:background="@color/white"
88
android:orientation="vertical">
99

10-
<ScrollView
10+
<LinearLayout
11+
android:layout_width="fill_parent"
12+
android:layout_height="wrap_content"
13+
android:layout_margin="2dp"
14+
android:orientation="horizontal">
15+
16+
<TextView
17+
android:layout_width="match_parent"
18+
android:layout_height="match_parent"
19+
android:layout_weight="3"
20+
android:gravity="center_vertical|left"
21+
android:paddingLeft="10dp"
22+
android:text="@string/title" />
23+
24+
<EditText
25+
android:id="@+id/et_title"
26+
android:layout_width="match_parent"
27+
android:layout_height="match_parent"
28+
android:layout_marginRight="10dp"
29+
android:layout_weight="1"
30+
android:maxLines="1"
31+
android:singleLine="true" />
32+
</LinearLayout>
33+
34+
<LinearLayout
35+
android:layout_width="match_parent"
36+
android:layout_height="wrap_content"
37+
android:layout_margin="2dp"
38+
android:layout_weight="1"
39+
android:orientation="horizontal">
40+
41+
<TextView
42+
android:layout_width="match_parent"
43+
android:layout_height="match_parent"
44+
android:layout_weight="3"
45+
android:gravity="center_vertical|left"
46+
android:paddingLeft="10dp"
47+
android:text="@string/category" />
48+
49+
<EditText
50+
android:id="@+id/et_category"
51+
android:layout_width="match_parent"
52+
android:layout_height="match_parent"
53+
android:layout_marginRight="10dp"
54+
android:layout_weight="1"
55+
android:maxLines="1"
56+
android:singleLine="true" />
57+
58+
</LinearLayout>
59+
60+
<LinearLayout
1161
android:layout_width="match_parent"
12-
android:layout_height="match_parent">
62+
android:layout_height="wrap_content"
63+
android:layout_gravity="center_horizontal"
64+
android:layout_margin="2dp"
65+
android:layout_weight="1"
66+
android:orientation="horizontal">
1367

14-
<LinearLayout
68+
<TextView
69+
android:layout_width="match_parent"
70+
android:layout_height="match_parent"
71+
android:layout_weight="3"
72+
android:gravity="center_vertical|left"
73+
android:paddingLeft="10dp"
74+
android:text="@string/price" />
75+
76+
<EditText
77+
android:id="@+id/et_price"
1578
android:layout_width="match_parent"
1679
android:layout_height="wrap_content"
17-
android:orientation="vertical">
18-
19-
<LinearLayout
20-
android:layout_width="fill_parent"
21-
android:layout_height="wrap_content"
22-
android:layout_margin="2dp"
23-
android:orientation="horizontal">
24-
25-
<TextView
26-
android:layout_width="match_parent"
27-
android:layout_height="match_parent"
28-
android:layout_weight="3"
29-
android:gravity="center_vertical|left"
30-
android:paddingLeft="10dp"
31-
android:text="@string/title" />
32-
33-
<EditText
34-
android:id="@+id/et_title"
35-
android:layout_width="match_parent"
36-
android:layout_height="match_parent"
37-
android:layout_marginRight="10dp"
38-
android:layout_weight="1"
39-
android:maxLines="1"
40-
android:singleLine="true" />
41-
</LinearLayout>
42-
43-
<LinearLayout
44-
android:layout_width="match_parent"
45-
android:layout_height="wrap_content"
46-
android:layout_margin="2dp"
47-
android:layout_weight="1"
48-
android:orientation="horizontal">
49-
50-
<TextView
51-
android:layout_width="match_parent"
52-
android:layout_height="match_parent"
53-
android:layout_weight="3"
54-
android:gravity="center_vertical|left"
55-
android:paddingLeft="10dp"
56-
android:text="@string/category" />
57-
58-
<EditText
59-
android:id="@+id/et_category"
60-
android:layout_width="match_parent"
61-
android:layout_height="match_parent"
62-
android:layout_marginRight="10dp"
63-
android:layout_weight="1"
64-
android:maxLines="1"
65-
android:singleLine="true" />
66-
67-
</LinearLayout>
68-
69-
<LinearLayout
70-
android:layout_width="match_parent"
71-
android:layout_height="wrap_content"
72-
android:layout_gravity="center_horizontal"
73-
android:layout_margin="2dp"
74-
android:layout_weight="1"
75-
android:orientation="horizontal">
76-
77-
<TextView
78-
android:layout_width="match_parent"
79-
android:layout_height="match_parent"
80-
android:layout_weight="3"
81-
android:gravity="center_vertical|left"
82-
android:paddingLeft="10dp"
83-
android:text="@string/price" />
84-
85-
<EditText
86-
android:id="@+id/et_price"
87-
android:layout_width="match_parent"
88-
android:layout_height="wrap_content"
89-
android:layout_marginRight="10dp"
90-
android:layout_weight="1"
91-
android:inputType="numberSigned"
92-
android:maxLines="1"
93-
android:singleLine="true" />
94-
95-
</LinearLayout>
96-
97-
<LinearLayout
98-
android:layout_width="match_parent"
99-
android:layout_height="wrap_content"
100-
android:layout_gravity="center_horizontal"
101-
android:layout_margin="2dp"
102-
android:layout_weight="1"
103-
android:orientation="horizontal">
104-
105-
<TextView
106-
android:layout_width="match_parent"
107-
android:layout_height="match_parent"
108-
android:layout_weight="3"
109-
android:gravity="center_vertical|left"
110-
android:paddingLeft="10dp"
111-
android:text="@string/account" />
112-
113-
<Spinner
114-
android:id="@+id/spinner_account"
115-
android:layout_width="match_parent"
116-
android:layout_height="wrap_content"
117-
android:layout_marginRight="10dp"
118-
android:layout_weight="1" />
119-
120-
</LinearLayout>
121-
</LinearLayout>
122-
123-
</ScrollView>
80+
android:layout_marginRight="10dp"
81+
android:layout_weight="1"
82+
android:inputType="numberSigned"
83+
android:maxLines="1"
84+
android:singleLine="true" />
85+
86+
</LinearLayout>
87+
88+
<LinearLayout
89+
android:layout_width="match_parent"
90+
android:layout_height="wrap_content"
91+
android:layout_gravity="center_horizontal"
92+
android:layout_margin="2dp"
93+
android:layout_weight="1"
94+
android:orientation="horizontal">
95+
96+
<TextView
97+
android:layout_width="match_parent"
98+
android:layout_height="match_parent"
99+
android:layout_weight="3"
100+
android:gravity="center_vertical|left"
101+
android:paddingLeft="10dp"
102+
android:text="@string/account" />
103+
104+
<Spinner
105+
android:id="@+id/spinner_account"
106+
android:layout_width="match_parent"
107+
android:layout_height="wrap_content"
108+
android:layout_marginRight="10dp"
109+
android:layout_weight="1" />
110+
111+
</LinearLayout>
124112
</LinearLayout>

app/src/main/res/layout/fragment_accounts.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<ListView
1010
android:id="@+id/list_view"
1111
android:layout_width="match_parent"
12-
android:layout_height="match_parent"
12+
android:layout_height="0dp"
1313
android:layout_gravity="center_horizontal"
1414
android:layout_weight="1"
1515
android:background="@android:color/transparent" />
@@ -22,7 +22,7 @@
2222

2323
<Button
2424
android:id="@+id/btn_add_account"
25-
android:layout_width="match_parent"
25+
android:layout_width="0dp"
2626
android:layout_height="wrap_content"
2727
android:layout_weight="1"
2828
android:background="@drawable/selector_add_income"

app/src/main/res/layout/fragment_exchange_rates.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<ListView
1010
android:id="@+id/list_view"
1111
android:layout_width="match_parent"
12-
android:layout_height="match_parent"
12+
android:layout_height="0dp"
1313
android:layout_gravity="center_horizontal"
1414
android:layout_weight="1"
1515
android:background="@android:color/transparent" />
@@ -22,7 +22,7 @@
2222

2323
<Button
2424
android:id="@+id/btn_add_exchange_rate"
25-
android:layout_width="match_parent"
25+
android:layout_width="0dp"
2626
android:layout_height="wrap_content"
2727
android:layout_weight="1"
2828
android:background="@drawable/selector_add_income"

app/src/main/res/layout/fragment_records.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<ListView
4242
android:id="@+id/list_view"
4343
android:layout_width="match_parent"
44-
android:layout_height="match_parent"
44+
android:layout_height="0dp"
4545
android:layout_gravity="center_horizontal"
4646
android:layout_weight="1"
4747
android:background="@android:color/transparent" />

app/src/main/res/layout/view_report_item.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@
2020
android:background="@android:color/transparent">
2121

2222
<TextView
23-
android:layout_width="match_parent"
23+
android:layout_width="0dp"
2424
android:layout_height="match_parent"
25-
android:text="Category"
2625
android:id="@+id/tv_category"
2726
android:textSize="16sp"
2827
android:layout_gravity="center"

app/src/main/res/layout/view_report_item_exp.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@
2020
android:background="@android:color/transparent">
2121

2222
<TextView
23-
android:layout_width="match_parent"
23+
android:layout_width="0dp"
2424
android:layout_height="match_parent"
25-
android:text="Category"
2625
android:id="@+id/tv_category"
2726
android:textSize="18sp"
2827
android:layout_gravity="center"

app/src/main/res/layout/view_summary_report.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
android:id="@+id/ll_total_expense">
5151

5252
<TextView
53-
android:layout_width="match_parent"
53+
android:layout_width="0dp"
5454
android:layout_height="match_parent"
5555
android:text="@string/total_expenses"
5656
android:textSize="18sp"
@@ -89,7 +89,7 @@
8989
android:id="@+id/ll_total">
9090

9191
<TextView
92-
android:layout_width="match_parent"
92+
android:layout_width="0dp"
9393
android:layout_height="match_parent"
9494
android:text="@string/total"
9595
android:textSize="18sp"

app/src/main/res/layout/view_summary_report_item.xml

Lines changed: 0 additions & 49 deletions
This file was deleted.

app/src/main/res/values/strings.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,8 @@
5151
<string name="rates_needed">Next exchange rates are needed:</string>
5252
<string name="arrow" translatable="false"><![CDATA[" -> "]]></string>
5353
<string name="account_was_removed">Account was removed</string>
54+
<string name="one" translatable="false">1</string>
55+
<string name="equal" translatable="false">=</string>
56+
<string name="multiply" translatable="false">*</string>
5457

5558
</resources>

0 commit comments

Comments
 (0)