m3迁移
This commit is contained in:
parent
a129213ba3
commit
dc3d0ea1f4
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -70,7 +70,7 @@ android {
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
||||||
//视频播放器
|
//视频播放器
|
||||||
implementation 'com.github.CarGuo.GSYVideoPlayer:GSYVideoPlayer:v8.2.0-release-jitpack'
|
// implementation 'com.github.CarGuo.GSYVideoPlayer:GSYVideoPlayer:v8.2.0-release-jitpack'
|
||||||
//权限申请
|
//权限申请
|
||||||
implementation 'com.guolindev.permissionx:permissionx:1.6.1'
|
implementation 'com.guolindev.permissionx:permissionx:1.6.1'
|
||||||
implementation "androidx.room:room-runtime:2.4.0"
|
implementation "androidx.room:room-runtime:2.4.0"
|
||||||
|
@ -94,7 +94,6 @@ dependencies {
|
||||||
implementation 'com.kongzue.stacklabel:stacklabelview:1.1.9'
|
implementation 'com.kongzue.stacklabel:stacklabelview:1.1.9'
|
||||||
implementation files('libs/editor_0.8.aar')
|
implementation files('libs/editor_0.8.aar')
|
||||||
implementation project(path: ':assistantCoreLibrary')
|
implementation project(path: ':assistantCoreLibrary')
|
||||||
implementation project(path: ':networkApi')
|
|
||||||
implementation 'com.afollestad.material-dialogs:bottomsheets:3.3.0'
|
implementation 'com.afollestad.material-dialogs:bottomsheets:3.3.0'
|
||||||
implementation 'com.afollestad.material-dialogs:input:3.3.0'
|
implementation 'com.afollestad.material-dialogs:input:3.3.0'
|
||||||
|
|
||||||
|
@ -104,9 +103,9 @@ dependencies {
|
||||||
implementation 'com.github.QuadFlask:colorpicker:0.0.15'
|
implementation 'com.github.QuadFlask:colorpicker:0.0.15'
|
||||||
implementation 'cat.ereza:customactivityoncrash:2.3.0'
|
implementation 'cat.ereza:customactivityoncrash:2.3.0'
|
||||||
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
|
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
|
||||||
implementation 'androidx.appcompat:appcompat:1.3.1'
|
implementation 'androidx.appcompat:appcompat:1.4.0'
|
||||||
implementation 'androidx.core:core-splashscreen:1.0.0-beta01'
|
implementation 'androidx.core:core-splashscreen:1.0.0-beta01'
|
||||||
implementation 'com.google.android.material:material:1.5.0'
|
implementation 'com.google.android.material:material:1.6.1'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
||||||
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
|
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
|
||||||
implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
|
implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
|
||||||
|
|
|
@ -23,6 +23,9 @@
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/Theme.rust.Concept"
|
android:theme="@style/Theme.rust.Concept"
|
||||||
android:usesCleartextTraffic="true">
|
android:usesCleartextTraffic="true">
|
||||||
|
<activity
|
||||||
|
android:name=".CreationWizardActivity"
|
||||||
|
android:exported="false" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".TurretDesignActivity"
|
android:name=".TurretDesignActivity"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
|
|
|
@ -0,0 +1,110 @@
|
||||||
|
package com.coldmint.rust.pro
|
||||||
|
|
||||||
|
import android.content.Intent
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import com.coldmint.rust.pro.adapters.GuideAdapter
|
||||||
|
import com.coldmint.rust.pro.base.BaseActivity
|
||||||
|
import com.coldmint.rust.pro.databean.GuideData
|
||||||
|
import com.coldmint.rust.pro.databinding.ActivityCreationWizardBinding
|
||||||
|
import com.coldmint.rust.pro.tool.AppSettings
|
||||||
|
|
||||||
|
class CreationWizardActivity : BaseActivity<ActivityCreationWizardBinding>() {
|
||||||
|
//创建向导类型(模组,模板包)
|
||||||
|
lateinit var type: String
|
||||||
|
override fun whenCreateActivity(savedInstanceState: Bundle?, canUseView: Boolean) {
|
||||||
|
setReturnButton()
|
||||||
|
title = getString(R.string.creation_wizard)
|
||||||
|
val temType = intent.getStringExtra("type")
|
||||||
|
if (temType.isNullOrBlank()) {
|
||||||
|
showToast("请传入类型")
|
||||||
|
finish()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
type = temType
|
||||||
|
viewBinding.recyclerView.layoutManager = LinearLayoutManager(this)
|
||||||
|
when (temType) {
|
||||||
|
"mod" -> {
|
||||||
|
val dataList = ArrayList<GuideData>()
|
||||||
|
dataList.add(
|
||||||
|
GuideData(
|
||||||
|
R.string.create_mod_lable,
|
||||||
|
R.string.create_mod_describe,
|
||||||
|
R.drawable.ic_outline_create_24
|
||||||
|
)
|
||||||
|
)
|
||||||
|
dataList.add(
|
||||||
|
GuideData(
|
||||||
|
R.string.import_mod,
|
||||||
|
R.string.import_mod_from_file_manager_describe,
|
||||||
|
R.drawable.folder
|
||||||
|
)
|
||||||
|
)
|
||||||
|
dataList.add(
|
||||||
|
GuideData(
|
||||||
|
R.string.import_mod_from_package_directory,
|
||||||
|
R.string.import_mod_from_package_directory_describe,
|
||||||
|
R.drawable.zip
|
||||||
|
)
|
||||||
|
)
|
||||||
|
dataList.add(
|
||||||
|
GuideData(
|
||||||
|
R.string.import_mod_from_recycle_bin,
|
||||||
|
R.string.import_mod_from_recycle_bin_describe,
|
||||||
|
R.drawable.auto_delete
|
||||||
|
)
|
||||||
|
)
|
||||||
|
val adapter = GuideAdapter(this, dataList)
|
||||||
|
adapter.setItemEvent { i, itemGuideBinding, viewHolder, guideData ->
|
||||||
|
itemGuideBinding.root.setOnClickListener {
|
||||||
|
finish()
|
||||||
|
when (guideData.titleRes) {
|
||||||
|
R.string.create_mod_lable -> {
|
||||||
|
startActivity(
|
||||||
|
Intent(
|
||||||
|
this,
|
||||||
|
CreateModActivity::class.java
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
R.string.import_mod -> {
|
||||||
|
val startIntent =
|
||||||
|
Intent(this, FileManagerActivity::class.java)
|
||||||
|
val fileBundle = Bundle()
|
||||||
|
fileBundle.putString("type", "selectFile")
|
||||||
|
startIntent.putExtra("data", fileBundle)
|
||||||
|
startActivity(startIntent)
|
||||||
|
}
|
||||||
|
R.string.import_mod_from_package_directory -> {
|
||||||
|
val startIntent =
|
||||||
|
Intent(this, FileManagerActivity::class.java)
|
||||||
|
val fileBundle = Bundle()
|
||||||
|
fileBundle.putString("type", "selectFile")
|
||||||
|
val packDirectory = appSettings.getValue(
|
||||||
|
AppSettings.Setting.PackDirectory,
|
||||||
|
AppSettings.dataRootDirectory + "/bin/"
|
||||||
|
)
|
||||||
|
fileBundle.putString("path", packDirectory)
|
||||||
|
fileBundle.putString("rootpath", packDirectory)
|
||||||
|
startIntent.putExtra("data", fileBundle)
|
||||||
|
startActivity(startIntent)
|
||||||
|
}
|
||||||
|
R.string.import_mod_from_recycle_bin -> {
|
||||||
|
startActivity(Intent(this, RecyclingStationActivity::class.java))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
viewBinding.recyclerView.adapter = adapter
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getViewBindingObject(): ActivityCreationWizardBinding {
|
||||||
|
return ActivityCreationWizardBinding.inflate(layoutInflater)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -156,8 +156,6 @@ class FileManagerActivity : BaseActivity<ActivityFileBinding>() {
|
||||||
else -> {
|
else -> {
|
||||||
val ints = intArrayOf(
|
val ints = intArrayOf(
|
||||||
R.string.open_action1,
|
R.string.open_action1,
|
||||||
R.string.open_action2,
|
|
||||||
R.string.open_action3,
|
|
||||||
R.string.open_action4
|
R.string.open_action4
|
||||||
)
|
)
|
||||||
val items = FileAdapter.conversionSymbol(
|
val items = FileAdapter.conversionSymbol(
|
||||||
|
@ -235,18 +233,19 @@ class FileManagerActivity : BaseActivity<ActivityFileBinding>() {
|
||||||
//加载文件
|
//加载文件
|
||||||
fun loadFiles(file: File) {
|
fun loadFiles(file: File) {
|
||||||
executorService.submit {
|
executorService.submit {
|
||||||
|
if (!file.exists()) {
|
||||||
|
runOnUiThread {
|
||||||
|
viewBinding.fileList.isVisible = false
|
||||||
|
viewBinding.progressBar.isVisible = false
|
||||||
|
viewBinding.fileError.isVisible = true
|
||||||
|
viewBinding.fileError.setText(R.string.unable_to_open_this_directory)
|
||||||
|
viewBinding.fab.hide()
|
||||||
|
}
|
||||||
|
return@submit
|
||||||
|
}
|
||||||
|
|
||||||
if (file.isDirectory) {
|
if (file.isDirectory) {
|
||||||
val files = file.listFiles()
|
val files = file.listFiles()
|
||||||
if (files == null || !file.exists()) {
|
|
||||||
runOnUiThread {
|
|
||||||
viewBinding.fileList.isVisible = false
|
|
||||||
viewBinding.progressBar.isVisible = false
|
|
||||||
viewBinding.fileError.isVisible = true
|
|
||||||
viewBinding.fileError.setText(R.string.unable_to_open_this_directory)
|
|
||||||
viewBinding.fab.hide()
|
|
||||||
}
|
|
||||||
return@submit
|
|
||||||
}
|
|
||||||
directs = file
|
directs = file
|
||||||
val fileArrayList: ArrayList<File?> = ArrayList(listOf(*files))
|
val fileArrayList: ArrayList<File?> = ArrayList(listOf(*files))
|
||||||
if (file.absolutePath != mRoot.absolutePath) {
|
if (file.absolutePath != mRoot.absolutePath) {
|
||||||
|
@ -472,7 +471,6 @@ class FileManagerActivity : BaseActivity<ActivityFileBinding>() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 解析文件路径
|
* 解析文件路径
|
||||||
*
|
*
|
||||||
|
|
|
@ -106,34 +106,28 @@ class LoginActivity : BaseActivity<ActivityLoginBinding>() {
|
||||||
}
|
}
|
||||||
val appId = appSettings.getValue(AppSettings.Setting.AppID, "");
|
val appId = appSettings.getValue(AppSettings.Setting.AppID, "");
|
||||||
isLogin = true
|
isLogin = true
|
||||||
viewBinding.button.setBackgroundColor(
|
|
||||||
GlobalMethod.getThemeColor(
|
|
||||||
this@LoginActivity,
|
|
||||||
R.attr.colorPrimaryVariant
|
|
||||||
)
|
|
||||||
)
|
|
||||||
viewBinding.button.setText(R.string.request_data)
|
viewBinding.button.setText(R.string.request_data)
|
||||||
User.login(LoginRequestData(account, passWord, appId),
|
User.login(LoginRequestData(account, passWord, appId),
|
||||||
object : ApiCallBack<UserData> {
|
object : ApiCallBack<UserData> {
|
||||||
override fun onResponse(userData: UserData) {
|
override fun onResponse(userData: UserData) {
|
||||||
isLogin = false
|
isLogin = false
|
||||||
viewBinding.button.setBackgroundColor(GlobalMethod.getColorPrimary(this@LoginActivity))
|
|
||||||
viewBinding.button.setText(R.string.login)
|
viewBinding.button.setText(R.string.login)
|
||||||
if (userData.code == ServerConfiguration.Success_Code) {
|
if (userData.code == ServerConfiguration.Success_Code) {
|
||||||
appSettings.forceSetValue(
|
appSettings.forceSetValue(
|
||||||
AppSettings.Setting.Account,
|
AppSettings.Setting.Account,
|
||||||
userData.data.account
|
account
|
||||||
)
|
)
|
||||||
appSettings.forceSetValue(AppSettings.Setting.PassWord, passWord)
|
appSettings.forceSetValue(AppSettings.Setting.PassWord, passWord)
|
||||||
appSettings.forceSetValue(
|
appSettings.forceSetValue(
|
||||||
AppSettings.Setting.UserName,
|
AppSettings.Setting.Token,
|
||||||
userData.data.userName
|
userData.data.token
|
||||||
)
|
)
|
||||||
GlobalMethod.isActive = userData.data.activation
|
GlobalMethod.isActive = userData.data.activation
|
||||||
//更新本地激活时间
|
//更新本地激活时间
|
||||||
val expirationTime = userData.data.expirationTime
|
val expirationTime = userData.data.expirationTime
|
||||||
val time = ServerConfiguration.toLongTime(expirationTime)
|
val time = ServerConfiguration.toLongTime(expirationTime)
|
||||||
appSettings.forceSetValue(AppSettings.Setting.ExpirationTime, time)
|
appSettings.forceSetValue(AppSettings.Setting.ExpirationTime, time)
|
||||||
|
appSettings.forceSetValue(AppSettings.Setting.LoginStatus,true)
|
||||||
startActivity(Intent(this@LoginActivity, MainActivity::class.java))
|
startActivity(Intent(this@LoginActivity, MainActivity::class.java))
|
||||||
finish()
|
finish()
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -314,62 +314,9 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
||||||
val templateItem = getString(R.string.template_title)
|
val templateItem = getString(R.string.template_title)
|
||||||
when (item) {
|
when (item) {
|
||||||
warehouseItem -> {
|
warehouseItem -> {
|
||||||
val popupMenu = PopupMenu(this@MainActivity, viewBinding.mainButton)
|
val intent = Intent(this, CreationWizardActivity::class.java)
|
||||||
popupMenu.menu.add(R.string.create_mod_lable)
|
intent.putExtra("type", "mod")
|
||||||
val fileManagerMenu = popupMenu.menu.addSubMenu(R.string.open_action2)
|
startActivity(intent)
|
||||||
fileManagerMenu.add(R.string.file_manager)
|
|
||||||
fileManagerMenu.add(R.string.packaged_mod)
|
|
||||||
if (AppOperator.isAppInstalled(this, GlobalMethod.ADM_PACKAGE)) {
|
|
||||||
fileManagerMenu.add(R.string.from_adm)
|
|
||||||
}
|
|
||||||
popupMenu.setOnMenuItemClickListener { item ->
|
|
||||||
when (item.title.toString()) {
|
|
||||||
getString(R.string.create_mod_lable) -> {
|
|
||||||
startActivity(
|
|
||||||
Intent(
|
|
||||||
this@MainActivity,
|
|
||||||
CreateModActivity::class.java
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
getString(R.string.file_manager) -> {
|
|
||||||
val startIntent =
|
|
||||||
Intent(this@MainActivity, FileManagerActivity::class.java)
|
|
||||||
val fileBundle = Bundle()
|
|
||||||
fileBundle.putString("type", "selectFile")
|
|
||||||
startIntent.putExtra("data", fileBundle)
|
|
||||||
startActivityForResult(startIntent, 1)
|
|
||||||
}
|
|
||||||
getString(R.string.packaged_mod) -> {
|
|
||||||
val startIntent =
|
|
||||||
Intent(this@MainActivity, FileManagerActivity::class.java)
|
|
||||||
val fileBundle = Bundle()
|
|
||||||
fileBundle.putString("type", "selectFile")
|
|
||||||
val packDirectory = appSettings.getValue(
|
|
||||||
AppSettings.Setting.PackDirectory,
|
|
||||||
AppSettings.dataRootDirectory + "/bin/"
|
|
||||||
)
|
|
||||||
fileBundle.putString("path", packDirectory)
|
|
||||||
fileBundle.putString("rootpath", packDirectory)
|
|
||||||
startIntent.putExtra("data", fileBundle)
|
|
||||||
startActivityForResult(startIntent, 1)
|
|
||||||
}
|
|
||||||
getString(R.string.from_adm) -> {
|
|
||||||
val startIntent =
|
|
||||||
Intent(this@MainActivity, FileManagerActivity::class.java)
|
|
||||||
val fileBundle = Bundle()
|
|
||||||
fileBundle.putString("type", "selectFile")
|
|
||||||
val packDirectory =
|
|
||||||
Environment.getExternalStorageDirectory().absolutePath + "/ADM"
|
|
||||||
fileBundle.putString("path", packDirectory)
|
|
||||||
fileBundle.putString("rootpath", packDirectory)
|
|
||||||
startIntent.putExtra("data", fileBundle)
|
|
||||||
startActivityForResult(startIntent, 1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
true
|
|
||||||
}
|
|
||||||
popupMenu.show()
|
|
||||||
}
|
}
|
||||||
templateItem -> {
|
templateItem -> {
|
||||||
val popupMenu = PopupMenu(this@MainActivity, viewBinding.mainButton)
|
val popupMenu = PopupMenu(this@MainActivity, viewBinding.mainButton)
|
||||||
|
|
|
@ -22,8 +22,8 @@ class RecyclingStationActivity : BaseActivity<ActivityRecyclingStationBinding>()
|
||||||
|
|
||||||
override fun whenCreateActivity(savedInstanceState: Bundle?, canUseView: Boolean) {
|
override fun whenCreateActivity(savedInstanceState: Bundle?, canUseView: Boolean) {
|
||||||
if (canUseView) {
|
if (canUseView) {
|
||||||
viewBinding.toolbar.setTitle(R.string.enable_the_recovery_station)
|
|
||||||
setReturnButton()
|
setReturnButton()
|
||||||
|
title = getString(R.string.enable_the_recovery_station)
|
||||||
viewBinding.backupList.layoutManager =
|
viewBinding.backupList.layoutManager =
|
||||||
LinearLayoutManager(this@RecyclingStationActivity)
|
LinearLayoutManager(this@RecyclingStationActivity)
|
||||||
val workFolderPath = appSettings.getValue(
|
val workFolderPath = appSettings.getValue(
|
||||||
|
@ -69,7 +69,8 @@ class RecyclingStationActivity : BaseActivity<ActivityRecyclingStationBinding>()
|
||||||
if (file == null) {
|
if (file == null) {
|
||||||
return@setOnClickListener
|
return@setOnClickListener
|
||||||
}
|
}
|
||||||
val popupMenu = PopupMenu(this@RecyclingStationActivity, fileItemBinding.more)
|
val popupMenu =
|
||||||
|
PopupMenu(this@RecyclingStationActivity, fileItemBinding.more)
|
||||||
popupMenu.menu.add(R.string.recovery_file)
|
popupMenu.menu.add(R.string.recovery_file)
|
||||||
popupMenu.menu.add(R.string.delete_title)
|
popupMenu.menu.add(R.string.delete_title)
|
||||||
popupMenu.setOnMenuItemClickListener(PopupMenu.OnMenuItemClickListener { item ->
|
popupMenu.setOnMenuItemClickListener(PopupMenu.OnMenuItemClickListener { item ->
|
||||||
|
|
|
@ -450,7 +450,7 @@ class RegisterActivity : BaseActivity<ActivityRegisterBinding>() {
|
||||||
|
|
||||||
override fun whenCreateActivity(savedInstanceState: Bundle?, canUseView: Boolean) {
|
override fun whenCreateActivity(savedInstanceState: Bundle?, canUseView: Boolean) {
|
||||||
if (canUseView) {
|
if (canUseView) {
|
||||||
viewBinding.toolbar.setTitle(R.string.register)
|
title = getString(R.string.register)
|
||||||
setReturnButton()
|
setReturnButton()
|
||||||
initAction()
|
initAction()
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,8 @@ package com.coldmint.rust.pro
|
||||||
import android.app.Application
|
import android.app.Application
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import cat.ereza.customactivityoncrash.config.CaocConfig
|
import cat.ereza.customactivityoncrash.config.CaocConfig
|
||||||
|
import com.google.android.material.color.DynamicColors
|
||||||
|
import com.google.android.material.color.DynamicColorsOptions
|
||||||
|
|
||||||
class RustApplication : Application() {
|
class RustApplication : Application() {
|
||||||
|
|
||||||
|
@ -14,6 +16,7 @@ class RustApplication : Application() {
|
||||||
override fun onCreate() {
|
override fun onCreate() {
|
||||||
super.onCreate()
|
super.onCreate()
|
||||||
// UMConfigure.preInit(this, appId, channel)
|
// UMConfigure.preInit(this, appId, channel)
|
||||||
|
// DynamicColors.applyToActivitiesIfAvailable(this)
|
||||||
CaocConfig.Builder.create()
|
CaocConfig.Builder.create()
|
||||||
.backgroundMode(CaocConfig.BACKGROUND_MODE_SILENT) //default: CaocConfig.BACKGROUND_MODE_SHOW_CUSTOM
|
.backgroundMode(CaocConfig.BACKGROUND_MODE_SILENT) //default: CaocConfig.BACKGROUND_MODE_SHOW_CUSTOM
|
||||||
.enabled(true) //default: true
|
.enabled(true) //default: true
|
||||||
|
|
|
@ -32,9 +32,6 @@ import com.google.android.material.snackbar.Snackbar
|
||||||
import com.google.android.material.tabs.TabLayout
|
import com.google.android.material.tabs.TabLayout
|
||||||
import com.google.android.material.tabs.TabLayoutMediator
|
import com.google.android.material.tabs.TabLayoutMediator
|
||||||
import com.gyf.immersionbar.ktx.immersionBar
|
import com.gyf.immersionbar.ktx.immersionBar
|
||||||
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder
|
|
||||||
import com.shuyu.gsyvideoplayer.utils.GSYVideoHelper
|
|
||||||
import com.shuyu.gsyvideoplayer.utils.GSYVideoType
|
|
||||||
|
|
||||||
|
|
||||||
class UserHomePageActivity : BaseActivity<ActivityUserHomePageBinding>() {
|
class UserHomePageActivity : BaseActivity<ActivityUserHomePageBinding>() {
|
||||||
|
@ -46,9 +43,6 @@ class UserHomePageActivity : BaseActivity<ActivityUserHomePageBinding>() {
|
||||||
val userHomeStateAdapter by lazy {
|
val userHomeStateAdapter by lazy {
|
||||||
UserHomeStateAdapter(this, userId)
|
UserHomeStateAdapter(this, userId)
|
||||||
}
|
}
|
||||||
val videoHelper by lazy {
|
|
||||||
GSYVideoHelper(this)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
val appID by lazy {
|
val appID by lazy {
|
||||||
|
@ -95,23 +89,9 @@ class UserHomePageActivity : BaseActivity<ActivityUserHomePageBinding>() {
|
||||||
}
|
}
|
||||||
initButton()
|
initButton()
|
||||||
|
|
||||||
loadVideo()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fun loadVideo() {
|
|
||||||
viewBinding.coverView.visibility = View.INVISIBLE
|
|
||||||
viewBinding.appBar.setBackgroundResource(R.drawable.transparent)
|
|
||||||
viewBinding.tabLayout.setBackgroundResource(R.drawable.transparent)
|
|
||||||
viewBinding.videoView.setUp("http://39.105.229.249/resources/mp4/vicious.mp4", true, null)
|
|
||||||
videoHelper.setGsyVideoOptionBuilder(
|
|
||||||
GSYVideoHelper.GSYVideoHelperBuilder().setHideActionBar(true).setHideStatusBar(false)
|
|
||||||
)
|
|
||||||
GSYVideoType.setShowType(GSYVideoType.SCREEN_TYPE_FULL)
|
|
||||||
viewBinding.videoView.isLooping = true
|
|
||||||
viewBinding.videoView.isAutoFullWithSize = true
|
|
||||||
viewBinding.videoView.startPlayLogic()
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 打开用户列表
|
* 打开用户列表
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
package com.coldmint.rust.pro.adapters
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import com.coldmint.rust.pro.base.BaseAdapter
|
||||||
|
import com.coldmint.rust.pro.databean.GuideData
|
||||||
|
import com.coldmint.rust.pro.databinding.ItemGuideBinding
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 向导适配器
|
||||||
|
*/
|
||||||
|
class GuideAdapter(context: Context, dataList: MutableList<GuideData>) :
|
||||||
|
BaseAdapter<ItemGuideBinding, GuideData>(context, dataList) {
|
||||||
|
override fun getViewBindingObject(
|
||||||
|
layoutInflater: LayoutInflater,
|
||||||
|
parent: ViewGroup,
|
||||||
|
viewType: Int
|
||||||
|
): ItemGuideBinding {
|
||||||
|
return ItemGuideBinding.inflate(layoutInflater, parent, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onBingView(
|
||||||
|
data: GuideData,
|
||||||
|
viewBinding: ItemGuideBinding,
|
||||||
|
viewHolder: ViewHolder<ItemGuideBinding>,
|
||||||
|
position: Int
|
||||||
|
) {
|
||||||
|
viewBinding.iconView.setImageResource(data.imageRes)
|
||||||
|
viewBinding.titleView.setText(data.titleRes)
|
||||||
|
viewBinding.describeView.setText(data.describeRes)
|
||||||
|
}
|
||||||
|
}
|
|
@ -17,6 +17,7 @@ import androidx.lifecycle.ViewModelProvider
|
||||||
import androidx.viewbinding.ViewBinding
|
import androidx.viewbinding.ViewBinding
|
||||||
import com.afollestad.materialdialogs.MaterialDialog
|
import com.afollestad.materialdialogs.MaterialDialog
|
||||||
import com.coldmint.rust.pro.R
|
import com.coldmint.rust.pro.R
|
||||||
|
import com.google.android.material.appbar.MaterialToolbar
|
||||||
import com.google.android.material.snackbar.Snackbar
|
import com.google.android.material.snackbar.Snackbar
|
||||||
import com.google.android.material.textfield.TextInputLayout
|
import com.google.android.material.textfield.TextInputLayout
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
@ -43,15 +44,12 @@ abstract class BaseActivity<ViewBingType : ViewBinding> :
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
// WindowCompat.setDecorFitsSystemWindows(window, false)
|
WindowCompat.setDecorFitsSystemWindows(window, false)
|
||||||
whenCreateActivity(savedInstanceState, false)
|
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
whenCreateActivity(savedInstanceState, false)
|
||||||
setContentView(viewBinding.root)
|
setContentView(viewBinding.root)
|
||||||
val toolBar = findViewById<Toolbar>(R.id.toolbar)
|
val toolBar = findViewById<MaterialToolbar>(R.id.toolbar)
|
||||||
if (toolBar == null) {
|
if (toolBar != null) {
|
||||||
MaterialDialog(this).title(R.string.app_name).message(text = "启动失败,未找到标题栏")
|
|
||||||
.positiveButton(text = "确定").cancelable(false).show()
|
|
||||||
} else {
|
|
||||||
setSupportActionBar(toolBar)
|
setSupportActionBar(toolBar)
|
||||||
}
|
}
|
||||||
whenCreateActivity(savedInstanceState, true)
|
whenCreateActivity(savedInstanceState, true)
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
package com.coldmint.rust.pro.databean
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 向导数据
|
||||||
|
* @property titleRes Int
|
||||||
|
* @property imageRes Int
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
class GuideData(val titleRes: Int, val describeRes: Int, val imageRes: Int)
|
|
@ -7,6 +7,7 @@ import android.widget.Toast
|
||||||
import androidx.recyclerview.widget.GridLayoutManager
|
import androidx.recyclerview.widget.GridLayoutManager
|
||||||
import com.bumptech.glide.Glide
|
import com.bumptech.glide.Glide
|
||||||
import com.bumptech.glide.request.RequestOptions
|
import com.bumptech.glide.request.RequestOptions
|
||||||
|
import com.coldmint.rust.core.dataBean.user.ActivationInfo
|
||||||
import com.coldmint.rust.core.dataBean.user.UserData
|
import com.coldmint.rust.core.dataBean.user.UserData
|
||||||
import com.coldmint.rust.core.interfaces.ApiCallBack
|
import com.coldmint.rust.core.interfaces.ApiCallBack
|
||||||
import com.coldmint.rust.core.web.ServerConfiguration
|
import com.coldmint.rust.core.web.ServerConfiguration
|
||||||
|
@ -103,8 +104,19 @@ class UserInfoFragment : BaseFragment<FragmentUserInfoBinding>() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
|
|
||||||
if (account.isNotBlank()) {
|
if (account.isNotBlank()) {
|
||||||
User.getInfo(account, object : ApiCallBack<UserData> {
|
User.getUserActivationInfo(account, object : ApiCallBack<ActivationInfo> {
|
||||||
override fun onResponse(t: UserData) {
|
|
||||||
|
|
||||||
|
override fun onFailure(e: Exception) {
|
||||||
|
viewBinding.nameView.text = account
|
||||||
|
loadRecyclerView(3)
|
||||||
|
// val localTime =
|
||||||
|
// appSettings.getValue(AppSettings.Setting.ExpirationTime, 0.toLong())
|
||||||
|
// viewBinding.expirationTimeView.text =
|
||||||
|
// ServerConfiguration.toStringTime(localTime)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onResponse(t: ActivationInfo) {
|
||||||
if (t.code == ServerConfiguration.Success_Code) {
|
if (t.code == ServerConfiguration.Success_Code) {
|
||||||
viewBinding.nameView.text = t.data.userName
|
viewBinding.nameView.text = t.data.userName
|
||||||
val icon = t.data.headIcon
|
val icon = t.data.headIcon
|
||||||
|
@ -121,15 +133,6 @@ class UserInfoFragment : BaseFragment<FragmentUserInfoBinding>() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onFailure(e: Exception) {
|
|
||||||
viewBinding.nameView.text = account
|
|
||||||
loadRecyclerView(3)
|
|
||||||
// val localTime =
|
|
||||||
// appSettings.getValue(AppSettings.Setting.ExpirationTime, 0.toLong())
|
|
||||||
// viewBinding.expirationTimeView.text =
|
|
||||||
// ServerConfiguration.toStringTime(localTime)
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -148,7 +151,7 @@ class UserInfoFragment : BaseFragment<FragmentUserInfoBinding>() {
|
||||||
}
|
}
|
||||||
|
|
||||||
viewBinding.logOutButton.setOnClickListener {
|
viewBinding.logOutButton.setOnClickListener {
|
||||||
requireActivity().finish()
|
appSettings.setValue(AppSettings.Setting.LoginStatus, false)
|
||||||
startActivity(Intent(requireContext(), LoginActivity::class.java))
|
startActivity(Intent(requireContext(), LoginActivity::class.java))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ class AppSettings private constructor(val mContext: Context) {
|
||||||
private val editor: SharedPreferences.Editor = sharedPreferences.edit()
|
private val editor: SharedPreferences.Editor = sharedPreferences.edit()
|
||||||
|
|
||||||
enum class Setting {
|
enum class Setting {
|
||||||
DatabaseDirectory, DatabasePath, TemplateDirectory, AppLanguage, DeveloperMode, CustomSymbol, AutoCreateNomedia, OnlyLoadConantLanguageTemple, NightMode, GamePackage, KeepRwmodFile, EnableRecoveryStation, RecoveryStationFileSaveDays, RecoveryStationFolder, IndependentFolder, SetGameStorage, PackDirectory, IdentifiersPromptNumber, UserName, UseJetBrainsMonoFont, AppID, Account, PassWord, ExpirationTime, CheckBetaUpdate, UpdateData, ShareTip, AgreePolicy, EnglishEditingMode, NightModeFollowSystem, UseMobileNetwork, MapFolder, ModFolder, UseTheCommunityAsTheLaunchPage, AutoSave,ServerAddress
|
DatabaseDirectory, DatabasePath, TemplateDirectory, AppLanguage, DeveloperMode, CustomSymbol, AutoCreateNomedia, OnlyLoadConantLanguageTemple, NightMode, GamePackage, KeepRwmodFile, EnableRecoveryStation, RecoveryStationFileSaveDays, RecoveryStationFolder, IndependentFolder, SetGameStorage, PackDirectory, IdentifiersPromptNumber, UserName, UseJetBrainsMonoFont, AppID, Account, PassWord, ExpirationTime, CheckBetaUpdate, UpdateData, ShareTip, AgreePolicy, EnglishEditingMode, NightModeFollowSystem, UseMobileNetwork, MapFolder, ModFolder, UseTheCommunityAsTheLaunchPage, AutoSave, ServerAddress, Token, LoginStatus
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -303,5 +303,7 @@ class AppSettings private constructor(val mContext: Context) {
|
||||||
map[Setting.UpdateData] = "UpdateData"
|
map[Setting.UpdateData] = "UpdateData"
|
||||||
map[Setting.ShareTip] = "ShareTip"
|
map[Setting.ShareTip] = "ShareTip"
|
||||||
map[Setting.AgreePolicy] = "AgreePolicy"
|
map[Setting.AgreePolicy] = "AgreePolicy"
|
||||||
|
map[Setting.LoginStatus] = "LoginStatus"
|
||||||
|
map[Setting.Token] = "Token"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -51,7 +51,6 @@ object GlobalMethod {
|
||||||
const val DEFAULT_GAME_PACKAGE = "com.corrodinggames.rts"
|
const val DEFAULT_GAME_PACKAGE = "com.corrodinggames.rts"
|
||||||
const val DEBUG_SIGN = "963dfd616924b27f9247a35e45bc130a"
|
const val DEBUG_SIGN = "963dfd616924b27f9247a35e45bc130a"
|
||||||
const val RELEASE_SIGN = "5320b24894fe7ed449842a81a2dfceda"
|
const val RELEASE_SIGN = "5320b24894fe7ed449842a81a2dfceda"
|
||||||
const val ADM_PACKAGE = "com.dv.adm.pay"
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -157,6 +156,7 @@ object GlobalMethod {
|
||||||
* @param resId 资源id
|
* @param resId 资源id
|
||||||
* @return 成功返回值,失败返回-1
|
* @return 成功返回值,失败返回-1
|
||||||
*/
|
*/
|
||||||
|
@Deprecated("废弃")
|
||||||
fun getThemeColor(context: Context, resId: Int): Int {
|
fun getThemeColor(context: Context, resId: Int): Int {
|
||||||
val typedValue = TypedValue()
|
val typedValue = TypedValue()
|
||||||
return if (context.theme.resolveAttribute(resId, typedValue, true)) {
|
return if (context.theme.resolveAttribute(resId, typedValue, true)) {
|
||||||
|
@ -172,6 +172,7 @@ object GlobalMethod {
|
||||||
* @param context 上下文环境
|
* @param context 上下文环境
|
||||||
* @return 整数
|
* @return 整数
|
||||||
*/
|
*/
|
||||||
|
@Deprecated("废弃")
|
||||||
fun getColorPrimary(context: Context): Int {
|
fun getColorPrimary(context: Context): Int {
|
||||||
return getThemeColor(context, R.attr.colorPrimary)
|
return getThemeColor(context, R.attr.colorPrimary)
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,8 @@ import com.afollestad.materialdialogs.MaterialDialog
|
||||||
import com.coldmint.rust.core.CompressionManager
|
import com.coldmint.rust.core.CompressionManager
|
||||||
import com.coldmint.rust.core.DataSet
|
import com.coldmint.rust.core.DataSet
|
||||||
import com.coldmint.rust.core.dataBean.LoginRequestData
|
import com.coldmint.rust.core.dataBean.LoginRequestData
|
||||||
|
import com.coldmint.rust.core.dataBean.user.ActivationInfo
|
||||||
|
import com.coldmint.rust.core.dataBean.user.SocialInfoData
|
||||||
import com.coldmint.rust.core.dataBean.user.UserData
|
import com.coldmint.rust.core.dataBean.user.UserData
|
||||||
import com.coldmint.rust.core.database.code.CodeDataBase
|
import com.coldmint.rust.core.database.code.CodeDataBase
|
||||||
import com.coldmint.rust.core.interfaces.ApiCallBack
|
import com.coldmint.rust.core.interfaces.ApiCallBack
|
||||||
|
@ -59,7 +61,7 @@ class StartViewModel(application: Application) : BaseAndroidViewModel(applicatio
|
||||||
* 用户数据的LiveData
|
* 用户数据的LiveData
|
||||||
*/
|
*/
|
||||||
val userLiveData by lazy {
|
val userLiveData by lazy {
|
||||||
MutableLiveData<UserData>()
|
MutableLiveData<ActivationInfo>()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -126,34 +128,17 @@ class StartViewModel(application: Application) : BaseAndroidViewModel(applicatio
|
||||||
* 验证用户信息
|
* 验证用户信息
|
||||||
*/
|
*/
|
||||||
fun verifyingUserInfo() {
|
fun verifyingUserInfo() {
|
||||||
|
val status = appSettings.getValue(AppSettings.Setting.LoginStatus, false)
|
||||||
|
if (!status) {
|
||||||
|
needLoginLiveData.value = true
|
||||||
|
return
|
||||||
|
}
|
||||||
//验证登录
|
//验证登录
|
||||||
val account = appSettings.getValue(AppSettings.Setting.Account, "")
|
val token = appSettings.getValue(AppSettings.Setting.Token, "")
|
||||||
val passWord = appSettings.getValue(AppSettings.Setting.PassWord, "")
|
if (token.isBlank()) {
|
||||||
if (account.isBlank() || passWord.isBlank()) {
|
|
||||||
needLoginLiveData.value = true
|
needLoginLiveData.value = true
|
||||||
} else {
|
} else {
|
||||||
User.login(LoginRequestData(
|
User.getUserActivationInfo(token, object : ApiCallBack<ActivationInfo> {
|
||||||
account,
|
|
||||||
passWord, appSettings.getValue(AppSettings.Setting.AppID, "")
|
|
||||||
), object : ApiCallBack<UserData> {
|
|
||||||
override fun onResponse(userData: UserData) {
|
|
||||||
if (userData.code == ServerConfiguration.Success_Code) {
|
|
||||||
userLiveData.value = userData
|
|
||||||
//更新本地激活时间
|
|
||||||
val expirationTime = userData.data.expirationTime
|
|
||||||
val time = ServerConfiguration.toLongTime(expirationTime)
|
|
||||||
appSettings.forceSetValue(
|
|
||||||
AppSettings.Setting.ExpirationTime,
|
|
||||||
time
|
|
||||||
)
|
|
||||||
isActivationLiveData.value = userData.data.activation
|
|
||||||
} else {
|
|
||||||
// 用户登录失败
|
|
||||||
verifyErrorMsgLiveData.value = userData.message
|
|
||||||
Log.d("验证失败", userData.message)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onFailure(e: Exception) {
|
override fun onFailure(e: Exception) {
|
||||||
val localTime = appSettings.getValue(
|
val localTime = appSettings.getValue(
|
||||||
AppSettings.Setting.ExpirationTime,
|
AppSettings.Setting.ExpirationTime,
|
||||||
|
@ -167,6 +152,25 @@ class StartViewModel(application: Application) : BaseAndroidViewModel(applicatio
|
||||||
isActivationLiveData.value = localTime > nowTime
|
isActivationLiveData.value = localTime > nowTime
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
override fun onResponse(activationInfo: ActivationInfo) {
|
||||||
|
if (activationInfo.code == ServerConfiguration.Success_Code) {
|
||||||
|
userLiveData.value = activationInfo
|
||||||
|
//更新本地激活时间
|
||||||
|
val expirationTime = activationInfo.data.expirationTime
|
||||||
|
val time = ServerConfiguration.toLongTime(expirationTime)
|
||||||
|
appSettings.forceSetValue(
|
||||||
|
AppSettings.Setting.ExpirationTime,
|
||||||
|
time
|
||||||
|
)
|
||||||
|
isActivationLiveData.value = activationInfo.data.activation
|
||||||
|
} else {
|
||||||
|
// 用户登录失败
|
||||||
|
verifyErrorMsgLiveData.value = activationInfo.message
|
||||||
|
Log.d("验证失败", activationInfo.message)
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -396,6 +400,7 @@ class StartViewModel(application: Application) : BaseAndroidViewModel(applicatio
|
||||||
)
|
)
|
||||||
appSettings.initSetting(AppSettings.Setting.AutoSave, true)
|
appSettings.initSetting(AppSettings.Setting.AutoSave, true)
|
||||||
appSettings.initSetting(AppSettings.Setting.AgreePolicy, false)
|
appSettings.initSetting(AppSettings.Setting.AgreePolicy, false)
|
||||||
|
appSettings.initSetting(AppSettings.Setting.LoginStatus, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
<vector android:height="24dp" android:tint="#000000"
|
||||||
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M10,6L8.59,7.41 13.17,12l-4.58,4.59L10,18l6,-6z"/>
|
||||||
|
</vector>
|
|
@ -5,7 +5,7 @@
|
||||||
android:viewportHeight="108"
|
android:viewportHeight="108"
|
||||||
android:viewportWidth="108"
|
android:viewportWidth="108"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<path android:fillColor="#E91E63"
|
<path android:fillColor="@color/icon_color"
|
||||||
android:pathData="M0,0h108v108h-108z"/>
|
android:pathData="M0,0h108v108h-108z"/>
|
||||||
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
|
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
|
||||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
|
5
app/src/main/res/drawable/ic_outline_create_24.xml
Normal file
5
app/src/main/res/drawable/ic_outline_create_24.xml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<vector android:height="24dp" android:tint="#000000"
|
||||||
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M3,17.25V21h3.75L17.81,9.94l-3.75,-3.75L3,17.25zM5.92,19H5v-0.92l9.06,-9.06 0.92,0.92L5.92,19zM20.71,5.63l-2.34,-2.34c-0.2,-0.2 -0.45,-0.29 -0.71,-0.29s-0.51,0.1 -0.7,0.29l-1.83,1.83 3.75,3.75 1.83,-1.83c0.39,-0.39 0.39,-1.02 0,-1.41z"/>
|
||||||
|
</vector>
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<solid android:color="?attr/colorPrimaryVariant" />
|
<solid android:color="?attr/colorPrimary" />
|
||||||
<corners
|
<corners
|
||||||
android:bottomLeftRadius="16dp"
|
android:bottomLeftRadius="16dp"
|
||||||
android:bottomRightRadius="16dp"
|
android:bottomRightRadius="16dp"
|
||||||
|
@ -8,5 +8,5 @@
|
||||||
android:topRightRadius="16dp" />
|
android:topRightRadius="16dp" />
|
||||||
<stroke
|
<stroke
|
||||||
android:width="1dp"
|
android:width="1dp"
|
||||||
android:color="?attr/colorSecondary" />
|
android:color="?attr/colorOnPrimary" />
|
||||||
</shape>
|
</shape>
|
|
@ -6,11 +6,10 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize" />
|
||||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -1,28 +1,22 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
xmlns:card_view="http://schemas.android.com/tools"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:animateLayoutChanges="true">
|
android:fitsSystemWindows="true"
|
||||||
|
tools:context=".MainActivity">
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="wrap_content"
|
||||||
android:background="?android:windowBackground"
|
|
||||||
android:fitsSystemWindows="true">
|
android:fitsSystemWindows="true">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
<androidx.appcompat.widget.Toolbar
|
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize" />
|
||||||
android:theme="?attr/actionBarStyle"
|
|
||||||
app:layout_collapseMode="pin"
|
|
||||||
app:layout_scrollFlags="scroll|enterAlways"
|
|
||||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
|
|
||||||
|
|
||||||
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
|
@ -42,7 +36,7 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
<com.google.android.material.circularreveal.cardview.CircularRevealCardView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:cardElevation="2dp"
|
app:cardElevation="2dp"
|
||||||
|
@ -72,7 +66,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/app_name" />
|
android:text="@string/app_name" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.cardview.widget.CardView>
|
</com.google.android.material.circularreveal.cardview.CircularRevealCardView>
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -1,21 +1,43 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:fitsSystemWindows="true"
|
||||||
tools:context=".BrowserActivity">
|
tools:context=".BrowserActivity">
|
||||||
|
|
||||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
|
||||||
android:id="@+id/linearProgressIndicator"
|
|
||||||
android:indeterminate="true"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
<WebView
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:id="@+id/webView"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="wrap_content"
|
||||||
|
android:fitsSystemWindows="true">
|
||||||
|
|
||||||
</LinearLayout>
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
|
android:id="@+id/toolbar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="?attr/actionBarSize" />
|
||||||
|
|
||||||
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
|
||||||
|
|
||||||
|
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||||
|
android:id="@+id/linearProgressIndicator"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:indeterminate="true" />
|
||||||
|
|
||||||
|
<WebView
|
||||||
|
android:id="@+id/webView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
31
app/src/main/res/layout/activity_creation_wizard.xml
Normal file
31
app/src/main/res/layout/activity_creation_wizard.xml
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
|
tools:context=".MainActivity">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fitsSystemWindows="true">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
|
android:id="@+id/toolbar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="?attr/actionBarSize" />
|
||||||
|
|
||||||
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/recyclerView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="16dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginRight="16dp"
|
||||||
|
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" />
|
||||||
|
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
@ -27,8 +27,7 @@
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
android:theme="?attr/actionBarStyle"
|
android:theme="?attr/actionBarStyle" />
|
||||||
app:popupTheme="@style/ThemeOverlay.rust.Concept.popupTheme" />
|
|
||||||
|
|
||||||
<com.google.android.material.tabs.TabLayout
|
<com.google.android.material.tabs.TabLayout
|
||||||
android:id="@+id/tabLayout"
|
android:id="@+id/tabLayout"
|
||||||
|
|
|
@ -1,90 +1,113 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:card_view="http://schemas.android.com/tools"
|
xmlns:card_view="http://schemas.android.com/tools"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:fitsSystemWindows="true"
|
||||||
android:padding="8dp">
|
tools:context=".MainActivity">
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/titleView"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentTop="true"
|
|
||||||
android:text="@string/error_title"
|
|
||||||
android:textSize="16dp" />
|
|
||||||
|
|
||||||
<TextView
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:id="@+id/subTitleView"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@id/titleView"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:text="@string/error_content" />
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:id="@+id/inputLayout"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/subTitleView"
|
android:fitsSystemWindows="true">
|
||||||
android:layout_marginTop="8dp">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
|
android:id="@+id/toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:id="@+id/inputEditView"
|
android:layout_height="?attr/actionBarSize" />
|
||||||
|
|
||||||
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="8dp"
|
||||||
|
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/titleView"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="@string/error_description"
|
android:layout_alignParentTop="true"
|
||||||
android:imeOptions="actionDone"
|
android:text="@string/error_title"
|
||||||
android:inputType="textMultiLine"
|
android:textSize="16dp" />
|
||||||
android:maxLines="5" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
<TextView
|
||||||
|
android:id="@+id/subTitleView"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@id/titleView"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:text="@string/error_content" />
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/inputLayout"
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_above="@id/shareLogButton"
|
|
||||||
android:layout_below="@id/inputLayout"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
app:cardElevation="2dp"
|
|
||||||
card_view:cardCornerRadius="2dp">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="5dp"
|
android:layout_below="@id/subTitleView"
|
||||||
android:orientation="vertical">
|
android:layout_marginTop="8dp">
|
||||||
|
|
||||||
<ScrollView
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/inputEditView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="@string/error_description"
|
||||||
|
android:imeOptions="actionDone"
|
||||||
|
android:inputType="textMultiLine"
|
||||||
|
android:maxLines="5" />
|
||||||
|
|
||||||
<TextView
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
android:id="@+id/errorInfo"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/collapse_info" />
|
|
||||||
|
|
||||||
</ScrollView>
|
<androidx.cardview.widget.CardView
|
||||||
</LinearLayout>
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_above="@id/shareLogButton"
|
||||||
|
android:layout_below="@id/inputLayout"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
app:cardElevation="2dp"
|
||||||
|
card_view:cardCornerRadius="2dp">
|
||||||
|
|
||||||
</androidx.cardview.widget.CardView>
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_margin="5dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<Button
|
<ScrollView
|
||||||
android:id="@+id/shareLogButton"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="match_parent"
|
android:layout_height="match_parent">
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_above="@id/restartButton"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:text="@string/share_log" />
|
|
||||||
|
|
||||||
<Button
|
<TextView
|
||||||
android:id="@+id/restartButton"
|
android:id="@+id/errorInfo"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentBottom="true"
|
android:text="@string/collapse_info" />
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:text="@string/restart" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</ScrollView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/shareLogButton"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_above="@id/restartButton"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:text="@string/share_log" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/restartButton"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:text="@string/restart" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
@ -3,23 +3,18 @@
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:card_view="http://schemas.android.com/tools"
|
xmlns:card_view="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:fitsSystemWindows="true">
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="wrap_content"
|
||||||
android:background="?android:windowBackground"
|
|
||||||
android:fitsSystemWindows="true">
|
android:fitsSystemWindows="true">
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize" />
|
||||||
android:theme="?attr/actionBarStyle"
|
|
||||||
app:layout_collapseMode="pin"
|
|
||||||
app:layout_scrollFlags="scroll|enterAlways"
|
|
||||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
|
|
||||||
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
|
|
|
@ -3,26 +3,25 @@
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:id="@+id/drawerlayout"
|
android:id="@+id/drawerlayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:animateLayoutChanges="true">
|
||||||
|
|
||||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
<com.google.android.material.circularreveal.coordinatorlayout.CircularRevealCoordinatorLayout
|
||||||
android:id="@+id/rootLayout"
|
android:id="@+id/rootLayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:fitsSystemWindows="true">
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:animateLayoutChanges="true"
|
android:fitsSystemWindows="true">
|
||||||
android:background="?android:windowBackground">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
android:animateLayoutChanges="true"
|
|
||||||
android:fitsSystemWindows="true"
|
|
||||||
app:layout_collapseMode="parallax"
|
app:layout_collapseMode="parallax"
|
||||||
app:layout_scrollFlags="scroll|enterAlways" />
|
app:layout_scrollFlags="scroll|enterAlways" />
|
||||||
|
|
||||||
|
@ -30,7 +29,6 @@
|
||||||
android:id="@+id/tabLayout"
|
android:id="@+id/tabLayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?android:windowBackground"
|
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:tabMode="fixed"
|
app:tabMode="fixed"
|
||||||
app:tabTextAppearance="@style/TabLayoutTextStyle">
|
app:tabTextAppearance="@style/TabLayoutTextStyle">
|
||||||
|
@ -48,7 +46,7 @@
|
||||||
app:defaultNavHost="true"
|
app:defaultNavHost="true"
|
||||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" />
|
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" />
|
||||||
|
|
||||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||||
android:id="@+id/mainButton"
|
android:id="@+id/mainButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -56,18 +54,18 @@
|
||||||
android:layout_margin="16dp"
|
android:layout_margin="16dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:layout_marginBottom="24dp"
|
android:layout_marginBottom="24dp"
|
||||||
android:src="@drawable/add"
|
android:text="@string/create"
|
||||||
app:tint="@color/white" />
|
app:icon="@drawable/add" />
|
||||||
|
|
||||||
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</com.google.android.material.circularreveal.coordinatorlayout.CircularRevealCoordinatorLayout>
|
||||||
|
|
||||||
<com.google.android.material.navigation.NavigationView
|
<com.google.android.material.navigation.NavigationView
|
||||||
android:id="@+id/navaiagtion"
|
android:id="@+id/navaiagtion"
|
||||||
android:layout_width="260dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="start"
|
android:layout_gravity="start"
|
||||||
android:background="?android:windowBackground"
|
android:fitsSystemWindows="true"
|
||||||
app:menu="@menu/menu_drawer_left" />
|
app:menu="@menu/menu_drawer_left" />
|
||||||
|
|
||||||
</androidx.drawerlayout.widget.DrawerLayout>
|
</androidx.drawerlayout.widget.DrawerLayout>
|
|
@ -7,18 +7,13 @@
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="wrap_content"
|
||||||
android:background="?android:windowBackground"
|
|
||||||
android:fitsSystemWindows="true">
|
android:fitsSystemWindows="true">
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize" />
|
||||||
android:theme="?attr/actionBarStyle"
|
|
||||||
app:layout_collapseMode="pin"
|
|
||||||
app:layout_scrollFlags="scroll|enterAlways"
|
|
||||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
|
|
||||||
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
|
|
|
@ -4,31 +4,19 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="180dp"
|
android:layout_height="wrap_content"
|
||||||
android:background="?android:windowBackground">
|
android:fitsSystemWindows="true">
|
||||||
|
|
||||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
|
android:id="@+id/toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="?attr/actionBarSize" />
|
||||||
android:theme="?attr/actionBarStyle"
|
|
||||||
app:contentScrim="?attr/colorPrimary"
|
|
||||||
app:layout_scrollFlags="scroll|exitUntilCollapsed">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
|
||||||
android:id="@+id/toolbar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="?attr/actionBarSize"
|
|
||||||
app:layout_collapseMode="pin"
|
|
||||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
|
|
||||||
|
|
||||||
|
|
||||||
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
|
||||||
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
<androidx.core.widget.NestedScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
|
|
@ -18,8 +18,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
app:layout_collapseMode="pin"
|
app:layout_collapseMode="pin"
|
||||||
app:layout_scrollFlags="scroll|enterAlways"
|
app:layout_scrollFlags="scroll|enterAlways" />
|
||||||
app:popupTheme="@style/ThemeOverlay.rust.Concept.popupTheme" />
|
|
||||||
|
|
||||||
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
|
@ -1,26 +1,24 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
|
tools:context=".MainActivity">
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="wrap_content"
|
||||||
android:background="?android:windowBackground"
|
|
||||||
android:fitsSystemWindows="true">
|
android:fitsSystemWindows="true">
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize" />
|
||||||
app:layout_collapseMode="pin"
|
|
||||||
app:layout_scrollFlags="scroll|enterAlways"
|
|
||||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
|
|
||||||
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/settings"
|
android:id="@+id/settings"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -4,17 +4,6 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
|
|
||||||
android:id="@+id/videoView"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:id="@+id/appBar"
|
android:id="@+id/appBar"
|
||||||
|
@ -243,8 +232,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
app:layout_collapseMode="pin"
|
app:layout_collapseMode="pin"
|
||||||
app:layout_scrollFlags="scroll|enterAlways"
|
app:layout_scrollFlags="scroll|enterAlways" />
|
||||||
app:popupTheme="@style/ThemeOverlay.rust.Concept.popupTheme" />
|
|
||||||
|
|
||||||
|
|
||||||
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
||||||
|
@ -254,7 +242,6 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="bottom"
|
android:layout_gravity="bottom"
|
||||||
android:background="?android:windowBackground"
|
|
||||||
app:layout_collapseMode="pin"
|
app:layout_collapseMode="pin"
|
||||||
app:layout_scrollFlags="scroll|enterAlways"
|
app:layout_scrollFlags="scroll|enterAlways"
|
||||||
app:tabMode="fixed"
|
app:tabMode="fixed"
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_vertical"
|
android:paddingTop="24dp"
|
||||||
android:orientation="vertical"
|
|
||||||
android:paddingLeft="16dp"
|
android:paddingLeft="16dp"
|
||||||
android:paddingTop="8dp"
|
|
||||||
android:paddingRight="16dp"
|
android:paddingRight="16dp"
|
||||||
android:paddingBottom="8dp">
|
android:paddingBottom="16dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/imageView"
|
android:id="@+id/imageView"
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:text="@string/user_name"
|
android:text="@string/user_name"
|
||||||
android:textSize="16sp" />
|
android:textSize="24sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/emailView"
|
android:id="@+id/emailView"
|
||||||
|
|
58
app/src/main/res/layout/item_guide.xml
Normal file
58
app/src/main/res/layout/item_guide.xml
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="8dp">
|
||||||
|
|
||||||
|
<com.google.android.material.circularreveal.cardview.CircularRevealCardView
|
||||||
|
android:id="@+id/cardView"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:padding="8dp"
|
||||||
|
android:id="@+id/iconView"
|
||||||
|
android:layout_width="75dp"
|
||||||
|
android:layout_height="75dp"
|
||||||
|
android:src="@drawable/image" />
|
||||||
|
</com.google.android.material.circularreveal.cardview.CircularRevealCardView>
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignTop="@id/cardView"
|
||||||
|
android:layout_alignBottom="@id/cardView"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_toStartOf="@id/openView"
|
||||||
|
android:layout_toEndOf="@id/cardView"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/titleView"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="标题"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/describeView"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="15dp"
|
||||||
|
android:text="描述" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/openView"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:src="@drawable/ic_baseline_chevron_right_24" />
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
|
@ -48,7 +48,6 @@
|
||||||
<string name="unit_error">Unable to create, the Unit is exists.</string>
|
<string name="unit_error">Unable to create, the Unit is exists.</string>
|
||||||
<string name="mod_action9">Rename</string>
|
<string name="mod_action9">Rename</string>
|
||||||
<string name="open_action1">Edit text</string>
|
<string name="open_action1">Edit text</string>
|
||||||
<string name="open_action2">Import the mod</string>
|
|
||||||
<string name="open_action3">Unzip</string>
|
<string name="open_action3">Unzip</string>
|
||||||
<string name="open_action4">System default mode</string>
|
<string name="open_action4">System default mode</string>
|
||||||
<string name="loading_files">Load files...</string>
|
<string name="loading_files">Load files...</string>
|
||||||
|
|
|
@ -51,7 +51,6 @@
|
||||||
<string name="unit_error">作成できません。この単位はすでに存在します。</string>
|
<string name="unit_error">作成できません。この単位はすでに存在します。</string>
|
||||||
<string name="mod_action9">名前の変更</string>
|
<string name="mod_action9">名前の変更</string>
|
||||||
<string name="open_action1">テキストの編集</string>
|
<string name="open_action1">テキストの編集</string>
|
||||||
<string name="open_action2">モジュールのインポート</string>
|
|
||||||
<string name="open_action3">ファイルの解凍</string>
|
<string name="open_action3">ファイルの解凍</string>
|
||||||
<string name="open_action4">システムデフォルトでオン</string>
|
<string name="open_action4">システムデフォルトでオン</string>
|
||||||
<string name="loading_files">ファイルをロード...</string>
|
<string name="loading_files">ファイルをロード...</string>
|
||||||
|
|
|
@ -53,7 +53,6 @@
|
||||||
<string name="mod_action9">Переименование.</string>
|
<string name="mod_action9">Переименование.</string>
|
||||||
<string name="mod_action10">Исправить информационные файлы</string>
|
<string name="mod_action10">Исправить информационные файлы</string>
|
||||||
<string name="open_action1">Изменить текст.</string>
|
<string name="open_action1">Изменить текст.</string>
|
||||||
<string name="open_action2">Импорт модуля.</string>
|
|
||||||
<string name="open_action3">Извлеките файл.</string>
|
<string name="open_action3">Извлеките файл.</string>
|
||||||
<string name="open_action4">Система включена по умолчанию.</string>
|
<string name="open_action4">Система включена по умолчанию.</string>
|
||||||
<string name="not_find_units">Единица не найдена.</string>
|
<string name="not_find_units">Единица не найдена.</string>
|
||||||
|
|
10
app/src/main/res/values-v23/themes.xml
Normal file
10
app/src/main/res/values-v23/themes.xml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
|
||||||
|
<style name="Theme.rust.Concept" parent="Base.rust.Concept">
|
||||||
|
<!-- Transparent system bars for edge-to-edge. -->
|
||||||
|
<item name="android:navigationBarColor">@android:color/transparent</item>
|
||||||
|
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||||
|
<item name="android:windowLightStatusBar">?attr/isLightTheme</item>
|
||||||
|
</style>
|
||||||
|
</resources>
|
|
@ -51,7 +51,6 @@
|
||||||
<string name="folder_error">無法創建,此文件夾已存在。</string>
|
<string name="folder_error">無法創建,此文件夾已存在。</string>
|
||||||
<string name="mod_action9">重命名</string>
|
<string name="mod_action9">重命名</string>
|
||||||
<string name="open_action1">編輯文本</string>
|
<string name="open_action1">編輯文本</string>
|
||||||
<string name="open_action2">導入模組</string>
|
|
||||||
<string name="open_action3">解壓文件</string>
|
<string name="open_action3">解壓文件</string>
|
||||||
<string name="open_action4">系統默認方式打開</string>
|
<string name="open_action4">系統默認方式打開</string>
|
||||||
<string name="loading_files">加載文件...</string>
|
<string name="loading_files">加載文件...</string>
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
<string name="always_allow">始终允许</string>
|
<string name="always_allow">始终允许</string>
|
||||||
<string name="pay_yes">是的,确实收到了</string>
|
<string name="pay_yes">是的,确实收到了</string>
|
||||||
<string name="pay_no">不,没有</string>
|
<string name="pay_no">不,没有</string>
|
||||||
|
<string name="creation_wizard">创建向导</string>
|
||||||
<string name="dialog_cancel">取消</string>
|
<string name="dialog_cancel">取消</string>
|
||||||
<string name="no_longer_prompt">不再提示</string>
|
<string name="no_longer_prompt">不再提示</string>
|
||||||
<string name="navigation_tip">共%1$d个项目支持快速导航。</string>
|
<string name="navigation_tip">共%1$d个项目支持快速导航。</string>
|
||||||
|
@ -81,6 +81,7 @@
|
||||||
<string name="tags_error">请输入标签。</string>
|
<string name="tags_error">请输入标签。</string>
|
||||||
<string name="mod_tags_help">请使用\",\"分割标签,拥有相同标签的作品会被分到一类。</string>
|
<string name="mod_tags_help">请使用\",\"分割标签,拥有相同标签的作品会被分到一类。</string>
|
||||||
<string name="create_mod_lable">创建模组</string>
|
<string name="create_mod_lable">创建模组</string>
|
||||||
|
<string name="create_mod_describe">创建一个新模组。</string>
|
||||||
<string name="filter">过滤</string>
|
<string name="filter">过滤</string>
|
||||||
<string name="activate_the_account">激活账户</string>
|
<string name="activate_the_account">激活账户</string>
|
||||||
<string name="activate_the_account_ok">激活成功,请重新登录。</string>
|
<string name="activate_the_account_ok">激活成功,请重新登录。</string>
|
||||||
|
@ -115,8 +116,14 @@
|
||||||
<string name="mod_action9">重命名</string>
|
<string name="mod_action9">重命名</string>
|
||||||
<string name="mod_action10">修复信息文件</string>
|
<string name="mod_action10">修复信息文件</string>
|
||||||
<string name="open_action1">编辑文本</string>
|
<string name="open_action1">编辑文本</string>
|
||||||
<string name="open_action2">导入模组</string>
|
|
||||||
<string name="import_template">导入模板包</string>
|
<string name="import_template">导入模板包</string>
|
||||||
|
<string name="import_mod">导入模组</string>
|
||||||
|
<string name="import_mod_from_file_manager_describe">从文件管理导入模组。</string>
|
||||||
|
<string name="import_mod_from_recycle_bin">回收站</string>
|
||||||
|
<string name="import_mod_from_recycle_bin_describe">从回收站恢复模组。</string>
|
||||||
|
<string name="import_mod_from_package_directory">打包目录</string>
|
||||||
|
<string name="import_mod_from_package_directory_describe">导入之前打包的模组。</string>
|
||||||
<string name="open_action3">解压文件</string>
|
<string name="open_action3">解压文件</string>
|
||||||
<string name="open_action4">系统默认方式打开</string>
|
<string name="open_action4">系统默认方式打开</string>
|
||||||
<string name="not_find_units">没有找到单位</string>
|
<string name="not_find_units">没有找到单位</string>
|
||||||
|
|
|
@ -10,39 +10,12 @@
|
||||||
|
|
||||||
|
|
||||||
<!--概念主题 -->
|
<!--概念主题 -->
|
||||||
<style name="Theme.rust.Concept" parent="Base.rust.Concept">
|
<style name="Theme.rust.Concept" parent="Base.rust.Concept" />
|
||||||
<!--主色调-->
|
|
||||||
<!-- <item name="colorPrimary">@color/pink_500</item>-->
|
|
||||||
<!--主色调变体-->
|
|
||||||
<!-- <item name="colorPrimaryVariant">@color/pink_200</item>-->
|
|
||||||
<!--主色调之上-->
|
|
||||||
<!-- <item name="colorOnPrimary">@color/white</item>-->
|
|
||||||
|
|
||||||
<!--次要颜色-->
|
|
||||||
<!-- <item name="colorSecondary">@color/blue_500</item>-->
|
|
||||||
<!-- <item name="colorSecondaryVariant">@color/blue_700</item>-->
|
|
||||||
<!-- <item name="colorOnSecondary">@color/black</item>-->
|
|
||||||
|
|
||||||
<!-- <item name="android:statusBarColor">@color/white_200</item>-->
|
|
||||||
<!-- <item name="android:windowLightStatusBar" tools:targetApi="m">true</item>-->
|
|
||||||
<!-- <item name="actionBarStyle">@style/ThemeOverlay.rust.Concept.ActionBar</item>-->
|
|
||||||
<!-- <item name="android:windowBackground">@color/white_200</item>-->
|
|
||||||
<!-- <item name="android:navigationBarColor">@color/white_200</item>-->
|
|
||||||
<!-- <item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">true</item>-->
|
|
||||||
</style>
|
|
||||||
|
|
||||||
|
|
||||||
<style name="Base.rust.Concept" parent="Theme.Material3.DayNight.NoActionBar"/>
|
<style name="Base.rust.Concept" parent="Theme.Material3.DynamicColors.DayNight">
|
||||||
|
<item name="windowNoTitle">true</item>
|
||||||
<!--概念活动栏样式-->
|
<item name="windowActionBar">false</item>
|
||||||
<style name="ThemeOverlay.rust.Concept.ActionBar" parent="ThemeOverlay.Material3.ActionBar">
|
|
||||||
<item name="android:textColorPrimary">@color/black</item>
|
|
||||||
<item name="colorPrimary">?android:windowBackground</item>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="ThemeOverlay.rust.Concept.popupTheme" parent="ThemeOverlay.Material3.Light">
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!--设置标签为小写-->
|
<!--设置标签为小写-->
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
package com.coldmint.rust.core.dataBean.user
|
||||||
|
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName
|
||||||
|
|
||||||
|
data class ActivationInfo(
|
||||||
|
@SerializedName("code")
|
||||||
|
val code: Int,
|
||||||
|
@SerializedName("data")
|
||||||
|
val `data`: Data,
|
||||||
|
@SerializedName("message")
|
||||||
|
val message: String
|
||||||
|
) {
|
||||||
|
data class Data(
|
||||||
|
@SerializedName("account")
|
||||||
|
val account: String,
|
||||||
|
@SerializedName("activation")
|
||||||
|
val activation: Boolean,
|
||||||
|
@SerializedName("headIcon")
|
||||||
|
val headIcon: String?,
|
||||||
|
@SerializedName("banTime")
|
||||||
|
val banTime: String?,
|
||||||
|
@SerializedName("email")
|
||||||
|
val email: String,
|
||||||
|
@SerializedName("enable")
|
||||||
|
val enable: String,
|
||||||
|
@SerializedName("expirationTime")
|
||||||
|
val expirationTime: String,
|
||||||
|
@SerializedName("userName")
|
||||||
|
val userName: String,
|
||||||
|
@SerializedName("permission")
|
||||||
|
val permission: Int
|
||||||
|
)
|
||||||
|
}
|
|
@ -1,30 +1,22 @@
|
||||||
package com.coldmint.rust.core.dataBean.user
|
package com.coldmint.rust.core.dataBean.user
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户数据
|
import com.google.gson.annotations.SerializedName
|
||||||
* @property code Int
|
|
||||||
* @property `data` Data
|
|
||||||
* @property message String
|
|
||||||
* @constructor
|
|
||||||
*/
|
|
||||||
data class UserData(
|
data class UserData(
|
||||||
|
@SerializedName("code")
|
||||||
val code: Int,
|
val code: Int,
|
||||||
|
@SerializedName("data")
|
||||||
val `data`: Data,
|
val `data`: Data,
|
||||||
|
@SerializedName("message")
|
||||||
val message: String
|
val message: String
|
||||||
) {
|
) {
|
||||||
data class Data(
|
data class Data(
|
||||||
val account: String,
|
@SerializedName("activation")
|
||||||
val appID: String,
|
val activation: Boolean,
|
||||||
val creationTime: String,
|
@SerializedName("expirationTime")
|
||||||
val email: String,
|
|
||||||
val enable: Boolean,
|
|
||||||
val expirationTime: String,
|
val expirationTime: String,
|
||||||
val gender: Int,
|
@SerializedName("token")
|
||||||
val headIcon: String?,
|
val token: String
|
||||||
val loginTime: String,
|
|
||||||
val password: String,
|
|
||||||
val permission: Int,
|
|
||||||
val userName: String,
|
|
||||||
val activation: Boolean
|
|
||||||
)
|
)
|
||||||
}
|
}
|
|
@ -16,7 +16,6 @@ import java.io.IOException
|
||||||
* @author Cold Mint
|
* @author Cold Mint
|
||||||
* @date 2021/12/22 20:12
|
* @date 2021/12/22 20:12
|
||||||
*/
|
*/
|
||||||
@Deprecated("已废弃")
|
|
||||||
class ActivationApp private constructor() {
|
class ActivationApp private constructor() {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
|
@ -9,7 +9,6 @@ import com.google.gson.Gson
|
||||||
import okhttp3.*
|
import okhttp3.*
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
|
||||||
@Deprecated("已废弃")
|
|
||||||
class AppUpdate {
|
class AppUpdate {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -12,7 +12,6 @@ import java.io.IOException
|
||||||
/**
|
/**
|
||||||
* 轮播图管理器
|
* 轮播图管理器
|
||||||
*/
|
*/
|
||||||
@Deprecated("已废弃")
|
|
||||||
class BannerManager private constructor() {
|
class BannerManager private constructor() {
|
||||||
companion object {
|
companion object {
|
||||||
val instance: BannerManager by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) {
|
val instance: BannerManager by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) {
|
||||||
|
|
|
@ -10,7 +10,6 @@ import com.google.gson.Gson
|
||||||
import okhttp3.*
|
import okhttp3.*
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
|
||||||
@Deprecated("已废弃")
|
|
||||||
object Community {
|
object Community {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -14,7 +14,6 @@ import java.io.IOException
|
||||||
* @author Cold Mint
|
* @author Cold Mint
|
||||||
* @date 2022/1/10 20:17
|
* @date 2022/1/10 20:17
|
||||||
*/
|
*/
|
||||||
@Deprecated("已废弃")
|
|
||||||
class Coupon {
|
class Coupon {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
|
@ -14,7 +14,6 @@ import java.io.IOException
|
||||||
/**
|
/**
|
||||||
* 动态
|
* 动态
|
||||||
*/
|
*/
|
||||||
@Deprecated("已废弃")
|
|
||||||
class Dynamic private constructor() {
|
class Dynamic private constructor() {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
|
@ -15,7 +15,6 @@ import java.io.IOException
|
||||||
* @author Cold Mint
|
* @author Cold Mint
|
||||||
* @date 2022/1/6 19:45
|
* @date 2022/1/6 19:45
|
||||||
*/
|
*/
|
||||||
@Deprecated("已废弃")
|
|
||||||
class Report private constructor() {
|
class Report private constructor() {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
|
@ -9,7 +9,6 @@ import com.google.gson.Gson
|
||||||
import okhttp3.*
|
import okhttp3.*
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
|
||||||
@Deprecated("已过时")
|
|
||||||
class Search private constructor() {
|
class Search private constructor() {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
|
@ -5,6 +5,7 @@ import android.os.Looper
|
||||||
import com.coldmint.rust.core.dataBean.ApiResponse
|
import com.coldmint.rust.core.dataBean.ApiResponse
|
||||||
import com.coldmint.rust.core.dataBean.LoginRequestData
|
import com.coldmint.rust.core.dataBean.LoginRequestData
|
||||||
import com.coldmint.rust.core.dataBean.RegisterRequestData
|
import com.coldmint.rust.core.dataBean.RegisterRequestData
|
||||||
|
import com.coldmint.rust.core.dataBean.user.ActivationInfo
|
||||||
import com.coldmint.rust.core.dataBean.user.SocialInfoData
|
import com.coldmint.rust.core.dataBean.user.SocialInfoData
|
||||||
import com.coldmint.rust.core.dataBean.user.SpaceInfoData
|
import com.coldmint.rust.core.dataBean.user.SpaceInfoData
|
||||||
import com.coldmint.rust.core.dataBean.user.UserData
|
import com.coldmint.rust.core.dataBean.user.UserData
|
||||||
|
@ -21,7 +22,6 @@ import java.lang.NullPointerException
|
||||||
/**
|
/**
|
||||||
* 用户类
|
* 用户类
|
||||||
*/
|
*/
|
||||||
@Deprecated("已废弃")
|
|
||||||
object User {
|
object User {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -314,6 +314,48 @@ object User {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户激活信息
|
||||||
|
* @param token String
|
||||||
|
* @param apiCallBack ApiCallBack<ActivationInfo>
|
||||||
|
*/
|
||||||
|
fun getUserActivationInfo(token : String, apiCallBack: ApiCallBack<ActivationInfo>) {
|
||||||
|
val okHttpClient = ServerConfiguration.initOkHttpClient()
|
||||||
|
val requestBody: FormBody =
|
||||||
|
FormBody.Builder().add("token", token)
|
||||||
|
.build()
|
||||||
|
val request =
|
||||||
|
Request.Builder()
|
||||||
|
.url(ServerConfiguration.website + "php/user.php?action=getUserActivationInfo")
|
||||||
|
.post(requestBody).build()
|
||||||
|
val call = okHttpClient.newCall(request)
|
||||||
|
val handler = Handler(Looper.getMainLooper())
|
||||||
|
val gson = Gson()
|
||||||
|
call.enqueue(object : Callback {
|
||||||
|
override fun onFailure(call: Call, e: IOException) {
|
||||||
|
e.printStackTrace()
|
||||||
|
handler.post { apiCallBack.onFailure(e) }
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onResponse(call: Call, response: Response) {
|
||||||
|
try {
|
||||||
|
val data = response.body!!.string()
|
||||||
|
val finalActivationInfo =
|
||||||
|
gson.fromJson(data, ActivationInfo::class.java)
|
||||||
|
handler.post {
|
||||||
|
apiCallBack.onResponse(finalActivationInfo)
|
||||||
|
}
|
||||||
|
} catch (e: Exception) {
|
||||||
|
e.printStackTrace()
|
||||||
|
handler.post {
|
||||||
|
apiCallBack.onFailure(e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取用户社交信息
|
* 获取用户社交信息
|
||||||
* @param apiCallBack ApiCallBack<WebModData>
|
* @param apiCallBack ApiCallBack<WebModData>
|
||||||
|
|
|
@ -14,7 +14,6 @@ import okhttp3.RequestBody.Companion.asRequestBody
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
|
||||||
@Deprecated("已废弃")
|
|
||||||
class WebMod private constructor() {
|
class WebMod private constructor() {
|
||||||
|
|
||||||
enum class SortMode(private val value: String) {
|
enum class SortMode(private val value: String) {
|
||||||
|
|
|
@ -2,4 +2,5 @@
|
||||||
<resources>
|
<resources>
|
||||||
<color name="red">#D32F2F</color>
|
<color name="red">#D32F2F</color>
|
||||||
<color name="yellow">#FBC02D</color>
|
<color name="yellow">#FBC02D</color>
|
||||||
|
<color name="icon_color">#2196F3</color>
|
||||||
</resources>
|
</resources>
|
|
@ -10,12 +10,15 @@ import retrofit2.converter.gson.GsonConverterFactory
|
||||||
/**
|
/**
|
||||||
* 网络管理器
|
* 网络管理器
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@Deprecated("已废弃", level = DeprecationLevel.HIDDEN)
|
||||||
object NetworkManager {
|
object NetworkManager {
|
||||||
|
|
||||||
private var baseUrl: String? = null
|
private var baseUrl: String? = null
|
||||||
|
|
||||||
private var retrofit: Retrofit? = null
|
private var retrofit: Retrofit? = null
|
||||||
|
|
||||||
|
|
||||||
const val debugKey = "网络管理器"
|
const val debugKey = "网络管理器"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
include ':app'
|
include ':app'
|
||||||
rootProject.name = "铁锈助手"
|
rootProject.name = "铁锈助手"
|
||||||
include ':assistantCoreLibrary'
|
include ':assistantCoreLibrary'
|
||||||
include ':networkApi'
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user