add basic login activity

This commit is contained in:
dkanada 2019-07-12 17:15:55 -07:00
commit c963c7195b
12 changed files with 330 additions and 952 deletions

View file

@ -0,0 +1,83 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".ui.activities.LoginActivity">
<include layout="@layout/status_bar" />
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
style="@style/Toolbar"
android:background="@android:color/transparent" />
<ImageView
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_marginTop="50dp"
android:layout_marginBottom="50dp"
android:src="@mipmap/ic_launcher" />
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:id="@+id/username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginEnd="32dp"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:hint="@string/username" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:id="@+id/password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginEnd="32dp"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:inputType="textPassword"
android:hint="@string/password" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:id="@+id/server"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginEnd="32dp"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:hint="@string/server" />
</com.google.android.material.textfield.TextInputLayout>
<Button
android:id="@+id/login"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginEnd="32dp"
android:layout_marginTop="32dp"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:text="login" />
</LinearLayout>

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".ui.activities.SplashActivity">
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
style="?android:attr/progressBarStyleLarge" />
</LinearLayout>

View file

@ -9,6 +9,7 @@
<string name="action_settings">"Settings"</string>
<string name="action_grant">Grant</string>
<string name="action_about">About</string>
<string name="action_login">Login</string>
<string name="action_clear_playlist">Clear playlist</string>
<string name="action_add_to_favorites">Add to favorites</string>
<string name="action_remove_from_favorites">Remove from favorites</string>
@ -242,6 +243,7 @@
<string name="bug_report_manual">Send manually</string>
<string name="username">Username</string>
<string name="password">Password</string>
<string name="server">Server</string>
<string name="bug_report_no_title">Please enter an issue title</string>
<string name="bug_report_no_description">Please enter an issue description</string>
<string name="bug_report_no_username">Please enter your valid GitHub username</string>