Skip to content
This repository was archived by the owner on Jun 7, 2020. It is now read-only.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ android {
applicationId "chat.rocket.android"
minSdkVersion versions.minSdk
targetSdkVersion versions.targetSdk
versionCode 2065
versionCode 2067
versionName "3.4.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
Expand Down
42 changes: 25 additions & 17 deletions app/src/main/res/layout/fragment_profile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,47 +37,55 @@

<TextView
android:id="@+id/text_status"
style="@style/Profile.TextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:text="@string/status"
android:textColor="#DE000000"
android:textSize="18sp"
android:textStyle="normal" />
android:text="@string/status" />

<TextView
style="@style/Profile.TextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/msg_name" />

<EditText
android:id="@+id/text_name"
style="@style/Profile.EditText"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginTop="16dp"
android:drawableStart="@drawable/ic_person_black_20dp"
android:hint="@string/msg_name"
android:hint="@string/msg_profile_name_hint"
android:inputType="textCapWords" />

<TextView
style="@style/Profile.TextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/msg_username" />

<EditText
android:id="@+id/text_username"
style="@style/Profile.EditText"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginTop="16dp"
android:drawableStart="@drawable/ic_at_black_20dp"
android:hint="@string/msg_username"
android:hint="@string/msg_profile_username_hint"
android:inputType="text" />

<TextView
style="@style/Profile.TextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/msg_email" />

<EditText
android:id="@+id/text_email"
style="@style/Profile.EditText"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="32dp"
android:layout_marginBottom="16dp"
android:drawableStart="@drawable/ic_email_black_20dp"
android:hint="@string/msg_email"
android:hint="@string/msg_profile_email_hint"
android:inputType="textEmailAddress" />
</LinearLayout>

</ScrollView>

<com.wang.avi.AVLoadingIndicatorView
Expand Down
5 changes: 4 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,15 @@ https://github.com/RocketChat/java-code-styles/blob/master/CODING_STYLE.md#strin
<string name="msg_no_data_to_display">No data to display</string>
<string name="msg_check_this_out">Check this out</string>
<string name="msg_share_using">Share using</string>
<string name="msg_username">Username</string>
<string name="msg_profile_username_hint" translatable="false">Please enter your username</string> <!-- TODO Make translatable and add translations -->
<string name="msg_profile_updated_successfully">Profile updated successfully</string>
<string name="msg_username">username</string>
<string name="msg_username_or_email">Username or email</string>
<string name="msg_password">Password</string>
<string name="msg_name">Name</string>
<string name="msg_profile_name_hint" translatable="false">Please enter your name…</string>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't declare a translatable string as not translatable, please.

<string name="msg_email">Email</string>
<string name="msg_profile_email_hint" translatable="false">Please enter your email address</string> <!-- TODO Make translatable and add translations -->
<string name="msg_avatar_url">avatar URL</string>
<string name="msg_or_continue_using_social_accounts">Or continue using social accounts</string>
<string name="msg_new_user">New user? %1$s</string>
Expand Down
13 changes: 12 additions & 1 deletion app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,18 @@

// REMARK: To be removed.
<style name="Profile.EditText" parent="Authentication.EditText.Border">
<item name="android:background">@drawable/style_edit_text_profile</item>
<item name="android:layout_height">48dp</item>
<item name="android:layout_marginTop">8dp</item>
</style>

<style name="Profile.TextView" parent="TextAppearance.AppCompat.Title">
<item name="android:textSize">16sp</item>
<item name="android:fontFamily">sans-serif-medium</item>
<item name="android:textStyle">normal</item>
<item name="android:layout_marginTop">24dp</item>
<item name="android:layout_gravity">left</item>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

layout_gravity should be start instead of left to support RTL languages.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the catch @HusseinElFeky!

Changed!
280f1c1

<item name="android:textColor">@color/colorPrimary</item>
<item name="android:maxLines">1</item>
</style>

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