Added adapitve icon and grid size change forsong
3
.gitignore
vendored
|
@ -40,6 +40,5 @@ app/normal/release/
|
|||
/models/
|
||||
|
||||
app/font/
|
||||
app/src/debug/
|
||||
app/src/font/
|
||||
app/src/debug/
|
||||
/app/nofont/
|
||||
|
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 13 KiB |
|
@ -229,18 +229,14 @@ public class MainActivity extends AbsSlidingMusicPanelActivity
|
|||
if (fragment instanceof AbsLibraryPagerRecyclerViewCustomGridSizeFragment) {
|
||||
AbsLibraryPagerRecyclerViewCustomGridSizeFragment currentFragment
|
||||
= (AbsLibraryPagerRecyclerViewCustomGridSizeFragment) fragment;
|
||||
if (currentFragment instanceof SongsFragment) {
|
||||
menu.removeItem(R.id.action_grid_size);
|
||||
menu.removeItem(R.id.action_layout_type);
|
||||
} else {
|
||||
MenuItem gridSizeItem = menu.findItem(R.id.action_grid_size);
|
||||
if (RetroUtil.isLandscape()) {
|
||||
gridSizeItem.setTitle(R.string.action_grid_size_land);
|
||||
}
|
||||
setUpGridSizeMenu(currentFragment, gridSizeItem.getSubMenu());
|
||||
MenuItem layoutItem = menu.findItem(R.id.action_layout_type);
|
||||
setupLayoutMenu(currentFragment, layoutItem.getSubMenu());
|
||||
|
||||
MenuItem gridSizeItem = menu.findItem(R.id.action_grid_size);
|
||||
if (RetroUtil.isLandscape()) {
|
||||
gridSizeItem.setTitle(R.string.action_grid_size_land);
|
||||
}
|
||||
setUpGridSizeMenu(currentFragment, gridSizeItem.getSubMenu());
|
||||
MenuItem layoutItem = menu.findItem(R.id.action_layout_type);
|
||||
setupLayoutMenu(currentFragment, layoutItem.getSubMenu());
|
||||
setUpSortOrderMenu(currentFragment, menu.findItem(R.id.action_sort_order).getSubMenu());
|
||||
} else {
|
||||
menu.removeItem(R.id.action_layout_type);
|
||||
|
|
|
@ -17,10 +17,16 @@ package code.name.monkey.retromusic.extensions
|
|||
import android.content.Context
|
||||
import android.graphics.Bitmap
|
||||
import android.graphics.BitmapFactory
|
||||
import android.graphics.Canvas
|
||||
import android.graphics.drawable.AdaptiveIconDrawable
|
||||
import android.graphics.drawable.BitmapDrawable
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.os.Build
|
||||
import androidx.annotation.DimenRes
|
||||
import androidx.annotation.DrawableRes
|
||||
import androidx.core.content.ContextCompat
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.util.DensityUtil
|
||||
|
||||
fun Context.scaledDrawableResources(@DrawableRes id: Int, @DimenRes width: Int, @DimenRes height: Int): Drawable {
|
||||
val w = resources.getDimension(width).toInt()
|
||||
|
@ -34,3 +40,20 @@ fun Context.scaledDrawable(@DrawableRes id: Int, width: Int, height: Int): Drawa
|
|||
return BitmapDrawable(resources, bmpScaled)
|
||||
}
|
||||
|
||||
fun Drawable.getBitmapDrawable(): Bitmap {
|
||||
val bmp = Bitmap.createBitmap(bounds.width(), bounds.height(), Bitmap.Config.ARGB_8888)
|
||||
val canvas = Canvas(bmp)
|
||||
draw(canvas)
|
||||
return bmp
|
||||
}
|
||||
|
||||
fun getAdaptiveIconDrawable(context: Context): Drawable {
|
||||
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
AdaptiveIconDrawable(
|
||||
ContextCompat.getDrawable(context, R.drawable.ic_launcher_background),
|
||||
ContextCompat.getDrawable(context, R.drawable.ic_launcher_background)
|
||||
)
|
||||
} else {
|
||||
ContextCompat.getDrawable(context, R.drawable.color_circle_gradient)!!
|
||||
}
|
||||
}
|
|
@ -29,7 +29,6 @@ abstract class AbsLibraryPagerRecyclerViewCustomGridSizeFragment<A : RecyclerVie
|
|||
} else R.layout.item_list
|
||||
}
|
||||
|
||||
protected abstract fun setLayoutRes(layoutRes: Int)
|
||||
|
||||
fun setAndSaveLayoutRes(layoutRes: Int) {
|
||||
setLayoutRes(layoutRes)
|
||||
|
@ -53,7 +52,6 @@ abstract class AbsLibraryPagerRecyclerViewCustomGridSizeFragment<A : RecyclerVie
|
|||
return gridSize
|
||||
}
|
||||
|
||||
protected abstract fun setGridSize(gridSize: Int)
|
||||
|
||||
fun getSortOrder(): String? {
|
||||
if (sortOrder == null) {
|
||||
|
@ -62,7 +60,6 @@ abstract class AbsLibraryPagerRecyclerViewCustomGridSizeFragment<A : RecyclerVie
|
|||
return sortOrder
|
||||
}
|
||||
|
||||
protected abstract fun setSortOrder(sortOrder: String)
|
||||
|
||||
fun setAndSaveSortOrder(sortOrder: String) {
|
||||
this.sortOrder = sortOrder
|
||||
|
@ -78,9 +75,9 @@ abstract class AbsLibraryPagerRecyclerViewCustomGridSizeFragment<A : RecyclerVie
|
|||
} else {
|
||||
saveGridSize(gridSize)
|
||||
}
|
||||
invalidateLayoutManager()
|
||||
// only recreate the adapter and layout manager if the layout currentLayoutRes has changed
|
||||
if (oldLayoutRes != itemLayoutRes()) {
|
||||
invalidateLayoutManager()
|
||||
invalidateAdapter()
|
||||
} else {
|
||||
setGridSize(gridSize)
|
||||
|
@ -107,6 +104,12 @@ abstract class AbsLibraryPagerRecyclerViewCustomGridSizeFragment<A : RecyclerVie
|
|||
recyclerView.setPadding(padding, padding, padding, padding)
|
||||
}
|
||||
|
||||
protected abstract fun setGridSize(gridSize: Int)
|
||||
|
||||
protected abstract fun setSortOrder(sortOrder: String)
|
||||
|
||||
protected abstract fun setLayoutRes(layoutRes: Int)
|
||||
|
||||
protected abstract fun loadSortOrder(): String
|
||||
|
||||
protected abstract fun saveSortOrder(sortOrder: String)
|
||||
|
|
|
@ -3,7 +3,7 @@ package code.name.monkey.retromusic.fragments.mainactivity
|
|||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.annotation.LayoutRes
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import code.name.monkey.retromusic.App
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.adapter.song.ShuffleButtonSongAdapter
|
||||
|
@ -18,7 +18,7 @@ import java.util.*
|
|||
import javax.inject.Inject
|
||||
|
||||
class SongsFragment :
|
||||
AbsLibraryPagerRecyclerViewCustomGridSizeFragment<SongAdapter, LinearLayoutManager>(),
|
||||
AbsLibraryPagerRecyclerViewCustomGridSizeFragment<SongAdapter, GridLayoutManager>(),
|
||||
SongView, MainActivityFragmentCallbacks {
|
||||
|
||||
@Inject
|
||||
|
@ -37,8 +37,19 @@ class SongsFragment :
|
|||
songPresenter.attachView(this)
|
||||
}
|
||||
|
||||
override fun createLayoutManager(): LinearLayoutManager {
|
||||
return LinearLayoutManager(requireActivity())
|
||||
override fun createLayoutManager(): GridLayoutManager {
|
||||
println("createLayoutManager: ${getGridSize()}")
|
||||
return GridLayoutManager(requireActivity(), getGridSize()).apply {
|
||||
spanSizeLookup = object : GridLayoutManager.SpanSizeLookup() {
|
||||
override fun getSpanSize(position: Int): Int {
|
||||
return if (position == 0) {
|
||||
getGridSize()
|
||||
} else {
|
||||
1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun createAdapter(): SongAdapter {
|
||||
|
@ -46,7 +57,7 @@ class SongsFragment :
|
|||
return ShuffleButtonSongAdapter(
|
||||
mainActivity,
|
||||
dataSet,
|
||||
R.layout.item_list,
|
||||
itemLayoutRes(),
|
||||
mainActivity
|
||||
)
|
||||
}
|
||||
|
@ -60,7 +71,7 @@ class SongsFragment :
|
|||
}
|
||||
|
||||
override fun loadGridSize(): Int {
|
||||
return PreferenceUtil.getInstance(requireContext()).getSongGridSize(requireActivity())
|
||||
return PreferenceUtil.getInstance(requireContext()).getSongGridSize(requireContext())
|
||||
}
|
||||
|
||||
override fun saveGridSize(gridColumns: Int) {
|
||||
|
@ -68,7 +79,7 @@ class SongsFragment :
|
|||
}
|
||||
|
||||
override fun loadGridSizeLand(): Int {
|
||||
return PreferenceUtil.getInstance(requireContext()).getSongGridSizeLand(requireActivity())
|
||||
return PreferenceUtil.getInstance(requireContext()).getSongGridSizeLand(requireContext())
|
||||
}
|
||||
|
||||
override fun saveGridSizeLand(gridColumns: Int) {
|
||||
|
@ -125,10 +136,11 @@ class SongsFragment :
|
|||
|
||||
@LayoutRes
|
||||
override fun loadLayoutRes(): Int {
|
||||
return R.layout.item_list
|
||||
return PreferenceUtil.getInstance(requireContext()).songGridStyle
|
||||
}
|
||||
|
||||
override fun saveLayoutRes(@LayoutRes layoutRes: Int) {
|
||||
PreferenceUtil.getInstance(requireContext()).songGridStyle = layoutRes
|
||||
}
|
||||
|
||||
override fun handleBackPress(): Boolean {
|
||||
|
|
|
@ -396,11 +396,9 @@ public final class PreferenceUtil {
|
|||
.getInt(ALBUM_GRID_SIZE_LAND, context.getResources().getInteger(R.integer.default_grid_columns_land));
|
||||
}
|
||||
|
||||
|
||||
@LayoutRes
|
||||
public int getAlbumGridStyle() {
|
||||
if (mPreferences.contains(ALBUM_GRID_STYLE)) {
|
||||
Log.i(TAG, "getAlbumGridStyle: " + mPreferences.getInt(ALBUM_GRID_STYLE, -10));
|
||||
}
|
||||
return mPreferences.getInt(ALBUM_GRID_STYLE, R.layout.item_grid);
|
||||
}
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@ import android.graphics.Color
|
|||
import android.util.AttributeSet
|
||||
import androidx.appcompat.widget.AppCompatImageView
|
||||
import code.name.monkey.appthemehelper.util.ATHUtil
|
||||
import code.name.monkey.appthemehelper.util.ColorUtil
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.extensions.getAdaptiveIconDrawable
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
import code.name.monkey.retromusic.util.RetroColorUtil
|
||||
|
||||
|
@ -44,15 +44,16 @@ class ColorIconsImageView @JvmOverloads constructor(
|
|||
}
|
||||
|
||||
fun setIconBackgroundColor(color: Int) {
|
||||
setBackgroundResource(R.drawable.color_circle_gradient)
|
||||
background = getAdaptiveIconDrawable(context)
|
||||
if (ATHUtil.isWindowBackgroundDark(context) && PreferenceUtil.getInstance(context).desaturatedColor()) {
|
||||
val desaturatedColor = RetroColorUtil.desaturateColor(color, 0.4f)
|
||||
backgroundTintList = ColorStateList.valueOf(desaturatedColor)
|
||||
imageTintList =
|
||||
ColorStateList.valueOf(ATHUtil.resolveColor(context, R.attr.colorSurface))
|
||||
} else {
|
||||
backgroundTintList = ColorStateList.valueOf(ColorUtil.adjustAlpha(color, 0.22f))
|
||||
imageTintList = ColorStateList.valueOf(ColorUtil.withAlpha(color, 0.75f))
|
||||
backgroundTintList = ColorStateList.valueOf(color)
|
||||
imageTintList =
|
||||
ColorStateList.valueOf(ATHUtil.resolveColor(context, R.attr.colorSurface))
|
||||
}
|
||||
requestLayout()
|
||||
invalidate()
|
||||
|
|
58
app/src/main/res/drawable-v24/ic_launcher_foreground.xml
Normal file
|
@ -0,0 +1,58 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="921.0526"
|
||||
android:viewportHeight="921.0526">
|
||||
<group android:translateX="322.5263"
|
||||
android:translateY="285.5263">
|
||||
<path
|
||||
android:pathData="M10.256,0L265.4,0C268.967,0 270.26,0.371 271.563,1.069C272.867,1.766 273.89,2.789 274.587,4.093C275.285,5.396 275.656,6.689 275.656,10.256L275.656,177.191C275.656,180.757 275.285,182.05 274.587,183.353C273.89,184.657 272.867,185.68 271.563,186.378C270.26,187.075 268.967,187.446 265.4,187.446L10.256,187.446C6.689,187.446 5.396,187.075 4.093,186.378C2.789,185.68 1.766,184.657 1.069,183.353C0.371,182.05 0,180.757 -0,177.191L0,10.256C-0,6.689 0.371,5.396 1.069,4.093C1.766,2.789 2.789,1.766 4.093,1.069C5.396,0.371 6.689,0 10.256,0Z"
|
||||
android:strokeWidth="1"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:gradientRadius="236.10738"
|
||||
android:centerX="0"
|
||||
android:centerY="0"
|
||||
android:type="radial">
|
||||
<item android:offset="0" android:color="#FF3D5AFE"/>
|
||||
<item android:offset="1" android:color="#FF651FFF"/>
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:pathData="M262.814,336.03L0.163,75.53L0.006,183.375C0.002,185.781 0.962,188.088 2.67,189.781L161.703,347.393C163.201,348.877 165.225,349.711 167.334,349.711L257.18,349.711C261.598,349.711 265.18,346.129 265.18,341.711C265.18,339.577 264.328,337.533 262.814,336.03Z"
|
||||
android:strokeWidth="1"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:gradientRadius="250.9684"
|
||||
android:centerX="-32.788143"
|
||||
android:centerY="67.34283"
|
||||
android:type="radial">
|
||||
<item android:offset="0" android:color="#FF3D5AFE"/>
|
||||
<item android:offset="1" android:color="#FF651FFF"/>
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:pathData="M8.035,349.71L59.204,349.71C63.623,349.71 67.204,346.128 67.204,341.71C67.204,339.608 66.377,337.59 64.901,336.093L13.732,284.191C10.63,281.045 5.565,281.009 2.418,284.111C0.894,285.614 0.035,287.666 0.035,289.808L0.035,341.71C0.035,346.128 3.617,349.71 8.035,349.71Z"
|
||||
android:strokeWidth="1"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:gradientRadius="95.39285"
|
||||
android:centerX="-268.79202"
|
||||
android:centerY="57.347355"
|
||||
android:type="radial">
|
||||
<item android:offset="0" android:color="#FF3D5AFE"/>
|
||||
<item android:offset="1" android:color="#FF651FFF"/>
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
</group>
|
||||
</vector>
|
10
app/src/main/res/drawable/ic_launcher_background.xml
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:fillColor="@color/md_white_1000"
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
</vector>
|
55
app/src/main/res/drawable/ic_retro_music_icon.xml
Normal file
|
@ -0,0 +1,55 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="276dp"
|
||||
android:height="350dp"
|
||||
android:viewportWidth="276"
|
||||
android:viewportHeight="350">
|
||||
<path
|
||||
android:pathData="M10.256,0L265.4,0C268.967,0 270.26,0.371 271.563,1.069C272.867,1.766 273.89,2.789 274.587,4.093C275.285,5.396 275.656,6.689 275.656,10.256L275.656,177.191C275.656,180.757 275.285,182.05 274.587,183.353C273.89,184.657 272.867,185.68 271.563,186.378C270.26,187.075 268.967,187.446 265.4,187.446L10.256,187.446C6.689,187.446 5.396,187.075 4.093,186.378C2.789,185.68 1.766,184.657 1.069,183.353C0.371,182.05 0,180.757 -0,177.191L0,10.256C-0,6.689 0.371,5.396 1.069,4.093C1.766,2.789 2.789,1.766 4.093,1.069C5.396,0.371 6.689,0 10.256,0Z"
|
||||
android:strokeWidth="1"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:gradientRadius="236.10738"
|
||||
android:centerX="0"
|
||||
android:centerY="0"
|
||||
android:type="radial">
|
||||
<item android:offset="0" android:color="#FF3D5AFE"/>
|
||||
<item android:offset="1" android:color="#FF651FFF"/>
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:pathData="M262.814,336.03L0.163,75.53L0.006,183.375C0.002,185.781 0.962,188.088 2.67,189.781L161.703,347.393C163.201,348.877 165.225,349.711 167.334,349.711L257.18,349.711C261.598,349.711 265.18,346.129 265.18,341.711C265.18,339.577 264.328,337.533 262.814,336.03Z"
|
||||
android:strokeWidth="1"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:gradientRadius="250.9684"
|
||||
android:centerX="-32.788143"
|
||||
android:centerY="67.34283"
|
||||
android:type="radial">
|
||||
<item android:offset="0" android:color="#FF3D5AFE"/>
|
||||
<item android:offset="1" android:color="#FF651FFF"/>
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:pathData="M8.035,349.71L59.204,349.71C63.623,349.71 67.204,346.128 67.204,341.71C67.204,339.608 66.377,337.59 64.901,336.093L13.732,284.191C10.63,281.045 5.565,281.009 2.418,284.111C0.894,285.614 0.035,287.666 0.035,289.808L0.035,341.71C0.035,346.128 3.617,349.71 8.035,349.71Z"
|
||||
android:strokeWidth="1"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:gradientRadius="95.39285"
|
||||
android:centerX="-268.79202"
|
||||
android:centerY="57.347355"
|
||||
android:type="radial">
|
||||
<item android:offset="0" android:color="#FF3D5AFE"/>
|
||||
<item android:offset="1" android:color="#FF651FFF"/>
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
</vector>
|
|
@ -20,10 +20,10 @@
|
|||
|
||||
<code.name.monkey.retromusic.views.ColorIconsImageView
|
||||
android:id="@+id/v1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="@dimen/adaptive_icon_size"
|
||||
android:layout_height="@dimen/adaptive_icon_size"
|
||||
android:layout_gravity="center"
|
||||
android:padding="@dimen/home_icon_padding"
|
||||
android:padding="@dimen/adaptive_icon_padding"
|
||||
app:iconBackgroundColor="@color/md_blue_500"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
@ -55,10 +55,10 @@
|
|||
|
||||
<code.name.monkey.retromusic.views.ColorIconsImageView
|
||||
android:id="@+id/v2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="@dimen/adaptive_icon_size"
|
||||
android:layout_height="@dimen/adaptive_icon_size"
|
||||
android:layout_gravity="center"
|
||||
android:padding="@dimen/home_icon_padding"
|
||||
android:padding="@dimen/adaptive_icon_padding"
|
||||
app:iconBackgroundColor="@color/md_red_500"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
@ -92,10 +92,10 @@
|
|||
|
||||
<code.name.monkey.retromusic.views.ColorIconsImageView
|
||||
android:id="@+id/v3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="@dimen/adaptive_icon_size"
|
||||
android:layout_height="@dimen/adaptive_icon_size"
|
||||
android:layout_gravity="center"
|
||||
android:padding="@dimen/home_icon_padding"
|
||||
android:padding="@dimen/adaptive_icon_padding"
|
||||
app:iconBackgroundColor="@color/md_deep_purple_500"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
@ -128,10 +128,10 @@
|
|||
|
||||
<code.name.monkey.retromusic.views.ColorIconsImageView
|
||||
android:id="@+id/v4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="@dimen/adaptive_icon_size"
|
||||
android:layout_height="@dimen/adaptive_icon_size"
|
||||
android:layout_gravity="center"
|
||||
android:padding="@dimen/home_icon_padding"
|
||||
android:padding="@dimen/adaptive_icon_padding"
|
||||
app:iconBackgroundColor="@color/md_green_500"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
|
|
@ -25,10 +25,11 @@
|
|||
|
||||
<code.name.monkey.retromusic.views.ColorIconsImageView
|
||||
android:id="@+id/icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="@dimen/adaptive_icon_size"
|
||||
android:layout_height="@dimen/adaptive_icon_size"
|
||||
android:padding="@dimen/adaptive_icon_padding"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="8dp"
|
||||
android:padding="10dp"
|
||||
app:iconBackgroundColor="@color/md_blue_A400"
|
||||
app:srcCompat="@drawable/ic_theme_palette_white_24dp" />
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/ic_launcher_background" />
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground" />
|
||||
<background android:drawable="@drawable/ic_launcher_background"/>
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/ic_launcher_background" />
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground" />
|
||||
<background android:drawable="@drawable/ic_launcher_background"/>
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5 KiB |
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 11 KiB |
|
@ -52,4 +52,6 @@
|
|||
<dimen name="pref_title_padding">72dp</dimen>
|
||||
<dimen name="slider_thumb_radius">6dp</dimen>
|
||||
<dimen name="slider_track_height">3dp</dimen>
|
||||
<dimen name="adaptive_icon_size">48dp</dimen>
|
||||
<dimen name="adaptive_icon_padding">12dp</dimen>
|
||||
</resources>
|
||||
|
|