Fixed UserInfo fragment for Landscape
This commit is contained in:
parent
2786d8abed
commit
f916a826b5
3 changed files with 107 additions and 10 deletions
99
app/src/main/res/layout-land/fragment_user_info.xml
Normal file
99
app/src/main/res/layout-land/fragment_user_info.xml
Normal file
|
@ -0,0 +1,99 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout 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_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appBarLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
android:layout_height="wrap_content"
|
||||
app:navigationIcon="@drawable/ic_keyboard_backspace_black"
|
||||
app:title="@string/profile"
|
||||
app:titleTextAppearance="@style/ToolbarTextAppearanceNormal" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/bannerImage"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="16dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:transitionName="banner_image"
|
||||
app:layout_constraintBottom_toTopOf="@+id/nameContainer"
|
||||
app:layout_constraintDimensionRatio="21:10"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:shapeAppearanceOverlay="@style/circleImageView"
|
||||
app:srcCompat="@drawable/material_design_default" />
|
||||
|
||||
<code.name.monkey.retromusic.views.RetroShapeableImageView
|
||||
android:id="@+id/userImage"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:transitionName="user_image"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:retroCornerSize="36dp"
|
||||
app:srcCompat="@drawable/ic_person_flat" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/nameContainer"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
app:hintAnimationEnabled="true"
|
||||
app:hintEnabled="true"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/userImage"
|
||||
app:layout_constraintEnd_toStartOf="@+id/next"
|
||||
app:layout_constraintStart_toEndOf="@id/userImage"
|
||||
app:layout_constraintTop_toTopOf="@id/userImage">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:autofillHints="name"
|
||||
android:hint="@string/my_name"
|
||||
android:importantForAutofill="yes"
|
||||
android:inputType="textPersonName|textCapWords|text"
|
||||
android:textAppearance="@style/TextViewSubtitle1"
|
||||
tools:text="@tools:sample/full_names" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/next"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_margin="16dp"
|
||||
android:gravity="center"
|
||||
android:src="@drawable/ic_save"
|
||||
android:text="@string/save"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
@ -35,11 +35,11 @@
|
|||
android:layout_height="0dp"
|
||||
android:layout_margin="16dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:transitionName="banner_image"
|
||||
app:layout_constraintDimensionRatio="21:10"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:transitionName="banner_image"
|
||||
app:shapeAppearanceOverlay="@style/circleImageView"
|
||||
app:srcCompat="@drawable/material_design_default" />
|
||||
|
||||
|
@ -86,15 +86,13 @@
|
|||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/next"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="16dp"
|
||||
android:fitsSystemWindows="false"
|
||||
android:gravity="center"
|
||||
android:text="@string/save"
|
||||
app:icon="@drawable/ic_save"
|
||||
app:iconGravity="textStart" />
|
||||
android:src="@drawable/ic_save"
|
||||
android:text="@string/save" />
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
Loading…
Add table
Add a link
Reference in a new issue