Skip to content

Commit

Permalink
login: smoother learner list (fixes #4668) (#4703)
Browse files Browse the repository at this point in the history
Co-authored-by: dogi <[email protected]>
  • Loading branch information
Okuro3499 and dogi authored Oct 25, 2024
1 parent f0e8320 commit 88b2281
Show file tree
Hide file tree
Showing 6 changed files with 118 additions and 160 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
applicationId "org.ole.planet.myplanet"
minSdkVersion 26
targetSdkVersion 34
versionCode 2060
versionName "0.20.60"
versionCode 2061
versionName "0.20.61"
ndkVersion '21.3.6528147'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
Expand Down
50 changes: 20 additions & 30 deletions app/src/main/res/layout-large-land/activity_login.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:baselineAligned="false"
android:orientation="horizontal">

<androidx.constraintlayout.widget.ConstraintLayout
Expand All @@ -25,7 +26,7 @@
android:id="@+id/syncIcon"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginTop="@dimen/_10dp"
android:background="@drawable/file_upload_animation_login"
android:contentDescription="@string/sync"
Expand All @@ -47,12 +48,13 @@
android:id="@+id/imgBtnSetting"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_marginTop="@dimen/_10dp"
android:background="@null"
android:contentDescription="@string/settings"
android:paddingStart="@dimen/_10dp"
android:paddingTop="6dp"
android:paddingRight="10dp"
android:paddingEnd="10dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_settings_black_24dp" />
Expand All @@ -78,6 +80,7 @@
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:hint="@string/hint_name"
app:boxBackgroundColor="@color/md_white_1000"
app:boxStrokeColor="@color/md_white_1000"
app:boxStrokeWidth="0dp"
Expand All @@ -94,8 +97,6 @@
android:layout_centerVertical="true"
android:autofillHints=""
android:drawablePadding="12dp"
android:contentDescription="@string/hint_name"
android:hint="@string/hint_name"
android:inputType="text"
android:paddingStart="10dp"
android:paddingEnd="8dp"
Expand All @@ -107,6 +108,7 @@
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:hint="@string/password"
app:boxBackgroundColor="@color/md_white_1000"
app:boxStrokeColor="@color/md_white_1000"
app:boxStrokeWidth="0dp"
Expand All @@ -124,7 +126,6 @@
android:layout_centerVertical="true"
android:autofillHints=""
android:drawablePadding="12dp"
android:hint="password"
android:inputType="textPassword"
android:paddingStart="10dp"
android:paddingEnd="8dp"
Expand Down Expand Up @@ -203,7 +204,7 @@

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="match_parent">

<ImageView
android:id="@+id/logoImageView"
Expand Down Expand Up @@ -267,29 +268,16 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/btn_lang" />
<LinearLayout
android:id="@+id/ltAvailablaSpace"
<TextView
android:id="@+id/tv_available_space"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="4dp"
android:textColor="@color/md_white_1000"
app:drawableStartCompat="@drawable/baseline_storage_24"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/customDeviceName">

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingHorizontal="@dimen/padding_small"
app:srcCompat="@drawable/baseline_storage_24" />
<TextView
android:id="@+id/tv_available_space"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/md_white_1000"
tools:text="@string/available_space_colon" />
</LinearLayout>

app:layout_constraintTop_toBottomOf="@+id/customDeviceName"
tools:text="@string/available_space_colon" />
<Spinner
android:id="@+id/team"
android:layout_width="wrap_content"
Expand All @@ -299,16 +287,18 @@
android:visibility="gone"
app:backgroundTint="@color/daynight_textColor"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ltAvailablaSpace" />
app:layout_constraintTop_toBottomOf="@+id/tv_available_space" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="350dp"
android:layout_height="0dp"
android:layout_marginTop="@dimen/_10dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/team" />
app:layout_constraintTop_toBottomOf="@+id/team"
app:layout_constraintVertical_bias="0.503" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</LinearLayout>
Expand Down
89 changes: 36 additions & 53 deletions app/src/main/res/layout-night/activity_login.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,13 @@

<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="5"
android:gravity="center"
android:orientation="horizontal"
android:background="@color/light_dark">
android:layout_height="match_parent"
android:background="@color/light_dark"
android:orientation="horizontal">

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -58,8 +55,8 @@
android:id="@+id/syncIcon"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_alignParentLeft="true"
android:layout_marginLeft="10dp"
android:layout_alignParentStart="true"
android:layout_marginStart="10dp"
android:layout_marginTop="5dp"
android:background="@drawable/file_upload_animation_login"
android:contentDescription="@string/sync"
Expand All @@ -77,13 +74,14 @@
android:id="@+id/imgBtnSetting"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:background="@null"
android:contentDescription="@string/settings"
android:paddingStart="@dimen/_10dp"
android:paddingTop="6dp"
android:paddingRight="10dp"
android:paddingEnd="@dimen/_10dp"
app:srcCompat="@drawable/ic_settings_black_24dp"
app:tint="@color/daynight_textColor"/>
app:tint="@color/daynight_textColor" />
</RelativeLayout>

<androidx.constraintlayout.widget.ConstraintLayout
Expand All @@ -110,8 +108,8 @@
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:hint="@string/hint_name"
android:textColorHint="@color/daynight_textColor"
android:labelFor="@+id/inputName"
android:textColorHint="@color/daynight_textColor"
app:boxBackgroundColor="@color/md_white_1000"
app:boxStrokeColor="@color/md_white_1000"
app:boxStrokeWidth="0dp"
Expand All @@ -127,12 +125,12 @@
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:autofillHints=""
android:backgroundTint="@color/daynight_textColor"
android:drawablePadding="12dp"
android:inputType="text"
android:paddingStart="10dp"
android:paddingEnd="8dp"
android:textColor="@color/daynight_textColor"
android:backgroundTint="@color/daynight_textColor" />
android:textColor="@color/daynight_textColor" />
</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.textfield.TextInputLayout
Expand All @@ -141,8 +139,8 @@
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:hint="@string/password"
android:textColorHint="@color/daynight_textColor"
android:labelFor="@+id/input_password"
android:textColorHint="@color/daynight_textColor"
app:boxBackgroundColor="@color/md_white_1000"
app:boxStrokeColor="@color/md_white_1000"
app:boxStrokeWidth="0dp"
Expand All @@ -160,12 +158,12 @@
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:autofillHints=""
android:backgroundTint="@color/daynight_textColor"
android:drawablePadding="12dp"
android:inputType="textPassword"
android:paddingStart="10dp"
android:paddingEnd="8dp"
android:textColor="@color/daynight_textColor"
android:backgroundTint="@color/daynight_textColor" />
android:textColor="@color/daynight_textColor" />
</com.google.android.material.textfield.TextInputLayout>

<Button
Expand Down Expand Up @@ -200,9 +198,9 @@
android:layout_marginTop="@dimen/padding_normal"
android:contentDescription="@string/btn_guest_login"
android:text="@string/btn_guest_login"
android:textColor="@color/daynight_textColor"
android:textSize="14sp"
android:theme="@style/PrimaryFlatButton"
android:textColor="@color/daynight_textColor" />
android:theme="@style/PrimaryFlatButton" />
<Button
android:id="@+id/become_member"
android:layout_width="wrap_content"
Expand All @@ -211,8 +209,8 @@
android:layout_marginTop="@dimen/padding_normal"
android:contentDescription="@string/become_a_member"
android:text="@string/become_a_member"
android:theme="@style/PrimaryFlatButton"
android:textColor="@color/daynight_textColor" />
android:textColor="@color/daynight_textColor"
android:theme="@style/PrimaryFlatButton" />
<Button
android:id="@+id/btn_feedback"
android:layout_width="wrap_content"
Expand All @@ -221,8 +219,8 @@
android:layout_marginTop="@dimen/padding_normal"
android:contentDescription="@string/feedback"
android:text="@string/feedback"
android:theme="@style/PrimaryFlatButton"
android:textColor="@color/daynight_textColor" />
android:textColor="@color/daynight_textColor"
android:theme="@style/PrimaryFlatButton" />
<Button
android:id="@+id/open_community"
android:layout_width="wrap_content"
Expand All @@ -231,9 +229,9 @@
android:layout_marginTop="@dimen/padding_normal"
android:contentDescription="@string/open_community"
android:text="@string/open_community"
android:textColor="@color/daynight_textColor"
android:textSize="14sp"
android:theme="@style/PrimaryFlatButton"
android:textColor="@color/daynight_textColor" />
android:theme="@style/PrimaryFlatButton" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
Expand All @@ -245,12 +243,11 @@
android:layout_height="match_parent"
android:layout_weight="4"
android:background="@color/secondary_bg"
android:orientation="vertical"
android:weightSum="5">
android:orientation="vertical">

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_marginTop="40dp">

<ImageView
Expand Down Expand Up @@ -316,31 +313,17 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/btn_lang" />
<LinearLayout
android:id="@+id/ltAvailablaSpace"
<TextView
android:id="@+id/tv_available_space"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:textColor="@color/md_white_1000"
android:textSize="12sp"
app:drawableStartCompat="@drawable/baseline_storage_24"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/customDeviceName">

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:paddingHorizontal="@dimen/padding_small"
app:srcCompat="@drawable/baseline_storage_24"
app:tint="@color/daynight_textColor" />
<TextView
android:id="@+id/tv_available_space"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/md_white_1000"
android:textSize="12sp"
tools:text="@string/available_space_colon" />
</LinearLayout>

app:layout_constraintTop_toBottomOf="@+id/customDeviceName"
tools:text="@string/available_space_colon" />
<Spinner
android:id="@+id/team"
android:layout_width="wrap_content"
Expand All @@ -350,15 +333,15 @@
android:visibility="gone"
app:backgroundTint="@color/daynight_textColor"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ltAvailablaSpace" />
app:layout_constraintTop_toBottomOf="@+id/tv_available_space" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="350dp"
android:layout_height="0dp"
android:layout_marginTop="@dimen/_10dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/team" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
Expand Down
Loading

0 comments on commit 88b2281

Please sign in to comment.