diff options
author | Marvin Borner | 2018-09-10 18:39:52 +0200 |
---|---|---|
committer | Marvin Borner | 2018-09-10 18:39:52 +0200 |
commit | 1ddc1a914d805cc11e6b603fb617ea5fa630e317 (patch) | |
tree | e959ee2d6b9d97b5dae94c301c5a0d74234a178a /app/src | |
parent | 4821b9e70674f1f798fe57736811e1139691105b (diff) |
Added text to login screen :sparkles:
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/main/java/me/texx/Texx/RoutingActivity.kt | 2 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_login.xml | 41 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 8 |
3 files changed, 47 insertions, 4 deletions
diff --git a/app/src/main/java/me/texx/Texx/RoutingActivity.kt b/app/src/main/java/me/texx/Texx/RoutingActivity.kt index 805bf5f..4e11c60 100644 --- a/app/src/main/java/me/texx/Texx/RoutingActivity.kt +++ b/app/src/main/java/me/texx/Texx/RoutingActivity.kt @@ -72,7 +72,7 @@ class RoutingActivity : AppCompatActivity() { private fun verifyLogin() { val accessToken: String? = SecureStorage(this@RoutingActivity).get("access_token") // because it may be the first start // synced function of fuel doesn't work here (#331) -> ugly workaround - if (accessToken != null) { + if (accessToken == null) { val userID = EasyPrefrences(this@RoutingActivity).getString("user_id") "/users/$userID".httpGet() // verify by making request to user api // TODO: More secure way of verifying .responseJson { _, response, result -> diff --git a/app/src/main/res/layout/activity_login.xml b/app/src/main/res/layout/activity_login.xml index da8bae3..d5fd089 100644 --- a/app/src/main/res/layout/activity_login.xml +++ b/app/src/main/res/layout/activity_login.xml @@ -27,6 +27,8 @@ android:id="@+id/login_progress" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_centerHorizontal="true" + android:layout_centerVertical="true" android:layout_marginBottom="8dp" android:visibility="gone" /> @@ -40,6 +42,45 @@ android:layout_alignParentTop="@id/image_background"> + <TextView + android:id="@+id/text_welcome" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentBottom="true" + android:layout_marginBottom="8dp" + android:layout_marginStart="16dp" + android:text="@string/welcome_text" + android:textColor="@android:color/background_light" + android:textSize="30sp" + app:layout_constraintBottom_toTopOf="@+id/text_connect" + app:layout_constraintStart_toStartOf="parent" /> + + <TextView + android:id="@+id/text_connect" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginBottom="8dp" + android:layout_marginStart="16dp" + android:text="@string/connect_request_login" + android:textColor="@android:color/background_light" + android:textSize="24sp" + app:layout_constraintBottom_toTopOf="@+id/text_login_register" + app:layout_constraintStart_toStartOf="parent" /> + + <TextView + android:id="@+id/text_login_register" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginBottom="8dp" + android:layout_marginStart="16dp" + android:maxWidth="200dp" + android:text="@string/login_or_register_request" + android:textColor="@android:color/background_light" + android:textSize="14sp" + app:layout_constraintBottom_toTopOf="@+id/email" + app:layout_constraintStart_toStartOf="parent" + tools:text="@string/login_or_register_request" /> + <AutoCompleteTextView android:id="@+id/email" android:layout_width="0dp" diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 78b42cb..df13742 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -17,9 +17,13 @@ completions." </string> <string name="loading">Loading...</string> - <string name="title_activity_app_settings">App Settings</string> + + <string name="welcome_text">Welcome to Texx.</string> + <string name="connect_request_login">Let\'s Connect!</string> + <string name="login_or_register_request">Please Login or Register Newly to Texx.</string> <!-- Strings related to Settings --> + <string name="title_activity_app_settings">App Settings</string> <string name="pref_header_general">General</string> <string name="pref_header_account">Account</string> <string name="pref_title_dark_theme">Enable Dark theme</string> @@ -32,8 +36,6 @@ <string name="bug_report_title">Report an issue</string> <string name="bug_report_edit_title_hint">Title</string> <string name="bug_report_edit_description">Describe your issue</string> - - <!-- TODO: Remove or change this placeholder text --> <string name="hello_blank_fragment">Hello blank fragment</string> <!--<string name="pref_title_add_friends_to_messages">Add friends to messages</string> |