Code refactor and Flat, Fit, Full, Circle theme toolbar shadow fixes
This commit is contained in:
parent
954dfb6327
commit
724f743627
304 changed files with 3874 additions and 3524 deletions
|
@ -22,7 +22,8 @@ import code.name.monkey.retromusic.loaders.ArtistLoader
|
|||
import code.name.monkey.retromusic.loaders.SongLoader
|
||||
import java.util.*
|
||||
|
||||
internal class AsyncSearchResultLoader(context: Context, private val query: String) : WrappedAsyncTaskLoader<List<Any>>(context) {
|
||||
internal class AsyncSearchResultLoader(context: Context, private val query: String) :
|
||||
WrappedAsyncTaskLoader<List<Any>>(context) {
|
||||
|
||||
override fun loadInBackground(): List<Any>? {
|
||||
val results = ArrayList<Any>()
|
||||
|
|
|
@ -16,6 +16,10 @@ package code.name.monkey.retromusic.misc;
|
|||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcelable;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
|
@ -23,10 +27,6 @@ import androidx.fragment.app.FragmentPagerAdapter;
|
|||
import androidx.fragment.app.FragmentTransaction;
|
||||
import androidx.viewpager.widget.PagerAdapter;
|
||||
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
|
|
|
@ -17,6 +17,7 @@ package code.name.monkey.retromusic.misc;
|
|||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
|
|
|
@ -19,9 +19,11 @@ import android.app.Activity;
|
|||
import android.media.MediaScannerConnection;
|
||||
import android.net.Uri;
|
||||
import android.widget.Toast;
|
||||
import code.name.monkey.retromusic.R;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
import code.name.monkey.retromusic.R;
|
||||
|
||||
/**
|
||||
* @author Karim Abou Zeid (kabouzeid)
|
||||
*/
|
||||
|
@ -30,15 +32,10 @@ public class UpdateToastMediaScannerCompletionListener implements MediaScannerCo
|
|||
private final WeakReference<Activity> activityWeakReference;
|
||||
|
||||
private final String couldNotScanFiles;
|
||||
|
||||
private int failed = 0;
|
||||
|
||||
private int scanned = 0;
|
||||
|
||||
private final String scannedFiles;
|
||||
|
||||
private final String[] toBeScanned;
|
||||
|
||||
private int failed = 0;
|
||||
private int scanned = 0;
|
||||
private Toast toast;
|
||||
|
||||
@SuppressLint("ShowToast")
|
||||
|
|
|
@ -1 +1 @@
|
|||
/*
* 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.misc
import android.content.Context
import android.os.AsyncTask
import java.lang.ref.WeakReference
abstract class WeakContextAsyncTask<Params, Progress, Result>(context: Context) : AsyncTask<Params, Progress, Result>() {
private val contextWeakReference: WeakReference<Context> = WeakReference(context)
protected val context: Context?
get() = contextWeakReference.get()
}
|
||||
/*
* 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.misc
import android.content.Context
import android.os.AsyncTask
import java.lang.ref.WeakReference
abstract class WeakContextAsyncTask<Params, Progress, Result>(context: Context) :
AsyncTask<Params, Progress, Result>() {
private val contextWeakReference: WeakReference<Context> = WeakReference(context)
protected val context: Context?
get() = contextWeakReference.get()
}
|
|
@ -29,7 +29,7 @@ abstract class WrappedAsyncTaskLoader<D>
|
|||
*
|
||||
* @param context The [Context] to use.
|
||||
*/
|
||||
(context: Context) : AsyncTaskLoader<D>(context) {
|
||||
(context: Context) : AsyncTaskLoader<D>(context) {
|
||||
|
||||
private var mData: D? = null
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue