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

Commit d7f766d

Browse files
author
Evgenii Kanivets
committed
[30m]. Improve some UI.
1 parent 05beed0 commit d7f766d

File tree

4 files changed

+50
-31
lines changed

4 files changed

+50
-31
lines changed

app/src/main/AndroidManifest.xml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,26 @@
3232
<activity
3333
android:name=".activity.AddRecordActivity"
3434
android:screenOrientation="portrait"
35-
android:theme="@style/Theme.Default" />
35+
android:theme="@style/Theme.Default"
36+
android:windowSoftInputMode="stateVisible" />
3637
<activity
3738
android:name=".activity.AddAccountActivity"
3839
android:label="@string/title_add_account"
3940
android:screenOrientation="portrait"
40-
android:theme="@style/Theme.Default" />
41+
android:theme="@style/Theme.Default"
42+
android:windowSoftInputMode="stateVisible" />
4143
<activity
4244
android:name=".activity.AddExchangeRateActivity"
4345
android:label="@string/add_exchange_rate"
4446
android:screenOrientation="portrait"
45-
android:theme="@style/Theme.Default" />
47+
android:theme="@style/Theme.Default"
48+
android:windowSoftInputMode="stateVisible" />
4649
<activity
4750
android:name=".activity.TransferActivity"
4851
android:label="@string/transfer"
4952
android:screenOrientation="portrait"
50-
android:theme="@style/Theme.Default" />
53+
android:theme="@style/Theme.Default"
54+
android:windowSoftInputMode="stateVisible" />
5155
</application>
5256

5357
</manifest>

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626
android:layout_height="wrap_content"
2727
android:layout_marginRight="10dp"
2828
android:layout_weight="1"
29-
android:inputType="text" />
29+
android:inputType="text"
30+
android:maxLines="1"
31+
android:singleLine="true" />
3032
</LinearLayout>
3133

3234
<LinearLayout
@@ -49,7 +51,9 @@
4951
android:layout_height="wrap_content"
5052
android:layout_marginRight="10dp"
5153
android:layout_weight="1"
52-
android:inputType="numberSigned" />
54+
android:inputType="numberSigned"
55+
android:maxLines="1"
56+
android:singleLine="true" />
5357

5458
</LinearLayout>
5559

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

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@
3535
android:layout_width="match_parent"
3636
android:layout_height="match_parent"
3737
android:layout_marginRight="10dp"
38-
android:layout_weight="1" />
38+
android:layout_weight="1"
39+
android:maxLines="1"
40+
android:singleLine="true" />
3941
</LinearLayout>
4042

4143
<LinearLayout
@@ -58,7 +60,9 @@
5860
android:layout_width="match_parent"
5961
android:layout_height="match_parent"
6062
android:layout_marginRight="10dp"
61-
android:layout_weight="1" />
63+
android:layout_weight="1"
64+
android:maxLines="1"
65+
android:singleLine="true" />
6266

6367
</LinearLayout>
6468

@@ -84,7 +88,9 @@
8488
android:layout_height="wrap_content"
8589
android:layout_marginRight="10dp"
8690
android:layout_weight="1"
87-
android:inputType="numberSigned" />
91+
android:inputType="numberSigned"
92+
android:maxLines="1"
93+
android:singleLine="true" />
8894

8995
</LinearLayout>
9096

@@ -99,15 +105,15 @@
99105
<TextView
100106
android:layout_width="match_parent"
101107
android:layout_height="match_parent"
108+
android:layout_weight="3"
102109
android:gravity="center_vertical|left"
103110
android:paddingLeft="10dp"
104-
android:text="@string/account"
105-
android:layout_weight="3" />
111+
android:text="@string/account" />
106112

107113
<Spinner
114+
android:id="@+id/spinner_account"
108115
android:layout_width="match_parent"
109116
android:layout_height="wrap_content"
110-
android:id="@+id/spinner_account"
111117
android:layout_marginRight="10dp"
112118
android:layout_weight="1" />
113119

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

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,63 +3,68 @@
33
xmlns:tools="http://schemas.android.com/tools"
44
android:layout_width="match_parent"
55
android:layout_height="match_parent"
6+
android:orientation="horizontal"
67
android:paddingBottom="@dimen/activity_vertical_margin"
78
android:paddingLeft="@dimen/activity_horizontal_margin"
89
android:paddingRight="@dimen/activity_horizontal_margin"
910
android:paddingTop="@dimen/activity_vertical_margin"
10-
android:orientation="horizontal"
1111
tools:context="com.blogspot.e_kanivets.moneytracker.activity.TransferActivity">
1212

1313
<LinearLayout
14-
android:layout_weight="1"
1514
android:layout_width="0dp"
1615
android:layout_height="wrap_content"
17-
android:orientation="vertical"
18-
android:layout_marginRight="8dp">
16+
android:layout_marginRight="8dp"
17+
android:layout_weight="1"
18+
android:orientation="vertical">
1919

2020
<TextView
2121
android:layout_width="wrap_content"
2222
android:layout_height="wrap_content"
23-
android:text="@string/from"
24-
android:layout_gravity="center_horizontal" />
23+
android:layout_gravity="center_horizontal"
24+
android:text="@string/from" />
2525

2626
<android.support.v7.widget.AppCompatSpinner
27+
android:id="@+id/spinner_from"
2728
android:layout_width="match_parent"
28-
android:layout_height="wrap_content"
29-
android:id="@+id/spinner_from"/>
29+
android:layout_height="wrap_content" />
3030

3131
<EditText
32+
android:id="@+id/et_from_amount"
3233
android:layout_width="match_parent"
3334
android:layout_height="wrap_content"
34-
android:inputType="number"
3535
android:ems="10"
36-
android:id="@+id/et_from_amount" />
36+
android:inputType="number"
37+
android:maxLines="1"
38+
android:nextFocusDown="@+id/et_to_amount"
39+
android:singleLine="true" />
3740
</LinearLayout>
3841

3942
<LinearLayout
40-
android:layout_weight="1"
4143
android:layout_width="0dp"
4244
android:layout_height="wrap_content"
43-
android:orientation="vertical"
44-
android:layout_marginLeft="8dp">
45+
android:layout_marginLeft="8dp"
46+
android:layout_weight="1"
47+
android:orientation="vertical">
4548

4649
<TextView
4750
android:layout_width="wrap_content"
4851
android:layout_height="wrap_content"
49-
android:text="@string/to"
50-
android:layout_gravity="center_horizontal" />
52+
android:layout_gravity="center_horizontal"
53+
android:text="@string/to" />
5154

5255
<android.support.v7.widget.AppCompatSpinner
56+
android:id="@+id/spinner_to"
5357
android:layout_width="match_parent"
54-
android:layout_height="wrap_content"
55-
android:id="@+id/spinner_to"/>
58+
android:layout_height="wrap_content" />
5659

5760
<EditText
61+
android:id="@+id/et_to_amount"
5862
android:layout_width="match_parent"
5963
android:layout_height="wrap_content"
60-
android:inputType="number"
6164
android:ems="10"
62-
android:id="@+id/et_to_amount" />
65+
android:inputType="number"
66+
android:maxLines="1"
67+
android:singleLine="true" />
6368
</LinearLayout>
6469

6570
</LinearLayout>

0 commit comments

Comments
 (0)