Skip to content

Commit

Permalink
mode:smoother mode switch (fixes #4931)
Browse files Browse the repository at this point in the history
  • Loading branch information
Avinash-Codes committed Dec 26, 2024
1 parent c69eab8 commit bdbbe34
Show file tree
Hide file tree
Showing 3 changed files with 1,031 additions and 0 deletions.
334 changes: 334 additions & 0 deletions app/src/main/res/layout-large-land-night/activity_login.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,334 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/constraintLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.sync.LoginActivity">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:baselineAligned="false"
android:orientation="horizontal">

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="0dp"
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">

<ImageView
android:id="@+id/syncIcon"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_alignParentStart="true"
android:layout_marginTop="@dimen/_10dp"
android:background="@drawable/file_upload_animation_login"
android:contentDescription="@string/sync"
android:scaleType="fitCenter"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/lblLastSyncDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/_10dp"
android:padding="@dimen/padding_normal"
android:text="@string/dash_4"
android:textAlignment="center"
app:layout_constraintEnd_toStartOf="@+id/imgBtnSetting"
app:layout_constraintStart_toEndOf="@+id/syncIcon"
app:layout_constraintTop_toTopOf="parent"
android:textColor="@color/daynight_textColor" />
<ImageButton
android:id="@+id/imgBtnSetting"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_marginTop="@dimen/_10dp"
android:background="@null"
android:contentDescription="@string/settings"
android:paddingStart="@dimen/_10dp"
android:paddingTop="6dp"
android:paddingEnd="10dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
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"
app:layout_constraintBottom_toTopOf="@+id/linearLayout3"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/userProfile"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_gravity="center"
android:src="@drawable/profile"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/ltInputName"
android:layout_width="200dp"
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"
app:boxStrokeWidthFocused="0dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/userProfile">

<EditText
android:id="@+id/inputName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:autofillHints=""
android:drawablePadding="12dp"
android:contentDescription="@string/hint_name"
android:hint="@string/hint_name"
android:textColorHint="@color/daynight_textColor"
android:inputType="text"
android:paddingStart="10dp"
android:paddingEnd="8dp"
android:textColor="@color/daynight_textColor" />
</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.textfield.TextInputLayout
android:id="@+id/edtPassword"
android:layout_width="200dp"
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:passwordToggleTint="@color/daynight_textColor">

<EditText
android:id="@+id/input_password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
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/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/mainColor"
android:contentDescription="@string/btn_sign_in"
android:text="@string/btn_sign_in"
android:textColor="@android:color/white"
android:textSize="12sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/edtPassword" />
</androidx.constraintlayout.widget.ConstraintLayout>

<LinearLayout
android:id="@+id/linearLayout3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent">

<Button
android:id="@+id/btn_guest_login"
android:layout_width="wrap_content"
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
android:id="@+id/become_member"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
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"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:contentDescription="@string/feedback"
android:text="@string/feedback"
android:textColor="@color/daynight_textColor"
android:theme="@style/PrimaryFlatButton" />
</LinearLayout>

<Button
android:id="@+id/open_community"
android:layout_width="wrap_content"
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"
app:layout_constraintEnd_toEndOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="250dp"
android:layout_height="match_parent"
android:background="@color/colorPrimary"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">

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

<ImageButton
android:id="@+id/themeToggleButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:background="@null"
android:contentDescription="@string/select_theme_mode"
android:paddingStart="@dimen/_10dp"
android:paddingTop="6dp"
android:paddingEnd="@dimen/_10dp"
app:srcCompat="@drawable/moon_35"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/logoImageView"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center|top"
android:layout_marginTop="110dp"
android:contentDescription="@string/ole_logo"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ole_logo" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/_10dp"
android:contentDescription="@string/system_name"
android:text="@string/system_name"
android:textAlignment="center"
android:textColor="@android:color/white"
android:textSize="24sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/logoImageView" />
<TextView
android:id="@+id/lblVersion"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:contentDescription="@string/app_version"
android:text="@string/app_version"
android:textAlignment="center"
android:textColor="@android:color/white"
android:textSize="12sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView" />
<Button
android:id="@+id/btn_lang"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:contentDescription="@string/language"
android:padding="@dimen/padding_normal"
android:text="@string/language"
android:textColor="@android:color/white"
android:theme="@style/PrimaryFlatButton"
android:elevation="1dp"
android:outlineProvider="bounds"
android:strokeColor="@color/daynight_textColor"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/lblVersion" />
<TextView
android:id="@+id/customDeviceName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@android:color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/btn_lang" />
<TextView
android:id="@+id/tv_available_space"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
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"
tools:text="@string/available_space_colon" />
<Spinner
android:id="@+id/team"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:textSize="16sp"
android:visibility="gone"
app:backgroundTint="@color/daynight_textColor"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_available_space" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
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_constraintTop_toBottomOf="@+id/team"
app:layout_constraintVertical_bias="0.503" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
Loading

0 comments on commit bdbbe34

Please sign in to comment.