Removed libs folder

main
h4h13 2018-07-27 19:28:24 +05:30
parent f77b426617
commit 960b057e0a
80 changed files with 1192 additions and 1673 deletions

View File

@ -1,8 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<module external.linked.project.id="RetroMusicPlayer" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="java-gradle" name="Java-Gradle">
<configuration>
<option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
<option name="BUILDABLE" value="false" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>

19
.idea/gradle.xml Normal file
View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
<option value="$PROJECT_DIR$/appthemehelper" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
</GradleProjectSettings>
</option>
</component>
</project>

View File

@ -0,0 +1,9 @@
<component name="libraryTable">
<library name="Gradle: __local_aars__:/Users/hemanths/Desktop/KeepSafe/RetroMusicPlayer/app/libs/jsoup-1.11.2.jar:unspecified@jar">
<CLASSES>
<root url="jar://$PROJECT_DIR$/app/libs/jsoup-1.11.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

View File

@ -0,0 +1,9 @@
<component name="libraryTable">
<library name="Gradle: __local_aars__:/Users/hemanths/Desktop/KeepSafe/RetroMusicPlayer/app/libs/juniversalchardet-1.0.3.jar:unspecified@jar">
<CLASSES>
<root url="jar://$PROJECT_DIR$/app/libs/juniversalchardet-1.0.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

View File

@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="Gradle: android.arch.core:common:1.1.0@jar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/android.arch.core/common/1.1.0/8007981f7d7540d89cd18471b8e5dcd2b4f99167/common-1.1.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/android.arch.core/common/1.1.0/f211e8f994b67f7ae2a1bc06e4f7b974ec72ee50/common-1.1.0-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,12 @@
<component name="libraryTable">
<library name="Gradle: android.arch.core:runtime-1.1.0">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/runtime-1.1.0.aar/b36e14fbba8840b2dcd7d8c208b90268/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/runtime-1.1.0.aar/b36e14fbba8840b2dcd7d8c208b90268/res" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/android.arch.core/runtime/1.1.0/62944187d3ae3e7a4644b50da4e7b63c605a696/runtime-1.1.0-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="Gradle: android.arch.lifecycle:common:1.1.0@jar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/android.arch.lifecycle/common/1.1.0/edf3f7bfb84a7521d0599efa3b0113a0ee90f85/common-1.1.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/android.arch.lifecycle/common/1.1.0/72f6113534923e49e8c032107ca638b97775c61b/common-1.1.0-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,12 @@
<component name="libraryTable">
<library name="Gradle: android.arch.lifecycle:livedata-core-1.1.0">
<CLASSES>
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/livedata-core-1.1.0.aar/d2c525a4808cf4df3b5ab3a7b810cf48/res" />
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/livedata-core-1.1.0.aar/d2c525a4808cf4df3b5ab3a7b810cf48/jars/classes.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/android.arch.lifecycle/livedata-core/1.1.0/300f89e645a95de0bdc6d8833beeee6e3045df06/livedata-core-1.1.0-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,12 @@
<component name="libraryTable">
<library name="Gradle: android.arch.lifecycle:runtime-1.1.0">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/runtime-1.1.0.aar/a67547964595086eb2b7af77a2e804bd/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/runtime-1.1.0.aar/a67547964595086eb2b7af77a2e804bd/res" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/android.arch.lifecycle/runtime/1.1.0/a4b0d6b8e8f51c8f95d5a0641f81ffc13ab406c7/runtime-1.1.0-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,12 @@
<component name="libraryTable">
<library name="Gradle: android.arch.lifecycle:viewmodel-1.1.0">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/viewmodel-1.1.0.aar/3ed7a237c1f2c93f7c3360f26a0636cc/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/viewmodel-1.1.0.aar/3ed7a237c1f2c93f7c3360f26a0636cc/res" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/android.arch.lifecycle/viewmodel/1.1.0/e4c0c5d65f92ccad0b0148ac2f01b540ac7a711e/viewmodel-1.1.0-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,14 @@
<component name="libraryTable">
<library name="Gradle: com.afollestad:material-cab-0.1.12">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/material-cab-0.1.12.aar/efc8180c8619061cf96c2ac9e2eccb35/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/material-cab-0.1.12.aar/efc8180c8619061cf96c2ac9e2eccb35/res" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.afollestad/material-cab/0.1.12/165c2a54378ab503b8033df5fe52b9466bd8f37d/material-cab-0.1.12-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.afollestad/material-cab/0.1.12/4ca422bbed1f263346716c8ebf4605416be88419/material-cab-0.1.12-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,12 @@
<component name="libraryTable">
<library name="Gradle: com.afollestad.material-dialogs:commons-0.9.6.0">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/commons-0.9.6.0.aar/7579da2abadd4aba96da858fb9719fab/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/commons-0.9.6.0.aar/7579da2abadd4aba96da858fb9719fab/res" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.afollestad.material-dialogs/commons/0.9.6.0/74ecc9d8340862a987864b1de0e952090cf34f7f/commons-0.9.6.0-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,12 @@
<component name="libraryTable">
<library name="Gradle: com.afollestad.material-dialogs:core-0.9.6.0">
<CLASSES>
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/core-0.9.6.0.aar/23904c3b875a6ec7574e99b66432e754/res" />
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/core-0.9.6.0.aar/23904c3b875a6ec7574e99b66432e754/jars/classes.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.afollestad.material-dialogs/core/0.9.6.0/138d1054166753aa2b5306e5ae484d03e9974c81/core-0.9.6.0-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,12 @@
<component name="libraryTable">
<library name="Gradle: com.android.support:animated-vector-drawable-27.1.1">
<CLASSES>
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/animated-vector-drawable-27.1.1.aar/26f6ed752adc698ce6fd1a08edd747c8/res" />
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/animated-vector-drawable-27.1.1.aar/26f6ed752adc698ce6fd1a08edd747c8/jars/classes.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.android.support/animated-vector-drawable/27.1.1/a8f4121ade2fdfcc5cb20290a05333239fee05d7/animated-vector-drawable-27.1.1-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,12 @@
<component name="libraryTable">
<library name="Gradle: com.android.support:appcompat-v7-27.1.1">
<CLASSES>
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/77c90a5e3c37d5e699de166c095a5bba/res" />
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/77c90a5e3c37d5e699de166c095a5bba/jars/classes.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.android.support/appcompat-v7/27.1.1/21d073509c5f8d25a1bf274067fa729a1fba8d75/appcompat-v7-27.1.1-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,12 @@
<component name="libraryTable">
<library name="Gradle: com.android.support:cardview-v7-27.1.1">
<CLASSES>
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/cardview-v7-27.1.1.aar/e8435dd10a3b81726f71fafb5aa8bfa1/res" />
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/cardview-v7-27.1.1.aar/e8435dd10a3b81726f71fafb5aa8bfa1/jars/classes.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.android.support/cardview-v7/27.1.1/8300d225b205b04e22ec475cb412bd3621911d3/cardview-v7-27.1.1-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,12 @@
<component name="libraryTable">
<library name="Gradle: com.android.support:design-27.1.1">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/design-27.1.1.aar/e2db22a690f6f005533304c6d49854ba/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/design-27.1.1.aar/e2db22a690f6f005533304c6d49854ba/res" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.android.support/design/27.1.1/6e10c7f954f63690f7846fb22352375cf1b9fbb4/design-27.1.1-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,12 @@
<component name="libraryTable">
<library name="Gradle: com.android.support:gridlayout-v7-27.1.1">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/gridlayout-v7-27.1.1.aar/fa2eaed9d4bfdc8073511bc878a6b2cd/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/gridlayout-v7-27.1.1.aar/fa2eaed9d4bfdc8073511bc878a6b2cd/res" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.android.support/gridlayout-v7/27.1.1/a3b11bab701ea5e89909a158405f03b4ff028611/gridlayout-v7-27.1.1-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,10 @@
<component name="libraryTable">
<library name="Gradle: com.android.support:multidex-1.0.3">
<CLASSES>
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/multidex-1.0.3.aar/d6193502e0cbf5fca95d3bf6398ce22b/res" />
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/multidex-1.0.3.aar/d6193502e0cbf5fca95d3bf6398ce22b/jars/classes.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

View File

