#### 2022-02-13 V7.0.5
- *.[改进]启动软件时自动播放歌曲。 - *.[改进]当播放视频时,自动退出歌词界面。 - *.[改进]当播放歌曲时,自动进入歌词或视频界面。 - *.[修复]修复写真图片无法实现随机展现的BUG。
This commit is contained in:
parent
ee029bcf85
commit
3d55b0914c
|
@ -4,7 +4,7 @@
|
||||||
<component name="GradleSettings">
|
<component name="GradleSettings">
|
||||||
<option name="linkedExternalProjectsSettings">
|
<option name="linkedExternalProjectsSettings">
|
||||||
<GradleProjectSettings>
|
<GradleProjectSettings>
|
||||||
<option name="testRunner" value="PLATFORM" />
|
<option name="testRunner" value="GRADLE" />
|
||||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
<option name="modules">
|
<option name="modules">
|
||||||
|
@ -14,7 +14,6 @@
|
||||||
</set>
|
</set>
|
||||||
</option>
|
</option>
|
||||||
<option name="resolveModulePerSourceSet" value="false" />
|
<option name="resolveModulePerSourceSet" value="false" />
|
||||||
<option name="useQualifiedModuleNames" value="true" />
|
|
||||||
</GradleProjectSettings>
|
</GradleProjectSettings>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="RunConfigurationProducerService">
|
|
||||||
<option name="ignoredProducers">
|
|
||||||
<set>
|
|
||||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
|
|
||||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
|
|
||||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
|
|
||||||
</set>
|
|
||||||
</option>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
|
@ -1,3 +1,10 @@
|
||||||
|
#### 2022-02-13 V7.0.5
|
||||||
|
|
||||||
|
- *.[改进]启动软件时自动播放歌曲。
|
||||||
|
- *.[改进]当播放视频时,自动退出歌词界面。
|
||||||
|
- *.[改进]当播放歌曲时,自动进入歌词或视频界面。
|
||||||
|
- *.[修复]修复写真图片无法实现随机展现的BUG。
|
||||||
|
|
||||||
#### 2021-02-18 V7.0.4
|
#### 2021-02-18 V7.0.4
|
||||||
|
|
||||||
- *.[改进]修复部分布局控件未改成支持AndroidX的控件导致的闪退问题。
|
- *.[改进]修复部分布局控件未改成支持AndroidX的控件导致的闪退问题。
|
||||||
|
|
|
@ -8,8 +8,8 @@ android {
|
||||||
applicationId "com.zlm.hp"
|
applicationId "com.zlm.hp"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 29
|
targetSdkVersion 29
|
||||||
versionCode 10
|
versionCode 11
|
||||||
versionName "V7.0.3"
|
versionName "V7.0.5"
|
||||||
/**添加多 dex分包支持*/
|
/**添加多 dex分包支持*/
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
useLibrary 'org.apache.http.legacy'
|
useLibrary 'org.apache.http.legacy'
|
||||||
|
|
|
@ -130,6 +130,11 @@ public class AudioInfo implements Parcelable {
|
||||||
* MV路径
|
* MV路径
|
||||||
*/
|
*/
|
||||||
private String mvPath;
|
private String mvPath;
|
||||||
|
/**
|
||||||
|
* 是否播放MV
|
||||||
|
*/
|
||||||
|
@Transient
|
||||||
|
private boolean IsPlayMV;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -372,7 +377,13 @@ public class AudioInfo implements Parcelable {
|
||||||
public void setMvPath(String mvPath) {
|
public void setMvPath(String mvPath) {
|
||||||
this.mvPath = mvPath;
|
this.mvPath = mvPath;
|
||||||
}
|
}
|
||||||
|
public boolean getIsPlayMV() {
|
||||||
|
return IsPlayMV;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsPlayMV(boolean isPlayMv) {
|
||||||
|
this.IsPlayMV = isPlayMv;
|
||||||
|
}
|
||||||
public int getPlayProgress() {
|
public int getPlayProgress() {
|
||||||
return playProgress;
|
return playProgress;
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,15 @@ public class ActivityManager {
|
||||||
public void removeActivity(Activity activity) {
|
public void removeActivity(Activity activity) {
|
||||||
activityList.remove(activity);
|
activityList.remove(activity);
|
||||||
}
|
}
|
||||||
|
public boolean existActivity(Class<?> classinfo)
|
||||||
|
{
|
||||||
|
for (Activity item : activityList) {
|
||||||
|
if (!item.isFinishing() && item != null) {
|
||||||
|
if(item.getClass()==classinfo){return true;}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 退出
|
* 退出
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -57,7 +57,6 @@ public class AudioBroadcastReceiver {
|
||||||
* 播放
|
* 播放
|
||||||
*/
|
*/
|
||||||
public static final int ACTION_CODE_PLAYING = 3;
|
public static final int ACTION_CODE_PLAYING = 3;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 播放本地歌曲
|
* 播放本地歌曲
|
||||||
*/
|
*/
|
||||||
|
@ -243,7 +242,14 @@ public class AudioBroadcastReceiver {
|
||||||
* 播放网络视频
|
* 播放网络视频
|
||||||
*/
|
*/
|
||||||
public static final int ACTION_CODE_PLAYNETVIDEO = 40;
|
public static final int ACTION_CODE_PLAYNETVIDEO = 40;
|
||||||
|
/**
|
||||||
|
* 显示歌词界面
|
||||||
|
*/
|
||||||
|
public static final int ACTION_CODE_SHOWLRCVIEW = 42;
|
||||||
|
/**
|
||||||
|
* 关闭歌词窗体
|
||||||
|
*/
|
||||||
|
public static final int ACTION_LRC_CLOSE = 43;
|
||||||
private BroadcastReceiver mBroadcastReceiver;
|
private BroadcastReceiver mBroadcastReceiver;
|
||||||
private IntentFilter mIntentFilter;
|
private IntentFilter mIntentFilter;
|
||||||
private AudioReceiverListener mReceiverListener;
|
private AudioReceiverListener mReceiverListener;
|
||||||
|
@ -400,6 +406,22 @@ public class AudioBroadcastReceiver {
|
||||||
public static void sendVideoCloserReceiver(Context context) {
|
public static void sendVideoCloserReceiver(Context context) {
|
||||||
sendReceiver(context, ACTION_VIDEO_CLOSE, null, null);
|
sendReceiver(context, ACTION_VIDEO_CLOSE, null, null);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 显示歌词界面
|
||||||
|
*
|
||||||
|
* @param context
|
||||||
|
*/
|
||||||
|
public static void sendShowLrcViewReceiver(Context context) {
|
||||||
|
sendReceiver(context, ACTION_CODE_SHOWLRCVIEW, null, null);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 关闭歌词界面
|
||||||
|
*
|
||||||
|
* @param context
|
||||||
|
*/
|
||||||
|
public static void sendCloseLrcViewReceiver(Context context) {
|
||||||
|
sendReceiver(context, ACTION_LRC_CLOSE, null, null);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 在线歌曲下载完成
|
* 在线歌曲下载完成
|
||||||
*
|
*
|
||||||
|
|
|
@ -621,6 +621,7 @@ public class AudioPlayerService extends Service {
|
||||||
isPlayMV = true;
|
isPlayMV = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
audioInfo.setIsPlayMV(isPlayMV);
|
||||||
if ((isPlayMV && MvPath != null) || filePath == null || filePath.isEmpty()) { //如果会播放MV,则进入下一步操作
|
if ((isPlayMV && MvPath != null) || filePath == null || filePath.isEmpty()) { //如果会播放MV,则进入下一步操作
|
||||||
|
|
||||||
File MVFile = new File(MvPath);
|
File MVFile = new File(MvPath);
|
||||||
|
@ -692,9 +693,8 @@ public class AudioPlayerService extends Service {
|
||||||
AudioBroadcastReceiver.sendPlayReceiver(mContext, audioInfo);
|
AudioBroadcastReceiver.sendPlayReceiver(mContext, audioInfo);
|
||||||
mWorkerHandler.removeMessages(MESSAGE_WHAT_LOADPLAYPROGRESSDATA);
|
mWorkerHandler.removeMessages(MESSAGE_WHAT_LOADPLAYPROGRESSDATA);
|
||||||
mWorkerHandler.sendEmptyMessage(MESSAGE_WHAT_LOADPLAYPROGRESSDATA);
|
mWorkerHandler.sendEmptyMessage(MESSAGE_WHAT_LOADPLAYPROGRESSDATA);
|
||||||
|
|
||||||
mMediaPlayer.start();
|
mMediaPlayer.start();
|
||||||
|
AudioBroadcastReceiver.sendShowLrcViewReceiver(mContext);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -329,6 +329,7 @@ public class LocalVideoActivity extends BaseActivity {
|
||||||
mUIHandler.sendEmptyMessage(MESSAGE_WHAT_TIMECHANGE);
|
mUIHandler.sendEmptyMessage(MESSAGE_WHAT_TIMECHANGE);
|
||||||
//播放视频
|
//播放视频
|
||||||
playVideo();
|
playVideo();
|
||||||
|
AudioBroadcastReceiver.sendCloseLrcViewReceiver(mContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1946,6 +1946,9 @@ public class LrcActivity extends BaseActivity {
|
||||||
*/
|
*/
|
||||||
private void handleAudioBroadcastReceiver(Intent intent, int code) {
|
private void handleAudioBroadcastReceiver(Intent intent, int code) {
|
||||||
switch (code) {
|
switch (code) {
|
||||||
|
case AudioBroadcastReceiver.ACTION_LRC_CLOSE:
|
||||||
|
this.finish();
|
||||||
|
break;
|
||||||
case AudioBroadcastReceiver.ACTION_CODE_NULL:
|
case AudioBroadcastReceiver.ACTION_CODE_NULL:
|
||||||
|
|
||||||
//空数据
|
//空数据
|
||||||
|
|
|
@ -83,6 +83,7 @@ import com.zlm.libs.widget.MusicSeekBar;
|
||||||
import com.zlm.libs.widget.SlidingMenuLayout;
|
import com.zlm.libs.widget.SlidingMenuLayout;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.security.cert.CertPathValidatorException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -278,10 +279,10 @@ public class MainActivity extends BaseActivity {
|
||||||
protected int setContentLayoutResID() {
|
protected int setContentLayoutResID() {
|
||||||
return R.layout.activity_main;
|
return R.layout.activity_main;
|
||||||
}
|
}
|
||||||
|
//是否第一次使用
|
||||||
|
private boolean isFirst=true;
|
||||||
@Override
|
@Override
|
||||||
protected void initViews(Bundle savedInstanceState) {
|
protected void initViews(Bundle savedInstanceState) {
|
||||||
|
|
||||||
initSlidingMenu();
|
initSlidingMenu();
|
||||||
initViewPage();
|
initViewPage();
|
||||||
initTitleViews();
|
initTitleViews();
|
||||||
|
@ -290,6 +291,7 @@ public class MainActivity extends BaseActivity {
|
||||||
initReceiver();
|
initReceiver();
|
||||||
initService();
|
initService();
|
||||||
loadData();
|
loadData();
|
||||||
|
AudioPlayerManager.newInstance(mContext).play(mMusicSeekBar.getProgress());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -299,7 +301,24 @@ public class MainActivity extends BaseActivity {
|
||||||
private void initService() {
|
private void initService() {
|
||||||
AudioPlayerService.startService(this);
|
AudioPlayerService.startService(this);
|
||||||
}
|
}
|
||||||
|
private void ShowLrcView()
|
||||||
|
{
|
||||||
|
if (mSlidingMenuLayout.isShowingMenu()) {
|
||||||
|
mSlidingMenuLayout.hideMenu();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mIsShowPopPlayList) {
|
||||||
|
hidePopPlayListView();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(!ActivityManager.getInstance().existActivity(LrcActivity.class)) {
|
||||||
|
Intent intent = new Intent(MainActivity.this, LrcActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
|
//去掉动画
|
||||||
|
overridePendingTransition(0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 初始化广播
|
* 初始化广播
|
||||||
|
@ -451,7 +470,8 @@ public class MainActivity extends BaseActivity {
|
||||||
if (mAdapter != null)
|
if (mAdapter != null)
|
||||||
mAdapter.reshViewHolder(null);
|
mAdapter.reshViewHolder(null);
|
||||||
}
|
}
|
||||||
|
//region 加载歌词界面
|
||||||
|
//endregion
|
||||||
break;
|
break;
|
||||||
case AudioBroadcastReceiver.ACTION_CODE_PLAY:
|
case AudioBroadcastReceiver.ACTION_CODE_PLAY:
|
||||||
if (mPauseImageView.getVisibility() != View.VISIBLE)
|
if (mPauseImageView.getVisibility() != View.VISIBLE)
|
||||||
|
@ -459,7 +479,9 @@ public class MainActivity extends BaseActivity {
|
||||||
|
|
||||||
if (mPlayImageView.getVisibility() != View.INVISIBLE)
|
if (mPlayImageView.getVisibility() != View.INVISIBLE)
|
||||||
mPlayImageView.setVisibility(View.INVISIBLE);
|
mPlayImageView.setVisibility(View.INVISIBLE);
|
||||||
|
break;
|
||||||
|
case AudioBroadcastReceiver.ACTION_CODE_SHOWLRCVIEW:
|
||||||
|
ShowLrcView();
|
||||||
break;
|
break;
|
||||||
case AudioBroadcastReceiver.ACTION_CODE_PLAYING:
|
case AudioBroadcastReceiver.ACTION_CODE_PLAYING:
|
||||||
|
|
||||||
|
@ -776,20 +798,7 @@ public class MainActivity extends BaseActivity {
|
||||||
mPlayerBarLL.setOnClickListener(new View.OnClickListener() {
|
mPlayerBarLL.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (mSlidingMenuLayout.isShowingMenu()) {
|
ShowLrcView();
|
||||||
mSlidingMenuLayout.hideMenu();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mIsShowPopPlayList) {
|
|
||||||
hidePopPlayListView();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Intent intent = new Intent(MainActivity.this, LrcActivity.class);
|
|
||||||
startActivity(intent);
|
|
||||||
//去掉动画
|
|
||||||
overridePendingTransition(0, 0);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//mSlidingMenuLayout.addIgnoreHorizontalView(mPlayerBarLL);
|
//mSlidingMenuLayout.addIgnoreHorizontalView(mPlayerBarLL);
|
||||||
|
|
|
@ -350,30 +350,12 @@ public class ImageUtil {
|
||||||
*/
|
*/
|
||||||
private static void addAndSortData(List<SingerInfo> returnResult, List<List<SingerInfo>> tempReturnResult, List<String> singerNames) {
|
private static void addAndSortData(List<SingerInfo> returnResult, List<List<SingerInfo>> tempReturnResult, List<String> singerNames) {
|
||||||
for (int i = 0; i < singerNames.size(); i++) {
|
for (int i = 0; i < singerNames.size(); i++) {
|
||||||
if (i == 0) {
|
List<SingerInfo> tempList = tempReturnResult.get(i);
|
||||||
returnResult.addAll(tempReturnResult.get(i));
|
while(tempList.size()>0){
|
||||||
} else {
|
int max=tempList.size()-1,min=0;
|
||||||
String tag = singerNames.get(i - 1);
|
int ran2 = (int) (Math.random()*(max-min)+min);
|
||||||
List<SingerInfo> tempList = tempReturnResult.get(i);
|
returnResult.add(tempList.get(ran2));
|
||||||
|
tempList.remove(ran2);
|
||||||
boolean flag = tempList.size() - returnResult.size() > 0 ? true : false;
|
|
||||||
int minSize = tempList.size() > returnResult.size() ? returnResult.size() : tempList.size();
|
|
||||||
int modSize = Math.abs(tempList.size() - returnResult.size());
|
|
||||||
int z = 0;
|
|
||||||
for (int j = 0; j < minSize; j++) {
|
|
||||||
for (; z < returnResult.size(); z++) {
|
|
||||||
SingerInfo temp = returnResult.get(z);
|
|
||||||
if (temp.getSingerName().equals(tag)) {
|
|
||||||
returnResult.add(++z, tempList.get(j));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (flag) {
|
|
||||||
for (int k = modSize; k < tempList.size(); k++) {
|
|
||||||
returnResult.add(tempList.get(k));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,6 +1,6 @@
|
||||||
#Sat Sep 26 12:04:29 CST 2020
|
#Sat Sep 26 12:04:29 CST 2020
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionUrl=file:///C:/Users/Administrator/.gradle/wrapper/dists/gradle-6.6.1-bin/du4tvj86lhti6iga1v8h7pckb/gradle-6.6.1-bin.zip
|
distributionUrl=file:///E:/\u6211\u7684\u4EE3\u7801/android/gradle\u5305/gradle-6.6.1-bin.zip
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|
Loading…
Reference in New Issue
Block a user