├── app
├── .gitignore
├── lib
│ ├── Sunflower.jar
│ └── AutoUpdate_SDK.jar
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── drawable
│ │ │ │ ├── bk.jpg
│ │ │ │ ├── bg_card.9.png
│ │ │ │ ├── new_btn_mv.png
│ │ │ │ ├── new_download.png
│ │ │ │ ├── iflytek_dialog_image.png
│ │ │ │ ├── ic_play_arrow_white_24dp.png
│ │ │ │ ├── rotate_player_loading.xml
│ │ │ │ ├── bg_listview_item.xml
│ │ │ │ ├── layer_player_setting_seek_bar.xml
│ │ │ │ ├── selector_player_playing_thumb.xml
│ │ │ │ └── layer_player_playing_progress.xml
│ │ │ ├── mipmap-mdpi
│ │ │ │ ├── qq.png
│ │ │ │ ├── icon.png
│ │ │ │ ├── kuwo.png
│ │ │ │ ├── baidu.png
│ │ │ │ ├── iting.png
│ │ │ │ ├── kugou.png
│ │ │ │ ├── mango.png
│ │ │ │ ├── netease.png
│ │ │ │ ├── ttpod.png
│ │ │ │ ├── xiami.png
│ │ │ │ └── yinyuetai.png
│ │ │ ├── mipmap-hdpi
│ │ │ │ └── icon.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── icon.png
│ │ │ │ ├── m_img_loading.jpg
│ │ │ │ ├── icon_lyric_setting.png
│ │ │ │ ├── m_icon_player_loading.png
│ │ │ │ ├── m_icon_player_next_normal.png
│ │ │ │ ├── m_icon_player_next_pressed.png
│ │ │ │ ├── m_icon_player_pause_normal.png
│ │ │ │ ├── m_icon_player_play_normal.png
│ │ │ │ ├── m_icon_player_play_pressed.png
│ │ │ │ ├── m_icon_player_pause_pressed.png
│ │ │ │ ├── m_icon_player_previous_normal.png
│ │ │ │ ├── m_icon_player_previous_pressed.png
│ │ │ │ └── player_seekbar_playback_thumb.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── icon.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── icon.png
│ │ │ ├── drawable-hdpi
│ │ │ │ └── ic_add_white_24dp.png
│ │ │ ├── drawable-mdpi
│ │ │ │ ├── search_drawable_left.png
│ │ │ │ └── search_btn_bg.xml
│ │ │ ├── drawable-xhdpi
│ │ │ │ └── ic_add_white_24dp.png
│ │ │ ├── drawable-xxhdpi
│ │ │ │ └── ic_add_white_24dp.png
│ │ │ ├── drawable-xxxhdpi
│ │ │ │ └── ic_add_white_24dp.png
│ │ │ ├── values-v21
│ │ │ │ └── styles.xml
│ │ │ ├── values
│ │ │ │ ├── dimens.xml
│ │ │ │ ├── styles.xml
│ │ │ │ ├── colors.xml
│ │ │ │ ├── attrs.xml
│ │ │ │ └── strings.xml
│ │ │ ├── values-w820dp
│ │ │ │ └── dimens.xml
│ │ │ ├── menu
│ │ │ │ ├── menu_main.xml
│ │ │ │ ├── main_popup_menu.xml
│ │ │ │ └── music_type.xml
│ │ │ ├── color
│ │ │ │ └── item_color.xml
│ │ │ ├── layout
│ │ │ │ ├── activity_settings.xml
│ │ │ │ ├── layout_setting.xml
│ │ │ │ ├── preference_category_widget.xml
│ │ │ │ ├── activity_search_mv.xml
│ │ │ │ ├── searchmv_layout.xml
│ │ │ │ ├── view_toolbar.xml
│ │ │ │ ├── activity_search.xml
│ │ │ │ ├── preference_item.xml
│ │ │ │ ├── item_music_list.xml
│ │ │ │ ├── view_setting.xml
│ │ │ │ ├── activity_main.xml
│ │ │ │ ├── activity_playm.xml
│ │ │ │ └── autoupdate_dialog_layout.xml
│ │ │ └── xml
│ │ │ │ └── preferences.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── qtfreet
│ │ │ │ └── musicuu
│ │ │ │ ├── model
│ │ │ │ ├── OnMusicClickListener.java
│ │ │ │ ├── OnVideoClickListener.java
│ │ │ │ ├── JavaBeanRequest.java
│ │ │ │ ├── Constant
│ │ │ │ │ └── Constants.java
│ │ │ │ └── Bean
│ │ │ │ │ ├── YinyueTai
│ │ │ │ │ └── MvPlayBean.java
│ │ │ │ │ └── MusicUU
│ │ │ │ │ └── resultBean.java
│ │ │ │ ├── musicApi
│ │ │ │ ├── MusicService
│ │ │ │ │ ├── IMusic.java
│ │ │ │ │ ├── MusicService.java
│ │ │ │ │ ├── Util.java
│ │ │ │ │ ├── XmMusic.java
│ │ │ │ │ ├── TtMusic.java
│ │ │ │ │ └── SongResult.java
│ │ │ │ ├── SearchSong.java
│ │ │ │ └── MusicBean
│ │ │ │ │ ├── tx
│ │ │ │ │ ├── TencentGetKey.java
│ │ │ │ │ └── TencentMvKey.java
│ │ │ │ │ ├── kg
│ │ │ │ │ ├── KugouMp3Url.java
│ │ │ │ │ └── KugouPic.java
│ │ │ │ │ ├── tt
│ │ │ │ │ └── TiantianLrc.java
│ │ │ │ │ └── wy
│ │ │ │ │ └── NeteaseSongUrl.java
│ │ │ │ ├── wiget
│ │ │ │ └── DialogPreference.java
│ │ │ │ ├── ui
│ │ │ │ ├── BaseApplication.java
│ │ │ │ ├── view
│ │ │ │ │ ├── RadioImageView.java
│ │ │ │ │ ├── CustomSettingView.java
│ │ │ │ │ └── CustomRelativeLayout.java
│ │ │ │ ├── service
│ │ │ │ │ ├── MusicService.java
│ │ │ │ │ └── DownloadService.java
│ │ │ │ ├── BaseActivity.java
│ │ │ │ ├── activity
│ │ │ │ │ ├── VideoActivity.java
│ │ │ │ │ └── SettingsActivity.java
│ │ │ │ └── adapter
│ │ │ │ │ ├── MvDetailAdatper.java
│ │ │ │ │ └── SongDetailAdapter.java
│ │ │ │ └── utils
│ │ │ │ ├── PreferenceUtil.java
│ │ │ │ └── FileUtils.java
│ │ └── AndroidManifest.xml
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── qtfreet
│ │ │ └── musicuu
│ │ │ └── ExampleUnitTest.java
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── qtfreet
│ │ └── musicuu
│ │ └── ApplicationTest.java
├── proguard-rules.pro
└── build.gradle
├── settings.gradle
├── screenshots
└── pic.png
├── .idea
├── copyright
│ └── profiles_settings.xml
├── vcs.xml
├── libraries
│ ├── Sunflower.xml
│ ├── AutoUpdate_SDK.xml
│ ├── support_v4_25_1_0.xml
│ ├── ijkplayer_x86_0_7_5.xml
│ ├── ijkplayer_java_0_6_0.xml
│ ├── junit_4_12.xml
│ ├── okio_1_9_0.xml
│ ├── okhttp_3_4_1.xml
│ ├── library_2_4_0.xml
│ ├── picasso_2_5_2.xml
│ ├── hamcrest_core_1_3.xml
│ ├── butterknife_7_0_1.xml
│ ├── transition_25_1_0.xml
│ ├── cardview_v7_25_1_0.xml
│ ├── fastjson_1_1_55_android.xml
│ ├── library_1_3.xml
│ ├── mpermission_annotation_1_0_0.xml
│ ├── nohttp_1_1_0.xml
│ ├── okhttp_1_1_0.xml
│ ├── utilcode_1_3_4.xml
│ ├── okhttp_urlconnection_3_4_1.xml
│ ├── BottomDialog_1_0_4.xml
│ ├── library_1_4_1.xml
│ ├── crashreport_2_4_0.xml
│ ├── support_vector_drawable_25_1_0.xml
│ ├── animated_vector_drawable_25_1_0.xml
│ ├── mpermission_api_1_0_0.xml
│ ├── jjdxm_dialogui_1_0_3.xml
│ ├── jjdxm_ijkplayer_1_0_6.xml
│ ├── materialish_progress_1_0.xml
│ ├── jjdxm_ijkplayer_armv7a_1_0_0.xml
│ ├── support_annotations_25_1_0.xml
│ ├── design_25_1_0.xml
│ ├── appcompat_v7_25_1_0.xml
│ ├── support_compat_25_1_0.xml
│ ├── recyclerview_v7_25_1_0.xml
│ ├── support_core_ui_25_1_0.xml
│ ├── support_fragment_25_1_0.xml
│ ├── support_core_utils_25_1_0.xml
│ ├── support_media_compat_25_1_0.xml
│ └── recyclerview_swipe_1_0_2.xml
├── modules.xml
├── runConfigurations.xml
├── compiler.xml
├── gradle.xml
└── misc.xml
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── .gitignore
├── MusicUU.iml
├── gradle.properties
├── MusicUU-master.iml
├── README.md
├── gradlew.bat
└── gradlew
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/screenshots/pic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/screenshots/pic.png
--------------------------------------------------------------------------------
/app/lib/Sunflower.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/lib/Sunflower.jar
--------------------------------------------------------------------------------
/app/lib/AutoUpdate_SDK.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/lib/AutoUpdate_SDK.jar
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bk.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/drawable/bk.jpg
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/qq.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/mipmap-mdpi/qq.png
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/mipmap-hdpi/icon.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/mipmap-mdpi/icon.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/kuwo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/mipmap-mdpi/kuwo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_card.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/drawable/bg_card.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/new_btn_mv.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/drawable/new_btn_mv.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/baidu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/mipmap-mdpi/baidu.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/iting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/mipmap-mdpi/iting.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/kugou.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/mipmap-mdpi/kugou.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/mango.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/mipmap-mdpi/mango.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/netease.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/mipmap-mdpi/netease.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ttpod.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/mipmap-mdpi/ttpod.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/xiami.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/mipmap-mdpi/xiami.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/mipmap-xhdpi/icon.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/mipmap-xxhdpi/icon.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/mipmap-xxxhdpi/icon.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/new_download.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/drawable/new_download.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/yinyuetai.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/mipmap-mdpi/yinyuetai.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/m_img_loading.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/mipmap-xhdpi/m_img_loading.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/iflytek_dialog_image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/drawable/iflytek_dialog_image.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_add_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/drawable-hdpi/ic_add_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/icon_lyric_setting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/mipmap-xhdpi/icon_lyric_setting.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/search_drawable_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/drawable-mdpi/search_drawable_left.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_add_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/drawable-xhdpi/ic_add_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_add_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/drawable-xxhdpi/ic_add_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_add_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/drawable-xxxhdpi/ic_add_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_play_arrow_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/drawable/ic_play_arrow_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/m_icon_player_loading.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/mipmap-xhdpi/m_icon_player_loading.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/m_icon_player_next_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/mipmap-xhdpi/m_icon_player_next_normal.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/m_icon_player_next_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/mipmap-xhdpi/m_icon_player_next_pressed.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/m_icon_player_pause_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/mipmap-xhdpi/m_icon_player_pause_normal.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/m_icon_player_play_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/mipmap-xhdpi/m_icon_player_play_normal.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/m_icon_player_play_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/mipmap-xhdpi/m_icon_player_play_pressed.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/m_icon_player_pause_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/mipmap-xhdpi/m_icon_player_pause_pressed.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/m_icon_player_previous_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/mipmap-xhdpi/m_icon_player_previous_normal.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/m_icon_player_previous_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/mipmap-xhdpi/m_icon_player_previous_pressed.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/player_seekbar_playback_thumb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YiuChoi/MusicUU/master/app/src/main/res/mipmap-xhdpi/player_seekbar_playback_thumb.png
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/libraries/Sunflower.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/java/com/qtfreet/musicuu/model/OnMusicClickListener.java:
--------------------------------------------------------------------------------
1 | package com.qtfreet.musicuu.model;
2 |
3 | import android.view.View;
4 |
5 |
6 | public interface OnMusicClickListener {
7 | void Music(View itemView, int position);
8 |
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/.idea/libraries/AutoUpdate_SDK.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jan 13 10:46:31 CST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
7 |
--------------------------------------------------------------------------------
/app/src/main/java/com/qtfreet/musicuu/model/OnVideoClickListener.java:
--------------------------------------------------------------------------------
1 | package com.qtfreet.musicuu.model;
2 |
3 | import android.view.View;
4 |
5 | /**
6 | * Created by qtfreet00 on 2016/9/1.
7 | */
8 | public interface OnVideoClickListener {
9 | void click(View v, int postion);
10 | }
11 |
--------------------------------------------------------------------------------
/app/src/main/java/com/qtfreet/musicuu/musicApi/MusicService/IMusic.java:
--------------------------------------------------------------------------------
1 | package com.qtfreet.musicuu.musicApi.MusicService;
2 |
3 | import java.util.List;
4 |
5 | /**
6 | * Created by qtfreet00 on 2017/2/4.
7 | */
8 | public interface IMusic {
9 | List SongSearch(String key, int page, int size);
10 | }
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/rotate_player_loading.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/search_btn_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 | 25dp
6 | 20sp
7 | 90dp
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/test/java/com/qtfreet/musicuu/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.qtfreet.musicuu;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * To work on unit tests, switch the Test Artifact in the Build Variants view.
9 | */
10 | public class ExampleUnitTest {
11 | @Test
12 | public void addition_isCorrect() throws Exception {
13 | assertEquals(4, 2 + 2);
14 | }
15 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/qtfreet/musicuu/wiget/DialogPreference.java:
--------------------------------------------------------------------------------
1 | package com.qtfreet.musicuu.wiget;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 |
6 | /**
7 | * Created by qtfreet on 2016/3/30.
8 | */
9 | public class DialogPreference extends android.preference.DialogPreference {
10 | public DialogPreference(Context context, AttributeSet attrs) {
11 | super(context, attrs);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/.idea/libraries/support_v4_25_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/qtfreet/musicuu/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package com.qtfreet.musicuu;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/.idea/libraries/ijkplayer_x86_0_7_5.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/libraries/ijkplayer_java_0_6_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_listview_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/junit_4_12.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 |
5 | # Files for the Dalvik VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # Generated files
12 | bin/
13 | gen/
14 |
15 | # Gradle files
16 | .gradle/
17 | build/
18 |
19 | # Local configuration file (sdk path, etc)
20 | local.properties
21 |
22 | # Proguard folder generated by Eclipse
23 | proguard/
24 |
25 | # Log Files
26 | *.log
27 |
28 | # Android Studio Navigation editor temp files
29 | .navigation/
30 |
31 | # Android Studio captures folder
32 | captures/
33 |
--------------------------------------------------------------------------------
/.idea/libraries/okio_1_9_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/main_popup_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/.idea/libraries/okhttp_3_4_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/library_2_4_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/picasso_2_5_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/hamcrest_core_1_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/butterknife_7_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/color/item_color.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/libraries/transition_25_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/cardview_v7_25_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/fastjson_1_1_55_android.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/library_1_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/mpermission_annotation_1_0_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/nohttp_1_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/okhttp_1_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/utilcode_1_3_4.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_settings.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
7 |
8 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/.idea/libraries/okhttp_urlconnection_3_4_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/BottomDialog_1_0_4.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/library_1_4_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/crashreport_2_4_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/support_vector_drawable_25_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/layer_player_setting_seek_bar.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | -
5 |
6 |
7 |
8 |
9 |
10 | -
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/.idea/libraries/animated_vector_drawable_25_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/mpermission_api_1_0_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/jjdxm_dialogui_1_0_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/jjdxm_ijkplayer_1_0_6.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/materialish_progress_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_setting.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
14 |
--------------------------------------------------------------------------------
/.idea/libraries/jjdxm_ijkplayer_armv7a_1_0_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/support_annotations_25_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/java/com/qtfreet/musicuu/musicApi/MusicService/MusicService.java:
--------------------------------------------------------------------------------
1 | package com.qtfreet.musicuu.musicApi.MusicService;
2 |
3 | /**
4 | * Created by qtfreet00 on 2017/2/4.
5 | */
6 | public class MusicService {
7 | public static IMusic GetMusic(String type) {
8 | switch (type) {
9 | case "wy":
10 | return new WyMusic();
11 | case "tt":
12 | return new TtMusic();
13 | case "qq":
14 | return new TxMusic();
15 | case "kg":
16 | return new KgMusic();
17 | case "xm":
18 | return new XmMusic();
19 | default:
20 | return new TtMusic();
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/preference_category_widget.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
17 |
18 |
--------------------------------------------------------------------------------
/.idea/libraries/design_25_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #03A9F4
4 | #0288D1
5 | #FF4081
6 | #037BFF
7 | #8F8F8F
8 | #000000
9 | #FF535353
10 | #ffffff
11 | #666666
12 | #216b74ff
13 | #212121
14 | #f7e79c
15 | #4cd964
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/.idea/libraries/appcompat_v7_25_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/support_compat_25_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/recyclerview_v7_25_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/support_core_ui_25_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/support_fragment_25_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/support_core_utils_25_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_search_mv.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/.idea/libraries/support_media_compat_25_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_player_playing_thumb.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 |
9 |
10 | -
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/.idea/libraries/recyclerview_swipe_1_0_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/searchmv_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
14 |
15 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/layer_player_playing_progress.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | -
5 |
6 |
7 |
8 |
9 |
10 | -
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | -
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/java/com/qtfreet/musicuu/musicApi/SearchSong.java:
--------------------------------------------------------------------------------
1 | package com.qtfreet.musicuu.musicApi;
2 |
3 |
4 | import com.qtfreet.musicuu.musicApi.MusicBean.SearchResult;
5 | import com.qtfreet.musicuu.musicApi.MusicService.MusicService;
6 | import com.qtfreet.musicuu.musicApi.MusicService.SongResult;
7 |
8 | import java.util.List;
9 |
10 | /**
11 | * Created by qtfreet00 on 2017/2/5.
12 | */
13 | public class SearchSong {
14 | public static SearchResult Search(String type, String key, int page, int size) {
15 | List wy = MusicService.GetMusic(type).SongSearch(key, page, size);
16 | SearchResult searchResult = new SearchResult();
17 | if (wy == null) {
18 | searchResult.setStatus(404);
19 | searchResult.setSongs(null);
20 | } else {
21 | searchResult.setStatus(200);
22 | searchResult.setSongs(wy);
23 | }
24 | return searchResult;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/MusicUU.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | ## Project-wide Gradle settings.
2 | #
3 | # For more details on how to configure your build environment visit
4 | # http://www.gradle.org/docs/current/userguide/build_environment.html
5 | #
6 | # Specifies the JVM arguments used for the daemon process.
7 | # The setting is particularly useful for tweaking memory settings.
8 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
9 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
10 | #
11 | # When configured, Gradle will run in incubating parallel mode.
12 | # This option should only be used with decoupled projects. More details, visit
13 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
14 | # org.gradle.parallel=true
15 | #Tue Aug 23 15:18:40 CST 2016
16 | ANDROID_COMPILE_SDK_VERSION=23
17 | systemProp.http.proxyHost=127.0.0.1
18 | ANDROID_TARGET_SDK_VERSION=23
19 | ANDROID_MIN_SDK=14
20 | ANDROID_BUILD_TOOLS_VERSION=23.0.1
21 | systemProp.http.proxyPort=1080
22 |
--------------------------------------------------------------------------------
/MusicUU-master.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/view_toolbar.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
13 |
14 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_search.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
17 |
18 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/java/com/qtfreet/musicuu/model/JavaBeanRequest.java:
--------------------------------------------------------------------------------
1 | package com.qtfreet.musicuu.model;
2 |
3 | import com.alibaba.fastjson.JSON;
4 | import com.yolanda.nohttp.Headers;
5 | import com.yolanda.nohttp.RequestMethod;
6 | import com.yolanda.nohttp.rest.RestRequest;
7 | import com.yolanda.nohttp.rest.StringRequest;
8 |
9 | import java.util.List;
10 |
11 | /**
12 | * Created by qtfreet on 2016/12/21.
13 | */
14 |
15 | public class JavaBeanRequest extends RestRequest> {
16 |
17 | // 要解析的JavaBean的class。
18 | private Class clazz;
19 |
20 | public JavaBeanRequest(String url, Class clazz) {
21 | this(url, RequestMethod.GET, clazz);
22 | }
23 |
24 | public JavaBeanRequest(String url, RequestMethod requestMethod, Class clazz) {
25 | super(url, requestMethod);
26 | this.clazz = clazz;
27 | }
28 |
29 | @Override
30 | public List parseResponse(Headers responseHeaders, byte[] responseBody) throws Throwable {
31 | String response = StringRequest.parseResponseString(responseHeaders, responseBody);
32 |
33 | // 这里如果数据格式错误,或者解析失败,会在失败的回调方法中返回 ParseError 异常。
34 | return JSON.parseArray(response, clazz);
35 | }
36 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 音乐助手
2 | 一个免费下载音乐的App
3 | [问题交流反馈社区](http://qtfreet.cn)
4 |
5 | ####使用到的开源项目
6 | #####网络请求框架
7 | [retrofit2](https://github.com/square/retrofit)
8 | #####json解析
9 | [Gson](https://github.com/google/gson)
10 | #####视频播放
11 | [ijkplayer](https://github.com/Bilibili/ijkplayer)
12 | #####图片加载
13 | [picasso](https://github.com/square/picasso)
14 | #####歌词显示
15 | [LrcView](https://github.com/WuLiFei/LyricViewDemo)
16 |
17 | ######2016.8.18
18 | * 移除掉了主页面的搜索按钮,太丑了,把搜索放在了搜索框右侧的搜索图标和软键盘上
19 | * 更改了选择音乐源的样式
20 | * 播放mv改为全屏了
21 | * 歌曲下载放到后台了
22 | * 支持显示歌词了
23 | * 还是不支持后台播放,- -
24 |
25 | ######2016.9.1
26 | * 调整了下搜索歌曲页面的布局大小,现在可以显示更多的选项
27 | * 增加了音悦台接口,可以直接看mv
28 | * 越写越觉得代码丑,丑炸了
29 |
30 | ######2016.9.9
31 | * 封装部分代码到BaseActivity
32 | * 去除一个崩溃bug
33 |
34 | ######2016.9.19
35 | * 移除搜索界面右上角小三点,避免屏幕适配问题
36 | * 现在在搜索条目上向左滑动可显示下载,mv按钮
37 | * 修改部分提示
38 |
39 | ######2016.12.6
40 | * 修复自动更新导致的崩溃bug
41 | * 优化程序性能
42 | * 优化部分UI
43 | * 修复bug
44 | * 因旧版api已经停用,导致搜索会崩溃,更及时更新到最新版
45 | * 恢复下载音乐时选择音质选项
46 |
47 | ######2016.12.21
48 | * 修复播放时无限下一首的问题(已知问题,加载时圆圈不动)
49 | * 统一网络框架,优化代码
50 | * 更新下载功能
51 |
52 | 声明:本项目只能用于学习交流,请勿用于任何商业或者收费项目
53 |
54 | 
55 |
56 | 捐赠:愿意支持开发的可以支持下哈
57 |
58 |  
59 |
60 |
--------------------------------------------------------------------------------
/app/src/main/java/com/qtfreet/musicuu/model/Constant/Constants.java:
--------------------------------------------------------------------------------
1 | package com.qtfreet.musicuu.model.Constant;
2 |
3 | import android.os.Environment;
4 |
5 | /**
6 | * Created by qtfreet00 on 2016/8/17.
7 | */
8 | public class Constants {
9 | public static final String NAME = "name";
10 | public static final String URL = "url";
11 | public static final String KEY = "key";
12 | public static final String TYPE = "type";
13 | public static final String MUSICUU_PREF = "com.qtfreet.musicuu_preferences";
14 | public static final String SAVE_PATH = "SavePath";
15 | public static final String AUTO_CHECK = "AutoCheck";
16 | public static final String IS_FIRST_RUN = "isfirst";
17 | public static final String SONG_ID = "songid";
18 | public static final String PLAY_URLS = "playSongs";
19 | public static final String PLAY_LRCS = "playlrc";
20 | public static final String PLAY_NAMES = "playname";
21 | public static final String POSITION = "position";
22 | public static final String MUSIC_HOST = "http://api.itwusun.com/music/search/%s/1?format=json&sign=a5cc0a8797539d3a1a4f7aeca5b695b9&keyword=%s";
23 | public static final String lyricPath = Environment.getExternalStorageDirectory() + "/LyricDemo/lyric/";
24 | public static final String YinyueTai = "keyword";
25 | public static final String IS_FIRST_SEARCH = "issearch";
26 | }
27 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in F:\sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 | #okhttputils
19 | -dontwarn com.zhy.http.**
20 | -keep class com.zhy.http.**{*;}
21 | -keep interface com.zhy.http.**{*;}
22 |
23 | #okhttp
24 | -dontwarn okhttp3.**
25 | -keep class okhttp3.**{*;}
26 | -keep interface okhttp3.**{*;}
27 |
28 | #okio
29 | -dontwarn okio.**
30 | -keep class okio.**{*;}
31 | -keep interface okio.**{*;}
32 |
33 | -dontwarn com.squareup.okhttp.**
34 | -keep class io.vov.utils.** { *; }
35 | -keep class io.vov.vitamio.** { *; }
36 | -keep class butterknife.** { *; }
37 | -dontwarn butterknife.internal.**
38 | -keep class **$$ViewBinder { *; }
39 |
40 | -keepclasseswithmembernames class * {
41 | @butterknife.* ;
42 | }
43 |
44 | -keepclasseswithmembernames class * {
45 | @butterknife.* ;
46 | }
--------------------------------------------------------------------------------
/app/src/main/res/menu/music_type.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/java/com/qtfreet/musicuu/ui/BaseApplication.java:
--------------------------------------------------------------------------------
1 | package com.qtfreet.musicuu.ui;
2 |
3 | import android.app.Application;
4 |
5 | import com.liulishuo.filedownloader.FileDownloader;
6 | import com.liulishuo.filedownloader.connection.FileDownloadUrlConnection;
7 | import com.liulishuo.filedownloader.services.DownloadMgrInitialParams;
8 | import com.qtfreet.musicuu.model.Constant.Constants;
9 | import com.tencent.bugly.crashreport.CrashReport;
10 | import com.yanzhenjie.nohttp.OkHttpNetworkExecutor;
11 | import com.yolanda.nohttp.NoHttp;
12 |
13 | import java.io.File;
14 | import java.net.Proxy;
15 |
16 | /**
17 | * Created by qtfreet on 2016/3/21.
18 | */
19 | public class BaseApplication extends Application {
20 | @Override
21 | public void onCreate() {
22 | super.onCreate();
23 | CrashReport.initCrashReport(getApplicationContext(), "900055380", false);
24 | File file = new File(Constants.lyricPath);
25 | if (!file.exists()) {
26 | file.mkdirs();
27 | }
28 | NoHttp.initialize(this, new NoHttp.Config().setConnectTimeout(30000).setReadTimeout(30000).setNetworkExecutor(new OkHttpNetworkExecutor()));
29 | FileDownloader.init(getApplicationContext(), new DownloadMgrInitialParams.InitCustomMaker().connectionCreator(new FileDownloadUrlConnection.Creator(new FileDownloadUrlConnection.Configuration().connectTimeout(15_000).readTimeout(15_000).proxy(Proxy.NO_PROXY))));
30 | FileDownloader.setGlobalPost2UIInterval(1000);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/app/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | 音乐助手
3 | 设置
4 | 首页
5 | AutoCheck
6 | 设置
7 | SavePath
8 | ⋮
9 | 正在下载:%1$d%%
10 | 欢迎使用此软件,你需要知道的:\n1.由于初衷只是个音乐搜索下载工具,所以本软件不支持后台播放音乐。\n2.右上角菜单栏可以对软件进行设置。\n3.右下角的"+"可以设置搜索的音乐源。\nPS:本软件纯属个人作品,有任何bug可以通过摇一摇反馈给我
11 | 1.左滑菜单可以进行下载和观看mv\n2.默认下载音质为最高音质
12 | 你还没有输入歌曲名字呢
13 | 温馨提示
14 | 知道了
15 | 未找到播放链接
16 | 网易云音乐
17 | QQ音乐
18 | 酷狗音乐
19 | 酷我音乐
20 | 天天动听
21 | 虾米星球
22 | 百度音乐
23 | 爱音乐
24 | 音悦台
25 | 选择音乐源
26 | 程序设计:qtfreet00
27 | Logo设计:Hiapk-天使
28 | 音乐助手本着开源开发的一款工具类App,请勿将此软件用于任何非法用途,本软件仅供学习交流,使用此软件即代表默认遵守此声明,本人将不对此负任何法律责任!
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/app/src/main/java/com/qtfreet/musicuu/ui/view/RadioImageView.java:
--------------------------------------------------------------------------------
1 | package com.qtfreet.musicuu.ui.view;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.widget.ImageView;
6 |
7 | /**
8 | * Created by Bear on 2016/2/7.
9 | */
10 | public class RadioImageView extends ImageView {
11 | private int originalWidth;
12 | private int originalHeight;
13 |
14 | public RadioImageView(Context context) {
15 | super(context);
16 | }
17 |
18 | public RadioImageView(Context context, AttributeSet attrs) {
19 | super(context, attrs);
20 | }
21 |
22 | public RadioImageView(Context context, AttributeSet attrs, int defStyleAttr) {
23 | super(context, attrs, defStyleAttr);
24 | }
25 |
26 | public void setOriginalSize(int originalWidth, int originalHeight) {
27 | this.originalWidth = originalWidth;
28 | this.originalHeight = originalHeight;
29 | }
30 |
31 | @Override
32 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
33 | if (originalWidth > 0 && originalHeight > 0) {
34 | float ratio = (float) originalWidth / (float) originalHeight;
35 |
36 | int width = MeasureSpec.getSize(widthMeasureSpec);
37 | int height = MeasureSpec.getSize(heightMeasureSpec);
38 |
39 | // TODO: 现在只支持固定宽度
40 | if (width > 0) {
41 | height = (int) ((float) width / ratio);
42 | }
43 |
44 | setMeasuredDimension(width, height);
45 | } else {
46 | super.onMeasure(widthMeasureSpec, heightMeasureSpec);
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/app/src/main/java/com/qtfreet/musicuu/ui/service/MusicService.java:
--------------------------------------------------------------------------------
1 | package com.qtfreet.musicuu.ui.service;
2 |
3 | import android.app.Service;
4 | import android.content.Intent;
5 | import android.media.AudioManager;
6 | import android.media.MediaPlayer;
7 | import android.os.Binder;
8 | import android.os.IBinder;
9 | import android.support.annotation.Nullable;
10 |
11 | import java.io.IOException;
12 |
13 | /**
14 | * Created by qtfreet on 2016/3/23.
15 | */
16 | public class MusicService extends Service {
17 | MediaPlayer mp = null;
18 |
19 | @Override
20 | public void onCreate() {
21 |
22 | }
23 |
24 | @Override
25 | public int onStartCommand(Intent intent, int flags, int startId) {
26 | try {
27 | mp = new MediaPlayer();
28 | mp.setDataSource("");
29 | mp.prepare();
30 |
31 | } catch (IllegalArgumentException e) {
32 | // TODO Auto-generated catch block
33 | e.printStackTrace();
34 | } catch (SecurityException e) {
35 | // TODO Auto-generated catch block
36 | e.printStackTrace();
37 | } catch (IllegalStateException e) {
38 | // TODO Auto-generated catch block
39 | e.printStackTrace();
40 | } catch (IOException e) {
41 | e.printStackTrace();
42 | }
43 | return START_NOT_STICKY;
44 | }
45 |
46 | @Nullable
47 | @Override
48 | public IBinder onBind(Intent intent) {
49 | return null;
50 | }
51 |
52 |
53 | @Override
54 | public void onDestroy() {
55 | if (mp.isPlaying()) {
56 | mp.stop();
57 | mp.release();
58 | mp = null;
59 | }
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/preference_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
16 |
17 |
27 |
28 |
36 |
37 |
38 |
39 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 | apply plugin: 'com.neenbedankt.android-apt'
3 | android {
4 | compileSdkVersion 25
5 | buildToolsVersion "25.0.0"
6 |
7 | defaultConfig {
8 | applicationId "com.qtfreet.musicuu"
9 | minSdkVersion 16
10 | targetSdkVersion 25
11 | versionCode 25
12 | versionName "1.2.5"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 |
23 | dependencies {
24 | compile fileTree(include: ['*.jar'], dir: 'libs')
25 | testCompile 'junit:junit:4.12'
26 | compile 'com.android.support:appcompat-v7:25.1.0'
27 | compile 'com.android.support:design:25.1.0'
28 | compile 'com.jakewharton:butterknife:7.0.1'
29 | compile 'com.android.support:cardview-v7:25.1.0'
30 | compile 'com.squareup.picasso:picasso:2.5.2'
31 |
32 | apt 'com.zhy:mpermission-compiler:1.0.0'
33 | compile 'com.zhy:mpermission-api:1.0.0'
34 | compile 'com.nineoldandroids:library:2.4.0'
35 | compile 'com.liulishuo.filedownloader:library:1.4.1'
36 | compile 'top.zibin:BottomDialog:1.0.4'
37 |
38 | compile 'cn.pedant.sweetalert:library:1.3'
39 | compile 'com.dou361.ijkplayer:jjdxm-ijkplayer:1.0.6'
40 | compile 'tv.danmaku.ijk.media:ijkplayer-x86:0.7.5'
41 | compile 'com.yanzhenjie:recyclerview-swipe:1.0.2'
42 | compile files('lib/AutoUpdate_SDK.jar')
43 | compile files('lib/Sunflower.jar')
44 | compile 'com.tencent.bugly:crashreport:latest.release'
45 | compile 'com.blankj:utilcode:1.3.4'
46 | compile 'com.yolanda.nohttp:nohttp:1.1.0'
47 | compile 'com.yanzhenjie.nohttp:okhttp:1.1.0'
48 | compile 'com.alibaba:fastjson:1.1.55.android'
49 | compile ('com.dou361.dialogui:jjdxm-dialogui:1.0.3')
50 | }
51 |
--------------------------------------------------------------------------------
/app/src/main/java/com/qtfreet/musicuu/musicApi/MusicBean/tx/TencentGetKey.java:
--------------------------------------------------------------------------------
1 | package com.qtfreet.musicuu.musicApi.MusicBean.tx;
2 |
3 | import java.util.List;
4 |
5 | /**
6 | * Created by qtfreet on 2017/2/6.
7 | */
8 | public class TencentGetKey {
9 |
10 | /**
11 | * code : 0
12 | * sip : ["http://58.221.77.143/streamoc.music.tc.qq.com/","http://dl.stream.qqmusic.qq.com/","http://isure.stream.qqmusic.qq.com/"]
13 | * thirdip : ["http://thirdparty.gtimg.com/abcd1234/","http://thirdparty.gtimg.com/abcd1234/"]
14 | * testfile2g : C100003mAan70zUy5O.m4a
15 | * testfilewifi : C100003mAan70zUy5O.m4a
16 | * key : 4C2CFFDE791310F0E07C0353AB0B40E7DFE1196AA8B158DBA90520C01326DEB338B9195135FC76C15BA30E51E2B7287FEC8F2CFCED676DD7
17 | */
18 |
19 | private int code;
20 | private String testfile2g;
21 | private String testfilewifi;
22 | private String key;
23 | private List sip;
24 | private List thirdip;
25 |
26 | public int getCode() {
27 | return code;
28 | }
29 |
30 | public void setCode(int code) {
31 | this.code = code;
32 | }
33 |
34 | public String getTestfile2g() {
35 | return testfile2g;
36 | }
37 |
38 | public void setTestfile2g(String testfile2g) {
39 | this.testfile2g = testfile2g;
40 | }
41 |
42 | public String getTestfilewifi() {
43 | return testfilewifi;
44 | }
45 |
46 | public void setTestfilewifi(String testfilewifi) {
47 | this.testfilewifi = testfilewifi;
48 | }
49 |
50 | public String getKey() {
51 | return key;
52 | }
53 |
54 | public void setKey(String key) {
55 | this.key = key;
56 | }
57 |
58 | public List getSip() {
59 | return sip;
60 | }
61 |
62 | public void setSip(List sip) {
63 | this.sip = sip;
64 | }
65 |
66 | public List getThirdip() {
67 | return thirdip;
68 | }
69 |
70 | public void setThirdip(List thirdip) {
71 | this.thirdip = thirdip;
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/preferences.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
16 |
22 |
23 |
24 |
25 |
26 |
29 |
32 |
35 |
36 |
37 |
45 |
46 |
47 |
50 |
53 |
54 |
57 |
58 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/app/src/main/java/com/qtfreet/musicuu/musicApi/MusicService/Util.java:
--------------------------------------------------------------------------------
1 | package com.qtfreet.musicuu.musicApi.MusicService;
2 |
3 | import java.io.UnsupportedEncodingException;
4 | import java.net.URLEncoder;
5 | import java.security.MessageDigest;
6 | import java.security.NoSuchAlgorithmException;
7 | import java.util.regex.Matcher;
8 | import java.util.regex.Pattern;
9 |
10 | /**
11 | * Created by qtfreet on 2017/2/6.
12 | */
13 | public class Util {
14 | //将秒数转为时间
15 | public static String secTotime(int seconds) {
16 |
17 | int temp;
18 | StringBuilder sb = new StringBuilder();
19 | temp = seconds / 3600;
20 | sb.append((temp < 10) ? "0" + temp + ":" : "" + temp + ":");
21 |
22 | temp = seconds % 3600 / 60;
23 | sb.append((temp < 10) ? "0" + temp + ":" : "" + temp + ":");
24 |
25 | temp = seconds % 3600 % 60;
26 | sb.append((temp < 10) ? "0" + temp : "" + temp);
27 | return sb.toString();
28 | }
29 |
30 | public static String UrlEncode(String str) {
31 | try {
32 | return URLEncoder.encode(str, "UTF-8");
33 | } catch (UnsupportedEncodingException e) {
34 | return "";
35 | }
36 | }
37 |
38 |
39 | public static String RegexString(String regex, String text) {
40 | Pattern pattern = Pattern.compile(regex);
41 | Matcher matcher = pattern.matcher(text);
42 | if (matcher.find()) {
43 | return matcher.group(0);
44 | }
45 | return "";
46 | }
47 |
48 | public static boolean isNumber(String text) {
49 | return Pattern.matches("^\\d+$", text);
50 | }
51 |
52 |
53 | public static String getMD5(String sourceStr) {
54 | String result = "";
55 | try {
56 | MessageDigest md = MessageDigest.getInstance("MD5");
57 | md.update(sourceStr.getBytes());
58 | byte b[] = md.digest();
59 | int i;
60 | StringBuilder buf = new StringBuilder("");
61 | for (byte aB : b) {
62 | i = aB;
63 | if (i < 0)
64 | i += 256;
65 | if (i < 16)
66 | buf.append("0");
67 | buf.append(Integer.toHexString(i));
68 | }
69 | result = buf.toString();
70 | } catch (NoSuchAlgorithmException e) {
71 | }
72 | return result;
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_music_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
16 |
17 |
22 |
23 |
28 |
29 |
44 |
45 |
56 |
57 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/app/src/main/java/com/qtfreet/musicuu/ui/BaseActivity.java:
--------------------------------------------------------------------------------
1 | package com.qtfreet.musicuu.ui;
2 |
3 | import android.os.Bundle;
4 | import android.support.v7.app.AppCompatActivity;
5 | import android.support.v7.widget.Toolbar;
6 | import android.transition.Fade;
7 | import android.transition.Slide;
8 | import android.view.KeyEvent;
9 | import android.view.MenuItem;
10 | import android.widget.TextView;
11 |
12 | import com.qtfreet.musicuu.R;
13 |
14 | import butterknife.Bind;
15 |
16 | /**
17 | * Created by qtfreet00 on 2016/9/1.
18 | */
19 | public abstract class BaseActivity extends AppCompatActivity {
20 |
21 | @Override
22 | protected void onCreate(Bundle savedInstanceState) {
23 | super.onCreate(savedInstanceState);
24 | initView(savedInstanceState);
25 | }
26 |
27 | public abstract void initView(Bundle savedInstanceState);
28 |
29 |
30 | protected void setTitleName(String id, boolean isCanBack) {
31 |
32 | if (toolbar != null) {
33 | setSupportActionBar(toolbar);
34 | if (toolbarTitle != null) {
35 | getSupportActionBar().setDisplayShowTitleEnabled(false);
36 | getSupportActionBar().setDisplayHomeAsUpEnabled(isCanBack);
37 | toolbarTitle.setText(id);
38 | }
39 | }
40 | }
41 |
42 | protected void setupWindowAnimations() {
43 | if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {
44 | Slide slide = new Slide();
45 | slide.setDuration(1000);
46 | getWindow().setExitTransition(slide);
47 | Fade fade = new Fade();
48 | fade.setDuration(1000);
49 | getWindow().setReenterTransition(fade);
50 | }
51 | }
52 |
53 | @Bind(R.id.toolbar)
54 | Toolbar toolbar;
55 | @Bind(R.id.title_name)
56 | TextView toolbarTitle;
57 |
58 | @Override
59 | public boolean onOptionsItemSelected(MenuItem item) {
60 | int id = item.getItemId();
61 |
62 | if (id == android.R.id.home) {
63 | this.finish();
64 | }
65 | return super.onOptionsItemSelected(item);
66 | }
67 |
68 | @Override
69 | public boolean onKeyDown(int keyCode, KeyEvent event) {
70 |
71 | if (keyCode == KeyEvent.KEYCODE_BACK
72 | && event.getRepeatCount() == 0) {
73 | finish();
74 | return true;
75 | }
76 | return super.onKeyDown(keyCode, event);
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/app/src/main/java/com/qtfreet/musicuu/musicApi/MusicBean/kg/KugouMp3Url.java:
--------------------------------------------------------------------------------
1 | package com.qtfreet.musicuu.musicApi.MusicBean.kg;
2 |
3 | /**
4 | * Created by qtfreet on 2017/2/7.
5 | */
6 | public class KugouMp3Url {
7 |
8 | /**
9 | * fileHead : 100
10 | * q : 0
11 | * fileSize : 9999673
12 | * fileName : 邓紫棋 - 泡沫
13 | * status : 1
14 | * url : http://fs.pc.kugou.com/201702071504/922dc1cc7de4b828527743026ae920bd/G009/M07/11/13/qYYBAFUKnZyAXz_5AJiVOX_ICZY421.mp3
15 | * extName : mp3
16 | * bitRate : 320000
17 | * timeLength : 249
18 | */
19 |
20 | private int fileHead;
21 | private int q;
22 | private int fileSize;
23 | private String fileName;
24 | private int status;
25 | private String url;
26 | private String extName;
27 | private int bitRate;
28 | private int timeLength;
29 |
30 | public int getFileHead() {
31 | return fileHead;
32 | }
33 |
34 | public void setFileHead(int fileHead) {
35 | this.fileHead = fileHead;
36 | }
37 |
38 | public int getQ() {
39 | return q;
40 | }
41 |
42 | public void setQ(int q) {
43 | this.q = q;
44 | }
45 |
46 | public int getFileSize() {
47 | return fileSize;
48 | }
49 |
50 | public void setFileSize(int fileSize) {
51 | this.fileSize = fileSize;
52 | }
53 |
54 | public String getFileName() {
55 | return fileName;
56 | }
57 |
58 | public void setFileName(String fileName) {
59 | this.fileName = fileName;
60 | }
61 |
62 | public int getStatus() {
63 | return status;
64 | }
65 |
66 | public void setStatus(int status) {
67 | this.status = status;
68 | }
69 |
70 | public String getUrl() {
71 | return url;
72 | }
73 |
74 | public void setUrl(String url) {
75 | this.url = url;
76 | }
77 |
78 | public String getExtName() {
79 | return extName;
80 | }
81 |
82 | public void setExtName(String extName) {
83 | this.extName = extName;
84 | }
85 |
86 | public int getBitRate() {
87 | return bitRate;
88 | }
89 |
90 | public void setBitRate(int bitRate) {
91 | this.bitRate = bitRate;
92 | }
93 |
94 | public int getTimeLength() {
95 | return timeLength;
96 | }
97 |
98 | public void setTimeLength(int timeLength) {
99 | this.timeLength = timeLength;
100 | }
101 | }
102 |
--------------------------------------------------------------------------------
/app/src/main/java/com/qtfreet/musicuu/utils/PreferenceUtil.java:
--------------------------------------------------------------------------------
1 | package com.qtfreet.musicuu.utils;
2 |
3 | import android.content.Context;
4 | import android.content.SharedPreferences;
5 |
6 | /**
7 | * Created by MarioStudio on 2016/8/7.
8 | */
9 |
10 | public class PreferenceUtil {
11 |
12 | public static PreferenceUtil preferenceUtil;
13 | private static SharedPreferences preferences;
14 |
15 | public static final String KEY_TEXT_SIZE = "key.text.size";
16 | public static final String KEY_LINE_SPACE = "key.line.space";
17 | public static final String KEY_HIGHLIGHT_COLOR = "key.highlight.color";
18 |
19 | public PreferenceUtil() {
20 |
21 | }
22 |
23 | public static PreferenceUtil getInstance(Context context) {
24 | if (preferenceUtil == null) {
25 | preferenceUtil = new PreferenceUtil();
26 | initPreferenceUtil(context);
27 | }
28 | return preferenceUtil;
29 | }
30 |
31 | private static void initPreferenceUtil(Context context) {
32 | preferences = context.getSharedPreferences("LyricViewDemo", Context.MODE_PRIVATE);
33 | }
34 |
35 | public int getInt(String key, int defValue) {
36 | if (preferences != null) {
37 | return preferences.getInt(key, defValue);
38 | }
39 | return defValue;
40 | }
41 |
42 | public void putInt(String key, int value) {
43 | if (preferences != null) {
44 | SharedPreferences.Editor editor = preferences.edit();
45 | editor.putInt(key, value);
46 | editor.commit();
47 | }
48 | }
49 |
50 | public String getString(String key, String defValue) {
51 | if (preferences != null) {
52 | return preferences.getString(key, defValue);
53 | }
54 | return defValue;
55 | }
56 |
57 | public void putString(String key, String value) {
58 | if (preferences != null) {
59 | SharedPreferences.Editor editor = preferences.edit();
60 | editor.putString(key, value);
61 | editor.commit();
62 | }
63 | }
64 |
65 | public float getFloat(String key, float defValue) {
66 | if (preferences != null) {
67 | return preferences.getFloat(key, defValue);
68 | }
69 | return defValue;
70 | }
71 |
72 | public void putFloat(String key, float value) {
73 | if (preferences != null) {
74 | SharedPreferences.Editor editor = preferences.edit();
75 | editor.putFloat(key, value);
76 | editor.commit();
77 | }
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/app/src/main/java/com/qtfreet/musicuu/utils/FileUtils.java:
--------------------------------------------------------------------------------
1 | package com.qtfreet.musicuu.utils;
2 |
3 | /**
4 | * Created by qtfreet on 2016/3/24.
5 | */
6 |
7 | import android.os.Environment;
8 |
9 | import java.io.File;
10 | import java.io.FileOutputStream;
11 | import java.io.IOException;
12 | import java.io.InputStream;
13 | import java.io.OutputStream;
14 |
15 | public class FileUtils {
16 |
17 |
18 | private static class FileUtilsLoader {
19 | private static final FileUtils INSTANCE = new FileUtils();
20 | }
21 |
22 | public static FileUtils getInstance() {
23 | return FileUtilsLoader.INSTANCE;
24 | }
25 |
26 | private String SDPATH;
27 |
28 | public boolean isSdCardAvailable() {
29 | return Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState());
30 | }
31 |
32 | public String getSDPATH() {
33 | return SDPATH;
34 | }
35 |
36 | public FileUtils() {
37 | //得到当前外部存储设备的目录
38 | // /SDCARD
39 | SDPATH = Environment.getExternalStorageDirectory() + "/";
40 | }
41 |
42 | /**
43 | * 在SD卡上创建文件
44 | *
45 | * @throws IOException
46 | */
47 | public File creatSDFile(String fileName) throws IOException {
48 | File file = new File(SDPATH + fileName);
49 | file.createNewFile();
50 | return file;
51 | }
52 |
53 | /**
54 | * 在SD卡上创建目录
55 | *
56 | * @param dirName
57 | */
58 | public File creatSDDir(String dirName) {
59 | File dir = new File(SDPATH + dirName);
60 | dir.mkdir();
61 | return dir;
62 | }
63 |
64 | /**
65 | * 判断SD卡上的文件夹是否存在
66 | */
67 | public boolean isFileExist(String fileName) {
68 | File file = new File(SDPATH + fileName);
69 | return file.exists();
70 | }
71 |
72 | /**
73 | * 将一个InputStream里面的数据写入到SD卡中
74 | */
75 | public File write2SDFromInput(String path, String fileName, InputStream input) {
76 | File file = null;
77 | OutputStream output = null;
78 | try {
79 | creatSDDir(path);
80 | file = creatSDFile(path + fileName);
81 | output = new FileOutputStream(file);
82 | byte buffer[] = new byte[4 * 1024];
83 | while ((input.read(buffer)) != -1) {
84 | output.write(buffer);
85 | }
86 | output.flush();
87 | } catch (Exception e) {
88 | e.printStackTrace();
89 | } finally {
90 | try {
91 | output.close();
92 | } catch (Exception e) {
93 | e.printStackTrace();
94 | }
95 | }
96 | return file;
97 | }
98 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/qtfreet/musicuu/musicApi/MusicBean/tt/TiantianLrc.java:
--------------------------------------------------------------------------------
1 | package com.qtfreet.musicuu.musicApi.MusicBean.tt;
2 |
3 | /**
4 | * Created by qtfreet on 2017/2/6.
5 | */
6 | public class TiantianLrc {
7 |
8 | /**
9 | * code : 1
10 | * data : {"lrc":"[ti:why]\n[ar:蔡健雅]\n[al:I DO BELIEVE]\n[by:mp3.91.com]\n[00:04.24]词-小寒 曲-黎沸挥\n[00:14.24]轻轻呼让玻璃窗起雾\n[00:17.54]玻璃窗起雾 就看不清楚\n[00:20.94]既然里外都看不清楚\n[00:24.46]就看不清楚 就继续模糊\n[00:28.27]有些人对爱太清楚 却得不到幸福\n[00:34.97]有些人对爱很模糊 却偏偏找到路\n[00:42.25]是否哭就会有人呵护\n[00:45.69]若不用呵护 就没理由哭\n[00:49.16]难道没有理由值得哭\n[00:52.61]就不用呵护 不值得安抚\n[00:56.25]你说没有你的呵护 她就会很无助\n[01:03.54]你说没有你的安抚 我才会不在乎\n[02:36.93][01:10.51]but why? 我的失落感到现在怎么好不起来\n[02:43.91][01:17.45]and why? 真爱只应该给那些软弱无助的女孩\n[02:50.40][01:24.42]oh why? 自由变成了一种虐待竟是如此难挨\n[02:57.99][01:31.57]哦爱 是否不该太慷慨 目送着你离开\n[02:08.83]想想不如就养只宠物\n[02:12.08]来陪我散步 来陪我看书\n[02:15.65]或者不如找一个候补\n[02:19.23]来陪我散步 来陪我跳舞\n[02:22.63]只是门被回忆堵住 谁能帮我铲除\n[02:29.72]而如今占据了一屋 是你留的孤独\n"}
11 | */
12 |
13 | private int code;
14 | private DataBean data;
15 |
16 | public int getCode() {
17 | return code;
18 | }
19 |
20 | public void setCode(int code) {
21 | this.code = code;
22 | }
23 |
24 | public DataBean getData() {
25 | return data;
26 | }
27 |
28 | public void setData(DataBean data) {
29 | this.data = data;
30 | }
31 |
32 | public static class DataBean {
33 | /**
34 | * lrc : [ti:why]
35 | [ar:蔡健雅]
36 | [al:I DO BELIEVE]
37 | [by:mp3.91.com]
38 | [00:04.24]词-小寒 曲-黎沸挥
39 | [00:14.24]轻轻呼让玻璃窗起雾
40 | [00:17.54]玻璃窗起雾 就看不清楚
41 | [00:20.94]既然里外都看不清楚
42 | [00:24.46]就看不清楚 就继续模糊
43 | [00:28.27]有些人对爱太清楚 却得不到幸福
44 | [00:34.97]有些人对爱很模糊 却偏偏找到路
45 | [00:42.25]是否哭就会有人呵护
46 | [00:45.69]若不用呵护 就没理由哭
47 | [00:49.16]难道没有理由值得哭
48 | [00:52.61]就不用呵护 不值得安抚
49 | [00:56.25]你说没有你的呵护 她就会很无助
50 | [01:03.54]你说没有你的安抚 我才会不在乎
51 | [02:36.93][01:10.51]but why? 我的失落感到现在怎么好不起来
52 | [02:43.91][01:17.45]and why? 真爱只应该给那些软弱无助的女孩
53 | [02:50.40][01:24.42]oh why? 自由变成了一种虐待竟是如此难挨
54 | [02:57.99][01:31.57]哦爱 是否不该太慷慨 目送着你离开
55 | [02:08.83]想想不如就养只宠物
56 | [02:12.08]来陪我散步 来陪我看书
57 | [02:15.65]或者不如找一个候补
58 | [02:19.23]来陪我散步 来陪我跳舞
59 | [02:22.63]只是门被回忆堵住 谁能帮我铲除
60 | [02:29.72]而如今占据了一屋 是你留的孤独
61 |
62 | */
63 |
64 | private String lrc;
65 |
66 | public String getLrc() {
67 | return lrc;
68 | }
69 |
70 | public void setLrc(String lrc) {
71 | this.lrc = lrc;
72 | }
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/view_setting.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
23 |
24 |
38 |
39 |
43 |
44 |
50 |
51 |
55 |
56 |
57 |
58 |
62 |
63 |
71 |
--------------------------------------------------------------------------------
/app/src/main/java/com/qtfreet/musicuu/ui/activity/VideoActivity.java:
--------------------------------------------------------------------------------
1 | package com.qtfreet.musicuu.ui.activity;
2 |
3 | import android.os.Bundle;
4 | import android.support.v7.app.AppCompatActivity;
5 | import android.text.TextUtils;
6 | import android.view.View;
7 | import android.widget.Toast;
8 |
9 | import com.dou361.ijkplayer.listener.OnPlayerBackListener;
10 | import com.dou361.ijkplayer.widget.PlayerView;
11 | import com.iflytek.sunflower.FlowerCollector;
12 | import com.qtfreet.musicuu.R;
13 | import com.qtfreet.musicuu.model.Constant.Constants;
14 |
15 | public class VideoActivity extends AppCompatActivity {
16 | private PlayerView player;
17 | private View rootView;
18 |
19 | @Override
20 | protected void onCreate(Bundle savedInstanceState) {
21 | super.onCreate(savedInstanceState);
22 | rootView = getLayoutInflater().from(this).inflate(R.layout.simple_player_view_player, null);
23 | setContentView(rootView);
24 | String videoName = getIntent().getExtras().getString(Constants.NAME);
25 | String url = getIntent().getExtras().getString(Constants.URL);
26 | if (TextUtils.isEmpty(videoName) || TextUtils.isEmpty(url)) {
27 | Toast.makeText(this, "播放链接无效~", Toast.LENGTH_SHORT).show();
28 | return;
29 | }
30 | player = new PlayerView(this, rootView)
31 |
32 | .setTitle(videoName)
33 | .setOnlyFullScreen(true)
34 | .forbidTouch(false)
35 | .hideMenu(true)
36 | .setPlaySource("默认", url).setShowSpeed(true)
37 | .setPlayerBackListener(new OnPlayerBackListener() {
38 | @Override
39 | public void onPlayerBack() {
40 | //这里可以简单播放器点击返回键
41 | finish();
42 | }
43 | })
44 | .startPlay();
45 |
46 | }
47 |
48 | @Override
49 | protected void onPause() {
50 | super.onPause();
51 | FlowerCollector.onPause(this);
52 | if (player != null) {
53 | player.onPause();
54 | }
55 | }
56 |
57 |
58 | @Override
59 | protected void onResume() {
60 | super.onResume();
61 | FlowerCollector.onResume(this);
62 | if (player != null) {
63 | player.onResume();
64 | }
65 | }
66 |
67 | @Override
68 | protected void onDestroy() {
69 | super.onDestroy();
70 | if (player != null) {
71 | player.onDestroy();
72 | }
73 | }
74 |
75 | @Override
76 | public void onBackPressed() {
77 | if (player != null && player.onBackPressed()) {
78 | return;
79 | }
80 | super.onBackPressed();
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/app/src/main/java/com/qtfreet/musicuu/musicApi/MusicBean/tx/TencentMvKey.java:
--------------------------------------------------------------------------------
1 | package com.qtfreet.musicuu.musicApi.MusicBean.tx;
2 |
3 | /**
4 | * Created by qtfreet00 on 2017/2/6.
5 | */
6 | public class TencentMvKey {
7 |
8 | /**
9 | * br : 81263.39
10 | * ct : 21600
11 | * filename : l0016uppwku.p1302.mp4
12 | * ip : 49.75.61.109
13 | * key : E3F13E0FDD85EDD44AEC0463F0DEC4A27FE3415D2F62B9F13121A5C0B29184FC40BEFC46D8C527FE00D72822DA9FC06C4165469FC8F40C3B131C017B851F0E92220F6D2A938401D7A3353E8BB6C131CC874C295485A0BC07443BF648A3CDA3C5
14 | * keyid : l0016uppwku.11302.1
15 | * level : 0
16 | * levelvalid : 1
17 | * s : o
18 | * sp : 0
19 | * sr : 0
20 | */
21 |
22 | private double br;
23 | private int ct;
24 | private String filename;
25 | private String ip;
26 | private String key;
27 | private String keyid;
28 | private int level;
29 | private int levelvalid;
30 | private String s;
31 | private int sp;
32 | private int sr;
33 |
34 | public double getBr() {
35 | return br;
36 | }
37 |
38 | public void setBr(double br) {
39 | this.br = br;
40 | }
41 |
42 | public int getCt() {
43 | return ct;
44 | }
45 |
46 | public void setCt(int ct) {
47 | this.ct = ct;
48 | }
49 |
50 | public String getFilename() {
51 | return filename;
52 | }
53 |
54 | public void setFilename(String filename) {
55 | this.filename = filename;
56 | }
57 |
58 | public String getIp() {
59 | return ip;
60 | }
61 |
62 | public void setIp(String ip) {
63 | this.ip = ip;
64 | }
65 |
66 | public String getKey() {
67 | return key;
68 | }
69 |
70 | public void setKey(String key) {
71 | this.key = key;
72 | }
73 |
74 | public String getKeyid() {
75 | return keyid;
76 | }
77 |
78 | public void setKeyid(String keyid) {
79 | this.keyid = keyid;
80 | }
81 |
82 | public int getLevel() {
83 | return level;
84 | }
85 |
86 | public void setLevel(int level) {
87 | this.level = level;
88 | }
89 |
90 | public int getLevelvalid() {
91 | return levelvalid;
92 | }
93 |
94 | public void setLevelvalid(int levelvalid) {
95 | this.levelvalid = levelvalid;
96 | }
97 |
98 | public String getS() {
99 | return s;
100 | }
101 |
102 | public void setS(String s) {
103 | this.s = s;
104 | }
105 |
106 | public int getSp() {
107 | return sp;
108 | }
109 |
110 | public void setSp(int sp) {
111 | this.sp = sp;
112 | }
113 |
114 | public int getSr() {
115 | return sr;
116 | }
117 |
118 | public void setSr(int sr) {
119 | this.sr = sr;
120 | }
121 | }
122 |
--------------------------------------------------------------------------------
/app/src/main/java/com/qtfreet/musicuu/ui/adapter/MvDetailAdatper.java:
--------------------------------------------------------------------------------
1 | package com.qtfreet.musicuu.ui.adapter;
2 |
3 | import android.content.Context;
4 | import android.support.v7.widget.RecyclerView;
5 | import android.text.TextUtils;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 | import android.widget.TextView;
10 |
11 |
12 | import com.qtfreet.musicuu.R;
13 | import com.qtfreet.musicuu.model.Bean.YinyueTai.MvBean;
14 | import com.qtfreet.musicuu.model.OnVideoClickListener;
15 | import com.qtfreet.musicuu.ui.view.RadioImageView;
16 | import com.squareup.picasso.Picasso;
17 |
18 |
19 | import java.util.List;
20 |
21 | import butterknife.Bind;
22 | import butterknife.ButterKnife;
23 |
24 |
25 | public class MvDetailAdatper extends RecyclerView.Adapter {
26 |
27 | private Context mContext;
28 | private List mvBean;
29 |
30 | private OnVideoClickListener onVideoClickListener;
31 |
32 | public MvDetailAdatper(Context mContext, List imageInfos) {
33 | this.mContext = mContext;
34 | this.mvBean = imageInfos;
35 | }
36 |
37 | @Override
38 | public VideoViewHodler onCreateViewHolder(ViewGroup parent, int viewType) {
39 | View view = LayoutInflater.from(mContext).inflate(R.layout.searchmv_layout, parent, false);
40 |
41 | return new VideoViewHodler(view);
42 | }
43 |
44 | @Override
45 | public void onBindViewHolder(VideoViewHodler holder, int position) {
46 |
47 | loadImage(holder, mvBean.get(position));
48 | }
49 |
50 | private void loadImage(VideoViewHodler holder, MvBean.DataBean Info) {
51 | String postImg = Info.getAlbumImg();
52 | String recImg = Info.getRecommendPic();
53 | String pic;
54 | if (recImg == null) {
55 | pic = postImg;
56 | } else {
57 | pic = recImg;
58 | }
59 | if (!TextUtils.isEmpty(pic)) {
60 | Picasso.with(mContext).load(pic).into(holder.iv);
61 | } else {
62 | // Picasso.with(mContext).load(R.mipmap.icon).fit().into(holder.iv);
63 |
64 | }
65 | holder.des.setText(Info.getTitle());
66 |
67 | }
68 |
69 | @Override
70 | public int getItemCount() {
71 | return mvBean.size();
72 | }
73 |
74 | class VideoViewHodler extends RecyclerView.ViewHolder {
75 | @Bind(R.id.des)
76 | TextView des;
77 | @Bind(R.id.iv_gril)
78 | RadioImageView iv;
79 |
80 |
81 | public VideoViewHodler(View itemView) {
82 | super(itemView);
83 | ButterKnife.bind(this, itemView);
84 | itemView.setOnClickListener(new View.OnClickListener() {
85 | @Override
86 | public void onClick(View v) {
87 | onVideoClickListener.click(v, getAdapterPosition());
88 | }
89 | });
90 | }
91 | }
92 |
93 | public void setOnVideoClickListener(OnVideoClickListener listener) {
94 | this.onVideoClickListener = listener;
95 | }
96 |
97 | }
98 |
--------------------------------------------------------------------------------
/app/src/main/java/com/qtfreet/musicuu/ui/adapter/SongDetailAdapter.java:
--------------------------------------------------------------------------------
1 | package com.qtfreet.musicuu.ui.adapter;
2 |
3 | import android.content.Context;
4 | import android.support.v7.widget.RecyclerView;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 | import android.widget.ImageView;
9 | import android.widget.RelativeLayout;
10 | import android.widget.TextView;
11 |
12 | import com.blankj.utilcode.utils.ConvertUtils;
13 | import com.qtfreet.musicuu.R;
14 | import com.qtfreet.musicuu.model.Bean.MusicUU.resultBean;
15 | import com.qtfreet.musicuu.model.OnMusicClickListener;
16 | import com.qtfreet.musicuu.musicApi.MusicService.SongResult;
17 | import com.squareup.picasso.Picasso;
18 | import com.yanzhenjie.recyclerview.swipe.SwipeMenuAdapter;
19 |
20 | import java.util.List;
21 |
22 | import butterknife.Bind;
23 | import butterknife.ButterKnife;
24 |
25 |
26 | public class SongDetailAdapter extends SwipeMenuAdapter {
27 | private OnMusicClickListener onItemClickListener;
28 | private List mSongs;
29 | private Context mContext;
30 |
31 | public void setOnMusicClickListener(OnMusicClickListener listener) {
32 | this.onItemClickListener = listener;
33 | }
34 |
35 | public SongDetailAdapter(Context context, List
36 | songs) {
37 | mSongs = songs;
38 | mContext = context;
39 | }
40 |
41 | @Override
42 | public View onCreateContentView(ViewGroup parent, int viewType) {
43 | return LayoutInflater.
44 | from(parent.getContext()).
45 | inflate(R.layout.item_music_list, parent, false);
46 | }
47 |
48 | @Override
49 | public ViewHolder onCompatCreateViewHolder(View realContentView, int viewType) {
50 | return new ViewHolder(realContentView);
51 | }
52 |
53 |
54 | @Override
55 | public void onBindViewHolder(final ViewHolder holder, final int position) {
56 | final SongResult song = mSongs.get(position);
57 | String url = song.getPicUrl();
58 | holder.mImageView.setTag(url);
59 | int size = ConvertUtils.dp2px(mContext, 90);
60 | if (url != null) {
61 | if (!url.isEmpty()) {
62 | Picasso.with(mContext).load(url).resize(size, size).centerCrop().into(holder.mImageView);
63 | }
64 | }
65 | holder.mSongName.setText(song.getSongName());
66 | holder.mSinger.setText(song.getArtistName() + "-" + song.getAlbumName());
67 | }
68 |
69 |
70 | @Override
71 | public int getItemCount() {
72 | return mSongs.size();
73 | }
74 |
75 |
76 | class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
77 |
78 | @Bind(R.id.rl_item_main)
79 | RelativeLayout mRelativeLayout;
80 | @Bind(R.id.iv_item_music)
81 | ImageView mImageView;
82 | @Bind(R.id.tv_item_song_name)
83 | TextView mSongName;
84 | @Bind(R.id.tv_item_singer)
85 | TextView mSinger;
86 |
87 |
88 | public ViewHolder(View itemView) {
89 | super(itemView);
90 | ButterKnife.bind(this, itemView);
91 | itemView.setOnClickListener(this);
92 | }
93 |
94 | @Override
95 | public void onClick(View view) {
96 | if (onItemClickListener != null) {
97 | onItemClickListener.Music(view, getAdapterPosition());
98 | }
99 | }
100 | }
101 |
102 |
103 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/qtfreet/musicuu/ui/activity/SettingsActivity.java:
--------------------------------------------------------------------------------
1 | package com.qtfreet.musicuu.ui.activity;
2 |
3 | import android.annotation.TargetApi;
4 | import android.app.FragmentManager;
5 | import android.os.Build;
6 | import android.os.Bundle;
7 | import android.preference.EditTextPreference;
8 | import android.preference.Preference;
9 | import android.preference.PreferenceFragment;
10 | import android.preference.PreferenceScreen;
11 |
12 | import com.iflytek.sunflower.FlowerCollector;
13 | import com.qtfreet.musicuu.R;
14 | import com.qtfreet.musicuu.model.Constant.Constants;
15 | import com.qtfreet.musicuu.ui.BaseActivity;
16 |
17 | import butterknife.ButterKnife;
18 |
19 |
20 | public class SettingsActivity extends BaseActivity {
21 |
22 | private SettingsFragment mSettingsFragment;
23 |
24 | @Override
25 | public void initView(Bundle savedInstanceState) {
26 | setContentView(R.layout.activity_settings);
27 |
28 | ButterKnife.bind(this);
29 | setTitleName("设置", true);
30 | if (savedInstanceState == null) {
31 | mSettingsFragment = new SettingsFragment();
32 | replaceFragment(R.id.settings_container, mSettingsFragment);
33 | }
34 | }
35 |
36 | @Override
37 | protected void onResume() {
38 | super.onResume();
39 | FlowerCollector.onResume(this);
40 | }
41 |
42 | @Override
43 | protected void onPause() {
44 | super.onPause();
45 | FlowerCollector.onPause(this);
46 | }
47 |
48 | @TargetApi(Build.VERSION_CODES.HONEYCOMB)
49 | public void replaceFragment(int viewId, android.app.Fragment fragment) {
50 | FragmentManager fragmentManager = getFragmentManager();
51 | fragmentManager.beginTransaction().replace(viewId, fragment).commit();
52 | }
53 |
54 | /**
55 | * A placeholder fragment containing a settings view.
56 | */
57 | public static class SettingsFragment extends PreferenceFragment implements Preference.OnPreferenceChangeListener {
58 |
59 | private EditTextPreference editTextPreference;
60 |
61 | @Override
62 | public void onCreate(Bundle savedInstanceState) {
63 | super.onCreate(savedInstanceState);
64 |
65 | addPreferencesFromResource(R.xml.preferences);
66 | editTextPreference = (EditTextPreference) getPreferenceManager().findPreference(Constants.SAVE_PATH);
67 | editTextPreference.setOnPreferenceChangeListener(this);
68 | String path = editTextPreference.getSharedPreferences().getString(Constants.SAVE_PATH, "");
69 | if (!path.equals("musicuu")) {
70 | editTextPreference.setSummary("当前保存在sd卡下的 " + path + " 文件夹下");
71 | }
72 | }
73 |
74 | @Override
75 | public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
76 | if (preference == editTextPreference) {
77 | editTextPreference.setText(editTextPreference.getSharedPreferences().getString(Constants.SAVE_PATH, ""));
78 | return true;
79 | }
80 | return super.onPreferenceTreeClick(preferenceScreen, preference);
81 | }
82 |
83 | @Override
84 | public boolean onPreferenceChange(Preference preference, Object newValue) {
85 | if (preference == editTextPreference) {
86 | editTextPreference.setSummary("当前保存在sd卡下的 " + newValue.toString() + " 文件夹下");
87 | return true;
88 | }
89 | // editTextPreference.getSharedPreferences().edit().putString("SavePath", newValue.toString()).commit();
90 |
91 | return false;
92 | }
93 | }
94 |
95 | }
96 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
33 |
34 |
35 |
38 |
41 |
42 |
43 |
44 |
45 |
49 |
50 |
51 |
52 |
53 |
54 |
59 |
60 |
65 |
66 |
70 |
71 |
76 |
81 |
82 |
85 |
86 |
91 |
92 |
93 |
94 |
95 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
13 |
14 |
18 |
19 |
28 |
29 |
30 |
41 |
42 |
55 |
56 |
64 |
65 |
66 |
67 |
68 |
77 |
78 |
88 |
89 |
90 |
91 |
99 |
100 |
101 |
--------------------------------------------------------------------------------
/app/src/main/java/com/qtfreet/musicuu/musicApi/MusicBean/kg/KugouPic.java:
--------------------------------------------------------------------------------
1 | package com.qtfreet.musicuu.musicApi.MusicBean.kg;
2 |
3 | /**
4 | * Created by qtfreet on 2017/2/7.
5 | */
6 | public class KugouPic {
7 |
8 | /**
9 | * status : 1
10 | * error :
11 | * data : {"albumname":"徐薇翻唱作品合集","publishtime":"2016-05-25 00:00:00","singername":"徐薇","intro":"徐薇·翻唱作品合集。","songcount":0,"imgurl":"http://imge.kugou.com/stdmusic/{size}/20160529/20160529210310343262.jpg","collectcount":0,"singerid":180071,"albumid":1918047,"sextype":0,"privilege":0}
12 | * errcode : 0
13 | */
14 |
15 | private int status;
16 | private String error;
17 | private DataBean data;
18 | private int errcode;
19 |
20 | public int getStatus() {
21 | return status;
22 | }
23 |
24 | public void setStatus(int status) {
25 | this.status = status;
26 | }
27 |
28 | public String getError() {
29 | return error;
30 | }
31 |
32 | public void setError(String error) {
33 | this.error = error;
34 | }
35 |
36 | public DataBean getData() {
37 | return data;
38 | }
39 |
40 | public void setData(DataBean data) {
41 | this.data = data;
42 | }
43 |
44 | public int getErrcode() {
45 | return errcode;
46 | }
47 |
48 | public void setErrcode(int errcode) {
49 | this.errcode = errcode;
50 | }
51 |
52 | public static class DataBean {
53 | /**
54 | * albumname : 徐薇翻唱作品合集
55 | * publishtime : 2016-05-25 00:00:00
56 | * singername : 徐薇
57 | * intro : 徐薇·翻唱作品合集。
58 | * songcount : 0
59 | * imgurl : http://imge.kugou.com/stdmusic/{size}/20160529/20160529210310343262.jpg
60 | * collectcount : 0
61 | * singerid : 180071
62 | * albumid : 1918047
63 | * sextype : 0
64 | * privilege : 0
65 | */
66 |
67 | private String albumname;
68 | private String publishtime;
69 | private String singername;
70 | private String intro;
71 | private int songcount;
72 | private String imgurl;
73 | private int collectcount;
74 | private int singerid;
75 | private int albumid;
76 | private int sextype;
77 | private int privilege;
78 |
79 | public String getAlbumname() {
80 | return albumname;
81 | }
82 |
83 | public void setAlbumname(String albumname) {
84 | this.albumname = albumname;
85 | }
86 |
87 | public String getPublishtime() {
88 | return publishtime;
89 | }
90 |
91 | public void setPublishtime(String publishtime) {
92 | this.publishtime = publishtime;
93 | }
94 |
95 | public String getSingername() {
96 | return singername;
97 | }
98 |
99 | public void setSingername(String singername) {
100 | this.singername = singername;
101 | }
102 |
103 | public String getIntro() {
104 | return intro;
105 | }
106 |
107 | public void setIntro(String intro) {
108 | this.intro = intro;
109 | }
110 |
111 | public int getSongcount() {
112 | return songcount;
113 | }
114 |
115 | public void setSongcount(int songcount) {
116 | this.songcount = songcount;
117 | }
118 |
119 | public String getImgurl() {
120 | return imgurl;
121 | }
122 |
123 | public void setImgurl(String imgurl) {
124 | this.imgurl = imgurl;
125 | }
126 |
127 | public int getCollectcount() {
128 | return collectcount;
129 | }
130 |
131 | public void setCollectcount(int collectcount) {
132 | this.collectcount = collectcount;
133 | }
134 |
135 | public int getSingerid() {
136 | return singerid;
137 | }
138 |
139 | public void setSingerid(int singerid) {
140 | this.singerid = singerid;
141 | }
142 |
143 | public int getAlbumid() {
144 | return albumid;
145 | }
146 |
147 | public void setAlbumid(int albumid) {
148 | this.albumid = albumid;
149 | }
150 |
151 | public int getSextype() {
152 | return sextype;
153 | }
154 |
155 | public void setSextype(int sextype) {
156 | this.sextype = sextype;
157 | }
158 |
159 | public int getPrivilege() {
160 | return privilege;
161 | }
162 |
163 | public void setPrivilege(int privilege) {
164 | this.privilege = privilege;
165 | }
166 | }
167 | }
168 |
--------------------------------------------------------------------------------
/app/src/main/java/com/qtfreet/musicuu/musicApi/MusicBean/wy/NeteaseSongUrl.java:
--------------------------------------------------------------------------------
1 | package com.qtfreet.musicuu.musicApi.MusicBean.wy;
2 |
3 | import java.util.List;
4 |
5 | /**
6 | * Created by qtfreet00 on 2017/2/3.
7 | */
8 | public class NeteaseSongUrl {
9 |
10 | /**
11 | * data : [{"id":451441156,"url":"http://m8.music.126.net/20170203203818/3b01a7c7b1f6fcb8ba91437fc2b4c680/ymusic/482b/c871/5558/27a2812fc38dceaad3d8d0561d4f4fe8.mp3","br":128000,"size":2661190,"md5":"27a2812fc38dceaad3d8d0561d4f4fe8","code":200,"expi":1200,"type":"mp3","gain":-1.05,"fee":0,"uf":null,"payed":0,"flag":0,"canExtend":false}]
12 | * code : 200
13 | */
14 |
15 | private int code;
16 | private List data;
17 |
18 | public int getCode() {
19 | return code;
20 | }
21 |
22 | public void setCode(int code) {
23 | this.code = code;
24 | }
25 |
26 | public List getData() {
27 | return data;
28 | }
29 |
30 | public void setData(List data) {
31 | this.data = data;
32 | }
33 |
34 | public static class DataBean {
35 | /**
36 | * id : 451441156
37 | * url : http://m8.music.126.net/20170203203818/3b01a7c7b1f6fcb8ba91437fc2b4c680/ymusic/482b/c871/5558/27a2812fc38dceaad3d8d0561d4f4fe8.mp3
38 | * br : 128000
39 | * size : 2661190
40 | * md5 : 27a2812fc38dceaad3d8d0561d4f4fe8
41 | * code : 200
42 | * expi : 1200
43 | * type : mp3
44 | * gain : -1.05
45 | * fee : 0
46 | * uf : null
47 | * payed : 0
48 | * flag : 0
49 | * canExtend : false
50 | */
51 |
52 | private int id;
53 | private String url;
54 | private int br;
55 | private int size;
56 | private String md5;
57 | private int code;
58 | private int expi;
59 | private String type;
60 | private double gain;
61 | private int fee;
62 | private Object uf;
63 | private int payed;
64 | private int flag;
65 | private boolean canExtend;
66 |
67 | public int getId() {
68 | return id;
69 | }
70 |
71 | public void setId(int id) {
72 | this.id = id;
73 | }
74 |
75 | public String getUrl() {
76 | return url;
77 | }
78 |
79 | public void setUrl(String url) {
80 | this.url = url;
81 | }
82 |
83 | public int getBr() {
84 | return br;
85 | }
86 |
87 | public void setBr(int br) {
88 | this.br = br;
89 | }
90 |
91 | public int getSize() {
92 | return size;
93 | }
94 |
95 | public void setSize(int size) {
96 | this.size = size;
97 | }
98 |
99 | public String getMd5() {
100 | return md5;
101 | }
102 |
103 | public void setMd5(String md5) {
104 | this.md5 = md5;
105 | }
106 |
107 | public int getCode() {
108 | return code;
109 | }
110 |
111 | public void setCode(int code) {
112 | this.code = code;
113 | }
114 |
115 | public int getExpi() {
116 | return expi;
117 | }
118 |
119 | public void setExpi(int expi) {
120 | this.expi = expi;
121 | }
122 |
123 | public String getType() {
124 | return type;
125 | }
126 |
127 | public void setType(String type) {
128 | this.type = type;
129 | }
130 |
131 | public double getGain() {
132 | return gain;
133 | }
134 |
135 | public void setGain(double gain) {
136 | this.gain = gain;
137 | }
138 |
139 | public int getFee() {
140 | return fee;
141 | }
142 |
143 | public void setFee(int fee) {
144 | this.fee = fee;
145 | }
146 |
147 | public Object getUf() {
148 | return uf;
149 | }
150 |
151 | public void setUf(Object uf) {
152 | this.uf = uf;
153 | }
154 |
155 | public int getPayed() {
156 | return payed;
157 | }
158 |
159 | public void setPayed(int payed) {
160 | this.payed = payed;
161 | }
162 |
163 | public int getFlag() {
164 | return flag;
165 | }
166 |
167 | public void setFlag(int flag) {
168 | this.flag = flag;
169 | }
170 |
171 | public boolean isCanExtend() {
172 | return canExtend;
173 | }
174 |
175 | public void setCanExtend(boolean canExtend) {
176 | this.canExtend = canExtend;
177 | }
178 | }
179 | }
180 |
--------------------------------------------------------------------------------
/app/src/main/java/com/qtfreet/musicuu/ui/view/CustomSettingView.java:
--------------------------------------------------------------------------------
1 | package com.qtfreet.musicuu.ui.view;
2 |
3 | import android.content.Context;
4 | import android.graphics.Color;
5 | import android.graphics.drawable.ShapeDrawable;
6 | import android.graphics.drawable.shapes.OvalShape;
7 | import android.util.AttributeSet;
8 | import android.util.TypedValue;
9 | import android.view.LayoutInflater;
10 | import android.view.MotionEvent;
11 | import android.view.View;
12 | import android.widget.LinearLayout;
13 | import android.widget.SeekBar;
14 | import android.widget.TextView;
15 |
16 | import com.qtfreet.musicuu.R;
17 | import com.qtfreet.musicuu.utils.PreferenceUtil;
18 |
19 | /**
20 | * Created by MarioStudio on 2016/8/1.
21 | */
22 |
23 | public class CustomSettingView extends LinearLayout {
24 |
25 | private TextView mDismissBtn;
26 | private SeekBar mTextSizeSeek;
27 | private SeekBar mLineSpaceSeek;
28 | private LinearLayout mColorLayout;
29 |
30 | private OnColorItemChangeListener colorItemChangeListener;
31 |
32 | private int colors[] = {Color.parseColor("#4FC5C7"), Color.parseColor("#F55064"), Color.parseColor("#262A3B"), Color.parseColor("#F2572D"), Color.parseColor("#97EC71"), Color.parseColor("#0EA8E3"), Color.parseColor("#F29C9C"), Color.parseColor("#5B4947"), Color.parseColor("#EFC028"), Color.parseColor("#DE9DD6")};
33 |
34 | public CustomSettingView(Context context) {
35 | super(context);
36 | initCustomSettingView();
37 | }
38 |
39 | public CustomSettingView(Context context, AttributeSet attrs) {
40 | super(context, attrs);
41 | initCustomSettingView();
42 | }
43 |
44 | public CustomSettingView(Context context, AttributeSet attrs, int defStyleAttr) {
45 | super(context, attrs, defStyleAttr);
46 | initCustomSettingView();
47 | }
48 |
49 | private void initCustomSettingView() {
50 | setOrientation(LinearLayout.VERTICAL);
51 | LayoutInflater.from(getContext()).inflate(R.layout.view_setting, this, true);
52 | initAllViews();
53 | }
54 |
55 | private void initAllViews() {
56 | setOnTouchListener(new CustomSettingViewTouchListener());
57 |
58 | mDismissBtn = (TextView) findViewById(R.id.btn_dismiss);
59 | mTextSizeSeek = (SeekBar) findViewById(R.id.seek_text_size);
60 | mLineSpaceSeek = (SeekBar) findViewById(R.id.seek_line_space);
61 | mColorLayout = (LinearLayout) findViewById(R.id.layout_color);
62 |
63 | mTextSizeSeek.setProgress((int) ((PreferenceUtil.getInstance(getContext()).getFloat(PreferenceUtil.KEY_TEXT_SIZE, 15.0f) - 15.0f) * 100 / 3.0f));
64 | mLineSpaceSeek.setProgress((int) ((PreferenceUtil.getInstance(getContext()).getFloat(PreferenceUtil.KEY_TEXT_SIZE, 12.0f) - 12.0f) * 100 / 3.0f));
65 | initColorLayout();
66 | }
67 |
68 | private void initColorLayout() {
69 | float width = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 48, getContext().getResources().getDisplayMetrics());
70 | mColorLayout.removeAllViews();
71 | for(int i = 0, size = colors.length; i < size; i ++) {
72 | ShapeDrawable shapeDrawable = new ShapeDrawable(new OvalShape());
73 | shapeDrawable.setBounds(0, 0, (int) width, (int) width);
74 | shapeDrawable.getPaint().setColor(colors[i]);
75 | View view = new View(getContext());
76 | view.setBackgroundDrawable(shapeDrawable);
77 | view.setTag(colors[i]);
78 | view.setOnClickListener(new ColorItemClickListener());
79 | MarginLayoutParams layoutParams = new LayoutParams((int) width, (int) width);
80 | layoutParams.setMargins((int) (width / 8), 0, (int) (width / 8), 0);
81 | mColorLayout.addView(view, layoutParams);
82 | }
83 | }
84 |
85 | private class CustomSettingViewTouchListener implements OnTouchListener {
86 |
87 | @Override
88 | public boolean onTouch(View view, MotionEvent event) {
89 | return true;
90 | }
91 | }
92 |
93 | private class ColorItemClickListener implements OnClickListener {
94 |
95 | @Override
96 | public void onClick(View view) {
97 | if(colorItemChangeListener != null) {
98 | colorItemChangeListener.onColorChanged((Integer) view.getTag());
99 | }
100 | }
101 | }
102 |
103 | public void setOnTextSizeChangeListener(SeekBar.OnSeekBarChangeListener seekBarChangeListener) {
104 | mTextSizeSeek.setOnSeekBarChangeListener(seekBarChangeListener);
105 | }
106 |
107 | public void setOnLineSpaceChangeListener(SeekBar.OnSeekBarChangeListener seekBarChangeListener) {
108 | mLineSpaceSeek.setOnSeekBarChangeListener(seekBarChangeListener);
109 | }
110 |
111 | public void setOnDismissBtnClickListener(OnClickListener clickListener) {
112 | mDismissBtn.setOnClickListener(clickListener);
113 | }
114 |
115 | public void setOnColorItemChangeListener(OnColorItemChangeListener colorItemChangeListener) {
116 | this.colorItemChangeListener = colorItemChangeListener;
117 | }
118 |
119 | public interface OnColorItemChangeListener {
120 | public void onColorChanged(int color);
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/app/src/main/java/com/qtfreet/musicuu/ui/view/CustomRelativeLayout.java:
--------------------------------------------------------------------------------
1 | package com.qtfreet.musicuu.ui.view;
2 |
3 | import android.animation.Animator;
4 | import android.animation.AnimatorListenerAdapter;
5 | import android.animation.AnimatorSet;
6 | import android.animation.ArgbEvaluator;
7 | import android.animation.ValueAnimator;
8 | import android.content.Context;
9 | import android.graphics.Color;
10 | import android.util.AttributeSet;
11 | import android.util.TypedValue;
12 | import android.view.MotionEvent;
13 | import android.view.View;
14 | import android.widget.RelativeLayout;
15 |
16 | import com.nineoldandroids.view.ViewHelper;
17 |
18 | /**
19 | * Created by MarioStudio on 2016/8/1.
20 | */
21 |
22 | public class CustomRelativeLayout extends RelativeLayout {
23 |
24 | private float height;
25 | private boolean mShowing;
26 |
27 | public CustomRelativeLayout(Context context) {
28 | super(context);
29 | initCustomRelativeLayout(context);
30 | }
31 |
32 | public CustomRelativeLayout(Context context, AttributeSet attrs) {
33 | super(context, attrs);
34 | initCustomRelativeLayout(context);
35 | }
36 |
37 | public CustomRelativeLayout(Context context, AttributeSet attrs, int defStyleAttr) {
38 | super(context, attrs, defStyleAttr);
39 | initCustomRelativeLayout(context);
40 | }
41 |
42 | private void initCustomRelativeLayout(Context context) {
43 | height = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 240, context.getResources().getDisplayMetrics());
44 | }
45 |
46 | @Override
47 | protected void onFinishInflate() {
48 | super.onFinishInflate();
49 | setOnTouchListener(new CustomRelativeLayoutTouchListener());
50 | doShow();
51 | }
52 |
53 | private class CustomRelativeLayoutTouchListener implements OnTouchListener {
54 |
55 | @Override
56 | public boolean onTouch(View view, MotionEvent event) {
57 | switch (event.getAction()) {
58 | case MotionEvent.ACTION_DOWN:
59 | doDismiss();
60 | break;
61 | }
62 | return true;
63 | }
64 | }
65 |
66 | public void show() {
67 | doShow();
68 | }
69 |
70 | public void dismiss() {
71 | doDismiss();
72 | }
73 |
74 | private void doShow() {
75 | setVisibility(View.INVISIBLE);
76 | ValueAnimator animator01 = ValueAnimator.ofFloat(1.0f, 0.0f);
77 | animator01.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
78 |
79 | @Override
80 | public void onAnimationUpdate(ValueAnimator animation) {
81 | doUpdate((Float) animation.getAnimatedValue());
82 | }
83 | });
84 | animator01.addListener(new AnimatorListenerAdapter() {
85 |
86 | @Override
87 | public void onAnimationStart(Animator animation) {
88 | super.onAnimationStart(animation);
89 | View child = getChildAt(0);
90 | ViewHelper.setTranslationY(child, height);
91 | setVisibility(View.VISIBLE);
92 | }
93 |
94 | @Override
95 | public void onAnimationEnd(Animator animation) {
96 | super.onAnimationEnd(animation);
97 | mShowing = false;
98 | }
99 | });
100 | ValueAnimator animator02 = ValueAnimator.ofObject(new ArgbEvaluator(), Color.TRANSPARENT, Color.parseColor("#A0000000"));
101 | animator02.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
102 |
103 | @Override
104 | public void onAnimationUpdate(ValueAnimator animation) {
105 | setBackgroundColor((Integer) animation.getAnimatedValue());
106 | }
107 | });
108 | AnimatorSet animatorSet = new AnimatorSet();
109 | animatorSet.play(animator01).with(animator02);
110 | animatorSet.setDuration(360);
111 | animatorSet.start();
112 | }
113 |
114 | private void doDismiss() {
115 | ValueAnimator animator01 = ValueAnimator.ofFloat(0.0f, 1.0f);
116 | animator01.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
117 |
118 | @Override
119 | public void onAnimationUpdate(ValueAnimator animation) {
120 | doUpdate((Float) animation.getAnimatedValue());
121 | }
122 | });
123 | animator01.addListener(new AnimatorListenerAdapter() {
124 |
125 | @Override
126 | public void onAnimationStart(Animator animation) {
127 | super.onAnimationStart(animation);
128 | View child = getChildAt(0);
129 | ViewHelper.setTranslationY(child, 0);
130 | setVisibility(View.VISIBLE);
131 | }
132 |
133 | @Override
134 | public void onAnimationEnd(Animator animation) {
135 | super.onAnimationEnd(animation);
136 | mShowing = false;
137 | setVisibility(View.GONE);
138 | }
139 | });
140 | ValueAnimator animator02 = ValueAnimator.ofObject(new ArgbEvaluator(), Color.parseColor("#A0000000"), Color.TRANSPARENT);
141 | animator02.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
142 |
143 | @Override
144 | public void onAnimationUpdate(ValueAnimator animation) {
145 | setBackgroundColor((Integer) animation.getAnimatedValue());
146 | }
147 | });
148 | AnimatorSet animatorSet = new AnimatorSet();
149 | animatorSet.play(animator01).with(animator02);
150 | animatorSet.setDuration(360);
151 | animatorSet.start();
152 | }
153 |
154 | private void doUpdate(float value) {
155 | View child = getChildAt(0);
156 | ViewHelper.setTranslationY(child, value * height);
157 | }
158 |
159 | public boolean isShowing() {
160 | return mShowing;
161 | }
162 | }
163 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_playm.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
13 |
14 |
18 |
19 |
31 |
32 |
37 |
38 |
42 |
43 |
52 |
53 |
63 |
64 |
65 |
71 |
72 |
81 |
82 |
97 |
98 |
107 |
108 |
109 |
114 |
115 |
121 |
122 |
132 |
133 |
139 |
140 |
141 |
142 |
147 |
148 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/autoupdate_dialog_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
15 |
16 |
22 |
23 |
32 |
33 |
43 |
44 |
45 |
52 |
53 |
57 |
58 |
68 |
69 |
70 |
71 |
72 |
73 |
80 |
81 |
89 |
90 |
97 |
107 |
108 |
109 |
110 |
111 |
119 |
120 |
127 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
--------------------------------------------------------------------------------
/app/src/main/java/com/qtfreet/musicuu/musicApi/MusicService/XmMusic.java:
--------------------------------------------------------------------------------
1 | package com.qtfreet.musicuu.musicApi.MusicService;
2 |
3 |
4 | import com.alibaba.fastjson.JSON;
5 | import com.qtfreet.musicuu.musicApi.MusicBean.xm.XiamiDatas;
6 | import com.qtfreet.musicuu.musicApi.MusicBean.xm.XiamiIds;
7 |
8 | import java.util.ArrayList;
9 | import java.util.List;
10 |
11 | /**
12 | * Created by qtfreet on 2017/2/8.
13 | */
14 | public class XmMusic implements IMusic {
15 | //虾米不支持mv和无损解析
16 | private static List search(String key, int page, int size) throws Exception {
17 | String url = "http://api.xiami.com/web?v=2.0&app_key=1&key=" + key + "&page=" + page + "&limit=" + size + "&r=search/songs";
18 | String s = NetUtil.GetHtmlWithRefer(url, "http://m.xiami.com");
19 | if (s.isEmpty()) {
20 | return null; //搜索歌曲失败
21 | }
22 | XiamiDatas xiamiDatas = JSON.parseObject(s, XiamiDatas.class);
23 | if (xiamiDatas == null) {
24 | return null;//没有找到符合的歌曲
25 | }
26 | int totalsize = xiamiDatas.getData().getTotal();
27 | return GetListByJson(xiamiDatas.getData().getSongs());
28 |
29 | }
30 |
31 | private static List GetListByJson(List songs) throws Exception {
32 | List list = new ArrayList<>();
33 | int len = songs.size();
34 | if (len <= 0) {
35 | return null;
36 | }
37 | int i = 0;
38 | while (i < len) {
39 | XiamiDatas.DataBean.SongsBean songsBean = songs.get(i);
40 | String SongId = String.valueOf(songsBean.getSong_id());
41 | SongResult songResult = SearchSong(SongId);
42 | if (songResult != null) {
43 | list.add(songResult);
44 | }
45 | i++;
46 | }
47 | return list;
48 | }
49 |
50 | private static SongResult GetResultsByIds(String ids, int type) {
51 | String albumUrl = "http://www.xiami.com/song/playlist/id/" + ids + "/type/" + type + "/cat/json";
52 | String html = NetUtil.GetHtmlContent(albumUrl);
53 | if (html.isEmpty() || html.contains("应版权方要求,没有歌曲可以播放")) {
54 | return null;
55 | }
56 | try {
57 | XiamiIds xiamiIds = JSON.parseObject(html, XiamiIds.class);
58 | List trackList = xiamiIds.getData().getTrackList();
59 | if (trackList == null) {
60 | return null;
61 | }
62 | XiamiIds.DataBean.TrackListBean trackListBean = trackList.get(0);
63 | SongResult song = new SongResult();
64 |
65 | String songId = trackListBean.getSong_id();
66 | String songName = trackListBean.getSongName();
67 | String songLink = "http://www.xiami.com/song/" + songId;
68 | String artistId = String.valueOf(trackListBean.getArtistId());
69 | String artistName = trackListBean.getSingers();
70 | String ablum = String.valueOf(trackListBean.getAlbumId());
71 | String album = trackListBean.getAlbum_name();
72 | String length = Util.secTotime(trackListBean.getLength());
73 | String lyric = trackListBean.getLyric();
74 | String picUrl = trackListBean.getPic();//此处为小图
75 | //trackListBean.getAlbum_pic()//大图
76 | song.setSongId(songId);
77 | song.setSongName(songName);
78 | song.setSongLink(songLink);
79 | song.setArtistId(artistId);
80 | song.setArtistName(artistName);
81 | song.setAlbumId(ablum);
82 | song.setAlbumName(album);
83 | song.setLength(length);
84 | song.setLrcUrl(lyric);
85 | song.setPicUrl(picUrl);
86 | List allAudios = trackListBean.getAllAudios();
87 | boolean hash320Kbite = false;
88 | for (XiamiIds.DataBean.TrackListBean.AllAudiosBean allAudiosBean : allAudios) {
89 | if (allAudiosBean.getFormat().equals("mp3")) {
90 | if (allAudiosBean.getAudioQualityEnum().equals("HIGH")) {
91 | hash320Kbite = true;
92 | song.setSqUrl(allAudiosBean.getFilePath());
93 | song.setHqUrl(allAudiosBean.getFilePath());
94 | }
95 | if (allAudiosBean.getAudioQualityEnum().equals("LOW")) {
96 | song.setLqUrl(allAudiosBean.getFilePath());
97 | }
98 | }
99 | }
100 | if (hash320Kbite) {
101 | song.setBitRate("320K");
102 | } else {
103 | song.setBitRate("128K");
104 | }
105 | song.setType("xm");
106 |
107 | return song;
108 | } catch (Exception ex) {
109 |
110 | }
111 | return null;
112 | }
113 |
114 | private static SongResult SearchSong(String songId) {
115 | SongResult song = GetResultsByIds(songId, 0);
116 | if (song == null) {
117 | return null;
118 | }
119 | return song;
120 | }
121 |
122 | //虾米网页版mv为m3u8
123 | // private static String GetMvUrl(String id, String quality, String format) {
124 | // if (format == "mp4" || format == "flv") {
125 | // String mvId;
126 | // String html;
127 | // if (Util.isNumber(id)) {
128 | // String url = "http://www.xiami.com/song/" + id;
129 | // html = NetUtil.GetHtmlContent(url);
130 | // if (html.isEmpty()) {
131 | // return "";
132 | // }
133 | // mvId = Util.RegexString("(?<=href=\" \"/mv/)\\w+(?=\" \")", html);
134 | // } else {
135 | // mvId = id;
136 | // }
137 | // if (mvId.isEmpty()) {
138 | // return null;
139 | // }
140 | // html = NetUtil.GetHtmlContent("http://m.xiami.com/mv/" + mvId);
141 | // return html.isEmpty() ? "" : Util.RegexString("(?<=