Code refactor
This commit is contained in:
parent
3c7328f9c6
commit
10874744f3
28 changed files with 771 additions and 1205 deletions
|
@ -170,6 +170,8 @@
|
|||
<androidx.appcompat.widget.AppCompatSeekBar
|
||||
android:id="@+id/progressSlider"
|
||||
android:layout_width="0dp"
|
||||
android:maxHeight="2dp"
|
||||
android:progressDrawable="@drawable/color_progress_seek"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_toLeftOf="@id/songTotalTime"
|
||||
|
|
|
@ -1,152 +0,0 @@
|
|||
<?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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/colorSurface"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appBarLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:elevation="0dp"
|
||||
app:elevation="0dp">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp"
|
||||
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="wrap_content"
|
||||
android:layout_marginStart="128dp"
|
||||
android:layout_marginEnd="128dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/imageContainer"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="24dp"
|
||||
app:cardCornerRadius="24dp"
|
||||
app:layout_constraintDimensionRatio="21:10"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/bannerImage"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_constraintDimensionRatio="16:9"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/material_design_default" />
|
||||
|
||||
<View
|
||||
android:id="@+id/bannerSelect"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@color/twenty_percent_black_overlay"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:background="?roundSelector"
|
||||
android:padding="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/bannerImage"
|
||||
app:layout_constraintEnd_toEndOf="@id/bannerImage"
|
||||
app:layout_constraintStart_toStartOf="@id/bannerImage"
|
||||
app:layout_constraintTop_toTopOf="@id/bannerImage"
|
||||
app:srcCompat="@drawable/ic_add_photo_white_24dp"
|
||||
app:tint="@color/md_white_1000" />
|
||||
|
||||
<code.name.monkey.retromusic.views.RetroShapeableImageView
|
||||
android:id="@+id/userImage"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:retroCornerSize="36dp"
|
||||
app:srcCompat="@drawable/ic_account_white_24dp" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="16dp"
|
||||
android:gravity="center"
|
||||
android:padding="12dp"
|
||||
android:src="@drawable/ic_add_photo_white_24dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/userImage"
|
||||
app:layout_constraintEnd_toEndOf="@id/userImage"
|
||||
app:layout_constraintStart_toStartOf="@id/userImage"
|
||||
app:layout_constraintTop_toTopOf="@id/userImage"
|
||||
app:tint="?android:attr/colorControlNormal" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/nameContainer"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:hintEnabled="true"
|
||||
app:layout_constraintBottom_toBottomOf="@id/next"
|
||||
app:layout_constraintEnd_toStartOf="@id/next"
|
||||
app:layout_constraintStart_toStartOf="@id/imageContainer"
|
||||
app:layout_constraintTop_toTopOf="@id/next">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@null"
|
||||
android:hint="@string/my_name"
|
||||
android:inputType="textPersonName|textCapWords|text"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||
android:id="@+id/next"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:gravity="center"
|
||||
android:padding="16dp"
|
||||
android:text="@string/save"
|
||||
app:icon="@drawable/ic_save_white_24dp"
|
||||
app:iconGravity="textStart"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@id/imageContainer"
|
||||
app:layout_constraintStart_toEndOf="@id/nameContainer"
|
||||
app:layout_constraintTop_toBottomOf="@id/imageContainer" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
@ -57,6 +57,7 @@
|
|||
|
||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
<androidx.appcompat.widget.AppCompatSeekBar
|
||||
android:id="@+id/progressSlider"
|
||||
android:layout_width="0dp"
|
||||
android:maxHeight="2dp"
|
||||
android:progressDrawable="@drawable/color_progress_seek"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toStartOf="@id/songTotalTime"
|
||||
app:layout_constraintStart_toEndOf="@id/songCurrentProgress"
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
android:id="@+id/imageContainer"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:cardCornerRadius="24dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardUseCompatPadding="true"
|
||||
app:layout_constraintDimensionRatio="21:10"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
|
@ -42,6 +42,8 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:splitTrack="false"
|
||||
android:maxHeight="2dp"
|
||||
android:progressDrawable="@drawable/color_progress_seek"
|
||||
app:layout_constraintEnd_toStartOf="@id/songTotalTime"
|
||||
app:layout_constraintStart_toEndOf="@id/songCurrentProgress"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
|
|
@ -56,6 +56,8 @@
|
|||
<androidx.appcompat.widget.AppCompatSeekBar
|
||||
android:id="@+id/progressSlider"
|
||||
android:layout_width="match_parent"
|
||||
android:maxHeight="2dp"
|
||||
android:progressDrawable="@drawable/color_progress_seek"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:maxHeight="2dp"
|
||||
android:progressDrawable="@drawable/color_progress_seek"
|
||||
app:layout_constraintEnd_toStartOf="@id/songTotalTime"
|
||||
app:layout_constraintStart_toEndOf="@id/songCurrentProgress"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
|
|
@ -92,6 +92,8 @@
|
|||
<androidx.appcompat.widget.AppCompatSeekBar
|
||||
android:id="@+id/progressSlider"
|
||||
android:layout_width="0dp"
|
||||
android:maxHeight="2dp"
|
||||
android:progressDrawable="@drawable/color_progress_seek"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
app:layout_constraintEnd_toStartOf="@id/songTotalTime"
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
<androidx.appcompat.widget.AppCompatSeekBar
|
||||
android:id="@+id/progressSlider"
|
||||
android:layout_width="0dp"
|
||||
android:maxHeight="2dp"
|
||||
android:progressDrawable="@drawable/color_progress_seek"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toStartOf="@id/songTotalTime"
|
||||
app:layout_constraintStart_toEndOf="@id/songCurrentProgress"
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:maxHeight="2dp"
|
||||
android:progressDrawable="@drawable/color_progress_seek"
|
||||
app:layout_constraintEnd_toStartOf="@id/songTotalTime"
|
||||
app:layout_constraintStart_toEndOf="@id/songCurrentProgress"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
|
|
@ -39,6 +39,8 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:maxHeight="2dp"
|
||||
android:progressDrawable="@drawable/color_progress_seek"
|
||||
app:layout_constraintEnd_toStartOf="@id/songTotalTime"
|
||||
app:layout_constraintStart_toEndOf="@id/songCurrentProgress"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
android:id="@+id/progressSlider"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxHeight="2dp"
|
||||
android:progressDrawable="@drawable/color_progress_seek"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playPauseButton"
|
||||
app:layout_constraintEnd_toStartOf="@id/songTotalTime"
|
||||
app:layout_constraintStart_toEndOf="@id/songCurrentProgress"
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
<androidx.appcompat.widget.AppCompatSeekBar
|
||||
android:id="@+id/progressSlider"
|
||||
android:layout_width="0dp"
|
||||
android:maxHeight="2dp"
|
||||
android:progressDrawable="@drawable/color_progress_seek"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toStartOf="@id/songTotalTime"
|
||||
app:layout_constraintStart_toEndOf="@id/songCurrentProgress"
|
||||
|
|
|
@ -14,23 +14,25 @@
|
|||
|
||||
<resources>
|
||||
<declare-styleable name="LrcView">
|
||||
<attr name="lrcTextSize" format="dimension" />
|
||||
<attr name="lrcLineSpaceSize" format="dimension" />
|
||||
<attr name="lrcNormalTextColor" format="reference|color" />
|
||||
<attr name="lrcCurrentTextColor" format="reference|color" />
|
||||
<attr name="lrcTouchDelay" format="integer" />
|
||||
<attr name="noLrcTextSize" format="dimension" />
|
||||
<attr name="noLrcTextColor" format="reference|color" />
|
||||
<attr name="indicatorLineHeight" format="dimension" />
|
||||
<attr name="indicatorTextSize" format="dimension" />
|
||||
<attr name="indicatorTextColor" format="reference|color" />
|
||||
<attr name="currentIndicateLrcColor" format="reference|color" />
|
||||
<attr name="indicatorTouchDelay" format="integer" />
|
||||
<attr name="indicatorLineColor" format="reference|color" />
|
||||
<attr name="indicatorStartEndMargin" format="dimension" />
|
||||
<attr name="iconLineGap" format="dimension" />
|
||||
<attr name="playIconWidth" format="dimension" />
|
||||
<attr name="playIconHeight" format="dimension" />
|
||||
<attr name="playIcon" format="reference" />
|
||||
<attr name="lrcTextSize" format="dimension"/>
|
||||
<attr name="lrcLineSpaceSize" format="dimension"/>
|
||||
<attr name="lrcNormalTextColor" format="reference|color"/>
|
||||
<attr name="lrcCurrentTextColor" format="reference|color"/>
|
||||
<attr name="lrcTouchDelay" format="integer"/>
|
||||
<attr name="noLrcTextSize" format="dimension"/>
|
||||
<attr name="noLrcTextColor" format="reference|color"/>
|
||||
<attr name="indicatorLineHeight" format="dimension"/>
|
||||
<attr name="indicatorTextSize" format="dimension"/>
|
||||
<attr name="indicatorTextColor" format="reference|color"/>
|
||||
<attr name="currentIndicateLrcColor" format="reference|color"/>
|
||||
<attr name="indicatorTouchDelay" format="integer"/>
|
||||
<attr name="indicatorLineColor" format="reference|color"/>
|
||||
<attr name="indicatorStartEndMargin" format="dimension"/>
|
||||
<attr name="iconLineGap" format="dimension"/>
|
||||
<attr name="playIconWidth" format="dimension"/>
|
||||
<attr name="playIconHeight" format="dimension"/>
|
||||
<attr name="playIcon" format="reference"/>
|
||||
<attr name="isLrcCurrentTextBold" format="boolean"/>
|
||||
<attr name="isLrcIndicatorTextBold" format="boolean"/>
|
||||
</declare-styleable>
|
||||
</resources>
|
Loading…
Add table
Add a link
Reference in a new issue