refactor code
This commit is contained in:
parent
f4c56c8484
commit
d6a99f99e4
29 changed files with 299 additions and 178 deletions
|
@ -5,28 +5,6 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/searchView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardUseCompatPadding="true">
|
||||
|
||||
<code.name.monkey.retromusic.views.IconImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:padding="14dp"
|
||||
app:srcCompat="@drawable/ic_search_white_24dp" />
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:padding="12dp"
|
||||
android:text="@string/search_hint" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||
style="@style/SubTitleTextAppearance"
|
||||
android:text="@string/for_you" />
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
app:contentInsetLeft="0dp"
|
||||
app:contentInsetStart="0dp"
|
||||
app:contentInsetStartWithNavigation="0dp"
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
||||
app:subtitleTextAppearance="@style/TextAppearance.AppCompat.Caption"
|
||||
app:titleMargin="0dp"
|
||||
app:titleMarginStart="0dp"
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/drawerLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
@ -10,16 +9,4 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<com.google.android.material.navigation.NavigationView
|
||||
android:id="@+id/navigationView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
android:fitsSystemWindows="true"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="8dp"
|
||||
app:headerLayout="@layout/navigation_drawer_header"
|
||||
app:itemBackground="@drawable/navigation_item"
|
||||
app:itemTextAppearance="@style/NavigationViewTitleTextAppearance"
|
||||
app:menu="@menu/menu_drawer" />
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
</FrameLayout>
|
|
@ -2,7 +2,6 @@
|
|||
<LinearLayout 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/root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
|
|
|
@ -42,13 +42,12 @@
|
|||
|
||||
|
||||
<code.name.monkey.retromusic.views.WidthFitSquareLayout
|
||||
android:id="@+id/album_cover_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/player_album_cover_fragment"
|
||||
android:id="@+id/playerAlbumCoverFragment"
|
||||
android:name="code.name.monkey.retromusic.ui.fragments.player.PlayerAlbumCoverFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
@ -61,14 +60,13 @@
|
|||
tools:background="@color/md_white_1000">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/playback_controls_fragment"
|
||||
android:id="@+id/playbackControlsFragment"
|
||||
android:name="code.name.monkey.retromusic.ui.fragments.player.blur.BlurPlaybackControlsFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/toolbar_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0">
|
||||
|
|
|
@ -34,20 +34,36 @@
|
|||
android:layout_height="wrap_content"
|
||||
app:layout_scrollFlags="scroll|enterAlways">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
android:layout_gravity="center_vertical"
|
||||
app:layout_collapseMode="pin"
|
||||
tools:ignore="UnusedAttribute">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/bannerTitle"
|
||||
style="@style/BigTitleTextAppearanceToolbar"
|
||||
android:text="@string/app_name"
|
||||
tools:ignore="MissingPrefix" />
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
app:layout_collapseMode="pin"
|
||||
tools:ignore="UnusedAttribute">
|
||||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
<TextView
|
||||
android:id="@+id/bannerTitle"
|
||||
style="@style/BigTitleTextAppearanceToolbar"
|
||||
android:text="@string/app_name"
|
||||
tools:ignore="MissingPrefix" />
|
||||
|
||||
<code.name.monkey.retromusic.views.CircularImageView
|
||||
android:id="@+id/userImage"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_weight="0"
|
||||
app:civ_border="false" />
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ViewStub
|
||||
android:id="@+id/cab_stub"
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView 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="wrap_content"
|
||||
android:fadingEdge="vertical">
|
||||
android:fadingEdge="vertical"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/offlineLyrics"
|
||||
|
@ -12,5 +14,5 @@
|
|||
android:lineSpacingExtra="3dp"
|
||||
android:padding="16dp"
|
||||
android:text="@string/no_lyrics_found"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Headline6" />
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1" />
|
||||
</ScrollView>
|
|
@ -7,8 +7,6 @@
|
|||
android:orientation="vertical"
|
||||
tools:ignore="MissingPrefix">
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/userInfoContainer"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -61,6 +59,35 @@
|
|||
android:textAllCaps="false"
|
||||
app:srcCompat="@drawable/ic_settings_white_24dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<code.name.monkey.retromusic.views.MaterialButtonTextColor
|
||||
android:id="@+id/actionFolders"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton.Icon"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/folders"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
app:icon="@drawable/ic_folder_white_24dp"
|
||||
app:iconPadding="12dp"
|
||||
app:iconTint="?iconColor"
|
||||
app:rippleColor="?iconColor" />
|
||||
|
||||
<code.name.monkey.retromusic.views.MaterialButtonTextColor
|
||||
android:id="@+id/actionEqualizer"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton.Icon"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/equalizer"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
app:icon="@drawable/ic_equalizer_white_24dp"
|
||||
app:iconPadding="12dp"
|
||||
app:iconTint="?iconColor"
|
||||
app:rippleColor="?iconColor" />
|
||||
|
||||
<code.name.monkey.retromusic.views.MaterialButtonTextColor
|
||||
android:id="@+id/actionSleepTimer"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton.Icon"
|
||||
|
@ -75,6 +102,34 @@
|
|||
app:iconTint="?iconColor"
|
||||
app:rippleColor="?iconColor" />
|
||||
|
||||
<code.name.monkey.retromusic.views.MaterialButtonTextColor
|
||||
android:id="@+id/actionShare"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton.Icon"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/action_share"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
app:icon="@drawable/ic_share_white_24dp"
|
||||
app:iconPadding="12dp"
|
||||
app:iconTint="?iconColor"
|
||||
app:rippleColor="?iconColor" />
|
||||
|
||||
<code.name.monkey.retromusic.views.MaterialButtonTextColor
|
||||
android:id="@+id/actionBugReport"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton.Icon"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/report_bug"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
app:icon="@drawable/ic_bug_report_white_24dp"
|
||||
app:iconPadding="12dp"
|
||||
app:iconTint="?iconColor"
|
||||
app:rippleColor="?iconColor" />
|
||||
|
||||
<code.name.monkey.retromusic.views.MaterialButtonTextColor
|
||||
android:id="@+id/actionAbout"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton.Icon"
|
||||
|
@ -103,5 +158,18 @@
|
|||
app:iconTint="?iconColor"
|
||||
app:rippleColor="?iconColor" />
|
||||
|
||||
<code.name.monkey.retromusic.views.MaterialButtonTextColor
|
||||
android:id="@+id/actionBuyPro"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton.Icon"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/buy_pro"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
app:icon="@drawable/ic_card_giftcard_white_24dp"
|
||||
app:iconPadding="12dp"
|
||||
app:iconTint="?iconColor"
|
||||
app:rippleColor="?iconColor" />
|
||||
|
||||
</LinearLayout>
|
|
@ -89,6 +89,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="3dp"
|
||||
android:progress="20"
|
||||
android:progressDrawable="@drawable/color_progress_seek"
|
||||
app:mpb_progressStyle="horizontal"
|
||||
app:mpb_useIntrinsicPadding="false" />
|
||||
</code.name.monkey.retromusic.views.FitSystemWindowsLayout>
|
|
@ -1,19 +1,20 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<code.name.monkey.retromusic.views.LyricView
|
||||
android:id="@+id/lyricsView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:fadeInFadeOut="true"
|
||||
app:highlightColor="@color/md_white_1000"
|
||||
app:hint="No Lyrics"
|
||||
app:hintColor="@color/md_grey_400"
|
||||
app:lineSpace="15dp"
|
||||
app:textAlign="left"
|
||||
app:textSize="18sp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
app:textSize="18sp" />
|
||||
</LinearLayout>
|
Loading…
Add table
Add a link
Reference in a new issue