Removed unwanted resources

main
h4h13 2019-10-26 19:16:01 +05:30
parent cddf9db608
commit 914b2316c3
9 changed files with 8 additions and 143 deletions

View File

@ -19,7 +19,7 @@ import code.name.monkey.retromusic.loaders.AlbumLoader
import code.name.monkey.retromusic.loaders.ArtistLoader
import code.name.monkey.retromusic.loaders.PlaylistSongsLoader
import code.name.monkey.retromusic.service.MusicService
import code.name.monkey.retromusic.transform.AppRater
import code.name.monkey.retromusic.util.AppRater
import code.name.monkey.retromusic.util.PreferenceUtil
import io.reactivex.disposables.CompositeDisposable
import java.util.*

View File

@ -12,7 +12,7 @@
* See the GNU General Public License for more details.
*/
package code.name.monkey.retromusic.transform
package code.name.monkey.retromusic.util
import android.content.Context
import android.content.Intent
@ -20,7 +20,6 @@ import android.content.SharedPreferences
import android.graphics.Color
import android.net.Uri
import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.util.PreferenceUtil
import com.afollestad.materialdialogs.LayoutMode
import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.WhichButton
@ -58,7 +57,7 @@ object AppRater {
// Wait at least n days before opening
if (launchCount >= LAUNCHES_UNTIL_PROMPT) {
if (System.currentTimeMillis() >= dateFirstLaunch + DAYS_UNTIL_PROMPT * 24 * 60 * 60 * 1000) {
showRateDialog(context, editor)
showRateDialog(context, editor)
}
}

View File

@ -1,49 +0,0 @@
/*
* Copyright (c) 2019 Hemanth Savarala.
*
* Licensed under the GNU General Public License v3
*
* This is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by
* the Free Software Foundation either version 3 of the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*/
package code.name.monkey.retromusic.views;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.PorterDuff;
import android.util.AttributeSet;
import androidx.appcompat.widget.AppCompatImageView;
import code.name.monkey.appthemehelper.util.ATHUtil;
import code.name.monkey.retromusic.R;
public class IconImageView extends AppCompatImageView {
public IconImageView(Context context) {
super(context);
init(context);
}
public IconImageView(Context context, AttributeSet attrs) {
super(context, attrs);
init(context);
}
public IconImageView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init(context);
}
private void init(Context context) {
if (context == null) return;
setImageTintList(ColorStateList.valueOf(ATHUtil.INSTANCE.resolveColor(context, R.attr.iconColor)));
//setColorFilter(ATHUtil.INSTANCE.resolveColor(context, R.attr.iconColor), PorterDuff.Mode.SRC_IN);
}
}

View File

@ -51,4 +51,4 @@ class ListItemView : FrameLayout {
}
typedArray.recycle()
}
}
}

View File

@ -1,37 +0,0 @@
/*
* Copyright (c) 2019 Hemanth Savarala.
*
* Licensed under the GNU General Public License v3
*
* This is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by
* the Free Software Foundation either version 3 of the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*/
package code.name.monkey.retromusic.views
import android.content.Context
import android.content.res.ColorStateList
import android.util.AttributeSet
import code.name.monkey.appthemehelper.ThemeStore
import code.name.monkey.appthemehelper.util.ATHUtil
import code.name.monkey.retromusic.R
import com.google.android.material.chip.Chip
class RetroChip @JvmOverloads constructor(
context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) :
Chip(context, attrs, defStyleAttr) {
init {
chipBackgroundColor = ColorStateList.valueOf(ThemeStore.primaryColor(context))
val iconColor = ATHUtil.resolveColor(context, R.attr.iconColor)
val dividerColor = ATHUtil.resolveColor(context, R.attr.dividerColor)
chipIcon?.setTintList(ColorStateList.valueOf(iconColor))
setTextColor(iconColor)
chipStrokeColor = ColorStateList.valueOf(dividerColor)
}
}

View File

@ -1,43 +0,0 @@
/*
* Copyright (c) 2019 Hemanth Savarala.
*
* Licensed under the GNU General Public License v3
*
* This is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by
* the Free Software Foundation either version 3 of the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*/
package code.name.monkey.retromusic.views
import android.content.Context
import android.util.AttributeSet
import code.name.monkey.retromusic.util.PreferenceUtil
import com.google.android.material.card.MaterialCardView
import com.google.android.material.shape.CornerFamily
import com.google.android.material.shape.MaterialShapeDrawable
/**
* Created by hemanths on 2019-10-11.
*/
class TopCornerCardView @JvmOverloads constructor(
context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0
) : MaterialCardView(context, attrs, defStyleAttr) {
private val shapeDrawable = MaterialShapeDrawable()
init {
val cornerSize= PreferenceUtil.getInstance(context).dialogCorner
val shapeModel = shapeDrawable.shapeAppearanceModel
background = shapeDrawable
shapeDrawable.shapeAppearanceModel = shapeModel.toBuilder()
.setTopLeftCorner(CornerFamily.ROUNDED, cornerSize)
.setBottomLeftCorner(CornerFamily.ROUNDED, cornerSize)
.setBottomRightCorner(CornerFamily.ROUNDED, cornerSize)
.setTopRightCorner(CornerFamily.ROUNDED, cornerSize)
.build()
}
}

View File

@ -58,12 +58,13 @@
android:layout_height="228dp"
android:background="@color/twenty_percent_black_overlay" />
<code.name.monkey.retromusic.views.IconImageView
<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:tint="@color/md_white_1000"
app:srcCompat="@drawable/ic_add_photo_white_24dp" />
<FrameLayout

View File

@ -58,7 +58,8 @@
android:visibility="gone"
tools:visibility="visible">
<code.name.monkey.retromusic.views.IconImageView
<androidx.appcompat.widget.AppCompatImageView
app:tint="?colorOnSecondary"
android:layout_width="96dp"
android:layout_height="96dp"
app:srcCompat="@drawable/ic_play_arrow_white_64dp" />

View File

@ -218,13 +218,6 @@
<item name="android:fontFamily">@font/circular</item>
</style>
<style name="TopCornerCardView">
<item name="cornerFamilyTopLeft">rounded</item>
<item name="cornerFamilyTopRight">rounded</item>
<item name="cornerSizeTopLeft">16dp</item>
<item name="cornerSizeTopRight">16dp</item>
</style>
<style name="ToolbarCornerCardView">
<item name="cornerFamily">rounded</item>
<item name="cornerSize">8dp</item>