@ -0,0 +1,12 @@
<component name="libraryTable">
<library name="Gradle: com.android.support:palette-v7-27.1.1">
<CLASSES>
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/palette-v7-27.1.1.aar/dc296069ee6f9fbc8138e9174657878f/res" />
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/palette-v7-27.1.1.aar/dc296069ee6f9fbc8138e9174657878f/jars/classes.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.android.support/palette-v7/27.1.1/af4fbc6e7a6ddaa395a8e1aace8a8fd8f248758/palette-v7-27.1.1-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,12 @@
<component name="libraryTable">
<library name="Gradle: com.android.support:preference-v14-27.1.1">
<CLASSES>
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/preference-v14-27.1.1.aar/e97fadaa85d2f563fbc19809bcfa7e14/res" />
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/preference-v14-27.1.1.aar/e97fadaa85d2f563fbc19809bcfa7e14/jars/classes.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.android.support/preference-v14/27.1.1/5b8f86fea035328fc9e8c660773037a3401ce25f/preference-v14-27.1.1-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,12 @@
<component name="libraryTable">
<library name="Gradle: com.android.support:preference-v7-27.1.1">
<CLASSES>
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/preference-v7-27.1.1.aar/73e4600198993eb053b7247910c02e73/res" />
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/preference-v7-27.1.1.aar/73e4600198993eb053b7247910c02e73/jars/classes.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.android.support/preference-v7/27.1.1/306693a02a130ff2a58c8635ea063880d3d2e56d/preference-v7-27.1.1-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,12 @@
<component name="libraryTable">
<library name="Gradle: com.android.support:recyclerview-v7-27.1.1">
<CLASSES>
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/recyclerview-v7-27.1.1.aar/cd372cb941fa0974334fbc99ba8a3dd7/res" />
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/recyclerview-v7-27.1.1.aar/cd372cb941fa0974334fbc99ba8a3dd7/jars/classes.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.android.support/recyclerview-v7/27.1.1/ad225a74247e675db0b05ea4f8b17202acbb7f9d/recyclerview-v7-27.1.1-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="Gradle: com.android.support:support-annotations:27.1.1@jar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.android.support/support-annotations/27.1.1/39ded76b5e1ce1c5b2688e1d25cdc20ecee32007/support-annotations-27.1.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.android.support/support-annotations/27.1.1/46bebf5bd40146178cb33c7678f3782a09dea6e4/support-annotations-27.1.1-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,12 @@
<component name="libraryTable">
<library name="Gradle: com.android.support:support-compat-27.1.1">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/support-compat-27.1.1.aar/ce09a34f9580a35100004bb2a682a1f8/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/support-compat-27.1.1.aar/ce09a34f9580a35100004bb2a682a1f8/res" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.android.support/support-compat/27.1.1/fe233277b6eae25ce5b2afab6daf55d73c86f0b9/support-compat-27.1.1-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,12 @@
<component name="libraryTable">
<library name="Gradle: com.android.support:support-core-ui-27.1.1">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/support-core-ui-27.1.1.aar/bbd0a2b02ca5ee4d4b50baaddca5232e/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/support-core-ui-27.1.1.aar/bbd0a2b02ca5ee4d4b50baaddca5232e/res" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.android.support/support-core-ui/27.1.1/266c369a3227be5afec33e11c964472269ff2a7c/support-core-ui-27.1.1-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,12 @@
<component name="libraryTable">
<library name="Gradle: com.android.support:support-core-utils-27.1.1">
<CLASSES>
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/support-core-utils-27.1.1.aar/f22a856ea32280a23988cd60cbf85707/res" />
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/support-core-utils-27.1.1.aar/f22a856ea32280a23988cd60cbf85707/jars/classes.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.android.support/support-core-utils/27.1.1/8fb37fd2f8dbc23482865700d2c340ae030ea561/support-core-utils-27.1.1-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,12 @@
<component name="libraryTable">
<library name="Gradle: com.android.support:support-fragment-27.1.1">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/support-fragment-27.1.1.aar/e693384f3f7664c98f3b058bcf04d0be/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/support-fragment-27.1.1.aar/e693384f3f7664c98f3b058bcf04d0be/res" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.android.support/support-fragment/27.1.1/94732bda44fba11302c58e459b7c1f47e7521bf9/support-fragment-27.1.1-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,12 @@
<component name="libraryTable">
<library name="Gradle: com.android.support:support-media-compat-27.1.1">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/support-media-compat-27.1.1.aar/4de1e888743b7cea7812b5df0acf9355/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/support-media-compat-27.1.1.aar/4de1e888743b7cea7812b5df0acf9355/res" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.android.support/support-media-compat/27.1.1/3ab3f968d7cd675d2f97e67a3e9fc0ac63618f46/support-media-compat-27.1.1-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,12 @@
<component name="libraryTable">
<library name="Gradle: com.android.support:support-v4-27.1.1">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/support-v4-27.1.1.aar/9774e1a224d6a245078f7b36690c578e/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/support-v4-27.1.1.aar/9774e1a224d6a245078f7b36690c578e/res" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.android.support/support-v4/27.1.1/5b8f86fea035328fc9e8c660773037a3401ce25f/support-v4-27.1.1-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,12 @@
<component name="libraryTable">
<library name="Gradle: com.android.support:support-vector-drawable-27.1.1">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/support-vector-drawable-27.1.1.aar/ac33b128022cfb835eaec541883813ef/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/support-vector-drawable-27.1.1.aar/ac33b128022cfb835eaec541883813ef/res" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.android.support/support-vector-drawable/27.1.1/4b29cf2106c95afb3432bb0c4ec5a91e959717b2/support-vector-drawable-27.1.1-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,12 @@
<component name="libraryTable">
<library name="Gradle: com.android.support:transition-27.1.1">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/transition-27.1.1.aar/08d045ad007db2151c00052f57c72c99/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/transition-27.1.1.aar/08d045ad007db2151c00052f57c72c99/res" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.android.support/transition/27.1.1/88ebe6765790253d410e51a3952571565f2040e9/transition-27.1.1-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,13 @@
<component name="libraryTable">
<library name="Gradle: com.anjlab.android.iab.v3:library:1.0.44@jar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.anjlab.android.iab.v3/library/1.0.44/add169444f38ac23ffae27326c75e33fedef73ba/library-1.0.44.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.anjlab.android.iab.v3/library/1.0.44/c05cc8f2eaf505104cd78dc60ccd9f551c10a5e/library-1.0.44-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.anjlab.android.iab.v3/library/1.0.44/4f82c0a4c635870b34cbe49e7edb6a0742d144ef/library-1.0.44-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,12 @@
<component name="libraryTable">
<library name="Gradle: com.github.AdrienPoupa:jaudiotagger-2.2.3">
<CLASSES>
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/jaudiotagger-2.2.3.aar/def623109496aa4748c88280fbdf20b2/res" />
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/jaudiotagger-2.2.3.aar/def623109496aa4748c88280fbdf20b2/jars/classes.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.github.AdrienPoupa/jaudiotagger/2.2.3/42bdc57c8d94f8778641a7a51f31cfc923a6b044/jaudiotagger-2.2.3-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,13 @@
<component name="libraryTable">
<library name="Gradle: com.github.bumptech.glide:glide:3.8.0@jar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.github.bumptech.glide/glide/3.8.0/9bada650e1afe9c6174ddc0d113c1fce4dc26fe0/glide-3.8.0.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.github.bumptech.glide/glide/3.8.0/2c7e46377484690d93b71b3cf079244cae6e23ee/glide-3.8.0-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.github.bumptech.glide/glide/3.8.0/cd6e591964f60aed960bdadbc3754665d3a0f32e/glide-3.8.0-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,13 @@
<component name="libraryTable">
<library name="Gradle: com.github.bumptech.glide:okhttp3-integration:1.5.0@jar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.github.bumptech.glide/okhttp3-integration/1.5.0/1e5d1f5fb6f867397009e73ea79b108ef6a51fc0/okhttp3-integration-1.5.0.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.github.bumptech.glide/okhttp3-integration/1.5.0/f27d46f4db57b6308b0a978fc9c2a6f92b90e597/okhttp3-integration-1.5.0-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.github.bumptech.glide/okhttp3-integration/1.5.0/8268762296b3eeeb921d613f4b090ecb6e30e982/okhttp3-integration-1.5.0-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,10 @@
<component name="libraryTable">
<library name="Gradle: com.github.jetradarmobile:android-snowfall-1.1.6">
<CLASSES>
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/android-snowfall-1.1.6.aar/71dd2e09e18a5723c0ecdf5670135fc4/res" />
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/android-snowfall-1.1.6.aar/71dd2e09e18a5723c0ecdf5670135fc4/jars/classes.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

View File

@ -0,0 +1,10 @@
<component name="libraryTable">
<library name="Gradle: com.github.kabouzeid:RecyclerView-FastScroll-1.0.16-kmod">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/RecyclerView-FastScroll-1.0.16-kmod.aar/e82ba8461037e70549c9794999b97b95/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/RecyclerView-FastScroll-1.0.16-kmod.aar/e82ba8461037e70549c9794999b97b95/res" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

View File

@ -0,0 +1,14 @@
<component name="libraryTable">
<library name="Gradle: com.github.ksoichiro:android-observablescrollview-1.6.0">
<CLASSES>
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/android-observablescrollview-1.6.0.aar/4b624dee3d4f1e37f59826dec4929eb2/res" />
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/android-observablescrollview-1.6.0.aar/4b624dee3d4f1e37f59826dec4929eb2/jars/classes.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.github.ksoichiro/android-observablescrollview/1.6.0/23c72bb51d649a397c2b8cff666d91f6f0b2fdad/android-observablescrollview-1.6.0-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.github.ksoichiro/android-observablescrollview/1.6.0/e1d8541d72ed39d8bde519cb291ebb92ddfcffd3/android-observablescrollview-1.6.0-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,13 @@
<component name="libraryTable">
<library name="Gradle: com.google.code.gson:gson:2.7@jar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.google.code.gson/gson/2.7/751f548c85fa49f330cecbb1875893f971b33c4e/gson-2.7.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.google.code.gson/gson/2.7/ceb1b728624941fdcc57d2c6d9aa10643bdd5d4c/gson-2.7-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.google.code.gson/gson/2.7/bbb63ca253b483da8ee53a50374593923e3de2e2/gson-2.7-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,12 @@
<component name="libraryTable">
<library name="Gradle: com.h6ah4i.android.widget.advrecyclerview:advrecyclerview-0.11.0">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/advrecyclerview-0.11.0.aar/0825a56ce9b150f139cb8d66c680e1a4/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/advrecyclerview-0.11.0.aar/0825a56ce9b150f139cb8d66c680e1a4/res" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.h6ah4i.android.widget.advrecyclerview/advrecyclerview/0.11.0/b344ea1387fd4754d39a0a99f85d17fd349996f9/advrecyclerview-0.11.0-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,14 @@
<component name="libraryTable">
<library name="Gradle: com.jakewharton:butterknife-8.8.1">
<CLASSES>
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/butterknife-8.8.1.aar/27780bbb9f4257ba6b794d9f5613ef01/res" />
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/butterknife-8.8.1.aar/27780bbb9f4257ba6b794d9f5613ef01/jars/classes.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.jakewharton/butterknife/8.8.1/9ab020267dec74a72a89e4aa6d04e34a13072f74/butterknife-8.8.1-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.jakewharton/butterknife/8.8.1/1de300f9b877d30cea69c2ba84a450549f023ab8/butterknife-8.8.1-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,13 @@
<component name="libraryTable">
<library name="Gradle: com.jakewharton:butterknife-annotations:8.8.1@jar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.jakewharton/butterknife-annotations/8.8.1/bc373fb6bc7bca3035041b924f158fd2b946ee8d/butterknife-annotations-8.8.1.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.jakewharton/butterknife-annotations/8.8.1/56878235bc1c2a9aebc15d5b4e29fa32485445ca/butterknife-annotations-8.8.1-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.jakewharton/butterknife-annotations/8.8.1/4f68b7085132dfeb48a0473bc589fdee8a3de757/butterknife-annotations-8.8.1-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="Gradle: com.mpatric:mp3agic:0.8.3@jar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.mpatric/mp3agic/0.8.3/ddbccc4219ef1bd38f7f6ed6fa0a5374159f9b9f/mp3agic-0.8.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.mpatric/mp3agic/0.8.3/bfd1267d2d5bdf5fa8ce9a4197cdfc0ed9bc5205/mp3agic-0.8.3-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,12 @@
<component name="libraryTable">
<library name="Gradle: com.r0adkll:slidableactivity-2.0.6">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/slidableactivity-2.0.6.aar/858dc50bcd901d7a2b7cec4d9c90c1bd/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/slidableactivity-2.0.6.aar/858dc50bcd901d7a2b7cec4d9c90c1bd/res" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.r0adkll/slidableactivity/2.0.6/c9d609040da653cf62ee8de8743cee4a1eb3f12e/slidableactivity-2.0.6-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,12 @@
<component name="libraryTable">
<library name="Gradle: com.sothree.slidinguppanel:library-3.4.0">
<CLASSES>
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/library-3.4.0.aar/698c4c46e7f9eb6640846e4eb80b479b/res" />
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/library-3.4.0.aar/698c4c46e7f9eb6640846e4eb80b479b/jars/classes.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.sothree.slidinguppanel/library/3.4.0/28720c57763dbf7fd8abf4a2c63f7ed4cd04c460/library-3.4.0-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="Gradle: com.squareup.okhttp3:logging-interceptor:3.10.0@jar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.squareup.okhttp3/logging-interceptor/3.10.0/55f574ec622f65ac9c0e2e922d3ffa01dc4f139e/logging-interceptor-3.10.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.squareup.okhttp3/logging-interceptor/3.10.0/255a9237ac6ac8ba15bb85006348d3fb0009a866/logging-interceptor-3.10.0-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="Gradle: com.squareup.okhttp3:okhttp:3.10.0@jar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.squareup.okhttp3/okhttp/3.10.0/7ef0f1d95bf4c0b3ba30bbae25e0e562b05cf75e/okhttp-3.10.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.squareup.okhttp3/okhttp/3.10.0/e99b7b608968f16b07104b93e62cb90701174d0/okhttp-3.10.0-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="Gradle: com.squareup.okio:okio:1.14.0@jar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.squareup.okio/okio/1.14.0/102d7be47241d781ef95f1581d414b0943053130/okio-1.14.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.squareup.okio/okio/1.14.0/e7c96b4fe5651490d8f3c022042940d743a3bdd9/okio-1.14.0-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,13 @@
<component name="libraryTable">
<library name="Gradle: com.squareup.retrofit2:adapter-rxjava2:2.3.0@jar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.squareup.retrofit2/adapter-rxjava2/2.3.0/f436637f9500ab5b8bc32afe556373180894b4a5/adapter-rxjava2-2.3.0.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.squareup.retrofit2/adapter-rxjava2/2.3.0/dc906275a1a658a33da1718c97bedb61d0977e54/adapter-rxjava2-2.3.0-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.squareup.retrofit2/adapter-rxjava2/2.3.0/3c971dd26ffebdbcd99e7804bc833bbb9494aa25/adapter-rxjava2-2.3.0-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,13 @@
<component name="libraryTable">
<library name="Gradle: com.squareup.retrofit2:converter-gson:2.3.0@jar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.squareup.retrofit2/converter-gson/2.3.0/9e09011e9767bb76b5e27c9b8223476b93b14631/converter-gson-2.3.0.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.squareup.retrofit2/converter-gson/2.3.0/9ed2c998e2833e191b99439d6faa6753ec73c913/converter-gson-2.3.0-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.squareup.retrofit2/converter-gson/2.3.0/438355cc604d9c87dedc84fd2c05924e4e6d2ce3/converter-gson-2.3.0-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,13 @@
<component name="libraryTable">
<library name="Gradle: com.squareup.retrofit2:retrofit:2.3.0@jar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.squareup.retrofit2/retrofit/2.3.0/bcacde6a8ccedcc56c127403d26b76072fe6214d/retrofit-2.3.0.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.squareup.retrofit2/retrofit/2.3.0/38a30cbb97721341a63588cd3ff732dabbd1ddae/retrofit-2.3.0-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.squareup.retrofit2/retrofit/2.3.0/76f3c69879d3e01c082f49d8661c5590838148e1/retrofit-2.3.0-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,12 @@
<component name="libraryTable">
<library name="Gradle: io.reactivex.rxjava2:rxandroid-2.0.2">
<CLASSES>
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/rxandroid-2.0.2.aar/53b8e754ff5ba3968ef17c1206481009/res" />
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/rxandroid-2.0.2.aar/53b8e754ff5ba3968ef17c1206481009/jars/classes.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/io.reactivex.rxjava2/rxandroid/2.0.2/ec7d5f2d49c35433363e36cb5e7790b2997bf0e8/rxandroid-2.0.2-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="Gradle: io.reactivex.rxjava2:rxjava:2.1.9@jar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/io.reactivex.rxjava2/rxjava/2.1.9/afd2ab255e6b94b064ea87c2ccd84ac0d163a427/rxjava-2.1.9.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/io.reactivex.rxjava2/rxjava/2.1.9/890fc9ef77d78ac270f322b024c0e660a8f57ea0/rxjava-2.1.9-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,14 @@
<component name="libraryTable">
<library name="Gradle: jp.wasabeef:glide-transformations-2.0.2">
<CLASSES>
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/glide-transformations-2.0.2.aar/a8e2dae52526ebad94e3e6c842f0daec/res" />
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/glide-transformations-2.0.2.aar/a8e2dae52526ebad94e3e6c842f0daec/jars/classes.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/jp.wasabeef/glide-transformations/2.0.2/d77158225e8aff098f2269c5b42cebb8cd1ebc6f/glide-transformations-2.0.2-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/jp.wasabeef/glide-transformations/2.0.2/87061eb6c96686339ab1a2d30dbd77c247486014/glide-transformations-2.0.2-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,12 @@
<component name="libraryTable">
<library name="Gradle: me.zhanghai.android.materialprogressbar:library-1.4.2">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/library-1.4.2.aar/096c8a340fae4eff81b0af67f28783d9/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/library-1.4.2.aar/096c8a340fae4eff81b0af67f28783d9/res" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/me.zhanghai.android.materialprogressbar/library/1.4.2/33920450ddf630ce9e20c0da0cf63fe5555d733/library-1.4.2-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="Gradle: org.jetbrains.kotlin:kotlin-runtime:1.0.6@jar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-runtime/1.0.6/3562c66f648480d3bd4f76cff722488ced13445b/kotlin-runtime-1.0.6.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-runtime/1.0.6/b2f828f696e80b1406a9079b968d12edc06ee916/kotlin-runtime-1.0.6-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="Gradle: org.jetbrains.kotlin:kotlin-stdlib:1.0.6@jar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.0.6/d19acb6ed49b9c48228c0e5dff8071fce23be4b8/kotlin-stdlib-1.0.6.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.0.6/973c5cf7a510034cf4a89a551f85bf4bb0b724d6/kotlin-stdlib-1.0.6-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="Gradle: org.reactivestreams:reactive-streams:1.0.2@jar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.reactivestreams/reactive-streams/1.0.2/323964c36556eb0e6209f65c1cef72b53b461ab8/reactive-streams-1.0.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.reactivestreams/reactive-streams/1.0.2/fb592a3d57b11e71eb7a6211dd12ba824c5dd037/reactive-streams-1.0.2-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -0,0 +1,14 @@
<component name="libraryTable">
<library name="Gradle: uk.co.chrisjenx:calligraphy-2.3.0">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/calligraphy-2.3.0.aar/478c573c6b2cd539e8ece85ad69f7a09/jars/classes.jar!/" />
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/calligraphy-2.3.0.aar/478c573c6b2cd539e8ece85ad69f7a09/res" />
</CLASSES>
<JAVADOC>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/uk.co.chrisjenx/calligraphy/2.3.0/775c7415bb896ff97ac6117710335a5d9cd3b5ae/calligraphy-2.3.0-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/uk.co.chrisjenx/calligraphy/2.3.0/e2637b5ce67253023fcba23a3188ec9af473481a/calligraphy-2.3.0-sources.jar!/" />
</SOURCES>
</library>
</component>

