Skip to content

Commit

Permalink
all: smoother mode switch (fixes #4931) (#4918)
Browse files Browse the repository at this point in the history
Co-authored-by: dogi <dogi@users.noreply.github.com>
  • Loading branch information
Avinash-Codes and dogi authored Jan 6, 2025
1 parent f0f11d6 commit 21d9a95
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 27 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 2168
versionName "0.21.68"
versionCode 2169
versionName "0.21.69"
ndkVersion '21.3.6528147'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
Expand Down
27 changes: 19 additions & 8 deletions app/src/main/res/layout-large-land/activity_login.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical"
android:background="@color/light_dark"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
Expand All @@ -43,7 +44,8 @@
android:textAlignment="center"
app:layout_constraintEnd_toStartOf="@+id/imgBtnSetting"
app:layout_constraintStart_toEndOf="@+id/syncIcon"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="parent"
android:textColor="@color/daynight_textColor" />
<ImageButton
android:id="@+id/imgBtnSetting"
android:layout_width="wrap_content"
Expand All @@ -57,7 +59,8 @@
android:paddingEnd="10dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_settings_black_24dp" />
app:srcCompat="@drawable/ic_settings_black_24dp"
app:tint="@color/daynight_textColor"/>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -81,6 +84,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:hint="@string/hint_name"
android:textColorHint="@color/hint_color"
app:boxBackgroundColor="@color/md_white_1000"
app:boxStrokeColor="@color/md_white_1000"
app:boxStrokeWidth="0dp"
Expand All @@ -99,11 +103,11 @@
android:drawablePadding="12dp"
android:contentDescription="@string/hint_name"
android:hint="@string/hint_name"
android:textColorHint="@color/hint_color"
android:textColorHint="@color/daynight_textColor"
android:inputType="text"
android:paddingStart="10dp"
android:paddingEnd="8dp"
android:textColor="@color/md_black_1000" />
android:textColor="@color/daynight_textColor" />
</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.textfield.TextInputLayout
Expand All @@ -112,14 +116,16 @@
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:hint="@string/password"
android:textColorHint="@color/hint_color"
app:boxBackgroundColor="@color/md_white_1000"
app:boxStrokeColor="@color/md_white_1000"
app:boxStrokeWidth="0dp"
app:boxStrokeWidthFocused="0dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ltInputName"
app:passwordToggleEnabled="true">
app:passwordToggleEnabled="true"
app:passwordToggleTint="@color/daynight_textColor">

<EditText
android:id="@+id/input_password"
Expand All @@ -128,21 +134,22 @@
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:autofillHints=""
android:backgroundTint="@color/daynight_textColor"
android:drawablePadding="12dp"
android:hint="password"
android:textColorHint="@color/hint_color"
android:inputType="textPassword"
android:paddingStart="10dp"
android:paddingEnd="8dp"
android:textColor="@color/md_black_1000" />
android:textColor="@color/daynight_textColor"/>
</com.google.android.material.textfield.TextInputLayout>

<Button
android:id="@+id/btn_signin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@color/colorPrimary"
android:background="@color/mainColor"
android:contentDescription="@string/btn_sign_in"
android:text="@string/btn_sign_in"
android:textColor="@android:color/white"
Expand All @@ -165,6 +172,7 @@
android:layout_height="wrap_content"
android:contentDescription="@string/btn_guest_login"
android:text="@string/btn_guest_login"
android:textColor="@color/daynight_textColor"
android:textSize="14sp"
android:theme="@style/PrimaryFlatButton" />
<Button
Expand All @@ -174,6 +182,7 @@
android:layout_gravity="center"
android:contentDescription="@string/become_a_member"
android:text="@string/become_a_member"
android:textColor="@color/daynight_textColor"
android:theme="@style/PrimaryFlatButton" />
<Button
android:id="@+id/btn_feedback"
Expand All @@ -182,6 +191,7 @@
android:layout_gravity="center"
android:contentDescription="@string/feedback"
android:text="@string/feedback"
android:textColor="@color/daynight_textColor"
android:theme="@style/PrimaryFlatButton" />
</LinearLayout>

Expand All @@ -191,6 +201,7 @@
android:layout_height="wrap_content"
android:contentDescription="@string/open_community"
android:text="@string/open_community"
android:textColor="@color/daynight_textColor"
android:textSize="14sp"
android:theme="@style/PrimaryFlatButton"
app:layout_constraintBottom_toBottomOf="parent"
Expand Down Expand Up @@ -221,7 +232,7 @@
android:paddingStart="@dimen/_10dp"
android:paddingTop="6dp"
android:paddingEnd="@dimen/_10dp"
app:srcCompat="@drawable/sun_35"
app:srcCompat="@drawable/moon_35"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
Expand Down
27 changes: 19 additions & 8 deletions app/src/main/res/layout-normal-land/activity_login.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical"
android:background="@color/light_dark"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
Expand All @@ -43,7 +44,8 @@
android:textAlignment="center"
app:layout_constraintEnd_toStartOf="@+id/imgBtnSetting"
app:layout_constraintStart_toEndOf="@+id/syncIcon"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="parent"
android:textColor="@color/daynight_textColor" />
<ImageButton
android:id="@+id/imgBtnSetting"
android:layout_width="wrap_content"
Expand All @@ -57,7 +59,8 @@
android:paddingEnd="10dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_settings_black_24dp" />
app:srcCompat="@drawable/ic_settings_black_24dp"
app:tint="@color/daynight_textColor"/>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -81,6 +84,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:hint="@string/hint_name"
android:textColorHint="@color/hint_color"
app:boxBackgroundColor="@color/md_white_1000"
app:boxStrokeColor="@color/md_white_1000"
app:boxStrokeWidth="0dp"
Expand All @@ -99,11 +103,11 @@
android:drawablePadding="12dp"
android:contentDescription="@string/hint_name"
android:hint="@string/hint_name"
android:textColorHint="@color/hint_color"
android:textColorHint="@color/daynight_textColor"
android:inputType="text"
android:paddingStart="10dp"
android:paddingEnd="8dp"
android:textColor="@color/md_black_1000" />
android:textColor="@color/daynight_textColor" />
</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.textfield.TextInputLayout
Expand All @@ -112,14 +116,16 @@
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:hint="@string/password"
android:textColorHint="@color/hint_color"
app:boxBackgroundColor="@color/md_white_1000"
app:boxStrokeColor="@color/md_white_1000"
app:boxStrokeWidth="0dp"
app:boxStrokeWidthFocused="0dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ltInputName"
app:passwordToggleEnabled="true">
app:passwordToggleEnabled="true"
app:passwordToggleTint="@color/daynight_textColor">

<EditText
android:id="@+id/input_password"
Expand All @@ -128,21 +134,22 @@
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:autofillHints=""
android:backgroundTint="@color/daynight_textColor"
android:drawablePadding="12dp"
android:hint="password"
android:textColorHint="@color/hint_color"
android:inputType="textPassword"
android:paddingStart="10dp"
android:paddingEnd="8dp"
android:textColor="@color/md_black_1000" />
android:textColor="@color/daynight_textColor"/>
</com.google.android.material.textfield.TextInputLayout>

<Button
android:id="@+id/btn_signin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@color/colorPrimary"
android:background="@color/mainColor"
android:contentDescription="@string/btn_sign_in"
android:text="@string/btn_sign_in"
android:textColor="@android:color/white"
Expand All @@ -165,6 +172,7 @@
android:layout_height="wrap_content"
android:contentDescription="@string/btn_guest_login"
android:text="@string/btn_guest_login"
android:textColor="@color/daynight_textColor"
android:textSize="14sp"
android:theme="@style/PrimaryFlatButton" />
<Button
Expand All @@ -174,6 +182,7 @@
android:layout_gravity="center"
android:contentDescription="@string/become_a_member"
android:text="@string/become_a_member"
android:textColor="@color/daynight_textColor"
android:theme="@style/PrimaryFlatButton" />
<Button
android:id="@+id/btn_feedback"
Expand All @@ -182,6 +191,7 @@
android:layout_gravity="center"
android:contentDescription="@string/feedback"
android:text="@string/feedback"
android:textColor="@color/daynight_textColor"
android:theme="@style/PrimaryFlatButton" />
</LinearLayout>

Expand All @@ -191,6 +201,7 @@
android:layout_height="wrap_content"
android:contentDescription="@string/open_community"
android:text="@string/open_community"
android:textColor="@color/daynight_textColor"
android:textSize="14sp"
android:theme="@style/PrimaryFlatButton"
app:layout_constraintBottom_toBottomOf="parent"
Expand Down Expand Up @@ -221,7 +232,7 @@
android:paddingStart="@dimen/_10dp"
android:paddingTop="6dp"
android:paddingEnd="@dimen/_10dp"
app:srcCompat="@drawable/sun_35"
app:srcCompat="@drawable/moon_35"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
Expand Down
Loading

0 comments on commit 21d9a95

Please sign in to comment.