Removed suggestions

main
h4h13 2019-04-15 08:14:48 +05:30
parent 43cb27ae5f
commit b46175e20b
28 changed files with 145 additions and 440 deletions

View File

@ -164,6 +164,5 @@ dependencies {
implementation 'com.github.takahirom.downloadable.calligraphy:downloadable-calligraphy:0.1.3'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha2'
implementation project(':appthemehelper')
implementation project(':library')
}

View File

@ -153,6 +153,6 @@ class ArtistImageLoader(private val context: Context, private val lastFMClient:
companion object {
// we need these very low values to make sure our artist image loading calls doesn't block the image loading queue
private const val TIMEOUT = 500
private const val TIMEOUT = 700
}
}

View File

@ -12,33 +12,33 @@
* See the GNU General Public License for more details.
*/
package code.name.monkey.retromusic.util.schedulers;
import androidx.annotation.NonNull;
import io.reactivex.Scheduler;
import io.reactivex.schedulers.Schedulers;
package code.name.monkey.retromusic.lyrics;
/**
* Created by hemanths on 12/08/17.
* Desc :
* Author : Lauzy
* Date : 2017/10/13
* Blog : http://www.jianshu.com/u/e76853f863a9
* Email : freedompaladin@gmail.com
*/
public class Lrc {
private long time;
private String text;
public class ImmediateScheduler implements BaseSchedulerProvider {
@NonNull
@Override
public Scheduler computation() {
return Schedulers.trampoline();
public long getTime() {
return time;
}
@NonNull
@Override
public Scheduler io() {
return Schedulers.trampoline();
public void setTime(long time) {
this.time = time;
}
@NonNull
@Override
public Scheduler ui() {
return Schedulers.trampoline();
public String getText() {
return text;
}
}
public void setText(String text) {
this.text = text;
}
}

View File

@ -1,4 +1,18 @@
package com.lauzy.freedom.library;
/*
* 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.lyrics;
import android.content.Context;

View File

@ -1,4 +1,18 @@
package com.lauzy.freedom.library
/*
* 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.lyrics
import android.animation.ValueAnimator
import android.content.Context
@ -23,6 +37,7 @@ import androidx.annotation.ColorInt
import androidx.core.content.ContextCompat
import androidx.core.content.res.ResourcesCompat
import androidx.core.view.ViewCompat
import code.name.monkey.retromusic.R
import java.util.*
/**

View File

@ -22,7 +22,6 @@ import code.name.monkey.retromusic.ui.adapter.HomeAdapter.Companion.GENRES
import code.name.monkey.retromusic.ui.adapter.HomeAdapter.Companion.PLAYLISTS
import code.name.monkey.retromusic.ui.adapter.HomeAdapter.Companion.RECENT_ALBUMS
import code.name.monkey.retromusic.ui.adapter.HomeAdapter.Companion.RECENT_ARTISTS
import code.name.monkey.retromusic.ui.adapter.HomeAdapter.Companion.SUGGESTIONS
import code.name.monkey.retromusic.ui.adapter.HomeAdapter.Companion.TOP_ALBUMS
import code.name.monkey.retromusic.ui.adapter.HomeAdapter.Companion.TOP_ARTISTS
import code.name.monkey.retromusic.util.PreferenceUtil
@ -80,7 +79,7 @@ class HomePresenter(private val view: HomeContract.HomeView) : Presenter(), Home
disposable += repository.topAlbums
.observeOn(AndroidSchedulers.mainThread())
.subscribe({
if (it.isNotEmpty()) hashSet.add(Home(2, R.string.top_albums, 0, it, TOP_ALBUMS, R.drawable.ic_album_white_24dp))
if (it.isNotEmpty()) hashSet.add(Home(3, R.string.top_albums, 0, it, TOP_ALBUMS, R.drawable.ic_album_white_24dp))
view.showData(ArrayList(hashSet))
}, {
view.showEmpty()
@ -91,7 +90,7 @@ class HomePresenter(private val view: HomeContract.HomeView) : Presenter(), Home
disposable += repository.topArtists
.observeOn(AndroidSchedulers.mainThread())
.subscribe({
if (it.isNotEmpty()) hashSet.add(Home(3, R.string.top_artists, 0, it, TOP_ARTISTS, R.drawable.ic_artist_white_24dp))
if (it.isNotEmpty()) hashSet.add(Home(2, R.string.top_artists, 0, it, TOP_ARTISTS, R.drawable.ic_artist_white_24dp))
view.showData(ArrayList(hashSet))
}, {
view.showEmpty()

View File

@ -10,6 +10,8 @@ import android.widget.ArrayAdapter
import android.widget.SeekBar
import android.widget.TextView
import code.name.monkey.appthemehelper.ThemeStore
import code.name.monkey.appthemehelper.util.ColorUtil
import code.name.monkey.appthemehelper.util.MaterialValueHelper
import code.name.monkey.appthemehelper.util.TintHelper
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
import code.name.monkey.retromusic.R
@ -24,17 +26,7 @@ import kotlinx.android.synthetic.main.activity_equalizer.*
class EqualizerActivity : AbsMusicServiceActivity(), AdapterView.OnItemSelectedListener {
/*private val mListener = { buttonView, isChecked ->
when (buttonView.getId()) {
R.id.equalizerSwitch -> {
EqualizerHelper.instance!!.equalizer.enabled = isChecked
TransitionManager.beginDelayedTransition(content)
content.visibility = if (isChecked) View.VISIBLE else View.GONE
}
}
}*/
private val mSeekBarChangeListener = object : SeekBar.OnSeekBarChangeListener {
private val seekBarChangeListener = object : SeekBar.OnSeekBarChangeListener {
override fun onProgressChanged(seekBar: SeekBar, progress: Int, fromUser: Boolean) {
if (fromUser) {
if (seekBar === bassBoostStrength) {
@ -58,14 +50,12 @@ class EqualizerActivity : AbsMusicServiceActivity(), AdapterView.OnItemSelectedL
}
}
private var mPresetsNamesAdapter: ArrayAdapter<String>? = null
private var presetsNamesAdapter: ArrayAdapter<String>? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_equalizer)
setStatusbarColorAuto()
setNavigationbarColorAuto()
setTaskDescriptionColorAuto()
@ -74,7 +64,10 @@ class EqualizerActivity : AbsMusicServiceActivity(), AdapterView.OnItemSelectedL
setupToolbar()
equalizerSwitch.isChecked = EqualizerHelper.instance!!.equalizer.enabled
TintHelper.setTintAuto(equalizerSwitch, ThemeStore.accentColor(this), false)
equalizerSwitch.setBackgroundColor(ThemeStore.accentColor(this))
val widgetColor = MaterialValueHelper.getPrimaryTextColor(this, ColorUtil.isColorLight(ThemeStore.accentColor(this)))
equalizerSwitch.setTextColor(widgetColor)
TintHelper.setTintAuto(equalizerSwitch, widgetColor, false)
equalizerSwitch.setOnCheckedChangeListener { buttonView, isChecked ->
when (buttonView.id) {
R.id.equalizerSwitch -> {
@ -85,17 +78,17 @@ class EqualizerActivity : AbsMusicServiceActivity(), AdapterView.OnItemSelectedL
}
}
mPresetsNamesAdapter = ArrayAdapter(this, android.R.layout.simple_list_item_1)
presets.adapter = mPresetsNamesAdapter
presetsNamesAdapter = ArrayAdapter(this, android.R.layout.simple_list_item_1)
presets.adapter = presetsNamesAdapter
presets.onItemSelectedListener = this
bassBoostStrength.progress = EqualizerHelper.instance!!.bassBoostStrength
ViewUtil.setProgressDrawable(bassBoostStrength, ThemeStore.accentColor(this))
bassBoostStrength.setOnSeekBarChangeListener(mSeekBarChangeListener)
bassBoostStrength.setOnSeekBarChangeListener(seekBarChangeListener)
virtualizerStrength.progress = EqualizerHelper.instance!!.virtualizerStrength
ViewUtil.setProgressDrawable(virtualizerStrength, ThemeStore.accentColor(this))
virtualizerStrength.setOnSeekBarChangeListener(mSeekBarChangeListener)
virtualizerStrength.setOnSeekBarChangeListener(seekBarChangeListener)
setupUI()
addPresets()
@ -124,12 +117,12 @@ class EqualizerActivity : AbsMusicServiceActivity(), AdapterView.OnItemSelectedL
}
private fun addPresets() {
mPresetsNamesAdapter!!.clear()
mPresetsNamesAdapter!!.add("Custom")
presetsNamesAdapter!!.clear()
presetsNamesAdapter!!.add("Custom")
for (j in 0 until EqualizerHelper.instance!!.equalizer.numberOfPresets) {
mPresetsNamesAdapter!!
presetsNamesAdapter!!
.add(EqualizerHelper.instance!!.equalizer.getPresetName(j.toShort()))
mPresetsNamesAdapter!!.notifyDataSetChanged()
presetsNamesAdapter!!.notifyDataSetChanged()
}
presets.setSelection(EqualizerHelper.instance!!.equalizer.currentPreset.toInt() + 1)
}

View File

@ -22,6 +22,8 @@ import code.name.monkey.retromusic.App
import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.helper.MusicPlayerRemote
import code.name.monkey.retromusic.helper.MusicProgressViewUpdateHelper
import code.name.monkey.retromusic.lyrics.LrcHelper
import code.name.monkey.retromusic.lyrics.LrcView
import code.name.monkey.retromusic.model.Song
import code.name.monkey.retromusic.model.lyrics.Lyrics
import code.name.monkey.retromusic.ui.activities.base.AbsMusicServiceActivity
@ -33,8 +35,6 @@ import code.name.monkey.retromusic.util.PreferenceUtil
import code.name.monkey.retromusic.util.RetroUtil
import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.input.input
import com.lauzy.freedom.library.LrcHelper
import com.lauzy.freedom.library.LrcView
import kotlinx.android.synthetic.main.activity_lyrics.*
import kotlinx.android.synthetic.main.fragment_lyrics.*
import kotlinx.android.synthetic.main.fragment_synced.*

View File

@ -41,7 +41,6 @@ class HomeAdapter(private val activity: AppCompatActivity, private var homes: Li
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
val layout = LayoutInflater.from(activity).inflate(R.layout.section_recycler_view, parent, false)
return when (viewType) {
SUGGESTIONS -> SuggestionViewHolder(LayoutInflater.from(activity).inflate(R.layout.section_item_collage, parent, false))
RECENT_ARTISTS, TOP_ARTISTS -> ArtistViewHolder(layout)
GENRES -> GenreViewHolder(layout)
PLAYLISTS -> PlaylistViewHolder(layout)
@ -54,10 +53,7 @@ class HomeAdapter(private val activity: AppCompatActivity, private var homes: Li
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
val home = homes[position]
when (getItemViewType(position)) {
SUGGESTIONS -> {
val viewHolder = holder as SuggestionViewHolder
viewHolder.bindView(home)
}
RECENT_ALBUMS, TOP_ALBUMS -> {
val viewHolder = holder as AlbumViewHolder
viewHolder.bindView(home)
@ -88,17 +84,16 @@ class HomeAdapter(private val activity: AppCompatActivity, private var homes: Li
companion object {
@IntDef(SUGGESTIONS, RECENT_ALBUMS, TOP_ALBUMS, RECENT_ARTISTS, TOP_ARTISTS, GENRES, PLAYLISTS)
@IntDef(RECENT_ALBUMS, TOP_ALBUMS, RECENT_ARTISTS, TOP_ARTISTS, GENRES, PLAYLISTS)
@Retention(AnnotationRetention.SOURCE)
annotation class HomeSection
const val SUGGESTIONS = 0
const val RECENT_ALBUMS = 1
const val TOP_ALBUMS = 2
const val RECENT_ARTISTS = 3
const val TOP_ARTISTS = 4
const val GENRES = 5
const val PLAYLISTS = 6
const val RECENT_ALBUMS = 0
const val TOP_ALBUMS = 1
const val RECENT_ARTISTS = 2
const val TOP_ARTISTS = 3
const val GENRES = 4
const val PLAYLISTS = 5
}

View File

@ -1,145 +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.util.color;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.graphics.drawable.AnimationDrawable;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.VectorDrawable;
import android.util.Log;
import android.util.Pair;
import java.util.WeakHashMap;
import code.name.monkey.retromusic.util.ImageUtil;
/**
* Helper class to process legacy (Holo) notifications to make them look like quantum
* notifications.
*
* @hide
*/
public class NotificationColorUtil {
private static final String TAG = "NotificationColorUtil";
private static final Object sLock = new Object();
private static NotificationColorUtil sInstance;
private final WeakHashMap<Bitmap, Pair<Boolean, Integer>> mGrayscaleBitmapCache =
new WeakHashMap<Bitmap, Pair<Boolean, Integer>>();
public static NotificationColorUtil getInstance() {
synchronized (sLock) {
if (sInstance == null) {
sInstance = new NotificationColorUtil();
}
return sInstance;
}
}
/**
* Checks whether a bitmap is grayscale. Grayscale here means "very close to a perfect gray".
*
* @param bitmap The bitmap to test.
* @return Whether the bitmap is grayscale.
*/
public boolean isGrayscale(Bitmap bitmap) {
synchronized (sLock) {
Pair<Boolean, Integer> cached = mGrayscaleBitmapCache.get(bitmap);
if (cached != null) {
if (cached.second == bitmap.getGenerationId()) {
return cached.first;
}
}
}
boolean result;
int generationId;
result = ImageUtil.isGrayscale(bitmap);
// generationId and the check whether the Bitmap is grayscale can't be read atomically
// here. However, since the thread is in the process of posting the notification, we can
// assume that it doesn't modify the bitmap while we are checking the pixels.
generationId = bitmap.getGenerationId();
synchronized (sLock) {
mGrayscaleBitmapCache.put(bitmap, Pair.create(result, generationId));
}
return result;
}
/**
* Checks whether a drawable is grayscale. Grayscale here means "very close to a perfect gray".
*
* @param d The drawable to test.
* @return Whether the drawable is grayscale.
*/
public boolean isGrayscale(Drawable d) {
if (d == null) {
return false;
} else if (d instanceof BitmapDrawable) {
BitmapDrawable bd = (BitmapDrawable) d;
return bd.getBitmap() != null && isGrayscale(bd.getBitmap());
} else if (d instanceof AnimationDrawable) {
AnimationDrawable ad = (AnimationDrawable) d;
int count = ad.getNumberOfFrames();
return count > 0 && isGrayscale(ad.getFrame(0));
} else if (d instanceof VectorDrawable) {
// We just assume you're doing the right thing if using vectors
return true;
} else {
return false;
}
}
/**
* Checks whether a drawable with a resoure id is grayscale. Grayscale here means "very close to a
* perfect gray".
*
* @param context The context to load the drawable from.
* @return Whether the drawable is grayscale.
*/
public boolean isGrayscale(Context context, int drawableResId) {
if (drawableResId != 0) {
try {
return isGrayscale(context.getDrawable(drawableResId));
} catch (Resources.NotFoundException ex) {
Log.e(TAG, "Drawable not found: " + drawableResId);
return false;
}
} else {
return false;
}
}
/**
* Inverts all the grayscale colors set by {@link android.text.style.TextAppearanceSpan}s on the
* text.
*
* @param charSequence The text to process.
* @return The color inverted text.
*/
private int processColor(int color) {
return Color.argb(Color.alpha(color),
255 - Color.red(color),
255 - Color.green(color),
255 - Color.blue(color));
}
}

View File

Before

Width:  |  Height:  |  Size: 707 B

After

Width:  |  Height:  |  Size: 707 B

View File

@ -8,52 +8,38 @@
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="0dp"
app:elevation="0dp">
android:layout_height="wrap_content">
<com.google.android.material.appbar.CollapsingToolbarLayout xmlns:tools="http://schemas.android.com/tools"
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
style="@style/Toolbar"
app:layout_collapseMode="pin"
app:title=""
tools:ignore="UnusedAttribute">
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/bannerTitle"
style="@style/BigTitleTextAppearanceToolbar"
android:text="@string/equalizer" />
</androidx.appcompat.widget.Toolbar>
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/equalizerSwitch"
style="@style/TextAppearance.MaterialComponents.Subtitle1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_scrollFlags="scroll|enterAlwaysCollapsed"
app:titleEnabled="false">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
style="@style/Toolbar"
app:layout_collapseMode="pin"
app:title=""
tools:ignore="UnusedAttribute">
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/bannerTitle"
android:textStyle="bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="@string/equalizer"
style="@style/BigTitleTextAppearanceToolbar"
tools:ignore="MissingPrefix" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/equalizerSwitch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginEnd="16dp" />
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.CollapsingToolbarLayout>
android:background="@color/md_red_A400"
android:fontFamily="@font/circular_std_medium"
android:padding="16dp"
android:text="@string/on" />
</com.google.android.material.appbar.AppBarLayout>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
<LinearLayout
android:id="@+id/content"
@ -61,6 +47,7 @@
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -68,19 +55,19 @@
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:padding="16dp"
android:text="Select preset"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
<Spinner
android:id="@+id/presets"
style="@style/TextAppearance.MaterialComponents.Subtitle2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@android:color/transparent" />
android:padding="16dp"
android:text="@string/select_preset" />
<Spinner
android:id="@+id/presets"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0" />
</LinearLayout>
<LinearLayout
@ -91,12 +78,12 @@
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/bassBoost"
style="@style/TextAppearance.MaterialComponents.Subtitle2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:padding="16dp"
android:text="@string/bass_boost"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
android:text="@string/bass_boost" />
<SeekBar
android:id="@+id/bassBoostStrength"
@ -120,12 +107,12 @@
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/virtualizer"
style="@style/TextAppearance.MaterialComponents.Subtitle2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:padding="16dp"
android:text="@string/virtualizer"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
android:text="@string/virtualizer" />
<SeekBar
android:id="@+id/virtualizerStrength"

View File

@ -31,8 +31,6 @@
</LinearLayout>
<code.name.monkey.retromusic.views.WidthFitSquareLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -55,6 +53,7 @@
android:scaleType="centerCrop" />
</com.google.android.material.card.MaterialCardView>
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
<TextView
android:id="@+id/slide"
android:layout_width="match_parent"

View File

@ -6,7 +6,7 @@
android:orientation="vertical"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<com.lauzy.freedom.library.LrcView
<code.name.monkey.retromusic.lyrics.LrcView
android:id="@+id/lyricsView"
android:layout_width="match_parent"
android:layout_height="match_parent" />

View File

@ -43,4 +43,27 @@
<attr name="optionTitle" format="reference" />
<attr name="optionIcon" format="reference" />
</declare-styleable>
<declare-styleable name="LrcView">
<attr name="lrcTextSize" format="dimension"/>
<attr name="lrcLineSpaceSize" format="dimension"/>
<attr name="lrcNormalTextColor" format="reference|color"/>
<attr name="lrcCurrentTextColor" format="reference|color"/>
<attr name="lrcTouchDelay" format="integer"/>
<attr name="noLrcTextSize" format="dimension"/>
<attr name="noLrcTextColor" format="reference|color"/>
<attr name="indicatorLineHeight" format="dimension"/>
<attr name="indicatorTextSize" format="dimension"/>
<attr name="indicatorTextColor" format="reference|color"/>
<attr name="currentIndicateLrcColor" format="reference|color"/>
<attr name="indicatorTouchDelay" format="integer"/>
<attr name="indicatorLineColor" format="reference|color"/>
<attr name="indicatorStartEndMargin" format="dimension"/>
<attr name="iconLineGap" format="dimension"/>
<attr name="playIconWidth" format="dimension"/>
<attr name="playIconHeight" format="dimension"/>
<attr name="playIcon" format="reference"/>
</declare-styleable>
</resources>

View File

@ -614,5 +614,7 @@
<string name="dialog_message_set_ringtone">Allow Retro Music to modify audio settings</string>
<string name="about_settings_summary">Team, social links</string>
<string name="other_settings_summary">Advanced testing features</string>
<string name="on">On</string>
<string name="select_preset">Select preset</string>
</resources>

1
library/.gitignore vendored
View File

@ -1 +0,0 @@
/build

View File

@ -1,41 +0,0 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-android'
android {
compileSdkVersion 28
defaultConfig {
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'androidx.core:core-ktx:1.1.0-alpha05'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
repositories {
mavenCentral()
}

View File

@ -1,21 +0,0 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@ -1,26 +0,0 @@
package com.lauzy.freedom.library;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.lauzy.freedom.library.test", appContext.getPackageName());
}
}

View File

@ -1,2 +0,0 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.lauzy.freedom.library"/>

View File

@ -1,30 +0,0 @@
package com.lauzy.freedom.library;
/**
* Desc :
* Author : Lauzy
* Date : 2017/10/13
* Blog : http://www.jianshu.com/u/e76853f863a9
* Email : freedompaladin@gmail.com
*/
public class Lrc {
private long time;
private String text;
public void setTime(long time) {
this.time = time;
}
public void setText(String text) {
this.text = text;
}
public long getTime() {
return time;
}
public String getText() {
return text;
}
}

View File

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<font-family xmlns:android="http://schemas.android.com/apk/res/android">
<font
android:font="@font/circular_std_book"
android:fontStyle="normal"
android:fontWeight="400" />
<font
android:font="@font/circular_std_black"
android:fontWeight="900" />
</font-family>

View File

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="LrcView">
<attr name="lrcTextSize" format="dimension"/>
<attr name="lrcLineSpaceSize" format="dimension"/>
<attr name="lrcNormalTextColor" format="reference|color"/>
<attr name="lrcCurrentTextColor" format="reference|color"/>
<attr name="lrcTouchDelay" format="integer"/>
<attr name="noLrcTextSize" format="dimension"/>
<attr name="noLrcTextColor" format="reference|color"/>
<attr name="indicatorLineHeight" format="dimension"/>
<attr name="indicatorTextSize" format="dimension"/>
<attr name="indicatorTextColor" format="reference|color"/>
<attr name="currentIndicateLrcColor" format="reference|color"/>
<attr name="indicatorTouchDelay" format="integer"/>
<attr name="indicatorLineColor" format="reference|color"/>
<attr name="indicatorStartEndMargin" format="dimension"/>
<attr name="iconLineGap" format="dimension"/>
<attr name="playIconWidth" format="dimension"/>
<attr name="playIconHeight" format="dimension"/>
<attr name="playIcon" format="reference"/>
</declare-styleable>
</resources>

View File

@ -1,3 +0,0 @@
<resources>
<string name="app_name">library</string>
</resources>

View File

@ -1,17 +0,0 @@
package com.lauzy.freedom.library;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}