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

Commit 0c21f1d

Browse files
authored
Merge pull request #2080 from arthurbdiniz/fix-2079
[IMPROVEMENT][LAYOUT] Profile Layout according to a web interface
2 parents bf957e3 + 22d7bf0 commit 0c21f1d

4 files changed

Lines changed: 42 additions & 20 deletions

File tree

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ android {
1818
applicationId "chat.rocket.android"
1919
minSdkVersion versions.minSdk
2020
targetSdkVersion versions.targetSdk
21-
versionCode 2065
21+
versionCode 2067
2222
versionName "3.4.0"
2323
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2424
multiDexEnabled true

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

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,47 +37,55 @@
3737

3838
<TextView
3939
android:id="@+id/text_status"
40+
style="@style/Profile.TextView"
4041
android:layout_width="match_parent"
4142
android:layout_height="wrap_content"
42-
android:layout_marginTop="32dp"
43-
android:paddingTop="10dp"
44-
android:paddingBottom="10dp"
45-
android:text="@string/status"
46-
android:textColor="#DE000000"
47-
android:textSize="18sp"
48-
android:textStyle="normal" />
43+
android:text="@string/status" />
44+
45+
<TextView
46+
style="@style/Profile.TextView"
47+
android:layout_width="wrap_content"
48+
android:layout_height="wrap_content"
49+
android:text="@string/msg_name" />
4950

5051
<EditText
5152
android:id="@+id/text_name"
5253
style="@style/Profile.EditText"
5354
android:layout_width="match_parent"
54-
android:layout_height="48dp"
55-
android:layout_marginTop="16dp"
5655
android:drawableStart="@drawable/ic_person_black_20dp"
57-
android:hint="@string/msg_name"
56+
android:hint="@string/msg_profile_name_hint"
5857
android:inputType="textCapWords" />
5958

59+
<TextView
60+
style="@style/Profile.TextView"
61+
android:layout_width="wrap_content"
62+
android:layout_height="wrap_content"
63+
android:text="@string/msg_username" />
64+
6065
<EditText
6166
android:id="@+id/text_username"
6267
style="@style/Profile.EditText"
6368
android:layout_width="match_parent"
64-
android:layout_height="48dp"
65-
android:layout_marginTop="16dp"
6669
android:drawableStart="@drawable/ic_at_black_20dp"
67-
android:hint="@string/msg_username"
70+
android:hint="@string/msg_profile_username_hint"
6871
android:inputType="text" />
6972

73+
<TextView
74+
style="@style/Profile.TextView"
75+
android:layout_width="wrap_content"
76+
android:layout_height="wrap_content"
77+
android:text="@string/msg_email" />
78+
7079
<EditText
7180
android:id="@+id/text_email"
7281
style="@style/Profile.EditText"
7382
android:layout_width="match_parent"
74-
android:layout_height="48dp"
75-
android:layout_marginTop="16dp"
76-
android:layout_marginBottom="32dp"
83+
android:layout_marginBottom="16dp"
7784
android:drawableStart="@drawable/ic_email_black_20dp"
78-
android:hint="@string/msg_email"
85+
android:hint="@string/msg_profile_email_hint"
7986
android:inputType="textEmailAddress" />
8087
</LinearLayout>
88+
8189
</ScrollView>
8290

8391
<com.wang.avi.AVLoadingIndicatorView

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,15 @@ https://github.com/RocketChat/java-code-styles/blob/master/CODING_STYLE.md#strin
113113
<string name="msg_no_data_to_display">No data to display</string>
114114
<string name="msg_check_this_out">Check this out</string>
115115
<string name="msg_share_using">Share using</string>
116+
<string name="msg_username">Username</string>
117+
<string name="msg_profile_username_hint" translatable="false">Please enter your username</string> <!-- TODO Make translatable and add translations -->
116118
<string name="msg_profile_updated_successfully">Profile updated successfully</string>
117-
<string name="msg_username">username</string>
118119
<string name="msg_username_or_email">Username or email</string>
119120
<string name="msg_password">Password</string>
120121
<string name="msg_name">Name</string>
122+
<string name="msg_profile_name_hint" translatable="false">Please enter your name…</string>
121123
<string name="msg_email">Email</string>
124+
<string name="msg_profile_email_hint" translatable="false">Please enter your email address</string> <!-- TODO Make translatable and add translations -->
122125
<string name="msg_avatar_url">avatar URL</string>
123126
<string name="msg_or_continue_using_social_accounts">Or continue using social accounts</string>
124127
<string name="msg_new_user">New user? %1$s</string>

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,18 @@
262262

263263
// REMARK: To be removed.
264264
<style name="Profile.EditText" parent="Authentication.EditText.Border">
265-
<item name="android:background">@drawable/style_edit_text_profile</item>
265+
<item name="android:layout_height">48dp</item>
266+
<item name="android:layout_marginTop">8dp</item>
267+
</style>
268+
269+
<style name="Profile.TextView" parent="TextAppearance.AppCompat.Title">
270+
<item name="android:textSize">16sp</item>
271+
<item name="android:fontFamily">sans-serif-medium</item>
272+
<item name="android:textStyle">normal</item>
273+
<item name="android:layout_marginTop">24dp</item>
274+
<item name="android:layout_gravity">left</item>
275+
<item name="android:textColor">@color/colorPrimary</item>
276+
<item name="android:maxLines">1</item>
266277
</style>
267278

268279
<style name="ActionModeStyle" parent="ThemeOverlay.AppCompat.Dark.ActionBar">

0 commit comments

Comments
 (0)