29
.idea/misc.xml Normal file
View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="NullableNotNullManager">
<option name="myDefaultNullable" value="android.support.annotation.Nullable" />
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
<option name="myNullables">
<value>
<list size="5">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
<item index="2" class="java.lang.String" itemvalue="javax.annotation.CheckForNull" />
<item index="3" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
<item index="4" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
</list>
</value>
</option>
<option name="myNotNulls">
<value>
<list size="4">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
</list>
</value>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
</project>

View File

@ -3,6 +3,8 @@
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/RetroMusicPlayer.iml" filepath="$PROJECT_DIR$/.idea/RetroMusicPlayer.iml" />
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
<module fileurl="file://$PROJECT_DIR$/appthemehelper/appthemehelper.iml" filepath="$PROJECT_DIR$/appthemehelper/appthemehelper.iml" />
</modules>
</component>
</project>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
</set>
</option>
</component>
</project>

View File

@ -2,5 +2,6 @@
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

@ -70,13 +70,6 @@
<sourceFolder url="file://$MODULE_DIR$/src/normal/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/normal/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/normal/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestNormal/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestNormal/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestNormal/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestNormal/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestNormal/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestNormal/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestNormal/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testNormal/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testNormal/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testNormal/assets" type="java-test-resource" />
@ -84,6 +77,13 @@
<sourceFolder url="file://$MODULE_DIR$/src/testNormal/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testNormal/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testNormal/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestNormal/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestNormal/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestNormal/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestNormal/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestNormal/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestNormal/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestNormal/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
@ -112,13 +112,6 @@
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
@ -126,11 +119,17 @@
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/annotation_processor_list" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/apk_list" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/build-info" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/builds" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/check-manifest" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/compatible_screen_manifest" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
@ -167,7 +166,6 @@
<orderEntry type="library" name="Gradle: com.sothree.slidinguppanel:library-3.4.0" level="project" />
<orderEntry type="library" name="Gradle: android.arch.lifecycle:common:1.1.0@jar" level="project" />
<orderEntry type="library" name="Gradle: com.google.code.gson:gson:2.7@jar" level="project" />
<orderEntry type="library" name="Gradle: __local_aars__:/Users/hemanths/Desktop/logo/RetroMusicPlayer/app/libs/jaudiotagger-android-2.2.3.jar:unspecified@jar" level="project" />
<orderEntry type="library" name="Gradle: com.afollestad:material-cab-0.1.12" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:palette-v7-27.1.1" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:recyclerview-v7-27.1.1" level="project" />
@ -182,7 +180,6 @@
<orderEntry type="library" name="Gradle: com.github.ksoichiro:android-observablescrollview-1.6.0" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-fragment-27.1.1" level="project" />
<orderEntry type="library" name="Gradle: com.squareup.retrofit2:retrofit:2.3.0@jar" level="project" />
<orderEntry type="library" name="Gradle: __local_aars__:/Users/hemanths/Desktop/logo/RetroMusicPlayer/app/libs/jsoup-1.11.2.jar:unspecified@jar" level="project" />
<orderEntry type="library" name="Gradle: android.arch.core:runtime-1.1.0" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:design-27.1.1" level="project" />
<orderEntry type="library" name="Gradle: com.afollestad.material-dialogs:core-0.9.6.0" level="project" />
@ -190,10 +187,11 @@
<orderEntry type="library" name="Gradle: com.github.jetradarmobile:android-snowfall-1.1.6" level="project" />
<orderEntry type="library" name="Gradle: com.anjlab.android.iab.v3:library:1.0.44@jar" level="project" />
<orderEntry type="library" name="Gradle: uk.co.chrisjenx:calligraphy-2.3.0" level="project" />
<orderEntry type="library" name="Gradle: __local_aars__:/Users/hemanths/Desktop/logo/RetroMusicPlayer/app/libs/juniversalchardet-1.0.3.jar:unspecified@jar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:gridlayout-v7-27.1.1" level="project" />
<orderEntry type="library" name="Gradle: android.arch.lifecycle:runtime-1.1.0" level="project" />
<orderEntry type="library" name="Gradle: __local_aars__:/Users/hemanths/Desktop/KeepSafe/RetroMusicPlayer/app/libs/juniversalchardet-1.0.3.jar:unspecified@jar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:transition-27.1.1" level="project" />
<orderEntry type="library" name="Gradle: __local_aars__:/Users/hemanths/Desktop/KeepSafe/RetroMusicPlayer/app/libs/jsoup-1.11.2.jar:unspecified@jar" level="project" />
<orderEntry type="library" name="Gradle: com.jakewharton:butterknife-8.8.1" level="project" />
<orderEntry type="library" name="Gradle: com.squareup.okhttp3:logging-interceptor:3.10.0@jar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-annotations:27.1.1@jar" level="project" />
@ -210,11 +208,11 @@
<orderEntry type="library" name="Gradle: org.jetbrains.kotlin:kotlin-runtime:1.0.6@jar" level="project" />
<orderEntry type="library" name="Gradle: com.mpatric:mp3agic:0.8.3@jar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-vector-drawable-27.1.1" level="project" />
<orderEntry type="library" name="Gradle: org.nanohttpd:nanohttpd:2.3.1@jar" level="project" />
<orderEntry type="library" name="Gradle: jp.wasabeef:glide-transformations-2.0.2" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-core-utils-27.1.1" level="project" />
<orderEntry type="library" name="Gradle: com.afollestad.material-dialogs:commons-0.9.6.0" level="project" />
<orderEntry type="library" name="Gradle: io.reactivex.rxjava2:rxandroid-2.0.2" level="project" />
<orderEntry type="library" name="Gradle: com.github.AdrienPoupa:jaudiotagger-2.2.3" level="project" />
<orderEntry type="library" name="Gradle: com.squareup.okhttp3:okhttp:3.10.0@jar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:preference-v7-27.1.1" level="project" />
<orderEntry type="library" name="Gradle: android.arch.lifecycle:livedata-core-1.1.0" level="project" />

View File

@ -141,5 +141,5 @@ dependencies {
/*Backend all*/
implementation project(':appthemehelper')
implementation 'com.sothree.slidinguppanel:library:3.4.0'
implementation 'org.nanohttpd:nanohttpd:2.3.1'
implementation 'com.github.AdrienPoupa:jaudiotagger:2.2.3'
}

Binary file not shown.

Binary file not shown.

View File

