diff --git a/app/src/main/java/code/name/monkey/retromusic/activities/SettingsActivity.kt b/app/src/main/java/code/name/monkey/retromusic/activities/SettingsActivity.kt index 2c639035..8a7568db 100755 --- a/app/src/main/java/code/name/monkey/retromusic/activities/SettingsActivity.kt +++ b/app/src/main/java/code/name/monkey/retromusic/activities/SettingsActivity.kt @@ -11,7 +11,6 @@ import code.name.monkey.retromusic.R import code.name.monkey.retromusic.activities.base.AbsBaseActivity import code.name.monkey.retromusic.fragments.settings.MainSettingsFragment import kotlinx.android.synthetic.main.activity_settings.appBarLayout -import kotlinx.android.synthetic.main.activity_settings.detailContentFrame import kotlinx.android.synthetic.main.activity_settings.toolbar class SettingsActivity : AbsBaseActivity() { @@ -45,17 +44,17 @@ class SettingsActivity : AbsBaseActivity() { fun setupFragment(fragment: Fragment, @StringRes titleName: Int) { val fragmentTransaction = fragmentManager - .beginTransaction() - .setCustomAnimations(R.anim.sliding_in_left, R.anim.sliding_out_right, android.R.anim.slide_in_left, android.R.anim.slide_out_right) + .beginTransaction() + .setCustomAnimations( + R.anim.sliding_in_left, + R.anim.sliding_out_right, + android.R.anim.slide_in_left, + android.R.anim.slide_out_right + ) - if (detailContentFrame == null) { - fragmentTransaction.replace(R.id.contentFrame, fragment, fragment.tag) - fragmentTransaction.addToBackStack(null) - fragmentTransaction.commit() - } else { - fragmentTransaction.replace(R.id.detailContentFrame, fragment, fragment.tag) - fragmentTransaction.commit() - } + fragmentTransaction.replace(R.id.contentFrame, fragment, fragment.tag) + fragmentTransaction.addToBackStack(null) + fragmentTransaction.commit() TransitionManager.beginDelayedTransition(appBarLayout) setTitle(titleName) diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/player/normal/PlayerPlaybackControlsFragment.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/player/normal/PlayerPlaybackControlsFragment.kt index 0ace3bd4..4be53f6b 100644 --- a/app/src/main/java/code/name/monkey/retromusic/fragments/player/normal/PlayerPlaybackControlsFragment.kt +++ b/app/src/main/java/code/name/monkey/retromusic/fragments/player/normal/PlayerPlaybackControlsFragment.kt @@ -27,7 +27,6 @@ import code.name.monkey.retromusic.misc.SimpleOnSeekbarChangeListener import code.name.monkey.retromusic.service.MusicService import code.name.monkey.retromusic.util.MusicUtil import code.name.monkey.retromusic.util.PreferenceUtil -import code.name.monkey.retromusic.util.RetroUtil import code.name.monkey.retromusic.util.ViewUtil import kotlinx.android.synthetic.main.fragment_player_playback_controls.nextButton import kotlinx.android.synthetic.main.fragment_player_playback_controls.playPauseButton @@ -159,20 +158,10 @@ class PlayerPlaybackControlsFragment : AbsPlayerControlsFragment(), OnSharedPref } private fun updatePlayPauseDrawableState() { - val playResIcon = if (RetroUtil.isTablet()) { - R.drawable.ic_play_arrow_white_64dp - } else { - R.drawable.ic_play_arrow_white_24dp - } - val pauseResIcon = if (RetroUtil.isTablet()) { - R.drawable.ic_pause_white_64dp - } else { - R.drawable.ic_pause_white_64dp - } if (MusicPlayerRemote.isPlaying) { - playPauseButton.setImageResource(playResIcon) + playPauseButton.setImageResource(R.drawable.ic_pause_white_24dp) } else { - playPauseButton.setImageResource(pauseResIcon) + playPauseButton.setImageResource(R.drawable.ic_play_arrow_white_24dp) } } diff --git a/app/src/main/res/layout-sw600dp-land/activity_settings.xml b/app/src/main/res/layout-sw600dp-land/activity_settings.xml deleted file mode 100644 index deae7ba4..00000000 --- a/app/src/main/res/layout-sw600dp-land/activity_settings.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/app/src/main/res/layout-xlarge/activity_about_content.xml b/app/src/main/res/layout-xlarge/activity_about_content.xml index b03e6dfd..7869a2a4 100644 --- a/app/src/main/res/layout-xlarge/activity_about_content.xml +++ b/app/src/main/res/layout-xlarge/activity_about_content.xml @@ -1,37 +1,36 @@ - - + android:padding="8dp" + grid:alignmentMode="alignBounds"> - + - - + - + + - + - + - + + \ No newline at end of file diff --git a/app/src/main/res/layout/card_credit.xml b/app/src/main/res/layout/card_credit.xml index dcee47ea..c774326d 100644 --- a/app/src/main/res/layout/card_credit.xml +++ b/app/src/main/res/layout/card_credit.xml @@ -13,7 +13,12 @@ @@ -65,7 +67,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" - app:layout_constraintGuide_begin="52dp" /> + app:layout_constraintGuide_begin="@dimen/list_pref_guideline_begin" /> @@ -65,6 +67,6 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" - app:layout_constraintGuide_begin="56dp" /> + app:layout_constraintGuide_begin="@dimen/list_pref_guideline_begin" /> \ No newline at end of file diff --git a/app/src/main/res/layout/list_item_view_no_title.xml b/app/src/main/res/layout/list_item_view_no_title.xml index ec15ebfe..17c8297f 100644 --- a/app/src/main/res/layout/list_item_view_no_title.xml +++ b/app/src/main/res/layout/list_item_view_no_title.xml @@ -18,9 +18,11 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?attr/rectSelector" - android:minHeight="72dp" - android:orientation="horizontal" - android:padding="16dp" + android:minHeight="?attr/listPreferredItemHeight" + android:paddingStart="?attr/listPreferredItemPaddingStart" + android:paddingTop="16dp" + android:paddingEnd="?attr/listPreferredItemPaddingEnd" + android:paddingBottom="16dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" tools:ignore="PrivateResource"> @@ -46,13 +48,13 @@ app:layout_constraintStart_toStartOf="@+id/guideline_front_margin" app:layout_constraintTop_toTopOf="parent" tools:maxLines="@string/grid_size_1" - tools:text="@tools:sample/lorem" /> + tools:text="@tools:sample/lorem/random" /> + app:layout_constraintGuide_begin="@dimen/list_pref_guideline_begin" /> \ No newline at end of file diff --git a/app/src/main/res/layout/list_item_view_seekbar.xml b/app/src/main/res/layout/list_item_view_seekbar.xml index dfaef53a..a20fb1c6 100644 --- a/app/src/main/res/layout/list_item_view_seekbar.xml +++ b/app/src/main/res/layout/list_item_view_seekbar.xml @@ -18,9 +18,11 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?attr/rectSelector" - android:minHeight="72dp" - android:orientation="horizontal" - android:padding="16dp" + android:minHeight="?attr/listPreferredItemHeight" + android:paddingStart="?attr/listPreferredItemPaddingStart" + android:paddingTop="16dp" + android:paddingEnd="?attr/listPreferredItemPaddingEnd" + android:paddingBottom="16dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" tools:ignore="PrivateResource"> @@ -65,7 +67,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" - app:layout_constraintGuide_begin="52dp" /> + app:layout_constraintGuide_begin="@dimen/list_pref_guideline_begin" /> + app:layout_constraintGuide_begin="@dimen/list_pref_guideline_begin" /> + app:layout_constraintGuide_begin="@dimen/list_pref_guideline_begin" /> 16dp 64dp 16dp + 80dp diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index e9839686..c8084435 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -48,4 +48,6 @@ 24dp 56dp 32dp + 56dp + 70dp