#### 2022-02-13 V7.0.5
- *.[改进]启动软件时自动播放歌曲。 - *.[改进]当播放视频时,自动退出歌词界面。 - *.[改进]当播放歌曲时,自动进入歌词或视频界面。 - *.[修复]修复写真图片无法实现随机展现的BUG。
This commit is contained in:
parent
ee029bcf85
commit
3d55b0914c
|
@ -4,7 +4,7 @@
|
|||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="testRunner" value="PLATFORM" />
|
||||
<option name="testRunner" value="GRADLE" />
|
||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="modules">
|
||||
|
@ -14,7 +14,6 @@
|
|||
</set>
|
||||
</option>
|
||||
<option name="resolveModulePerSourceSet" value="false" />
|
||||
<option name="useQualifiedModuleNames" value="true" />
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</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
|
||||
|
||||
- *.[改进]修复部分布局控件未改成支持AndroidX的控件导致的闪退问题。
|
||||
|
|
|
@ -8,8 +8,8 @@ android {
|
|||
applicationId "com.zlm.hp"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 29
|
||||
versionCode 10
|
||||
versionName "V7.0.3"
|
||||
versionCode 11
|
||||
versionName "V7.0.5"
|
||||
/**添加多 dex分包支持*/
|
||||
multiDexEnabled true
|
||||
useLibrary 'org.apache.http.legacy'
|
||||
|
|
|
@ -130,6 +130,11 @@ public class AudioInfo implements Parcelable {
|
|||
* MV路径
|
||||
*/
|
||||
private String mvPath;
|
||||
/**
|
||||
* 是否播放MV
|
||||
*/
|
||||
@Transient
|
||||
private boolean IsPlayMV;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@ -372,7 +377,13 @@ public class AudioInfo implements Parcelable {
|
|||
public void setMvPath(String mvPath) {
|
||||
this.mvPath = mvPath;
|
||||
}
|
||||
public boolean getIsPlayMV() {
|
||||
return IsPlayMV;
|
||||
}
|
||||
|
||||
public void setIsPlayMV(boolean isPlayMv) {
|
||||
this.IsPlayMV = isPlayMv;
|
||||
}
|
||||
public int getPlayProgress() {
|
||||
return playProgress;
|
||||
}
|
||||
|
|
|
@ -41,7 +41,15 @@ public class ActivityManager {
|
|||
public void removeActivity(Activity 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;
|
||||
|
||||
/**
|
||||
* 播放本地歌曲
|
||||
*/
|
||||
|
@ -243,7 +242,14 @@ public class AudioBroadcastReceiver {
|
|||
* 播放网络视频
|
||||
*/
|
||||
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 IntentFilter mIntentFilter;
|
||||
private AudioReceiverListener mReceiverListener;
|
||||
|
@ -400,6 +406,22 @@ public class AudioBroadcastReceiver {
|
|||
public static void sendVideoCloserReceiver(Context context) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
audioInfo.setIsPlayMV(isPlayMV);
|
||||
if ((isPlayMV && MvPath != null) || filePath == null || filePath.isEmpty()) { //如果会播放MV,则进入下一步操作
|
||||
|
||||
File MVFile = new File(MvPath);
|
||||
|
@ -692,9 +693,8 @@ public class AudioPlayerService extends Service {
|
|||
AudioBroadcastReceiver.sendPlayReceiver(mContext, audioInfo);
|
||||
mWorkerHandler.removeMessages(MESSAGE_WHAT_LOADPLAYPROGRESSDATA);
|
||||
mWorkerHandler.sendEmptyMessage(MESSAGE_WHAT_LOADPLAYPROGRESSDATA);
|
||||
|
||||
mMediaPlayer.start();
|
||||
|
||||
AudioBroadcastReceiver.sendShowLrcViewReceiver(mContext);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -329,6 +329,7 @@ public class LocalVideoActivity extends BaseActivity {
|
|||
mUIHandler.sendEmptyMessage(MESSAGE_WHAT_TIMECHANGE);
|
||||
//播放视频
|
||||
playVideo();
|
||||
AudioBroadcastReceiver.sendCloseLrcViewReceiver(mContext);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1946,6 +1946,9 @@ public class LrcActivity extends BaseActivity {
|
|||
*/
|
||||
private void handleAudioBroadcastReceiver(Intent intent, int code) {
|
||||
switch (code) {
|
||||
case AudioBroadcastReceiver.ACTION_LRC_CLOSE:
|
||||
this.finish();
|
||||
break;
|
||||
case AudioBroadcastReceiver.ACTION_CODE_NULL:
|
||||
|
||||
//空数据
|
||||
|
|
|
@ -83,6 +83,7 @@ import com.zlm.libs.widget.MusicSeekBar;
|
|||
import com.zlm.libs.widget.SlidingMenuLayout;
|
||||
|
||||
import java.io.File;
|
||||
import java.security.cert.CertPathValidatorException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -278,10 +279,10 @@ public class MainActivity extends BaseActivity {
|
|||
protected int setContentLayoutResID() {
|
||||
return R.layout.activity_main;
|
||||
}
|
||||
|
||||
//是否第一次使用
|
||||
private boolean isFirst=true;
|
||||
@Override
|
||||
protected void initViews(Bundle savedInstanceState) {
|
||||
|
||||
initSlidingMenu();
|
||||
initViewPage();
|
||||
initTitleViews();
|
||||
|
@ -290,6 +291,7 @@ public class MainActivity extends BaseActivity {
|
|||
initReceiver();
|
||||
initService();
|
||||
loadData();
|
||||
AudioPlayerManager.newInstance(mContext).play(mMusicSeekBar.getProgress());
|
||||
}
|
||||
|
||||
|
||||
|
@ -299,7 +301,24 @@ public class MainActivity extends BaseActivity {
|
|||
private void initService() {
|
||||
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)
|
||||
mAdapter.reshViewHolder(null);
|
||||
}
|
||||
|
||||
//region 加载歌词界面
|
||||
//endregion
|
||||
break;
|
||||
case AudioBroadcastReceiver.ACTION_CODE_PLAY:
|
||||
if (mPauseImageView.getVisibility() != View.VISIBLE)
|
||||
|
@ -459,7 +479,9 @@ public class MainActivity extends BaseActivity {
|
|||
|
||||
if (mPlayImageView.getVisibility() != View.INVISIBLE)
|
||||
mPlayImageView.setVisibility(View.INVISIBLE);
|
||||
|
||||
break;
|
||||
case AudioBroadcastReceiver.ACTION_CODE_SHOWLRCVIEW:
|
||||
ShowLrcView();
|
||||
break;
|
||||
case AudioBroadcastReceiver.ACTION_CODE_PLAYING:
|
||||
|
||||
|
@ -776,20 +798,7 @@ public class MainActivity extends BaseActivity {
|
|||
mPlayerBarLL.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (mSlidingMenuLayout.isShowingMenu()) {
|
||||
mSlidingMenuLayout.hideMenu();
|
||||
return;
|
||||
}
|
||||
|
||||
if (mIsShowPopPlayList) {
|
||||
hidePopPlayListView();
|
||||
return;
|
||||
}
|
||||
|
||||
Intent intent = new Intent(MainActivity.this, LrcActivity.class);
|
||||
startActivity(intent);
|
||||
//去掉动画
|
||||
overridePendingTransition(0, 0);
|
||||
ShowLrcView();
|
||||
}
|
||||
});
|
||||
//mSlidingMenuLayout.addIgnoreHorizontalView(mPlayerBarLL);
|
||||
|
|
|
@ -350,30 +350,12 @@ public class ImageUtil {
|
|||
*/
|
||||
private static void addAndSortData(List<SingerInfo> returnResult, List<List<SingerInfo>> tempReturnResult, List<String> singerNames) {
|
||||
for (int i = 0; i < singerNames.size(); i++) {
|
||||
if (i == 0) {
|
||||
returnResult.addAll(tempReturnResult.get(i));
|
||||
} else {
|
||||
String tag = singerNames.get(i - 1);
|
||||
List<SingerInfo> tempList = tempReturnResult.get(i);
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
||||
List<SingerInfo> tempList = tempReturnResult.get(i);
|
||||
while(tempList.size()>0){
|
||||
int max=tempList.size()-1,min=0;
|
||||
int ran2 = (int) (Math.random()*(max-min)+min);
|
||||
returnResult.add(tempList.get(ran2));
|
||||
tempList.remove(ran2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
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
|
||||
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
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
|
Loading…
Reference in New Issue
Block a user