@ -34,7 +34,7 @@ public class Constants {
public static final String PAYPAL_ME_URL = "https://www.paypal.me/h4h14";
public static final String GOOGLE_PLUS_COMMUNITY = "https://plus.google.com/communities/110811566242871492162";
public static final String TRANSLATE = "http://monkeycodeapp.oneskyapp.com/collaboration/project?id=238534";
public static final String GITHUB_PROJECT = "https://github.com/h4h13/RetroMusicApp";
public static final String GITHUB_PROJECT = "https://github.com/h4h13/RetroMusicPlayer";
public static final String BASE_API_URL_KUGOU = "http://lyrics.kugou.com/";
public static final String TELEGRAM_CHANGE_LOG = "https://t.me/retromusiclog";
public static final String USER_PROFILE = "profile.jpg";

View File

@ -1,69 +0,0 @@
package code.name.monkey.retromusic.lyrics;
import android.os.Handler;
import code.name.monkey.retromusic.model.Song;
import code.name.monkey.retromusic.rest.KogouClient;
import code.name.monkey.retromusic.rest.model.KuGouSearchLyricResult;
import code.name.monkey.retromusic.util.LyricUtil;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;
import java.io.File;
/**
* @author Hemanth S (h4h13).
*/
public class KogouLyricsFetcher {
private KogouClient mKogouClient;
private Song mSong;
private KogouLyricsCallback mCallback;
public KogouLyricsFetcher(KogouLyricsCallback callback) {
mCallback = callback;
mKogouClient = new KogouClient();
}
public void loadLyrics(Song song, String duration) {
mSong = song;
mKogouClient.getApiService()
.searchLyric(mSong.title, duration)
.subscribe(this::parseKugouResult,
throwable -> mCallback.onNoLyrics());
}
private void parseKugouResult(KuGouSearchLyricResult kuGouSearchLyricResult) {
if (kuGouSearchLyricResult != null && kuGouSearchLyricResult.status == 200 &
kuGouSearchLyricResult.candidates != null &&
kuGouSearchLyricResult.candidates.size() != 0) {
KuGouSearchLyricResult.Candidates candidates = kuGouSearchLyricResult.candidates.get(0);
loadLyricsFile(candidates);
} else {
mCallback.onNoLyrics();
}
}
private void loadLyricsFile(KuGouSearchLyricResult.Candidates candidates) {
mKogouClient.getApiService().getRawLyric(candidates.id, candidates.accesskey)
.observeOn(AndroidSchedulers.mainThread())
.subscribeOn(Schedulers.io())
.subscribe(kuGouRawLyric -> {
if (kuGouRawLyric == null) {
mCallback.onNoLyrics();
return;
}
String rawLyric = LyricUtil.decryptBASE64(kuGouRawLyric.content);
LyricUtil.writeLrcToLoc(mSong.title, mSong.artistName, rawLyric);
new Handler().postDelayed(
() -> mCallback.onLyrics(LyricUtil.getLocalLyricFile(mSong.title, mSong.artistName)),
1);
});
}
public interface KogouLyricsCallback {
void onNoLyrics();
void onLyrics(File file);
}
}

View File

@ -1,6 +0,0 @@
package code.name.monkey.retromusic.lyrics;
public interface LyricsEngine {
String getLyrics(String artistName, String songTitle);
}

View File

@ -1,143 +0,0 @@
package code.name.monkey.retromusic.lyrics;
import android.net.Uri;
import android.text.TextUtils;
import android.util.Log;
import org.json.JSONException;
import org.json.JSONObject;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.nodes.Node;
import org.jsoup.nodes.TextNode;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.StringWriter;
import java.net.URL;
import javax.net.ssl.HttpsURLConnection;
public class LyricsWikiEngine implements LyricsEngine {
private static final String TAG = LyricsWikiEngine.class.getSimpleName();
// Reads an InputStream and converts it to a String.
private static String readIt(InputStream stream) throws IOException {
Reader reader = new InputStreamReader(stream, "UTF-8");
StringWriter sw = new StringWriter();
char[] buffer = new char[4096];
int count;
while ((count = reader.read(buffer)) != -1) {
sw.write(buffer, 0, count);
}
return sw.toString();
}
@Override
public String getLyrics(String artistName, String songTitle) {
try {
String lyricsUrl = makeApiCall(artistName, songTitle);
if (lyricsUrl == null) { // no URL in API answer or no correct answer at all
return null;
}
return parseFullLyricsPage(lyricsUrl);
} catch (IOException e) {
Log.w(TAG, "Couldn't connect to lyrics wiki REST endpoints", e);
return null;
} catch (JSONException e) {
Log.w(TAG, "Couldn't transform API answer to JSON entity", e);
return null;
}
}
/**
* First call
*/
private String makeApiCall(String artistName, String songTitle) throws IOException, JSONException {
HttpsURLConnection apiCall = null;
try {
// build query
// e.g. https://lyrics.wikia.com/api.php?func=getSong&artist=The%20Beatle&song=Girl&fmt=realjson
Uri link = new Uri.Builder()
.scheme("https")
.authority("lyrics.wikia.com")
.path("api.php")
.appendQueryParameter("func", "getSong")
.appendQueryParameter("fmt", "realjson")
.appendQueryParameter("artist", artistName)
.appendQueryParameter("song", songTitle)
.build();
// construct an http request
apiCall = (HttpsURLConnection) new URL(link.toString()).openConnection();
apiCall.setReadTimeout(10_000);
apiCall.setConnectTimeout(15_000);
// execute
apiCall.connect();
int response = apiCall.getResponseCode();
if (response != HttpsURLConnection.HTTP_OK) {
// redirects are handled internally, this is clearly an error
return null;
}
InputStream is = apiCall.getInputStream();
String reply = readIt(is);
JSONObject getSongAnswer = new JSONObject(reply);
return getLyricsUrl(getSongAnswer);
} finally {
if (apiCall != null) {
apiCall.disconnect();
}
}
}
/**
* Second call
*/
private String parseFullLyricsPage(String lyricsUrl) throws IOException {
Document page = Jsoup.parse(new URL(lyricsUrl), 10_000);
Element lyricsBox = page.select("div.lyricbox").first();
if (lyricsBox == null) { // no lyrics frame on page
return null;
}
// remove unneeded elements
lyricsBox.select("div.rtMatcher").remove();
lyricsBox.select("div.lyricsbreak").remove();
lyricsBox.select("script").remove();
StringBuilder builder = new StringBuilder();
for (Node curr : lyricsBox.childNodes()) {
if (curr instanceof TextNode) {
builder.append(((TextNode) curr).text());
} else {
builder.append("\n");
}
}
return builder.toString();
}
private String getLyricsUrl(JSONObject getSongAnswer) {
try {
String pageId = getSongAnswer.getString("page_id");
if (TextUtils.isEmpty(pageId)) {
return null; // empty page_id means page wasn't created
}
return getSongAnswer.getString("url");
} catch (JSONException e) {
Log.w(TAG, "Unknown format of getSong API call answer", e);
return null;
}
}
}

View File

@ -1,38 +0,0 @@
package code.name.monkey.retromusic.lyrics;
import android.os.AsyncTask;
import android.text.TextUtils;
/**
* @author Hemanth S (h4h13).
*/
public class ParseLyrics extends AsyncTask<String, Void, String> {
private LyricsCallback mLyricsCallback;
public ParseLyrics(LyricsCallback lyricsCallback) {
mLyricsCallback = lyricsCallback;
}
@Override
protected String doInBackground(String... strings) {
LyricsEngine lyricsEngine = new LyricsWikiEngine();
return lyricsEngine.getLyrics(strings[1], strings[0]);
}
@Override
protected void onPostExecute(String s) {
super.onPostExecute(s);
if (TextUtils.isEmpty(s)) {
mLyricsCallback.onError();
return;
}
mLyricsCallback.onShowLyrics(s);
}
public interface LyricsCallback {
void onShowLyrics(String lyrics);
void onError();
}
}

View File

@ -1,23 +0,0 @@
package code.name.monkey.retromusic.lyrics;
public class QueryResult {
public static final String ITEM_LRC = "lrc";
public static final String ATTRIBUTE_ID = "id";
public static final String ATTRIBUTE_ARTIST = "artist";
public static final String ATTRIBUTE_TITLE = "title";
public final int mId;
public final String mArtist;
public final String mTitle;
QueryResult(int id, String artist, String title) {
mId = id;
mArtist = artist;
mTitle = title;
}
@Override
public String toString() {
return mTitle + " - " + mArtist;
}
}

View File

@ -2,11 +2,9 @@ package code.name.monkey.retromusic.ui.activities;
import android.annotation.SuppressLint;
import android.content.res.ColorStateList;
import android.graphics.Color;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.content.ContextCompat;
import android.support.v7.widget.Toolbar;
import android.text.InputType;
import android.text.TextUtils;
@ -16,18 +14,6 @@ import android.view.WindowManager;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView;
import com.afollestad.materialdialogs.DialogAction;
import com.afollestad.materialdialogs.MaterialDialog;
import com.bumptech.glide.Glide;
import org.jaudiotagger.tag.FieldKey;
import java.io.File;
import java.util.ArrayList;
import java.util.EnumMap;
import java.util.Map;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
@ -45,348 +31,300 @@ import code.name.monkey.retromusic.util.LyricUtil;
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.views.LyricView;
import com.afollestad.materialdialogs.DialogAction;
import com.afollestad.materialdialogs.MaterialDialog;
import com.bumptech.glide.Glide;
import io.reactivex.disposables.CompositeDisposable;
import java.io.File;
import java.util.ArrayList;
import java.util.EnumMap;
import java.util.Map;
import org.jaudiotagger.tag.FieldKey;
public class LyricsActivity extends AbsMusicServiceActivity implements MusicProgressViewUpdateHelper.Callback {
public class LyricsActivity extends AbsMusicServiceActivity implements
MusicProgressViewUpdateHelper.Callback {
@BindView(R.id.title)
TextView songTitle;
@BindView(R.id.text)
TextView songText;
@BindView(R.id.lyrics)
LyricView lyricView;
@BindView(R.id.toolbar)
Toolbar toolbar;
@BindView(R.id.offline_lyrics)
TextView offlineLyrics;
@BindView(R.id.actions)
RadioGroup actionsLayout;
@BindView(R.id.gradient_background)
View background;
@BindView(R.id.title)
TextView songTitle;
@BindView(R.id.text)
TextView songText;
private MusicProgressViewUpdateHelper updateHelper;
private AsyncTask updateLyricsAsyncTask;
private CompositeDisposable disposable;
private Song song;
private Lyrics lyrics;
@BindView(R.id.toolbar)
Toolbar toolbar;
@BindView(R.id.offline_lyrics)
TextView offlineLyrics;
@BindView(R.id.actions)
RadioGroup actionsLayout;
@BindView(R.id.gradient_background)
View background;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_lyrics);
ButterKnife.bind(this);
private MusicProgressViewUpdateHelper updateHelper;
private AsyncTask updateLyricsAsyncTask;
private CompositeDisposable disposable;
private Song song;
private Lyrics lyrics;
setStatusbarColorAuto();
setNavigationbarColorAuto();
setTaskDescriptionColorAuto();
setLightNavigationBar(true);
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_lyrics);
ButterKnife.bind(this);
updateHelper = new MusicProgressViewUpdateHelper(this, 500, 1000);
setStatusbarColorAuto();
setNavigationbarColorAuto();
setTaskDescriptionColorAuto();
setLightNavigationBar(true);
setupToolbar();
setupLyricsView();
setupWakelock();
updateHelper = new MusicProgressViewUpdateHelper(this, 500, 1000);
actionsLayout.setOnCheckedChangeListener((group, checkedId) -> selectLyricsTye(checkedId));
setupToolbar();
setupLyricsView();
setupWakelock();
actionsLayout.setOnCheckedChangeListener((group, checkedId) -> selectLyricsTye(checkedId));
}
private void selectLyricsTye(int group) {
RadioButton radioButton = actionsLayout.findViewById(group);
radioButton.setBackgroundTintList(ColorStateList.valueOf(ThemeStore.accentColor(this)));
radioButton.setTextColor(ThemeStore.textColorPrimary(this));
offlineLyrics.setVisibility(View.GONE);
switch (group) {
case R.id.synced_lyrics:
loadLRCLyrics();
break;
default:
case R.id.normal_lyrics:
loadSongLyrics();
offlineLyrics.setVisibility(View.VISIBLE);
break;
}
}
private void selectLyricsTye(int group) {
RadioButton radioButton = actionsLayout.findViewById(group);
radioButton.setBackgroundTintList(ColorStateList.valueOf(ThemeStore.accentColor(this)));
radioButton.setTextColor(ThemeStore.textColorPrimary(this));
offlineLyrics.setVisibility(View.GONE);
lyricView.setVisibility(View.GONE);
switch (group) {
case R.id.synced_lyrics:
loadLRCLyrics();
lyricView.setVisibility(View.VISIBLE);
break;
default:
case R.id.normal_lyrics:
loadSongLyrics();
offlineLyrics.setVisibility(View.VISIBLE);
break;
}
private void loadLRCLyrics() {
if (LyricUtil.isLrcFileExist(song.title, song.artistName)) {
showLyricsLocal(LyricUtil.getLocalLyricFile(song.title, song.artistName));
}
}
private void loadLRCLyrics() {
if (LyricUtil.isLrcFileExist(song.title, song.artistName)) {
showLyricsLocal(LyricUtil.getLocalLyricFile(song.title, song.artistName));
}
private void setupWakelock() {
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
}
private void setupLyricsView() {
disposable = new CompositeDisposable();
}
private void setupToolbar() {
toolbar.setBackgroundColor(ThemeStore.primaryColor(this));
toolbar.setTitle("");
toolbar.setNavigationOnClickListener(v -> onBackPressed());
setSupportActionBar(toolbar);
}
@Override
public void onPlayingMetaChanged() {
super.onPlayingMetaChanged();
loadLrcFile();
}
@Override
protected void onResume() {
super.onResume();
updateHelper.start();
}
@Override
protected void onPause() {
super.onPause();
updateHelper.stop();
}
@Override
public void onServiceConnected() {
super.onServiceConnected();
loadLrcFile();
}
@Override
public void onDestroy() {
super.onDestroy();
disposable.clear();
if (updateLyricsAsyncTask != null && !updateLyricsAsyncTask.isCancelled()) {
updateLyricsAsyncTask.cancel(true);
}
}
private void setupWakelock() {
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == android.R.id.home) {
onBackPressed();
}
return super.onOptionsItemSelected(item);
}
private void setupLyricsView() {
disposable = new CompositeDisposable();
//lyricView.setLineSpace(15.0f);
//lyricView.setTextSize(17.0f);
//lyricView.setPlayable(true);
//lyricView.setTranslationY(DensityUtil.getScreenWidth(this) + DensityUtil.dip2px(this, 120));
lyricView.setOnPlayerClickListener((progress, content) -> MusicPlayerRemote.seekTo((int) progress));
@Override
public void onUpdateProgressViews(int progress, int total) {
//lyricView.setHighLightTextColor(ThemeStore.accentColor(this));
lyricView.setDefaultColor(ContextCompat.getColor(this, R.color.md_grey_400));
//lyricView.setTouchable(false);
lyricView.setHintColor(Color.WHITE);
}
}
private void setupToolbar() {
toolbar.setBackgroundColor(ThemeStore.primaryColor(this));
toolbar.setTitle("");
toolbar.setNavigationOnClickListener(v -> onBackPressed());
setSupportActionBar(toolbar);
}
@Override
public void onPlayingMetaChanged() {
super.onPlayingMetaChanged();
loadLrcFile();
}
@Override
protected void onResume() {
super.onResume();
updateHelper.start();
}
@Override
protected void onPause() {
super.onPause();
updateHelper.stop();
}
@Override
public void onServiceConnected() {
super.onServiceConnected();
loadLrcFile();
}
@Override
public void onDestroy() {
super.onDestroy();
disposable.clear();
lyricView.setOnPlayerClickListener(null);
if (updateLyricsAsyncTask != null && !updateLyricsAsyncTask.isCancelled()) {
updateLyricsAsyncTask.cancel(true);
}
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == android.R.id.home) {
onBackPressed();
}
return super.onOptionsItemSelected(item);
}
@Override
public void onUpdateProgressViews(int progress, int total) {
lyricView.setCurrentTimeMillis(progress);
}
private void loadLrcFile() {
song = MusicPlayerRemote.getCurrentSong();
songTitle.setText(song.title);
songText.setText(song.artistName);
SongGlideRequest.Builder.from(Glide.with(this), song)
.checkIgnoreMediaStore(this)
.generatePalette(this)
.build()
.into(new RetroMusicColoredTarget(findViewById(R.id.image)) {
@Override
public void onColorReady(int color) {
if (PreferenceUtil.getInstance(LyricsActivity.this).getAdaptiveColor()) {
background.setBackgroundColor(color);
}
}
});
selectLyricsTye(actionsLayout.getCheckedRadioButtonId());
}
private void showLyricsLocal(File file) {
if (file == null) {
lyricView.reset();
lyricView.setVisibility(View.GONE);
} else {
lyricView.setVisibility(View.VISIBLE);
lyricView.setLyricFile(file, "UTF-8");
}
}
@OnClick({R.id.edit_lyrics})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.edit_lyrics:
switch (actionsLayout.getCheckedRadioButtonId()) {
case R.id.synced_lyrics:
showSyncedLyrics();
break;
case R.id.normal_lyrics:
showLyricsSaveDialog();
break;
}
break;
}
}
@SuppressLint("StaticFieldLeak")
private void loadSongLyrics() {
if (updateLyricsAsyncTask != null) updateLyricsAsyncTask.cancel(false);
final Song song = MusicPlayerRemote.getCurrentSong();
updateLyricsAsyncTask = new AsyncTask<Void, Void, Lyrics>() {
@Override
protected Lyrics doInBackground(Void... params) {
String data = MusicUtil.getLyrics(song);
if (TextUtils.isEmpty(data)) {
return null;
}
return Lyrics.parse(song, data);
private void loadLrcFile() {
song = MusicPlayerRemote.getCurrentSong();
songTitle.setText(song.title);
songText.setText(song.artistName);
SongGlideRequest.Builder.from(Glide.with(this), song)
.checkIgnoreMediaStore(this)
.generatePalette(this)
.build()
.into(new RetroMusicColoredTarget(findViewById(R.id.image)) {
@Override
public void onColorReady(int color) {
if (PreferenceUtil.getInstance(LyricsActivity.this).getAdaptiveColor()) {
background.setBackgroundColor(color);
}
}
});
selectLyricsTye(actionsLayout.getCheckedRadioButtonId());
}
@Override
protected void onPreExecute() {
super.onPreExecute();
lyrics = null;
}
private void showLyricsLocal(File file) {
@Override
protected void onPostExecute(Lyrics l) {
lyrics = l;
offlineLyrics.setVisibility(View.VISIBLE);
if (l == null) {
offlineLyrics.setText(R.string.no_lyrics_found);
return;
}
offlineLyrics.setText(l.data);
}
}
@Override
protected void onCancelled(Lyrics s) {
onPostExecute(null);
}
}.execute();
}
private void showSyncedLyrics() {
String content = "";
try {
content = LyricUtil.getStringFromFile(song.title, song.artistName);
} catch (Exception e) {
e.printStackTrace();
@OnClick({R.id.edit_lyrics})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.edit_lyrics:
switch (actionsLayout.getCheckedRadioButtonId()) {
case R.id.synced_lyrics:
showSyncedLyrics();
break;
case R.id.normal_lyrics:
showLyricsSaveDialog();
break;
}
new MaterialDialog.Builder(this)
.title("Add lyrics")
.neutralText("Search")
.content("Add time frame lyrics")
.negativeText("Delete")
.onNegative((dialog, which) -> {
LyricUtil.deleteLrcFile(song.title, song.artistName);
loadLrcFile();
})
.onNeutral((dialog, which) -> RetroUtil.openUrl(LyricsActivity.this, getGoogleSearchLrcUrl()))
.inputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_MULTI_LINE)
.input("Paste lyrics here", content, (dialog, input) -> {
LyricUtil.writeLrcToLoc(song.title, song.artistName, input.toString());
loadLrcFile();
}).show();
break;
}
}
private String getGoogleSearchLrcUrl() {
String baseUrl = "http://www.google.com/search?";
String query = song.title + "+" + song.artistName;
query = "q=" + query.replace(" ", "+") + " .lrc";
baseUrl += query;
return baseUrl;
@SuppressLint("StaticFieldLeak")
private void loadSongLyrics() {
if (updateLyricsAsyncTask != null) {
updateLyricsAsyncTask.cancel(false);
}
private void showLyricsSaveDialog() {
String content = "";
if (lyrics == null) {
content = "";
} else {
content = lyrics.data;
final Song song = MusicPlayerRemote.getCurrentSong();
updateLyricsAsyncTask = new AsyncTask<Void, Void, Lyrics>() {
@Override
protected Lyrics doInBackground(Void... params) {
String data = MusicUtil.getLyrics(song);
if (TextUtils.isEmpty(data)) {
return null;
}
new MaterialDialog.Builder(this)
.title("Add lyrics")
.neutralText("Search")
.onNeutral(new MaterialDialog.SingleButtonCallback() {
@Override
public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
RetroUtil.openUrl(LyricsActivity.this, getGoogleSearchUrl(song.title, song.artistName));
}
})
.inputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_MULTI_LINE)
.input("Paste lyrics here", content, (dialog, input) -> {
Map<FieldKey, String> fieldKeyValueMap = new EnumMap<>(FieldKey.class);
fieldKeyValueMap.put(FieldKey.LYRICS, input.toString());
return Lyrics.parse(song, data);
}
new WriteTagsAsyncTask(LyricsActivity.this)
.execute(new WriteTagsAsyncTask.LoadingInfo(getSongPaths(song), fieldKeyValueMap, null));
loadLrcFile();
})
.show();
}
@Override
protected void onPreExecute() {
super.onPreExecute();
lyrics = null;
}
private ArrayList<String> getSongPaths(Song song) {
ArrayList<String> paths = new ArrayList<>(1);
paths.add(song.data);
return paths;
}
private String getGoogleSearchUrl(String title, String text) {
String baseUrl = "http://www.google.com/search?";
String query = title + "+" + text;
query = "q=" + query.replace(" ", "+") + " lyrics";
baseUrl += query;
return baseUrl;
}
/*
private void loadLyricsWIki(String title, String artist) {
offlineLyrics.setVisibility(View.GONE);
if (lyricsWikiTask != null) {
lyricsWikiTask.cancel(false);
@Override
protected void onPostExecute(Lyrics l) {
lyrics = l;
offlineLyrics.setVisibility(View.VISIBLE);
if (l == null) {
offlineLyrics.setText(R.string.no_lyrics_found);
return;
}
lyricsWikiTask = new ParseLyrics(new ParseLyrics.LyricsCallback() {
@Override
public void onShowLyrics(String lyrics) {
offlineLyrics.setVisibility(View.VISIBLE);
offlineLyrics.setText(lyrics);
}
offlineLyrics.setText(l.data);
}
@Override
public void onError() {
loadSongLyrics();
}
}).execute(title, artist);
}
@Override
protected void onCancelled(Lyrics s) {
onPostExecute(null);
}
}.execute();
}
private void callAgain(final String title, final String artist) {
disposable.clear();
disposable.add(loadLyrics.downloadLrcFile(title, artist, MusicPlayerRemote.getSongDurationMillis())
.observeOn(AndroidSchedulers.mainThread())
.subscribeOn(Schedulers.io())
.doOnSubscribe(disposable -> {
refresh.startAnimation(rotateAnimation);
})
.subscribe(this::showLyricsLocal, throwable -> {
refresh.clearAnimation();
showLyricsLocal(null);
//loadLyricsWIki(songTitle, artist);
toggleSyncLyrics(View.GONE);
}, () -> {
refresh.clearAnimation();
Toast.makeText(this, "Lyrics downloaded", Toast.LENGTH_SHORT).show();
}));
private void showSyncedLyrics() {
String content = "";
try {
content = LyricUtil.getStringFromFile(song.title, song.artistName);
} catch (Exception e) {
e.printStackTrace();
}
*/
new MaterialDialog.Builder(this)
.title("Add lyrics")
.neutralText("Search")
.content("Add time frame lyrics")
.negativeText("Delete")
.onNegative((dialog, which) -> {
LyricUtil.deleteLrcFile(song.title, song.artistName);
loadLrcFile();
})
.onNeutral(
(dialog, which) -> RetroUtil.openUrl(LyricsActivity.this, getGoogleSearchLrcUrl()))
.inputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_MULTI_LINE)
.input("Paste lyrics here", content, (dialog, input) -> {
LyricUtil.writeLrcToLoc(song.title, song.artistName, input.toString());
loadLrcFile();
}).show();
}
private String getGoogleSearchLrcUrl() {
String baseUrl = "http://www.google.com/search?";
String query = song.title + "+" + song.artistName;
query = "q=" + query.replace(" ", "+") + " .lrc";
baseUrl += query;
return baseUrl;
}
private void showLyricsSaveDialog() {
String content = "";
if (lyrics == null) {
content = "";
} else {
content = lyrics.data;
}
new MaterialDialog.Builder(this)
.title("Add lyrics")
.neutralText("Search")
.onNeutral(new MaterialDialog.SingleButtonCallback() {
@Override
public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
RetroUtil.openUrl(LyricsActivity.this, getGoogleSearchUrl(song.title, song.artistName));
}
})
.inputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_MULTI_LINE)
.input("Paste lyrics here", content, (dialog, input) -> {
Map<FieldKey, String> fieldKeyValueMap = new EnumMap<>(FieldKey.class);
fieldKeyValueMap.put(FieldKey.LYRICS, input.toString());
new WriteTagsAsyncTask(LyricsActivity.this)
.execute(
new WriteTagsAsyncTask.LoadingInfo(getSongPaths(song), fieldKeyValueMap, null));
loadLrcFile();
})
.show();
}
private ArrayList<String> getSongPaths(Song song) {
ArrayList<String> paths = new ArrayList<>(1);
paths.add(song.data);
return paths;
}
private String getGoogleSearchUrl(String title, String text) {
String baseUrl = "http://www.google.com/search?";
String query = title + "+" + text;
query = "q=" + query.replace(" ", "+") + " lyrics";
baseUrl += query;
return baseUrl;
}
}

