This repository has been archived by the owner on Aug 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
886 additions
and
862 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,5 +65,4 @@ object PlayUrl { | |
val vkey: String | ||
) | ||
|
||
|
||
} |
70 changes: 70 additions & 0 deletions
70
app/src/main/java/com/dirror/music/ui/activity/AboutActivity2.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
package com.dirror.music.ui.activity | ||
|
||
import android.content.Intent | ||
import androidx.appcompat.app.AppCompatActivity | ||
import android.os.Bundle | ||
import com.dirror.music.MyApplication | ||
import com.dirror.music.R | ||
import com.dirror.music.databinding.ActivityAbout2Binding | ||
import com.dirror.music.util.Secure | ||
import com.dirror.music.util.UpdateUtil | ||
import com.dirror.music.util.getVisionCode | ||
import com.dirror.music.util.getVisionName | ||
|
||
/** | ||
* 2.0 新版 AboutActivity | ||
*/ | ||
class AboutActivity2 : AppCompatActivity() { | ||
|
||
companion object { | ||
// 官方网站 | ||
private const val WEBSITE = "https://moriafly.xyz" | ||
// 更新日志网站 | ||
private const val UPDATE_LOG = "https://github.com/Moriafly/DsoMusic/releases" | ||
private const val WEB_INFO = "https://moriafly.xyz/dirror-music/info.json" | ||
private const val HISTORY_VERSION = "https://moriafly.xyz/foyou/dsomusic/history-version.html" | ||
} | ||
|
||
private lateinit var binding: ActivityAbout2Binding | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
binding = ActivityAbout2Binding.inflate(layoutInflater) | ||
setContentView(binding.root) | ||
initView() | ||
initListener() | ||
} | ||
|
||
/** | ||
* 界面初始化 | ||
*/ | ||
private fun initView() { | ||
binding.apply { | ||
val versionType = if (Secure.isDebug()) { | ||
"测试版" | ||
} else { | ||
"正式版" | ||
} | ||
|
||
try { | ||
tvVersion.text = resources.getString(R.string.version, getVisionName(), getVisionCode(), versionType) | ||
} catch (e: Exception) { | ||
|
||
} | ||
} | ||
} | ||
|
||
private fun initListener() { | ||
binding.apply { | ||
// 检查更新 | ||
itemCheckForUpdates.setOnClickListener { UpdateUtil.checkNewVersion(this@AboutActivity2, true) } | ||
// 更新日志 | ||
itemUpdateLog.setOnClickListener { MyApplication.activityManager.startWebActivity(this@AboutActivity2, UPDATE_LOG) } | ||
// 历史版本 | ||
itemHistoryVersion.setOnClickListener { MyApplication.activityManager.startWebActivity(this@AboutActivity2, HISTORY_VERSION) } | ||
// 使用开源项目 | ||
itemOpenSourceCode.setOnClickListener { startActivity(Intent(this@AboutActivity2, OpenSourceActivity::class.java)) } | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.