Archived
Implemented login functionality at the school's request
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:interpolator="@android:anim/accelerate_interpolator"
|
||||
android:ordering="sequentially"
|
||||
android:shareInterpolator="false">
|
||||
<!-- Step 1 -->
|
||||
<objectAnimator
|
||||
android:duration="@android:integer/config_mediumAnimTime"
|
||||
android:propertyName="pathData"
|
||||
android:valueFrom="M 12 17 C 13.1 17 14 16.1 14 15 C 14 13.9 13.1 13 12 13 C 10.9 13 10 13.9 10 15 C 10 16.1 10.9 17 12 17 Z M 18 8 L 17 8 L 17 6 C 17 3.24 14.76 1 12 1 C 9.24 1 7 3 7 8 L 8.9 8 C 8.6 4 10.29 2.9 12 2.9 C 13.71 2.9 15.1 4.29 15.1 6 L 15.1 8 L 6 8 C 4.9 8 4 8.9 4 10 L 4 20 C 4 21.1 4.9 22 6 22 L 18 22 C 19.1 22 20 21.1 20 20 L 20 10 C 20 8.9 19.1 8 18 8 Z M 18 20 L 6 20 L 6 10 L 18 10 L 18 20 Z"
|
||||
android:valueTo="M 12 17 C 13.1 17 14 16.1 14 15 C 14 13.9 13.1 13 12 13 C 10.9 13 10 13.9 10 15 C 10 16.1 10.9 17 12 17 Z M 18 8 L 17 8 L 17 6 C 17 3.24 14.76 1 12 1 C 9.24 1 7 3.24 7 6 L 8.9 6 C 8.9 4.29 10.29 2.9 12 2.9 C 13.71 2.9 15.1 4.29 15.1 6 L 15.1 8 L 6 8 C 4.9 8 4 8.9 4 10 L 4 20 C 4 21.1 4.9 22 6 22 L 18 22 C 19.1 22 20 21.1 20 20 L 20 10 C 20 8.9 19.1 8 18 8 Z M 18 20 L 6 20 L 6 10 L 18 10 L 18 20 Z"
|
||||
android:valueType="pathType" />
|
||||
</set>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:drawable="@drawable/ic_closed_lock">
|
||||
<target
|
||||
android:name="lock"
|
||||
android:animation="@animator/unlock_animation" />
|
||||
</animated-vector>
|
||||
@@ -3,18 +3,18 @@
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<group android:name="background">
|
||||
<path
|
||||
android:name="circle"
|
||||
android:fillColor="@color/colorAccent"
|
||||
android:pathData="M12,12m-10,0a10,10 0,1 1,20 0a10,10 0,1 1,-20 0" />
|
||||
</group>
|
||||
<!-- <group android:name="background">-->
|
||||
<!-- <path-->
|
||||
<!-- android:name="circle"-->
|
||||
<!-- android:fillColor="@color/colorAccent"-->
|
||||
<!-- android:pathData="M12,12m-10,0a10,10 0,1 1,20 0a10,10 0,1 1,-20 0" />-->
|
||||
<!-- </group>-->
|
||||
<group android:name="check">
|
||||
<path
|
||||
android:name="tick"
|
||||
android:pathData="M6.5,12 l0,0 l0,0"
|
||||
android:strokeColor="@color/colorBackground"
|
||||
android:strokeWidth="1" />
|
||||
android:strokeColor="@color/colorAccent"
|
||||
android:strokeWidth="2" />
|
||||
</group>
|
||||
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:name="lock"
|
||||
android:fillColor="@color/colorAccent"
|
||||
android:pathData="M 12 17 C 13.1 17 14 16.1 14 15 C 14 13.9 13.1 13 12 13 C 10.9 13 10 13.9 10 15 C 10 16.1 10.9 17 12 17 Z M 18 8 L 17 8 L 17 6 C 17 3.24 14.76 1 12 1 C 9.24 1 7 3 7 8 L 8.9 8 C 8.6 4 10.29 2.9 12 2.9 C 13.71 2.9 15.1 4.29 15.1 6 L 15.1 8 L 6 8 C 4.9 8 4 8.9 4 10 L 4 20 C 4 21.1 4.9 22 6 22 L 18 22 C 19.1 22 20 21.1 20 20 L 20 10 C 20 8.9 19.1 8 18 8 Z M 18 20 L 6 20 L 6 10 L 18 10 L 18 20 Z" />
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:name="lock"
|
||||
android:fillColor="@color/colorAccent"
|
||||
android:pathData="M12,17c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM18,8h-1L17,6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6h1.9c0,-1.71 1.39,-3.1 3.1,-3.1 1.71,0 3.1,1.39 3.1,3.1v2L6,8c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,10c0,-1.1 -0.9,-2 -2,-2zM18,20L6,20L6,10h12v10z" />
|
||||
</vector>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/coordinatorLayout"
|
||||
@@ -7,7 +7,8 @@
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/colorBackground"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context=".activities.FirstTime">
|
||||
tools:context=".activities.FirstTime"
|
||||
android:animateLayoutChanges="true">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
@@ -25,7 +26,7 @@
|
||||
android:layout_marginTop="56dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="@string/welcome"
|
||||
android:textAlignment="center"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/colorAccent"
|
||||
android:fontFamily="@font/manrope_extrabold"
|
||||
android:textSize="28sp"
|
||||
@@ -282,7 +283,19 @@
|
||||
app:icon="@drawable/ic_tick"
|
||||
app:iconTint="@color/colorBackground"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:translationZ="-1dp"/>
|
||||
android:translationZ="-1dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/snackBarLayout"/>
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:id="@+id/snackBarLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearInflation"
|
||||
@@ -296,4 +309,4 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,140 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:background="@color/colorBackground"
|
||||
android:animateLayoutChanges="true">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtWelcome"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="56dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="@string/hello"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/colorAccent"
|
||||
android:fontFamily="@font/manrope_extrabold"
|
||||
android:textSize="28sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<TextView android:id="@+id/loginRequiredText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/login_required"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/colorText"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/txtWelcome"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/usernameTextLayout"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="32dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:hint="@string/username"
|
||||
android:importantForAutofill="no"
|
||||
android:textColorHint="@color/colorHint"
|
||||
app:boxStrokeColor="@color/colorAccent"
|
||||
app:boxStrokeWidth="1dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/loginRequiredText">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/usernameText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:animateLayoutChanges="true"
|
||||
android:ems="10"
|
||||
android:gravity="start"
|
||||
android:imeOptions="flagNoExtractUi"
|
||||
android:inputType="textNoSuggestions"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/colorText"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/passwordTextLayout"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
app:boxStrokeColor="@color/colorAccent"
|
||||
app:boxStrokeWidth="1dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:hint="@string/password"
|
||||
android:textColorHint="@color/colorHint"
|
||||
android:importantForAutofill="no"
|
||||
app:layout_constraintTop_toBottomOf="@+id/usernameTextLayout"
|
||||
app:layout_constraintStart_toStartOf="@+id/usernameTextLayout"
|
||||
app:layout_constraintEnd_toEndOf="@+id/usernameTextLayout">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/passwordText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:animateLayoutChanges="true"
|
||||
android:ems="10"
|
||||
android:gravity="start"
|
||||
android:imeOptions="flagNoExtractUi"
|
||||
android:inputType="textPassword"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/colorText"
|
||||
android:textSize="16sp"/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/temporary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="subst plan"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||
android:id="@+id/loginFab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:backgroundTint="@color/colorAccent"
|
||||
android:text="@string/login"
|
||||
android:textColor="@color/colorBackground"
|
||||
app:icon="@drawable/ic_tick"
|
||||
app:iconTint="@color/colorBackground"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:translationZ="-1dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/snackBarLayout"/>
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:id="@+id/snackBarLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="top"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:background="@color/colorBackground"
|
||||
android:animateLayoutChanges="true">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtWelcome"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="56dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:text="@string/hello"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/colorAccent"
|
||||
android:fontFamily="@font/manrope_extrabold"
|
||||
android:textSize="28sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="16dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/txtWelcome"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<TextView android:id="@+id/loginRequiredText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/login_required"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/colorText"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||
android:id="@+id/loginFab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:backgroundTint="@color/colorAccent"
|
||||
android:text="@string/login"
|
||||
android:textColor="@color/colorBackground"
|
||||
app:icon="@drawable/ic_open_lock"
|
||||
app:iconTint="@color/colorBackground"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:translationZ="-1dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layoutAfterCircleReveal"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@color/colorBackground"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/animated_lock" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:text="@string/logged_in"
|
||||
android:textAlignment="center"
|
||||
android:textSize="30sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/imageView" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/colourLayout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:background="@color/colorAccent"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<WebView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/webView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
@@ -150,4 +150,12 @@
|
||||
<item quantity="one">,\nund %d weitere Nachricht</item>
|
||||
<item quantity="other">,\nund %d weitere Nachrichten</item>
|
||||
</plurals>
|
||||
<string name="login_required">Bitte klicke die Schaltfäche unten und gib deinen Nutzernamen und dein Passwort ein, um zu zeigen, dass du am Alexander-von-Humboldt-Gymnasium beschäftigt bist.\n\nDieser Login ist nur einmalig und deine Informationen werden nicht mit anderen geteilt.</string>
|
||||
<string name="hello">Hallo!</string>
|
||||
<string name="username">Dein Nutzername</string>
|
||||
<string name="password">Dein Password</string>
|
||||
<string name="login">Einloggen</string>
|
||||
<string name="logging_in">Einloggen…</string>
|
||||
<string name="load_page_again">Lade Login-Seite erneut</string>
|
||||
<string name="logged_in">Du bist eingeloggt!</string>
|
||||
</resources>
|
||||
@@ -163,4 +163,12 @@
|
||||
<item quantity="one">,\nand %d more message</item>
|
||||
<item quantity="other">,\nand %d more messages</item>
|
||||
</plurals>
|
||||
<string name="login_required">Please click the button below to enter your username and password to verify that you\'re occupied at the Alexander-von-Humboldt-Gymnasium.\n\nThis login is only required once and your information will not be shared with anybody.</string>
|
||||
<string name="hello">Hello there!</string>
|
||||
<string name="username">Your username</string>
|
||||
<string name="password">Your password</string>
|
||||
<string name="login">Log in</string>
|
||||
<string name="logging_in">Logging in…</string>
|
||||
<string name="load_page_again">Load login page again</string>
|
||||
<string name="logged_in">You have been logged in!</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user