View File

@ -1,876 +0,0 @@
package code.name.monkey.retromusic.views;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ValueAnimator;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.Rect;
import android.graphics.Typeface;
import android.os.Looper;
import android.support.annotation.IntDef;
import android.text.Layout;
import android.text.StaticLayout;
import android.text.TextPaint;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.view.MotionEvent;
import android.view.VelocityTracker;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.animation.DecelerateInterpolator;
import android.view.animation.LinearInterpolator;
import org.mozilla.universalchardet.UniversalDetector;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;
import code.name.monkey.retromusic.R;
/**
* Created by zhengken.me on 2016/11/27.
* ClassName : LyricView
* Description :
*/
public class LyricView extends View {
public static final int LEFT = 0;
public static final int CENTER = 1;
public static final int RIGHT = 2;
private static final String TAG = "LyricView";
private static final float SLIDE_COEFFICIENT = 0.2f;
private static final int UNITS_SECOND = 1000;
private static final int UNITS_MILLISECOND = 1;
private static final int FLING_ANIMATOR_DURATION = 500 * UNITS_MILLISECOND;
private static final int THRESHOLD_Y_VELOCITY = 1600;
private static final int INDICATOR_ICON_PLAY_MARGIN_LEFT = 7;//dp
private static final int INDICATOR_ICON_PLAY_WIDTH = 15;//sp
private static final int INDICATOR_LINE_MARGIN = 10;//dp
private static final int INDICATOR_TIME_TEXT_SIZE = 10;//sp
private static final int INDICATOR_TIME_MARGIN_RIGHT = 7;//dp
private static final int DEFAULT_TEXT_SIZE = 16;//sp
private static final int DEFAULT_MAX_LENGTH = 300;//dp
private static final int DEFAULT_LINE_SPACE = 25;//dp
private int mHintColor;
private int mDefaultColor;
private int mHighLightColor;
private int mTextAlign;
private int mLineCount;
private int mTextSize;
private float mLineHeight;
private LyricInfo mLyricInfo;
private String mDefaultHint;
private int mMaxLength;
private TextPaint mTextPaint;
private Paint mBtnPlayPaint;
private Paint mLinePaint;
private Paint mTimerPaint;
private boolean mFling = false;
private ValueAnimator mFlingAnimator;
private float mScrollY = 0;
private float mLineSpace = 0;
private boolean mIsShade;
private float mShaderWidth = 0;
private int mCurrentPlayLine = 0;
private boolean mShowIndicator;
private VelocityTracker mVelocityTracker;
private float mVelocity = 0;
private float mDownX;
private float mDownY;
private float mLastScrollY;
private boolean mUserTouch = false;
Runnable hideIndicator = () -> {
setUserTouch(false);
invalidateView();
};
private int maxVelocity;
private int mLineNumberUnderIndicator = 0;
private Rect mBtnPlayRect = new Rect();
private Rect mTimerRect;
private String mDefaultTime = "00:00";
private int mLineColor = Color.parseColor("#EFEFEF");
private int mBtnColor = Color.parseColor("#EFEFEF");
private List<Integer> mLineFeedRecord = new ArrayList<>();
private boolean mEnableLineFeed = false;
private int mExtraHeight = 0;
private int mTextHeight;
private String mCurrentLyricFilePath = null;
private OnPlayerClickListener mClickListener;
public LyricView(Context context) {
super(context);
initMyView(context);
}
public LyricView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
getAttrs(context, attributeSet);
initMyView(context);
}
public LyricView(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
getAttrs(context, attributeSet);
initMyView(context);
}
@Override
public boolean dispatchTouchEvent(MotionEvent event) {
return super.dispatchTouchEvent(event);
}
@Override
public boolean onTouchEvent(MotionEvent event) {
if (mVelocityTracker == null) {
mVelocityTracker = VelocityTracker.obtain();
}
mVelocityTracker.addMovement(event);
switch (event.getAction()) {
case MotionEvent.ACTION_CANCEL:
actionCancel(event);
break;
case MotionEvent.ACTION_DOWN:
actionDown(event);
break;
case MotionEvent.ACTION_MOVE:
actionMove(event);
break;
case MotionEvent.ACTION_UP:
actionUp(event);
break;
default:
break;
}
invalidateView();
return true;
}
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
super.onLayout(changed, left, top, right, bottom);
mBtnPlayRect.set((int) getRawSize(TypedValue.COMPLEX_UNIT_DIP, INDICATOR_ICON_PLAY_MARGIN_LEFT),
(int) (getHeight() * 0.5f - getRawSize(TypedValue.COMPLEX_UNIT_SP, INDICATOR_ICON_PLAY_WIDTH) * 0.5f),
(int) (getRawSize(TypedValue.COMPLEX_UNIT_SP, INDICATOR_ICON_PLAY_WIDTH) + getRawSize(TypedValue.COMPLEX_UNIT_DIP, INDICATOR_ICON_PLAY_MARGIN_LEFT)),
(int) (getHeight() * 0.5f + getRawSize(TypedValue.COMPLEX_UNIT_SP, INDICATOR_ICON_PLAY_WIDTH) * 0.5f));
mShaderWidth = getWidth() * 0.4f;
}
@Override
protected void onDraw(Canvas canvas) {
if (scrollable()) {
if (mShowIndicator) {
drawIndicator(canvas);
}
for (int i = 0; i < mLineCount; i++) {
float x = 0;
switch (mTextAlign) {
case LEFT:
x = INDICATOR_ICON_PLAY_MARGIN_LEFT + INDICATOR_LINE_MARGIN + mBtnPlayRect.width();
break;
case CENTER:
x = getWidth() * 0.5f;
break;
case RIGHT:
x = getWidth() - INDICATOR_LINE_MARGIN * 2 - mTimerRect.width() - INDICATOR_ICON_PLAY_MARGIN_LEFT;
break;
}
float y;
if (mEnableLineFeed && i > 0) {
y = getMeasuredHeight() * 0.5f + i * mLineHeight - mScrollY + mLineFeedRecord.get(i - 1);
} else {
y = getMeasuredHeight() * 0.5f + i * mLineHeight - mScrollY;
}
// float y = getHeight() * 0.5f + i * mLineHeight - mScrollY;
if (y < 0) {
continue;
}
if (y > getHeight()) {
break;
}
if (i == mCurrentPlayLine - 1) {
mTextPaint.setColor(mHighLightColor);
} else if (i == mLineNumberUnderIndicator && mShowIndicator) {
mTextPaint.setColor(Color.LTGRAY);
} else {
mTextPaint.setColor(mDefaultColor);
}
if (mIsShade && (y > getHeight() - mShaderWidth || y < mShaderWidth)) {
if (y < mShaderWidth) {
mTextPaint.setAlpha(26 + (int) (23000.0f * y / mShaderWidth * 0.01f));
} else {
mTextPaint.setAlpha(26 + (int) (23000.0f * (getHeight() - y) / mShaderWidth * 0.01f));
}
} else {
mTextPaint.setAlpha(255);
}
if (mEnableLineFeed) {
StaticLayout staticLayout = new StaticLayout(mLyricInfo.songLines.get(i).content, mTextPaint,
mMaxLength,
Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);
canvas.save();
canvas.translate(x, y);
staticLayout.draw(canvas);
canvas.restore();
} else {
canvas.drawText(mLyricInfo.songLines.get(i).content, x, y, mTextPaint);
}
}
} else {
mTextPaint.setColor(mHintColor);
canvas.drawText(mDefaultHint, getMeasuredWidth() / 2, getMeasuredHeight() / 2, mTextPaint);
}
}
private void getAttrs(Context context, AttributeSet attrs) {
TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.LyricView);
mIsShade = ta.getBoolean(R.styleable.LyricView_fadeInFadeOut, false);
mDefaultHint = ta.getString(R.styleable.LyricView_hint) != null
? ta.getString(R.styleable.LyricView_hint)
: getResources().getString(R.string.default_hint);
mHintColor = ta.getColor(R.styleable.LyricView_hintColor, Color.parseColor("#FFFFFF"));
mDefaultColor = ta.getColor(R.styleable.LyricView_textColor, Color.parseColor("#8D8D8D"));
mHighLightColor = ta.getColor(R.styleable.LyricView_highlightColor, Color.parseColor("#FFFFFF"));
mTextSize = ta.getDimensionPixelSize(R.styleable.LyricView_textSize, (int) getRawSize(TypedValue.COMPLEX_UNIT_SP, DEFAULT_TEXT_SIZE));
mTextAlign = ta.getInt(R.styleable.LyricView_textAlign, CENTER);
mMaxLength = ta.getDimensionPixelSize(R.styleable.LyricView_maxLength, (int) getRawSize(TypedValue.COMPLEX_UNIT_DIP, DEFAULT_MAX_LENGTH));
mLineSpace = ta.getDimensionPixelSize(R.styleable.LyricView_lineSpace, (int) getRawSize(TypedValue.COMPLEX_UNIT_DIP, DEFAULT_LINE_SPACE));
ta.recycle();
}
public void setShade(boolean shade) {
mIsShade = shade;
invalidateView();
}
public void setHintColor(int hintColor) {
mHintColor = hintColor;
invalidateView();
}
public void setDefaultColor(int defaultColor) {
mDefaultColor = defaultColor;
invalidateView();
}
public void setHighLightColor(int highLightColor) {
mHighLightColor = highLightColor;
invalidateView();
}
public void setTextAlign(int textAlign) {
mTextAlign = textAlign;
invalidateView();
}
public void setLineCount(int lineCount) {
mLineCount = lineCount;
invalidateView();
}
public void setTextSize(int textSize) {
mTextSize = textSize;
invalidateView();
}
public void setDefaultHint(String defaultHint) {
mDefaultHint = defaultHint;
invalidateView();
}
public void setMaxLength(int maxLength) {
mMaxLength = maxLength;
invalidateView();
}
public void setOnPlayerClickListener(OnPlayerClickListener mClickListener) {
this.mClickListener = mClickListener;
}
public void setAlignment(@Alignment int alignment) {
mTextAlign = alignment;
}
public void setCurrentTimeMillis(long current) {
scrollToCurrentTimeMillis(current);
}
public void setLyricFile(File file) {
if (file == null || !file.exists()) {
reset();
mCurrentLyricFilePath = "";
return;
} else if (file.getPath().equals(mCurrentLyricFilePath)) {
return;
} else {
mCurrentLyricFilePath = file.getPath();
reset();
}
try {
FileInputStream fis = new FileInputStream(file);
byte[] buf = new byte[1024];
UniversalDetector detector = new UniversalDetector(null);
int nread;
while ((nread = fis.read(buf)) > 0 && !detector.isDone()) {
detector.handleData(buf, 0, nread);
}
detector.dataEnd();
String encoding = detector.getDetectedCharset();
if (encoding != null) {
setLyricFile(file, encoding);
} else {
setLyricFile(file, "UTF-8");
}
detector.reset();
fis.close();
} catch (IOException e) {
e.printStackTrace();
}
}
public void setLyricFile(File file, String charsetName) {
if (file != null && file.exists()) {
try {
setupLyricResource(new FileInputStream(file), charsetName);
for (int i = 0; i < mLyricInfo.songLines.size(); i++) {
StaticLayout staticLayout = new StaticLayout(mLyricInfo.songLines.get(i).content, mTextPaint,
(int) getRawSize(TypedValue.COMPLEX_UNIT_DIP, DEFAULT_MAX_LENGTH),
Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);
if (staticLayout.getLineCount() > 1) {
mEnableLineFeed = true;
mExtraHeight = mExtraHeight + (staticLayout.getLineCount() - 1) * mTextHeight;
}
mLineFeedRecord.add(i, mExtraHeight);
}
} catch (FileNotFoundException e) {
e.printStackTrace();
}
} else {
invalidateView();
}
}
private void setLineSpace(float lineSpace) {
if (mLineSpace != lineSpace) {
mLineSpace = getRawSize(TypedValue.COMPLEX_UNIT_DIP, lineSpace);
measureLineHeight();
mScrollY = measureCurrentScrollY(mCurrentPlayLine);
invalidateView();
}
}
public void reset() {
resetView();
}
private void actionCancel(MotionEvent event) {
releaseVelocityTracker();
}
private void actionDown(MotionEvent event) {
removeCallbacks(hideIndicator);
mLastScrollY = mScrollY;
mDownX = event.getX();
mDownY = event.getY();
if (mFlingAnimator != null) {
mFlingAnimator.cancel();
mFlingAnimator = null;
}
setUserTouch(true);
}
private boolean overScrolled() {
return scrollable() && (mScrollY > mLineHeight * (mLineCount - 1) + mLineFeedRecord.get(mLineCount - 1) + (mEnableLineFeed ? mTextHeight : 0) || mScrollY < 0);
}
private void actionMove(MotionEvent event) {
if (scrollable()) {
final VelocityTracker tracker = mVelocityTracker;
tracker.computeCurrentVelocity(UNITS_SECOND, maxVelocity);
mScrollY = mLastScrollY + mDownY - event.getY();
mVelocity = tracker.getYVelocity();
measureCurrentLine();
}
}
private void actionUp(MotionEvent event) {
postDelayed(hideIndicator, 3 * UNITS_SECOND);
releaseVelocityTracker();
if (scrollable()) {
if (overScrolled() && mScrollY < 0) {
smoothScrollTo(0);
return;
}
if (overScrolled() && mScrollY > mLineHeight * (mLineCount - 1) + mLineFeedRecord.get(mLineCount - 1) + (mEnableLineFeed ? mTextHeight : 0)) {
smoothScrollTo(mLineHeight * (mLineCount - 1) + mLineFeedRecord.get(mLineCount - 1) + (mEnableLineFeed ? mTextHeight : 0));
return;
}
if (Math.abs(mVelocity) > THRESHOLD_Y_VELOCITY) {
doFlingAnimator(mVelocity);
return;
}
if (mShowIndicator && clickPlayer(event)) {
if (mLineNumberUnderIndicator != mCurrentPlayLine) {
mShowIndicator = false;
if (mClickListener != null) {
setUserTouch(false);
mClickListener.onPlayerClicked(mLyricInfo.songLines.get(mLineNumberUnderIndicator).start, mLyricInfo.songLines.get(mLineNumberUnderIndicator).content);
}
}
}
}
}
private String measureCurrentTime() {
DecimalFormat format = new DecimalFormat("00");
if (mLyricInfo != null && mLineCount > 0 && mLineNumberUnderIndicator - 1 < mLineCount && mLineNumberUnderIndicator > 0) {
return format.format(mLyricInfo.songLines.get(mLineNumberUnderIndicator - 1).start / 1000 / 60) + ":" + format.format(mLyricInfo.songLines.get(mLineNumberUnderIndicator - 1).start / 1000 % 60);
}
if (mLyricInfo != null && mLineCount > 0 && (mLineNumberUnderIndicator - 1) >= mLineCount) {
return format.format(mLyricInfo.songLines.get(mLineCount - 1).start / 1000 / 60) + ":" + format.format(mLyricInfo.songLines.get(mLineCount - 1).start / 1000 % 60);
}
if (mLyricInfo != null && mLineCount > 0 && mLineNumberUnderIndicator - 1 <= 0) {
return format.format(mLyricInfo.songLines.get(0).start / 1000 / 60) + ":" + format.format(mLyricInfo.songLines.get(0).start / 1000 % 60);
}
return mDefaultTime;
}
private void drawIndicator(Canvas canvas) {
//绘制 播放 按钮
Path pathPlay = new Path();
float yCoordinate = mBtnPlayRect.left + (float) Math.sqrt(Math.pow(mBtnPlayRect.width(), 2) - Math.pow(mBtnPlayRect.width() * 0.5f, 2));
float remainWidth = mBtnPlayRect.right - yCoordinate;
pathPlay.moveTo(mBtnPlayRect.centerX() - mBtnPlayRect.width() * 0.5f, mBtnPlayRect.centerY() - mBtnPlayRect.height() * 0.5f);
pathPlay.lineTo(mBtnPlayRect.centerX() - mBtnPlayRect.width() * 0.5f, mBtnPlayRect.centerY() + mBtnPlayRect.height() * 0.5f);
pathPlay.lineTo(yCoordinate, mBtnPlayRect.centerY());
pathPlay.lineTo(mBtnPlayRect.centerX() - mBtnPlayRect.width() * 0.5f, mBtnPlayRect.centerY() - mBtnPlayRect.height() * 0.5f);
canvas.drawPath(pathPlay, mBtnPlayPaint);
//绘制 分割线
Path pathLine = new Path();
pathLine.moveTo(mBtnPlayRect.right + getRawSize(TypedValue.COMPLEX_UNIT_DIP, INDICATOR_LINE_MARGIN) - remainWidth, getMeasuredHeight() * 0.5f);
pathLine.lineTo(getWidth() - mTimerRect.width() - getRawSize(TypedValue.COMPLEX_UNIT_DIP, INDICATOR_TIME_MARGIN_RIGHT) - getRawSize(TypedValue.COMPLEX_UNIT_DIP, INDICATOR_LINE_MARGIN), getHeight() * 0.5f);
canvas.drawPath(pathLine, mLinePaint);
//绘制 时间
canvas.drawText(measureCurrentTime(), getWidth() - getRawSize(TypedValue.COMPLEX_UNIT_DIP, INDICATOR_TIME_MARGIN_RIGHT), (getHeight() + mTimerRect.height()) * 0.5f, mTimerPaint);
}
private boolean clickPlayer(MotionEvent event) {
if (mBtnPlayRect != null && mDownX > (mBtnPlayRect.left - INDICATOR_ICON_PLAY_MARGIN_LEFT) && mDownX < (mBtnPlayRect.right + INDICATOR_ICON_PLAY_MARGIN_LEFT) && mDownY > (mBtnPlayRect.top - INDICATOR_ICON_PLAY_MARGIN_LEFT) && mDownY < (mBtnPlayRect.bottom + INDICATOR_ICON_PLAY_MARGIN_LEFT)) {
float upX = event.getX();
float upY = event.getY();
return upX > (mBtnPlayRect.left - INDICATOR_ICON_PLAY_MARGIN_LEFT) && upX < (mBtnPlayRect.right + INDICATOR_ICON_PLAY_MARGIN_LEFT) && upY > (mBtnPlayRect.top - INDICATOR_ICON_PLAY_MARGIN_LEFT) && upY < (mBtnPlayRect.bottom + INDICATOR_ICON_PLAY_MARGIN_LEFT);
}
return false;
}
private void doFlingAnimator(float velocity) {
float distance = (velocity / Math.abs(velocity) * (Math.abs(velocity) * SLIDE_COEFFICIENT));
float to = Math.min(Math.max(0, (mScrollY - distance)), (mLineCount - 1) * mLineHeight + mLineFeedRecord.get(mLineCount - 1) + (mEnableLineFeed ? mTextHeight : 0));
mFlingAnimator = ValueAnimator.ofFloat(mScrollY, to);
mFlingAnimator.addUpdateListener(animation -> {
mScrollY = (float) animation.getAnimatedValue();
measureCurrentLine();
invalidateView();
});
mFlingAnimator.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationStart(Animator animation) {
super.onAnimationStart(animation);
mVelocity = 0;
mFling = true;
}
@Override
public void onAnimationEnd(Animator animation) {
super.onAnimationEnd(animation);
mFling = false;
}
@Override
public void onAnimationCancel(Animator animation) {
super.onAnimationCancel(animation);
}
});
mFlingAnimator.setDuration(FLING_ANIMATOR_DURATION);
mFlingAnimator.setInterpolator(new DecelerateInterpolator());
mFlingAnimator.start();
}
private void setUserTouch(boolean isUserTouch) {
if (isUserTouch) {
mUserTouch = true;
mShowIndicator = true;
} else {
mUserTouch = false;
mShowIndicator = false;
}
}
private void releaseVelocityTracker() {
if (mVelocityTracker != null) {
mVelocityTracker.clear();
mVelocityTracker.recycle();
mVelocityTracker = null;
}
}
private void initMyView(Context context) {
maxVelocity = ViewConfiguration.get(context).getScaledMaximumFlingVelocity();
initPaint();
initAllBounds();
}
private void initAllBounds() {
setRawTextSize(mTextSize);
setLineSpace(mLineSpace);
measureLineHeight();
mTimerRect = new Rect();
mTimerPaint.getTextBounds(mDefaultTime, 0, mDefaultTime.length(), mTimerRect);
}
private void initPaint() {
mTextPaint = new TextPaint();
mTextPaint.setDither(true);
mTextPaint.setAntiAlias(true);
Typeface typeface = Typeface.createFromAsset(getContext().getAssets(), "fonts/circular_std_book.otf");
mTextPaint.setTypeface(typeface);
switch (mTextAlign) {
case LEFT:
mTextPaint.setTextAlign(Paint.Align.LEFT);
break;
case CENTER:
mTextPaint.setTextAlign(Paint.Align.CENTER);
break;
case RIGHT:
mTextPaint.setTextAlign(Paint.Align.RIGHT);
break;
}
mBtnPlayPaint = new Paint();
mBtnPlayPaint.setDither(true);
mBtnPlayPaint.setAntiAlias(true);
mBtnPlayPaint.setColor(mBtnColor);
mBtnPlayPaint.setStyle(Paint.Style.FILL_AND_STROKE);
mBtnPlayPaint.setAlpha(128);
mLinePaint = new Paint();
mLinePaint.setDither(true);
mLinePaint.setAntiAlias(true);
mLinePaint.setColor(mLineColor);
mLinePaint.setAlpha(64);
mLinePaint.setStrokeWidth(1.0f);
mLinePaint.setStyle(Paint.Style.STROKE);
mTimerPaint = new Paint();
mTimerPaint.setDither(true);
mTimerPaint.setAntiAlias(true);
mTimerPaint.setColor(Color.WHITE);
mTimerPaint.setTextAlign(Paint.Align.RIGHT);
mTimerPaint.setTextSize(getRawSize(TypedValue.COMPLEX_UNIT_SP, INDICATOR_TIME_TEXT_SIZE));
}
private float measureCurrentScrollY(int line) {
if (mEnableLineFeed && line > 1) {
return (line - 1) * mLineHeight + mLineFeedRecord.get(line - 1);
}
return (line - 1) * mLineHeight;
}
private void invalidateView() {
if (Looper.getMainLooper() == Looper.myLooper()) {
// 当前线程是主UI线程直接刷新。
invalidate();
} else {
// 当前线程是非UI线程post刷新。
postInvalidate();
}
}
private void measureLineHeight() {
Rect lineBound = new Rect();
mTextPaint.getTextBounds(mDefaultHint, 0, mDefaultHint.length(), lineBound);
mTextHeight = lineBound.height();
mLineHeight = mTextHeight + mLineSpace;
}
/**
* To measure current showing line number based on the view's scroll Y
*/
private void measureCurrentLine() {
float baseScrollY = mScrollY + mLineHeight * 0.5f;
if (mEnableLineFeed) {
for (int i = mLyricInfo.songLines.size(); i >= 0; i--) {
if (baseScrollY > measureCurrentScrollY(i) + mLineSpace * 0.2) {
mLineNumberUnderIndicator = i - 1;
break;
}
}
} else {
mLineNumberUnderIndicator = (int) (baseScrollY / mLineHeight);
}
}
private void smoothScrollTo(float toY) {
final ValueAnimator animator = ValueAnimator.ofFloat(mScrollY, toY);
animator.addUpdateListener(valueAnimator -> {
mScrollY = (Float) valueAnimator.getAnimatedValue();
invalidateView();
});
animator.addListener(new Animator.AnimatorListener() {
@Override
public void onAnimationCancel(Animator animator) {
}
@Override
public void onAnimationEnd(Animator animator) {
mFling = false;
measureCurrentLine();
invalidateView();
}
@Override
public void onAnimationRepeat(Animator animator) {
}
@Override
public void onAnimationStart(Animator animator) {
mFling = true;
}
});
animator.setDuration(640);
animator.setInterpolator(new LinearInterpolator());
animator.start();
}
private boolean scrollable() {
return mLyricInfo != null && mLyricInfo.songLines != null && mLyricInfo.songLines.size() > 0;
}
private void scrollToCurrentTimeMillis(long time) {
int position = 0;
if (scrollable()) {
for (int i = 0, size = mLineCount; i < size; i++) {
LineInfo lineInfo = mLyricInfo.songLines.get(i);
if (lineInfo != null && lineInfo.start >= time) {
position = i;
break;
}
if (i == mLineCount - 1) {
position = mLineCount;
}
}
}
if (mCurrentPlayLine != position) {
mCurrentPlayLine = position;
if (!mFling && !mUserTouch) {
smoothScrollTo(measureCurrentScrollY(position));
}
}
}
private void setupLyricResource(InputStream inputStream, String charsetName) {
if (inputStream != null) {
try {
LyricInfo lyricInfo = new LyricInfo();
lyricInfo.songLines = new ArrayList<>();
InputStreamReader inputStreamReader = new InputStreamReader(inputStream, charsetName);
BufferedReader reader = new BufferedReader(inputStreamReader);
String line;
while ((line = reader.readLine()) != null) {
analyzeLyric(lyricInfo, line);
}
reader.close();
inputStream.close();
inputStreamReader.close();
mLyricInfo = lyricInfo;
mLineCount = mLyricInfo.songLines.size();
invalidateView();
} catch (IOException e) {
e.printStackTrace();
}
} else {
invalidateView();
}
}
/**
*
*/
private void analyzeLyric(LyricInfo lyricInfo, String line) {
int index = line.lastIndexOf("]");
if (line.startsWith("[offset:")) {
// time offset
lyricInfo.songOffset = Long.parseLong(line.substring(8, index).trim());
return;
}
if (line.startsWith("[ti:")) {
// title
lyricInfo.songTitle = line.substring(4, index).trim();
return;
}
if (line.startsWith("[ar:")) {
// artist
lyricInfo.songArtist = line.substring(4, index).trim();
return;
}
if (line.startsWith("[al:")) {
// album
lyricInfo.songAlbum = line.substring(4, index).trim();
return;
}
if (line.startsWith("[by:")) {
return;
}
if (index >= 9 && line.trim().length() > index + 1) {
// lyrics
LineInfo lineInfo = new LineInfo();
lineInfo.content = line.substring(10, line.length());
lineInfo.start = measureStartTimeMillis(line.substring(0, index));
lyricInfo.songLines.add(lineInfo);
}
}
/**
*
*/
private long measureStartTimeMillis(String str) {
long minute = Long.parseLong(str.substring(1, 3));
long second = Long.parseLong(str.substring(4, 6));
long millisecond = Long.parseLong(str.substring(7, 9));
return millisecond + second * 1000 + minute * 60 * 1000;
}
private void resetLyricInfo() {
if (mLyricInfo != null) {
if (mLyricInfo.songLines != null) {
mLyricInfo.songLines.clear();
mLyricInfo.songLines = null;
}
mLyricInfo = null;
}
}
private void resetView() {
mCurrentPlayLine = 0;
resetLyricInfo();
invalidateView();
mLineCount = 0;
mScrollY = 0;
mEnableLineFeed = false;
mLineFeedRecord.clear();
mExtraHeight = 0;
}
private float getRawSize(int unit, float size) {
Context context = getContext();
Resources resources;
if (context == null) {
resources = Resources.getSystem();
} else {
resources = context.getResources();
}
return TypedValue.applyDimension(unit, size, resources.getDisplayMetrics());
}
private void setRawTextSize(float size) {
if (size != mTextPaint.getTextSize()) {
mTextPaint.setTextSize(size);
measureLineHeight();
mScrollY = measureCurrentScrollY(mCurrentPlayLine);
invalidateView();
}
}
@IntDef({LEFT, CENTER, RIGHT})
@Retention(RetentionPolicy.SOURCE)
public @interface Alignment {
}
public interface OnPlayerClickListener {
void onPlayerClicked(long progress, String content);
}
private class LyricInfo {
List<LineInfo> songLines;
String songArtist;
String songTitle;
String songAlbum;
long songOffset;
}
private class LineInfo {
String content;
long start;
}
}

View File

@ -1,164 +1,151 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/root"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/root"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
style="@style/Toolbar"
app:contentInsetLeft="0dp"
app:contentInsetStart="0dp"
app:contentInsetStartWithNavigation="0dp"
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp"
app:titleMargin="0dp"
app:titleMarginStart="0dp">
<LinearLayout
android:id="@+id/actions_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<RadioGroup
android:id="@+id/actions"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<android.support.v7.widget.AppCompatRadioButton
android:id="@+id/synced_lyrics"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:layout_weight="1"
android:background="@drawable/toggle_outline_buttons"
android:button="@android:color/transparent"
android:gravity="center"
android:padding="8dp"
android:text="@string/synced_lyrics"
android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption"
android:textColor="?android:attr/textColorPrimary" />
<android.support.v7.widget.AppCompatRadioButton
android:id="@+id/normal_lyrics"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:layout_weight="1"
android:background="@drawable/toggle_outline_buttons"
android:button="@android:color/transparent"
android:checked="true"
android:gravity="center"
android:padding="8dp"
android:text="@string/normal_lyrics"
android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption" />
</RadioGroup>
<code.name.monkey.retromusic.views.IconImageView
android:id="@+id/edit_lyrics"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:background="?roundSelector"
android:padding="16dp"
app:srcCompat="@drawable/ic_edit_white_24dp" />
</LinearLayout>
</android.support.v7.widget.Toolbar>
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
style="@style/Toolbar"
app:contentInsetLeft="0dp"
app:contentInsetStart="0dp"
app:contentInsetStartWithNavigation="0dp"
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp"
app:titleMargin="0dp"
app:titleMarginStart="0dp">
<LinearLayout
android:id="@+id/actions_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<RadioGroup
android:id="@+id/actions"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical">
android:layout_weight="1"
android:orientation="horizontal">
<android.support.v7.widget.CardView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
app:cardElevation="8dp"
app:cardUseCompatPadding="true">
<android.support.v7.widget.AppCompatRadioButton
android:id="@+id/synced_lyrics"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_margin="4dp"
android:padding="8dp"
android:background="@drawable/toggle_outline_buttons"
android:button="@android:color/transparent"
android:gravity="center"
android:text="@string/synced_lyrics"
android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption"
android:textColor="?android:attr/textColorPrimary"/>
<ImageView
android:id="@+id/image"
android:layout_width="48dp"
android:layout_height="48dp"
android:scaleType="centerCrop" />
</android.support.v7.widget.CardView>
<android.support.v7.widget.AppCompatRadioButton
android:id="@+id/normal_lyrics"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_margin="4dp"
android:padding="8dp"
android:background="@drawable/toggle_outline_buttons"
android:button="@android:color/transparent"
android:checked="true"
android:gravity="center"
android:text="@string/normal_lyrics"
android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingEnd="0dp"
android:paddingStart="12dp">
</RadioGroup>
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="2"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
<TextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="2"
android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
</LinearLayout>
<code.name.monkey.retromusic.views.IconImageView
android:id="@+id/edit_lyrics"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:padding="16dp"
android:background="?roundSelector"
app:srcCompat="@drawable/ic_edit_white_24dp"/>
</LinearLayout>
</android.support.v7.widget.Toolbar>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical">
<android.support.v7.widget.CardView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
app:cardElevation="8dp"
app:cardUseCompatPadding="true">
<ImageView
android:id="@+id/image"
android:layout_width="48dp"
android:layout_height="48dp"
android:scaleType="centerCrop"/>
</android.support.v7.widget.CardView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="12dp"
android:paddingEnd="0dp"
android:orientation="vertical">
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="2"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"/>
<TextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="2"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"/>
</LinearLayout>
</LinearLayout>
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:cardCornerRadius="8dp"
app:cardElevation="8dp"
app:cardUseCompatPadding="true">
<FrameLayout
android:id="@+id/gradient_background"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/gradient_5">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:cardCornerRadius="8dp"
app:cardElevation="8dp"
app:cardUseCompatPadding="true">
android:padding="16dp">
<FrameLayout
android:id="@+id/gradient_background"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/gradient_5">
<TextView
android:id="@+id/offline_lyrics"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="start"
android:lineSpacingExtra="3dp"
android:text="@string/no_lyrics_found"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="@color/md_white_1000"
android:visibility="gone"/>
</ScrollView>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp">
<TextView
android:id="@+id/offline_lyrics"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="start"
android:lineSpacingExtra="3dp"
android:text="@string/no_lyrics_found"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="@color/md_white_1000"
android:visibility="gone" />
</ScrollView>
<code.name.monkey.retromusic.views.LyricView
android:id="@+id/lyrics"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
app:fadeInFadeOut="true"
app:highlightColor="@color/md_white_1000"
app:hint="No Lyrics"
app:hintColor="@color/md_grey_400"
app:lineSpace="15dp"
app:textAlign="left"
app:textSize="18sp" />
</FrameLayout>
</android.support.v7.widget.CardView>
</FrameLayout>
</android.support.v7.widget.CardView>
</LinearLayout>

View File

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="LyricView">
<attr name="hint" format="string" />
<attr name="hintColor" format="color" />
<attr name="textColor" format="color" />
<attr name="highlightColor" format="color" />
<attr name="textSize" format="dimension" />
<attr name="maxLength" format="dimension" />
<attr name="fadeInFadeOut" format="boolean" />
<attr name="lineSpace" format="dimension" />
<attr name="textAlign">
<enum name="left" value="0" />
<enum name="center" value="1" />
<enum name="right" value="2" />
</attr>
</declare-styleable>
</resources>

View File

@ -50,13 +50,6 @@
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
@ -64,6 +57,13 @@
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
@ -87,13 +87,18 @@
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/aapt_friendly_merged_manifests" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/annotation_processor_list" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/annotations_typedef_file" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/annotations_zip" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/check-manifest" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/consumer_proguard_file" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/intermediate-jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javac" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/library_and_local_jars_jni" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/library_assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/merged_manifests" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/packaged-classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/packaged_res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/platform_r_txt" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/public_res" />