正在迁移对话框。

This commit is contained in:
coldmint 2022-09-04 15:49:29 +08:00
parent f9dee274b0
commit 5e96af168f
97 changed files with 1792 additions and 1125 deletions

Binary file not shown.

View File

@ -27,8 +27,8 @@ android {
applicationId "com.coldmint.rust.pro" applicationId "com.coldmint.rust.pro"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 32 targetSdkVersion 32
versionCode 19 versionCode 21
versionName "2.1 Beta1 (2022-9-1)" versionName "2.1 Bata1_patch4(2022-9-3)"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }
@ -91,10 +91,10 @@ dependencies {
implementation 'com.github.promeg:tinypinyin:2.0.3' implementation 'com.github.promeg:tinypinyin:2.0.3'
implementation 'io.github.youth5201314:banner:2.2.2' implementation 'io.github.youth5201314:banner:2.2.2'
implementation 'androidx.core:core-ktx:1.8.0' implementation 'androidx.core:core-ktx:1.8.0'
implementation 'com.github.deano2390:MaterialShowcaseView:1.3.4' // implementation 'com.github.deano2390:MaterialShowcaseView:1.3.4'
implementation 'com.google.code.gson:gson:2.9.1' implementation 'com.google.code.gson:gson:2.9.1'
implementation 'com.github.yalantis:ucrop:2.2.8-native' implementation 'com.github.yalantis:ucrop:2.2.8-native'
implementation 'com.kongzue.stacklabel:stacklabelview:1.1.9' // implementation 'com.kongzue.stacklabel:stacklabelview:1.1.9'
implementation 'io.github.Rosemoe.sora-editor:editor:0.16.5' implementation 'io.github.Rosemoe.sora-editor:editor:0.16.5'
implementation project(path: ':assistantCoreLibrary') implementation project(path: ':assistantCoreLibrary')
implementation project(path: ':dialog') implementation project(path: ':dialog')
@ -107,7 +107,7 @@ dependencies {
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.5.0' implementation 'androidx.appcompat:appcompat:1.5.0'
implementation 'com.google.android.material:material:1.7.0-beta01' implementation 'com.google.android.material:material:1.7.0-rc01'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version" implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
implementation "androidx.navigation:navigation-ui-ktx:$nav_version" implementation "androidx.navigation:navigation-ui-ktx:$nav_version"

View File

@ -11,8 +11,8 @@
"type": "SINGLE", "type": "SINGLE",
"filters": [], "filters": [],
"attributes": [], "attributes": [],
"versionCode": 19, "versionCode": 21,
"versionName": "2.1 Beta1 (2022-9-1)", "versionName": "2.1 Bata1_patch4(2022-9-3)",
"outputFile": "app-release.apk" "outputFile": "app-release.apk"
} }
], ],

Binary file not shown.

View File

@ -53,7 +53,8 @@ class AboutActivity : BaseActivity<ActivityAboutBinding>() {
| |
|<p>铁锈助手2.0版本用零零散散的时间开发了1年开发语言以及开发环境都特别的正式了</p> |<p>铁锈助手2.0版本用零零散散的时间开发了1年开发语言以及开发环境都特别的正式了</p>
|<p>环境移到了电脑上使用Android Studio开发开发语言也从java迁移至了Kotlin</p> |<p>环境移到了电脑上使用Android Studio开发开发语言也从java迁移至了Kotlin</p>
|<p>越来越正式了更多的新功能也在慢慢的加入</p> |
|<p>为了安全使用了加固</p>
| |
| |
""".trimMargin() """.trimMargin()

View File

@ -8,11 +8,7 @@ import android.text.method.LinkMovementMethod
import android.text.style.ClickableSpan import android.text.style.ClickableSpan
import android.view.* import android.view.*
import androidx.core.view.isVisible import androidx.core.view.isVisible
import com.afollestad.materialdialogs.MaterialDialog import com.coldmint.dialog.InputDialog
import com.afollestad.materialdialogs.WhichButton
import com.afollestad.materialdialogs.actions.setActionButtonEnabled
import com.afollestad.materialdialogs.input.getInputField
import com.afollestad.materialdialogs.input.input
import com.coldmint.rust.core.database.code.CodeDataBase import com.coldmint.rust.core.database.code.CodeDataBase
import com.coldmint.rust.core.database.code.CodeInfo import com.coldmint.rust.core.database.code.CodeInfo
import com.coldmint.rust.core.database.code.SectionInfo import com.coldmint.rust.core.database.code.SectionInfo
@ -163,20 +159,18 @@ class CodeTableActivity : BaseActivity<ActivityCodeTableBinding>() {
override fun onOptionsItemSelected(item: MenuItem): Boolean { override fun onOptionsItemSelected(item: MenuItem): Boolean {
when (item.itemId) { when (item.itemId) {
R.id.filter_units -> { R.id.filter_units -> {
MaterialDialog(this).show { InputDialog(this).setTitle(R.string.filter).setMessage(R.string.filter_tip)
title(R.string.filter).message(R.string.filter_tip) .setInputCanBeEmpty(false).setMaxNumber(20)
input(maxLength = 20, waitForPositiveButton = false) { dialog, text -> .setPositiveButton(R.string.dialog_ok) { text ->
if (text.isNotEmpty()) { var key = text
dialog.setActionButtonEnabled(WhichButton.POSITIVE, true)
}
}.positiveButton(R.string.dialog_ok, null) { dialog ->
var key = dialog.getInputField().text.toString()
if (key.length > 20) { if (key.length > 20) {
key = key.substring(0, 20) key = key.substring(0, 20)
} }
loadData(key) loadData(key)
}.negativeButton(R.string.dialog_close) true
} }.setNegativeButton(R.string.dialog_close) {
}.show()
} }
android.R.id.home -> { android.R.id.home -> {
ifNeedFinish() ifNeedFinish()

View File

@ -12,7 +12,6 @@ import androidx.activity.result.ActivityResultLauncher
import androidx.activity.result.contract.ActivityResultContracts import androidx.activity.result.contract.ActivityResultContracts
import androidx.core.view.isVisible import androidx.core.view.isVisible
import androidx.palette.graphics.Palette import androidx.palette.graphics.Palette
import com.afollestad.materialdialogs.utils.MDUtil.getWidthAndHeight
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
import com.bumptech.glide.request.RequestOptions.bitmapTransform import com.bumptech.glide.request.RequestOptions.bitmapTransform
import com.coldmint.dialog.CoreDialog import com.coldmint.dialog.CoreDialog
@ -62,8 +61,8 @@ class CustomizeEditTextActivity : BaseActivity<ActivityCustomizeEditTextBinding>
val type = FileOperator.getFileType(file) val type = FileOperator.getFileType(file)
if (type == "png" || type == "jpg") { if (type == "png" || type == "jpg") {
val bitmap = BitmapFactory.decodeFile(path) val bitmap = BitmapFactory.decodeFile(path)
val width = windowManager.getWidthAndHeight().first val width = windowManager.defaultDisplay.width
val height = windowManager.getWidthAndHeight().second val height = windowManager.defaultDisplay.height
val imageWidth = bitmap.width val imageWidth = bitmap.width
val imageHeight = bitmap.height val imageHeight = bitmap.height
if (width % imageWidth == 0 && height % imageHeight == 0) { if (width % imageWidth == 0 && height % imageHeight == 0) {

View File

@ -19,16 +19,12 @@ import androidx.drawerlayout.widget.DrawerLayout
import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.ViewModelProvider
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.WhichButton
import com.afollestad.materialdialogs.actions.setActionButtonEnabled
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
import com.afollestad.materialdialogs.input.getInputField
import com.afollestad.materialdialogs.input.input
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
import com.bumptech.glide.request.RequestOptions import com.bumptech.glide.request.RequestOptions
import com.bumptech.glide.request.target.CustomTarget import com.bumptech.glide.request.target.CustomTarget
import com.bumptech.glide.request.transition.Transition import com.bumptech.glide.request.transition.Transition
import com.coldmint.dialog.CoreDialog
import com.coldmint.dialog.InputDialog
import com.coldmint.rust.core.ModClass import com.coldmint.rust.core.ModClass
import com.coldmint.rust.core.database.code.CodeDataBase import com.coldmint.rust.core.database.code.CodeDataBase
import com.coldmint.rust.core.database.file.FileDataBase import com.coldmint.rust.core.database.file.FileDataBase
@ -51,6 +47,11 @@ import com.coldmint.rust.pro.viewmodel.EditStartViewModel
import com.coldmint.rust.pro.viewmodel.EditViewModel import com.coldmint.rust.pro.viewmodel.EditViewModel
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.snackbar.Snackbar import com.google.android.material.snackbar.Snackbar
import io.github.rosemoe.sora.lang.completion.CompletionPublisher
import io.github.rosemoe.sora.text.CharPosition
import io.github.rosemoe.sora.text.ContentReference
import io.github.rosemoe.sora.widget.EditorSearcher
import io.github.rosemoe.sora.widget.component.EditorAutoCompletion
import io.github.rosemoe.sora.widget.schemes.EditorColorScheme import io.github.rosemoe.sora.widget.schemes.EditorColorScheme
import jp.wasabeef.glide.transformations.BlurTransformation import jp.wasabeef.glide.transformations.BlurTransformation
import java.io.File import java.io.File
@ -161,9 +162,8 @@ class EditActivity : BaseActivity<ActivityEditBinding>() {
fun loadMainObserve() { fun loadMainObserve() {
viewModel.needSaveLiveData.observe(this) { viewModel.needSaveLiveData.observe(this) {
if (it) { if (it) {
MaterialDialog(this).show { CoreDialog(this).setTitle(R.string.edit_function).setMessage(R.string.text_changed)
title(R.string.edit_function).message(R.string.text_changed) .setPositiveButton(R.string.edit_function) {
.positiveButton(R.string.edit_function) {
viewModel.saveAllFile( viewModel.saveAllFile(
viewBinding.tabLayout.selectedTabPosition, viewBinding.tabLayout.selectedTabPosition,
viewBinding.codeEditor.text.toString() viewBinding.codeEditor.text.toString()
@ -171,22 +171,24 @@ class EditActivity : BaseActivity<ActivityEditBinding>() {
viewModel.needCheckAutoSave = false viewModel.needCheckAutoSave = false
finish() finish()
} }
}.negativeButton(R.string.dialog_cancel) }.setNegativeButton(R.string.dialog_cancel) {
.neutralButton(R.string.not_save_exit).neutralButton {
MaterialDialog(this@EditActivity).show { }.setNeutralButton(R.string.not_save_exit) {
title(R.string.not_save_exit).message(R.string.not_save_exit_tip) CoreDialog(this@EditActivity).setTitle(R.string.not_save_exit)
.negativeButton(R.string.dialog_cancel) .setMessage(R.string.not_save_exit_tip)
.positiveButton(R.string.dialog_ok) { .setNegativeButton(R.string.dialog_cancel) {
}
.setPositiveButton(R.string.dialog_ok) {
viewModel.needCheckAutoSave = false viewModel.needCheckAutoSave = false
finish() finish()
}.cancelable(false) }.setCancelable(false).show()
} }.setCancelable(false).show()
}.cancelable(false)
}
} }
} }
viewModel.englishModeLiveData.observe(this) { viewModel.englishModeLiveData.observe(this)
{
rustLanguage.setEnglish(it) rustLanguage.setEnglish(it)
} }
@ -225,7 +227,8 @@ class EditActivity : BaseActivity<ActivityEditBinding>() {
// } // }
// true // true
// } // }
viewModel.openedSourceFileListLiveData.observe(this) { viewModel.openedSourceFileListLiveData.observe(this)
{
viewBinding.tabLayout.removeAllTabs() viewBinding.tabLayout.removeAllTabs()
viewBinding.tabLayout.isVisible = true viewBinding.tabLayout.isVisible = true
it.forEach { it.forEach {
@ -271,17 +274,14 @@ class EditActivity : BaseActivity<ActivityEditBinding>() {
when (it.title.toString()) { when (it.title.toString()) {
getString(R.string.close) -> { getString(R.string.close) -> {
if (openedSourceFile.isNeedSave()) { if (openedSourceFile.isNeedSave()) {
MaterialDialog(this).show { CoreDialog(this).setTitle(R.string.edit_function)
title(R.string.edit_function).message( .setMessage(R.string.text_changed)
R.string.text_changed .setPositiveButton(R.string.edit_function) {
).positiveButton(R.string.edit_function).positiveButton {
viewModel.saveOneFile(openedSourceFile) viewModel.saveOneFile(openedSourceFile)
viewModel.closeFile(openedSourceFile) viewModel.closeFile(openedSourceFile)
} }.setNegativeButton(R.string.dialog_cancel) {
.negativeButton(R.string.dialog_cancel).negativeButton {
viewModel.closeFile(openedSourceFile) viewModel.closeFile(openedSourceFile)
} }.show()
}
} else { } else {
viewModel.closeFile(openedSourceFile) viewModel.closeFile(openedSourceFile)
} }
@ -305,7 +305,8 @@ class EditActivity : BaseActivity<ActivityEditBinding>() {
} }
} }
viewModel.codeLiveData.observe(this) { viewModel.codeLiveData.observe(this)
{
// rustLanguage.autoCompleteProvider.setSourceFolder( // rustLanguage.autoCompleteProvider.setSourceFolder(
// FileOperator.getSuperDirectory( // FileOperator.getSuperDirectory(
// viewModel.getNowOpenFilePath() // viewModel.getNowOpenFilePath()
@ -319,7 +320,8 @@ class EditActivity : BaseActivity<ActivityEditBinding>() {
} }
viewModel.loadingLiveData.observe( viewModel.loadingLiveData.observe(
this this
) { )
{
if (it) { if (it) {
viewBinding.myProgressBar.isVisible = true viewBinding.myProgressBar.isVisible = true
viewBinding.codeEditor.isVisible = false viewBinding.codeEditor.isVisible = false
@ -478,6 +480,7 @@ class EditActivity : BaseActivity<ActivityEditBinding>() {
// initEndView() // initEndView()
showRenewalTip() showRenewalTip()
loadCustomStyle() loadCustomStyle()
loadSearchLayout()
turretCoordinateResults = turretCoordinateResults =
registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { registerForActivityResult(ActivityResultContracts.StartActivityForResult()) {
viewModel.reloadCode() viewModel.reloadCode()
@ -557,30 +560,26 @@ class EditActivity : BaseActivity<ActivityEditBinding>() {
startActivityForResult(intent, 3) startActivityForResult(intent, 3)
} }
getText(R.string.create_folder) -> { getText(R.string.create_folder) -> {
MaterialDialog(this).show { InputDialog(this).setTitle(R.string.create_folder)
title(R.string.create_folder) .setHint(R.string.file_name)
input(maxLength = 255, waitForPositiveButton = false) { dialog, text -> .setCancelable(false).setInputCanBeEmpty(false).setMaxNumber(255)
if (text.length in 1..255) { .setErrorTip { s, textInputLayout ->
dialog.setActionButtonEnabled(WhichButton.POSITIVE, true) val newFolder =
} File(editStartViewModel.loadPathLiveData.value + "/" + s)
}.positiveButton(R.string.dialog_ok, null) { dialog -> if (newFolder.exists()) {
val string = dialog.getInputField().text.toString() textInputLayout.error = getString(R.string.folder_error)
if (!string.isEmpty()) {
val file =
File(editStartViewModel.loadPathLiveData.value + "/" + string)
if (file.exists()) {
Toast.makeText(
this@EditActivity,
R.string.folder_error,
Toast.LENGTH_SHORT
).show()
} else { } else {
file.mkdirs() textInputLayout.isErrorEnabled = false
}
}.setPositiveButton(R.string.dialog_ok) { i ->
val newFolder =
File(editStartViewModel.loadPathLiveData.value + "/" + i)
val res = newFolder.mkdirs()
editStartViewModel.reloadList() editStartViewModel.reloadList()
} res
} }.setNegativeButton(R.string.dialog_cancel) {
}.negativeButton(R.string.dialog_close)
} }.show()
} }
getText(R.string.copy_to_this) -> { getText(R.string.copy_to_this) -> {
viewModel.executorService.submit { viewModel.executorService.submit {
@ -832,28 +831,19 @@ class EditActivity : BaseActivity<ActivityEditBinding>() {
return@OnMenuItemClickListener false return@OnMenuItemClickListener false
} }
val oldName = file.name val oldName = file.name
MaterialDialog(this@EditActivity).show { InputDialog(this).setTitle(R.string.rename).setMaxNumber(255)
title(R.string.rename) .setText(oldName).setPositiveButton(R.string.dialog_ok) { it ->
input( val newName = it
maxLength = 255,
waitForPositiveButton = false, prefill = oldName
) { dialog, text ->
if (text.length in 1..255) {
dialog.setActionButtonEnabled(
WhichButton.POSITIVE,
true
)
}
}.positiveButton(R.string.dialog_ok, null) { dialog ->
val newName = dialog.getInputField().text.toString()
if (newName != oldName) { if (newName != oldName) {
val reNameFile = val reNameFile =
File(editStartViewModel.loadPathLiveData.value + "/" + newName) File(editStartViewModel.loadPathLiveData.value + "/" + newName)
file.renameTo(reNameFile) file.renameTo(reNameFile)
editStartViewModel.reloadList() editStartViewModel.reloadList()
} }
}.negativeButton(R.string.dialog_close) true
} }.setNegativeButton(R.string.dialog_close) {
}.show()
} else if (title == getString(R.string.remove_bookmark)) { } else if (title == getString(R.string.remove_bookmark)) {
viewBinding.editDrawerlayout.closeDrawer(GravityCompat.START) viewBinding.editDrawerlayout.closeDrawer(GravityCompat.START)
val removeBookmark = val removeBookmark =
@ -957,7 +947,7 @@ class EditActivity : BaseActivity<ActivityEditBinding>() {
} }
val codeToolAdapter = CodeToolAdapter(this, items) val codeToolAdapter = CodeToolAdapter(this, items)
codeToolAdapter.setItemEvent { i, codeToolItemBinding, viewHolder, item -> codeToolAdapter.setItemEvent { i, codeToolItemBinding, viewHolder, item ->
codeToolItemBinding.root.setOnClickListener { codeToolItemBinding.codeTextItemView.setOnClickListener {
if (item == getString(R.string.symbol11)) { if (item == getString(R.string.symbol11)) {
GlobalMethod.showColorPickerDialog(this) { GlobalMethod.showColorPickerDialog(this) {
viewBinding.codeEditor.insertText(it, it.length) viewBinding.codeEditor.insertText(it, it.length)
@ -978,6 +968,8 @@ class EditActivity : BaseActivity<ActivityEditBinding>() {
).show() ).show()
} }
} else if (item == getString(R.string.code_tip)) { } else if (item == getString(R.string.code_tip)) {
viewBinding.codeEditor.getComponent(EditorAutoCompletion::class.java)
.requireCompletion()
// viewModel.executorService.submit { // viewModel.executorService.submit {
// try { // try {
// val list = ArrayList<CompletionItem>() // val list = ArrayList<CompletionItem>()
@ -1112,7 +1104,12 @@ class EditActivity : BaseActivity<ActivityEditBinding>() {
) )
) )
rustLanguage.setCodeEditor(viewBinding.codeEditor) rustLanguage.setCodeEditor(viewBinding.codeEditor)
viewBinding.codeEditor.setAutoCompletionItemAdapter(RustCompletionAdapter())
val codeEditBackGroundEnable =
AppSettings.getValue(AppSettings.Setting.CodeEditBackGroundEnable, false)
val rustCompletionAdapter = RustCompletionAdapter()
rustCompletionAdapter.setEditBackground(codeEditBackGroundEnable)
viewBinding.codeEditor.setAutoCompletionItemAdapter(rustCompletionAdapter)
viewBinding.codeEditor.isVerticalScrollBarEnabled = false viewBinding.codeEditor.isVerticalScrollBarEnabled = false
val path = viewModel.modClass?.modFile?.absolutePath ?: "" val path = viewModel.modClass?.modFile?.absolutePath ?: ""
CompletionItemConverter.configurationFileConversion( CompletionItemConverter.configurationFileConversion(
@ -1275,10 +1272,9 @@ class EditActivity : BaseActivity<ActivityEditBinding>() {
R.id.display_source_code -> { R.id.display_source_code -> {
val file = File(viewModel.getNowOpenFilePath()) val file = File(viewModel.getNowOpenFilePath())
val code = FileOperator.readFile(file) val code = FileOperator.readFile(file)
MaterialDialog(this, BottomSheet()).show { MaterialAlertDialogBuilder(this).setTitle(file.name).setMessage(code).setNegativeButton(R.string.dialog_ok){
title(text = file.name).message(text = code).negativeButton(R.string.dialog_ok) i,i2->
.cancelable(false) }.setCancelable(false).show()
}
} }
R.id.clear_code_cache -> { R.id.clear_code_cache -> {
Snackbar.make( Snackbar.make(
@ -1396,14 +1392,59 @@ class EditActivity : BaseActivity<ActivityEditBinding>() {
viewBinding.codeEditor.redo() viewBinding.codeEditor.redo()
} }
R.id.search_view -> { R.id.search_view -> {
viewBinding.codeEditor.searcher.stopSearch() viewBinding.searchLayout.isVisible = true
viewBinding.codeEditor.beginSearchMode() viewBinding.allButton.isVisible = false
viewBinding.replaceEditText.setText("")
viewBinding.replaceEditText.isVisible = false
viewBinding.findEditText.setText("")
} }
} }
return super.onOptionsItemSelected(item) return super.onOptionsItemSelected(item)
} }
/**
* 加载搜索布局
*/
fun loadSearchLayout() {
viewBinding.closeButton.setOnClickListener {
viewBinding.searchLayout.isVisible = false
viewBinding.codeEditor.searcher.stopSearch()
}
viewBinding.nextButton.setOnClickListener {
val find = viewBinding.findEditText.text.toString()
viewBinding.codeEditor.searcher.search(find, EditorSearcher.SearchOptions(false, false))
viewBinding.codeEditor.searcher.gotoNext()
}
viewBinding.lastButton.setOnClickListener {
val find = viewBinding.findEditText.text.toString()
viewBinding.codeEditor.searcher.search(find, EditorSearcher.SearchOptions(false, false))
viewBinding.codeEditor.searcher.gotoPrevious()
}
viewBinding.allButton.setOnClickListener {
val find = viewBinding.findEditText.text.toString()
val re = viewBinding.replaceEditText.text.toString()
viewBinding.codeEditor.searcher.search(find, EditorSearcher.SearchOptions(false, false))
viewBinding.codeEditor.searcher.replaceAll(re)
}
viewBinding.replaceButton.setOnClickListener {
val isVisible = viewBinding.replaceLayout.isVisible
if (isVisible) {
val find = viewBinding.findEditText.text.toString()
val re = viewBinding.replaceEditText.text.toString()
viewBinding.codeEditor.searcher.search(
find,
EditorSearcher.SearchOptions(false, false)
)
viewBinding.codeEditor.searcher.replaceThis(re)
} else {
viewBinding.replaceLayout.isVisible = true
viewBinding.allButton.isVisible = true
}
}
}
/** /**
* 打开侧滑 * 打开侧滑
*/ */

View File

@ -14,16 +14,13 @@ import android.view.View
import android.widget.PopupMenu import android.widget.PopupMenu
import android.widget.Toast import android.widget.Toast
import androidx.core.view.isVisible import androidx.core.view.isVisible
import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.WhichButton
import com.afollestad.materialdialogs.actions.setActionButtonEnabled
import com.afollestad.materialdialogs.input.getInputField
import com.afollestad.materialdialogs.input.input
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.dialog.InputDialog
import com.coldmint.rust.core.dataBean.ApiResponse import com.coldmint.rust.core.dataBean.ApiResponse
import com.coldmint.rust.core.dataBean.user.SpaceInfoData import com.coldmint.rust.core.dataBean.user.SpaceInfoData
import com.coldmint.rust.core.interfaces.ApiCallBack import com.coldmint.rust.core.interfaces.ApiCallBack
import com.coldmint.rust.core.tool.DebugHelper
import com.coldmint.rust.core.tool.FileOperator import com.coldmint.rust.core.tool.FileOperator
import com.coldmint.rust.core.web.Community import com.coldmint.rust.core.web.Community
import com.coldmint.rust.core.web.ServerConfiguration import com.coldmint.rust.core.web.ServerConfiguration
@ -171,20 +168,20 @@ class EditUserInfoActivity : BaseActivity<ActivityEditUserInfoBinding>() {
startIntent.putExtra("data", fileBundle) startIntent.putExtra("data", fileBundle)
startActivityForResult(startIntent, 1) startActivityForResult(startIntent, 1)
} else if (title == getString(R.string.from_url)) { } else if (title == getString(R.string.from_url)) {
MaterialDialog(this).show { InputDialog(this).setTitle(R.string.from_url).setMessage(R.string.from_url_tip).setErrorTip { s, textInputLayout ->
title(R.string.from_url).message(R.string.from_url_tip) if (s.matches(Regex("^http://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?$|^https://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?$"))) {
input(waitForPositiveButton = false) { dialog, text -> textInputLayout.error = getString(R.string.from_url_tip)
if (text.matches(Regex("^http://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?$|^https://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?$"))) {
dialog.setActionButtonEnabled(WhichButton.POSITIVE, true)
} else { } else {
dialog.setActionButtonEnabled(WhichButton.POSITIVE, false) textInputLayout.isErrorEnabled = false
} }
}.positiveButton(R.string.dialog_ok, null) { dialog -> }.setPositiveButton(R.string.dialog_ok){
val input = dialog.getInputField().text.toString() input->
needCleanCache = true needCleanCache = true
loadIcon(input) loadIcon(input)
}.negativeButton(R.string.dialog_close) true
} }.setNegativeButton(R.string.dialog_close){
}.show()
} else { } else {
val link = iconLink val link = iconLink
if (link != null) { if (link != null) {
@ -217,20 +214,22 @@ class EditUserInfoActivity : BaseActivity<ActivityEditUserInfoBinding>() {
startIntent.putExtra("data", fileBundle) startIntent.putExtra("data", fileBundle)
startActivityForResult(startIntent, 2) startActivityForResult(startIntent, 2)
} else if (title == getString(R.string.from_url)) { } else if (title == getString(R.string.from_url)) {
MaterialDialog(this).show { InputDialog(this).setTitle(R.string.from_url).setMessage(R.string.from_url_tip).setErrorTip { s, textInputLayout ->
title(R.string.from_url).message(R.string.from_url_tip) if (s.matches(Regex("^http://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?$|^https://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?$"))) {
input(waitForPositiveButton = false) { dialog, text -> textInputLayout.error = getString(R.string.from_url_tip)
if (text.matches(Regex("^http://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?$|^https://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?$"))) {
dialog.setActionButtonEnabled(WhichButton.POSITIVE, true)
} else { } else {
dialog.setActionButtonEnabled(WhichButton.POSITIVE, false) textInputLayout.isErrorEnabled = false
} }
}.positiveButton(R.string.dialog_ok, null) { dialog -> }.setPositiveButton(R.string.dialog_ok){
val input = dialog.getInputField().text.toString() input->
needCleanCache = true needCleanCache = true
loadCover(input) loadCover(input)
}.negativeButton(R.string.dialog_close) true
} }.setNegativeButton(R.string.dialog_close){
}.show()
} else { } else {
val link = coverLink val link = coverLink
if (link != null) { if (link != null) {

View File

@ -15,17 +15,11 @@ import android.net.Uri
import android.os.* import android.os.*
import android.view.* import android.view.*
import android.widget.* import android.widget.*
import android.widget.Toast.makeText
import androidx.activity.result.ActivityResultLauncher import androidx.activity.result.ActivityResultLauncher
import androidx.activity.result.contract.ActivityResultContracts import androidx.activity.result.contract.ActivityResultContracts
import androidx.core.view.isVisible import androidx.core.view.isVisible
import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.ViewModelProvider
import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.WhichButton
import com.afollestad.materialdialogs.actions.setActionButtonEnabled
import com.afollestad.materialdialogs.input.getInputField
import com.afollestad.materialdialogs.input.input
import com.afollestad.materialdialogs.list.listItems
import com.afollestad.materialdialogs.utils.MDUtil.isLandscape
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
import com.coldmint.dialog.CoreDialog import com.coldmint.dialog.CoreDialog
import com.coldmint.dialog.InputDialog import com.coldmint.dialog.InputDialog
@ -42,6 +36,9 @@ import com.coldmint.rust.pro.viewmodel.FileManagerViewModel
import com.google.android.material.chip.Chip import com.google.android.material.chip.Chip
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.snackbar.SnackbarContentLayout import com.google.android.material.snackbar.SnackbarContentLayout
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Job
import kotlinx.coroutines.launch
import me.zhanghai.android.fastscroll.FastScrollerBuilder import me.zhanghai.android.fastscroll.FastScrollerBuilder
import java.io.BufferedReader import java.io.BufferedReader
import java.io.File import java.io.File
@ -49,6 +46,7 @@ import java.io.InputStreamReader
import java.lang.Exception import java.lang.Exception
import java.util.* import java.util.*
import java.util.concurrent.Executors import java.util.concurrent.Executors
import javax.sql.CommonDataSource
import kotlin.collections.ArrayList import kotlin.collections.ArrayList
class FileManagerActivity : BaseActivity<ActivityFileBinding>() { class FileManagerActivity : BaseActivity<ActivityFileBinding>() {
@ -229,16 +227,16 @@ class FileManagerActivity : BaseActivity<ActivityFileBinding>() {
// } // }
FileManagerViewModel.StartType.DEFAULT, FileManagerViewModel.StartType.SELECT_FILE, FileManagerViewModel.StartType.SELECT_DIRECTORY -> { FileManagerViewModel.StartType.DEFAULT, FileManagerViewModel.StartType.SELECT_FILE, FileManagerViewModel.StartType.SELECT_DIRECTORY -> {
val popupMenu = PopupMenu(this@FileManagerActivity, viewBinding.fab) val popupMenu = PopupMenu(this@FileManagerActivity, viewBinding.fab)
// if (mFileAdapter != null) { if (adapter != null) {
// val selectPath = mFileAdapter!!.selectPath val selectPath = adapter!!.selectPath
// if (selectPath != null && mProcessFiles == false) { if (selectPath != null) {
// if (mFileAdapter!!.isCopyFile) { if (adapter!!.isCopyFile) {
// popupMenu.menu.add(R.string.copy_to_this) popupMenu.menu.add(R.string.copy_to_this)
// } else { } else {
// popupMenu.menu.add(R.string.cut_to_this) popupMenu.menu.add(R.string.cut_to_this)
// } }
// } }
// } }
popupMenu.menu.add(R.string.create_unit) popupMenu.menu.add(R.string.create_unit)
popupMenu.menu.add(R.string.create_folder) popupMenu.menu.add(R.string.create_folder)
popupMenu.menu.add(R.string.select_file) popupMenu.menu.add(R.string.select_file)
@ -270,52 +268,63 @@ class FileManagerActivity : BaseActivity<ActivityFileBinding>() {
getText(R.string.create_folder) -> { getText(R.string.create_folder) -> {
createFolderAction() createFolderAction()
} }
// getText(R.string.copy_to_this) -> { getText(R.string.copy_to_this) -> {
// Thread { val job = Job()
// mProcessFiles = true val handler = Handler(Looper.getMainLooper())
// val oldFile = File(mFileAdapter!!.selectPath) val scope = CoroutineScope(job)
// val newFile = File(directs.absolutePath + "/" + oldFile.name) scope.launch {
// if (FileOperator.copyFiles(oldFile, newFile)) { val oldFile = File(adapter!!.selectPath)
// handler.post { val newFile =
// loadFiles(directs) File(viewModel.getCurrentPath() + "/" + oldFile.name)
// mFileAdapter!!.cleanSelectPath() DebugHelper.printLog(
// mProcessFiles = false "文件管理器",
// } "复制文件 旧文件${oldFile.absolutePath} 新文件${newFile.absolutePath}"
// } else { )
// handler.post { adapter!!.cleanSelectPath()
// Toast.makeText( if (FileOperator.copyFiles(oldFile, newFile)) {
// this@FileManagerActivity, handler.post {
// getText(R.string.copy_failed), viewModel.loadFiles(viewModel.getCurrentPath())
// Toast.LENGTH_SHORT }
// ).show() } else {
// mProcessFiles = false
// } handler.post {
// } Snackbar.make(
// }.start() viewBinding.fab,
// } getText(R.string.copy_failed),
// getText(R.string.cut_to_this) -> { Snackbar.LENGTH_SHORT
// Thread { ).show()
// mProcessFiles = true }
// val oldFile = File(mFileAdapter!!.selectPath) }
// val newFile = File(directs.absolutePath + "/" + oldFile.name) }
// if (FileOperator.removeFiles(oldFile, newFile)) { }
// handler.post { getText(R.string.cut_to_this) -> {
// loadFiles(directs) val job = Job()
// mFileAdapter!!.cleanSelectPath() val handler = Handler(Looper.getMainLooper())
// mProcessFiles = false val scope = CoroutineScope(job)
// } scope.launch {
// } else { val oldFile = File(adapter!!.selectPath)
// handler.post { val newFile =
// Toast.makeText( File(viewModel.getCurrentPath() + "/" + oldFile.name)
// this@FileManagerActivity, DebugHelper.printLog(
// getText(R.string.cut_failed), "文件管理器",
// Toast.LENGTH_SHORT "移动文件 旧文件${oldFile.absolutePath} 新文件${newFile.absolutePath}"
// ).show() )
// mProcessFiles = false adapter!!.cleanSelectPath()
// } if (FileOperator.removeFiles(oldFile, newFile)) {
// } handler.post {
// }.start() viewModel.loadFiles(viewModel.getCurrentPath())
// } }
} else {
handler.post {
Snackbar.make(
viewBinding.fab,
getText(R.string.cut_failed),
Snackbar.LENGTH_SHORT
).show()
}
}
}
}
} }
false false
} }
@ -690,6 +699,26 @@ class FileManagerActivity : BaseActivity<ActivityFileBinding>() {
).setAction(R.string.dialog_ok) { ).setAction(R.string.dialog_ok) {
setResultAndFinish(file.absolutePath) setResultAndFinish(file.absolutePath)
}.setGestureInsetBottomIgnored(true).show() }.setGestureInsetBottomIgnored(true).show()
} else if (viewModel.startTypeData == FileManagerViewModel.StartType.DEFAULT) {
val type = FileOperator.getFileType(file)
if (type == "ini" || type == "txt") {
val intent = Intent(this, EditActivity::class.java)
val bundle = Bundle()
bundle.putString("path", file.absolutePath)
bundle.putString(
"modPath",
FileOperator.getSuperDirectory(file)
)
intent.putExtra("data", bundle)
startActivity(intent)
} else {
Snackbar.make(
viewBinding.fab, String.format(
getString(R.string.an_unsupported_file_type),
type
), Snackbar.LENGTH_SHORT
).show()
}
} }
} }
} }
@ -789,6 +818,17 @@ class FileManagerActivity : BaseActivity<ActivityFileBinding>() {
}.show() }.show()
} }
R.id.copyAction -> {
val finalFile =
adapter!!.getItemData(viewHolder.absoluteAdapterPosition)
adapter!!.setSelectPath(finalFile!!.absolutePath, true)
}
R.id.cutOffAction -> {
val finalFile =
adapter!!.getItemData(viewHolder.absoluteAdapterPosition)
adapter!!.setSelectPath(finalFile!!.absolutePath, false)
}
} }
true true
} }

View File

@ -14,7 +14,7 @@ import androidx.core.view.isVisible
import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.ViewModelProvider
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import com.afollestad.materialdialogs.MaterialDialog import com.coldmint.dialog.CoreDialog
import com.coldmint.rust.core.ModClass import com.coldmint.rust.core.ModClass
import com.coldmint.rust.pro.adapters.AttachFileAdapter import com.coldmint.rust.pro.adapters.AttachFileAdapter
import com.coldmint.rust.pro.base.BaseActivity import com.coldmint.rust.pro.base.BaseActivity
@ -145,9 +145,9 @@ class GlobalOperationsActivity : BaseActivity<ActivityGlobalOperationsBinding>()
viewBinding.actionEditText1.text.toString(), viewBinding.actionEditText1.text.toString(),
viewBinding.actionEditText2.text.toString() viewBinding.actionEditText2.text.toString()
) )
MaterialDialog(this).title(text = data).message(R.string.figure_out) CoreDialog(this).setTitle(data).setMessage(R.string.figure_out).setPositiveButton(R.string.dialog_ok){
.cancelable(false)
.positiveButton(R.string.dialog_ok).show() }.setCancelable(false).show()
} }
} }

View File

@ -7,7 +7,7 @@ import android.view.LayoutInflater
import android.widget.Toast import android.widget.Toast
import androidx.core.view.isVisible import androidx.core.view.isVisible
import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.ViewModelProvider
import com.afollestad.materialdialogs.MaterialDialog import com.coldmint.dialog.CoreDialog
import com.coldmint.rust.core.CompressionManager import com.coldmint.rust.core.CompressionManager
import com.coldmint.rust.core.LocalTemplatePackage import com.coldmint.rust.core.LocalTemplatePackage
import com.coldmint.rust.core.dataBean.template.TemplateInfo import com.coldmint.rust.core.dataBean.template.TemplateInfo
@ -235,24 +235,23 @@ class ImporterActivity : BaseActivity<ActivityImporterBinding>() {
} }
if (newInfo.versionNum < oldInfo.versionNum) { if (newInfo.versionNum < oldInfo.versionNum) {
handler.post { handler.post {
MaterialDialog(this).show { CoreDialog(this).setTitle(oldInfo.name).setCancelable(false)
title(text = oldInfo.name).cancelable(false).message( .setMessage(
text = String.format( String.format(
getString(R.string.covers_the_import), getString(R.string.covers_the_import),
newInfo.versionName, oldInfo.versionName newInfo.versionName, oldInfo.versionName
) )
).positiveButton(R.string.dialog_ok).positiveButton { ).setPositiveButton(R.string.dialog_ok) {
FileOperator.delete_files(templateDirectory) FileOperator.delete_files(templateDirectory)
importTemplate(outputDirectory, templateDirectory) importTemplate(outputDirectory, templateDirectory)
}.negativeButton(R.string.dialog_cancel).negativeButton { }.setNegativeButton(R.string.dialog_cancel) {
viewBinding.okButton.setBackgroundColor( viewBinding.okButton.setBackgroundColor(
GlobalMethod.getColorPrimary( GlobalMethod.getColorPrimary(
this@ImporterActivity this@ImporterActivity
) )
) )
viewBinding.okButton.setText(R.string.import_name) viewBinding.okButton.setText(R.string.import_name)
} }.show()
}
} }
return@Runnable return@Runnable
} else { } else {

View File

@ -183,11 +183,12 @@ class LibraryActivity : BaseActivity<ActivityLibraryBinding>() {
if (canUseView) { if (canUseView) {
setReturnButton() setReturnButton()
title = getString(R.string.libs) title = getString(R.string.libs)
viewBinding.libsView.addItemDecoration( val divider = MaterialDividerItemDecoration(
DividerItemDecoration(
this, this,
DividerItemDecoration.VERTICAL MaterialDividerItemDecoration.VERTICAL
) )
viewBinding.libsView.addItemDecoration(
divider
) )
viewBinding.libsView.layoutManager = LinearLayoutManager(this@LibraryActivity) viewBinding.libsView.layoutManager = LinearLayoutManager(this@LibraryActivity)
val libAdapter = LibAdapter(this@LibraryActivity, getLibInfoList()) val libAdapter = LibAdapter(this@LibraryActivity, getLibInfoList())

View File

@ -17,11 +17,6 @@ import android.util.Log
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import androidx.core.view.isVisible import androidx.core.view.isVisible
import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.WhichButton
import com.afollestad.materialdialogs.actions.setActionButtonEnabled
import com.afollestad.materialdialogs.input.getInputField
import com.afollestad.materialdialogs.input.input
import com.coldmint.dialog.InputDialog import com.coldmint.dialog.InputDialog
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
@ -42,10 +37,10 @@ class LoginActivity : BaseActivity<ActivityLoginBinding>() {
private var isLogin = false private var isLogin = false
private fun initAction() { private fun initAction() {
immersionBar { // immersionBar {
transparentStatusBar().statusBarDarkFont(true) // transparentStatusBar().statusBarDarkFont(true)
.transparentNavigationBar().navigationBarDarkIcon(true) // .transparentNavigationBar().navigationBarDarkIcon(true)
} // }
Log.d("应用识别码", AppSettings.getValue(AppSettings.Setting.AppID, "")) Log.d("应用识别码", AppSettings.getValue(AppSettings.Setting.AppID, ""))
viewBinding.changeServerView.isVisible = BuildConfig.DEBUG viewBinding.changeServerView.isVisible = BuildConfig.DEBUG
viewBinding.changePasswordView.setOnClickListener { viewBinding.changePasswordView.setOnClickListener {
@ -147,27 +142,13 @@ class LoginActivity : BaseActivity<ActivityLoginBinding>() {
} else { } else {
when (userData.message) { when (userData.message) {
"请先激活您的账户" -> { "请先激活您的账户" -> {
MaterialDialog(this@LoginActivity).show { InputDialog(this@LoginActivity).setTitle(R.string.activate_the_account)
title(R.string.activate_the_account).message(R.string.activate_the_account_tip) .setMessage(R.string.activate_the_account_tip)
.cancelable(false) .setHint(R.string.verification_code)
input( .setCancelable(false).setMaxNumber(6)
maxLength = 6, .setPositiveButton(R.string.dialog_ok) { text ->
waitForPositiveButton = false
) { dialog, text ->
if (text.length == 6) {
dialog.setActionButtonEnabled(
WhichButton.POSITIVE,
true
)
} else {
dialog.setActionButtonEnabled(
WhichButton.POSITIVE,
false
)
}
}.positiveButton(R.string.dialog_ok, null) { dialog ->
User.activateAccount(account, User.activateAccount(account,
dialog.getInputField().text.toString(), text,
object : ApiCallBack<ApiResponse> { object : ApiCallBack<ApiResponse> {
override fun onResponse(t: ApiResponse) { override fun onResponse(t: ApiResponse) {
if (t.code == ServerConfiguration.Success_Code) { if (t.code == ServerConfiguration.Success_Code) {
@ -190,8 +171,10 @@ class LoginActivity : BaseActivity<ActivityLoginBinding>() {
} }
}) })
}.negativeButton(R.string.dialog_close) true
} }.setNegativeButton(R.string.dialog_close) {
}.show()
} }
"找不到用户" -> { "找不到用户" -> {
setErrorAndInput( setErrorAndInput(
@ -226,32 +209,16 @@ class LoginActivity : BaseActivity<ActivityLoginBinding>() {
override fun onResponse(t: ApiResponse) { override fun onResponse(t: ApiResponse) {
viewBinding.button.isEnabled = true viewBinding.button.isEnabled = true
if (t.code == ServerConfiguration.Success_Code) { if (t.code == ServerConfiguration.Success_Code) {
MaterialDialog(this@LoginActivity).show { InputDialog(this@LoginActivity).setMaxNumber(
title(R.string.verification).message( 6
R.string.activate_the_account_tip ).setHint(R.string.verification_code)
) .setInputCanBeEmpty(false)
.cancelable(false) .setTitle(R.string.verification)
input( .setMessage(R.string.activate_the_account_tip)
maxLength = 6, .setCancelable(false)
waitForPositiveButton = false .setPositiveButton(R.string.dialog_ok) { it ->
) { dialog, text ->
if (text.length == 6) {
dialog.setActionButtonEnabled(
WhichButton.POSITIVE,
true
)
} else {
dialog.setActionButtonEnabled(
WhichButton.POSITIVE,
false
)
}
}.positiveButton(
R.string.dialog_ok,
null
) { dialog ->
User.changeAppId(account, User.changeAppId(account,
dialog.getInputField().text.toString(), it,
appId, appId,
object : object :
ApiCallBack<ApiResponse> { ApiCallBack<ApiResponse> {
@ -279,8 +246,11 @@ class LoginActivity : BaseActivity<ActivityLoginBinding>() {
} }
}) })
}.negativeButton(R.string.dialog_close) true
} }
.setNegativeButton(R.string.dialog_close) {
}.show()
} else { } else {
Snackbar.make( Snackbar.make(
viewBinding.button, viewBinding.button,

View File

@ -7,11 +7,14 @@ import android.content.pm.PackageInfo
import com.coldmint.rust.pro.tool.AppSettings import com.coldmint.rust.pro.tool.AppSettings
import android.content.Intent import android.content.Intent
import android.content.pm.PackageManager import android.content.pm.PackageManager
import android.content.res.Resources
import com.google.android.material.snackbar.Snackbar import com.google.android.material.snackbar.Snackbar
import android.os.* import android.os.*
import android.util.Log import android.util.Log
import android.view.* import android.view.*
import androidx.appcompat.app.ActionBarDrawerToggle import androidx.appcompat.app.ActionBarDrawerToggle
import androidx.appcompat.widget.Toolbar
import androidx.coordinatorlayout.widget.CoordinatorLayout
import androidx.core.view.GravityCompat import androidx.core.view.GravityCompat
import androidx.core.view.isVisible import androidx.core.view.isVisible
import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.ViewModelProvider
@ -20,7 +23,6 @@ import androidx.navigation.ui.AppBarConfiguration
import androidx.navigation.ui.navigateUp import androidx.navigation.ui.navigateUp
import androidx.navigation.ui.setupActionBarWithNavController import androidx.navigation.ui.setupActionBarWithNavController
import androidx.navigation.ui.setupWithNavController import androidx.navigation.ui.setupWithNavController
import com.afollestad.materialdialogs.MaterialDialog
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
import com.coldmint.dialog.CoreDialog import com.coldmint.dialog.CoreDialog
import com.coldmint.rust.core.CompressionManager import com.coldmint.rust.core.CompressionManager
@ -39,6 +41,7 @@ import com.coldmint.rust.pro.viewmodel.StartViewModel
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.tabs.TabLayout import com.google.android.material.tabs.TabLayout
import com.google.gson.Gson import com.google.gson.Gson
import com.gyf.immersionbar.ImmersionBar
import org.json.JSONObject import org.json.JSONObject
import java.io.File import java.io.File
import java.util.concurrent.Executors import java.util.concurrent.Executors
@ -107,6 +110,8 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
) )
viewBinding.drawerlayout.addDrawerListener(actionToggle) viewBinding.drawerlayout.addDrawerListener(actionToggle)
actionToggle.syncState() actionToggle.syncState()
} }
/** /**
@ -669,15 +674,13 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
startViewModel.signatureErrorLiveData.observe(this) { startViewModel.signatureErrorLiveData.observe(this) {
if (it) { if (it) {
//显示签名错误 //显示签名错误
MaterialDialog(this).show { CoreDialog(this).setTitle(R.string.sign_error)
title(R.string.sign_error).cancelable(false) .setMessage(R.string.sign_error_message).setCancelable(false)
.message(R.string.sign_error_message) .setPositiveButton(R.string.dialog_close) {
.positiveButton(R.string.dialog_close) {
finish() finish()
} }
} }
} }
}
startViewModel.isActivationLiveData.observe(this) { startViewModel.isActivationLiveData.observe(this) {
GlobalMethod.isActive = it GlobalMethod.isActive = it
@ -709,6 +712,18 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
useToolbarSetSupportActionBar() useToolbarSetSupportActionBar()
initNav() initNav()
observeStartViewModel() observeStartViewModel()
//偏移fab
if (ImmersionBar.hasNavigationBar(this)) {
val layoutParams =
viewBinding.mainButton.layoutParams as CoordinatorLayout.LayoutParams
layoutParams.setMargins(
GlobalMethod.dp2px(16),
GlobalMethod.dp2px(16),
GlobalMethod.dp2px(16),
ImmersionBar.getNavigationBarHeight(this) + GlobalMethod.dp2px(16)
)
DebugHelper.printLog("导航适配", "已调整fab按钮的位置。")
}
checkAppUpdate() checkAppUpdate()
} else { } else {
startViewModel.initAllData() startViewModel.initAllData()

View File

@ -15,6 +15,7 @@ import com.coldmint.rust.pro.adapters.TemplateItemAdapter
import com.coldmint.rust.pro.base.BaseActivity import com.coldmint.rust.pro.base.BaseActivity
import com.coldmint.rust.pro.databinding.ActivityNetworkTemplatePackageDetailsBinding import com.coldmint.rust.pro.databinding.ActivityNetworkTemplatePackageDetailsBinding
import com.coldmint.rust.pro.tool.AppSettings import com.coldmint.rust.pro.tool.AppSettings
import com.google.android.material.divider.MaterialDividerItemDecoration
class NetworkTemplatePackageDetailsActivity : class NetworkTemplatePackageDetailsActivity :
BaseActivity<ActivityNetworkTemplatePackageDetailsBinding>() { BaseActivity<ActivityNetworkTemplatePackageDetailsBinding>() {
@ -31,11 +32,12 @@ class NetworkTemplatePackageDetailsActivity :
title = getString(R.string.title) title = getString(R.string.title)
setReturnButton() setReturnButton()
viewBinding.recyclerView.layoutManager = LinearLayoutManager(this) viewBinding.recyclerView.layoutManager = LinearLayoutManager(this)
viewBinding.recyclerView.addItemDecoration( val divider = MaterialDividerItemDecoration(
DividerItemDecoration(
this, this,
DividerItemDecoration.VERTICAL MaterialDividerItemDecoration.VERTICAL
) )
viewBinding.recyclerView.addItemDecoration(
divider
) )
TemplatePhp.instance.getTemplateList( TemplatePhp.instance.getTemplateList(
id, id,
@ -52,7 +54,10 @@ class NetworkTemplatePackageDetailsActivity :
) )
adapter.setItemEvent { i, itemTemplateBinding, viewHolder, template -> adapter.setItemEvent { i, itemTemplateBinding, viewHolder, template ->
itemTemplateBinding.root.setOnClickListener { itemTemplateBinding.root.setOnClickListener {
val intent = Intent(this@NetworkTemplatePackageDetailsActivity,TemplateMakerActivity::class.java) val intent = Intent(
this@NetworkTemplatePackageDetailsActivity,
TemplateMakerActivity::class.java
)
intent.putExtra("name", template.title) intent.putExtra("name", template.title)
intent.putExtra("local", false) intent.putExtra("local", false)
intent.putExtra("path", template.id) intent.putExtra("path", template.id)

View File

@ -9,7 +9,7 @@ import android.view.ViewGroup
import android.widget.PopupMenu import android.widget.PopupMenu
import androidx.core.view.isVisible import androidx.core.view.isVisible
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import com.afollestad.materialdialogs.MaterialDialog import com.coldmint.dialog.CoreDialog
import com.coldmint.rust.core.dataBean.ApiResponse import com.coldmint.rust.core.dataBean.ApiResponse
import com.coldmint.rust.core.dataBean.OrderListDataBean import com.coldmint.rust.core.dataBean.OrderListDataBean
import com.coldmint.rust.core.interfaces.ApiCallBack import com.coldmint.rust.core.interfaces.ApiCallBack
@ -80,16 +80,11 @@ class OrderListActivity : BaseActivity<ActivityOrderListBinding>() {
"设置订单" -> { "设置订单" -> {
when (data.state) { when (data.state) {
"false" -> { "false" -> {
MaterialDialog(this@OrderListActivity).show { CoreDialog(this@OrderListActivity).setTitle(data.name).setMessage("确认收到" + data.account + "的付款了嘛?\n订单创建时间:" + data.createTime).setPositiveButton(R.string.pay_yes){
title(text = data.name).message(text = "确认收到" + data.account + "的付款了嘛?\n订单创建时间:" + data.createTime)
.positiveButton(R.string.pay_yes)
.positiveButton {
confirmOrder(data.flag, true) confirmOrder(data.flag, true)
}.negativeButton(R.string.pay_no) }.setNegativeButton(R.string.pay_no){
.negativeButton {
confirmOrder(data.flag, false) confirmOrder(data.flag, false)
} }.show()
}
} }
else -> { else -> {
showToast("无需处理") showToast("无需处理")
@ -109,13 +104,10 @@ class OrderListActivity : BaseActivity<ActivityOrderListBinding>() {
} }
} else { } else {
MaterialDialog(this@OrderListActivity).show { CoreDialog(this@OrderListActivity).setTitle(String.format(
title(text = data.name).message(
text = String.format(
getString(R.string.copy_orderid), getString(R.string.copy_orderid),
data.flag data.flag
) )).setPositiveButton(R.string.copy){
).positiveButton(R.string.copy).positiveButton {
val flag = data.flag val flag = data.flag
GlobalMethod.copyText(this@OrderListActivity, flag) GlobalMethod.copyText(this@OrderListActivity, flag)
Snackbar.make( Snackbar.make(
@ -126,9 +118,9 @@ class OrderListActivity : BaseActivity<ActivityOrderListBinding>() {
), ),
Snackbar.LENGTH_SHORT Snackbar.LENGTH_SHORT
).show() ).show()
}.cancelable(false) }.setNegativeButton(R.string.dialog_cancel){
.negativeButton(R.string.dialog_cancel)
} }.setCancelable(false).show()
} }
} }
} }

View File

@ -1,11 +1,14 @@
package com.coldmint.rust.pro package com.coldmint.rust.pro
import android.content.Intent
import android.graphics.Color import android.graphics.Color
import android.graphics.Typeface import android.graphics.Typeface
import android.os.Bundle import android.os.Bundle
import android.os.CountDownTimer import android.os.CountDownTimer
import android.text.Editable
import android.text.SpannableString import android.text.SpannableString
import android.text.Spanned import android.text.Spanned
import android.text.TextWatcher
import android.view.View import android.view.View
import android.widget.AdapterView import android.widget.AdapterView
import android.widget.Toast import android.widget.Toast
@ -20,7 +23,7 @@ import android.view.KeyEvent
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.MenuItem import android.view.MenuItem
import androidx.core.view.isVisible import androidx.core.view.isVisible
import com.afollestad.materialdialogs.MaterialDialog import com.coldmint.dialog.CoreDialog
import com.coldmint.rust.core.dataBean.OrderDataBean import com.coldmint.rust.core.dataBean.OrderDataBean
import com.coldmint.rust.core.interfaces.ApiCallBack import com.coldmint.rust.core.interfaces.ApiCallBack
import com.coldmint.rust.core.tool.AppOperator import com.coldmint.rust.core.tool.AppOperator
@ -53,9 +56,14 @@ class PayActivity : BaseActivity<ActivityPayBinding>() {
//倒计时器 //倒计时器
var countDownTimer: CountDownTimer? = null var countDownTimer: CountDownTimer? = null
val color by lazy {
GlobalMethod.getColorPrimary(this)
}
override fun whenCreateActivity(savedInstanceState: Bundle?, canUseView: Boolean) { override fun whenCreateActivity(savedInstanceState: Bundle?, canUseView: Boolean) {
if (canUseView) { if (canUseView) {
viewBinding.toolbar.title = getText(R.string.pay) title = getText(R.string.pay)
setReturnButton() setReturnButton()
val thisIntent = intent val thisIntent = intent
val uuid = thisIntent.getStringExtra("uuid") val uuid = thisIntent.getStringExtra("uuid")
@ -70,33 +78,50 @@ class PayActivity : BaseActivity<ActivityPayBinding>() {
ServerConfiguration.getRealLink("/resources/image/Payment/Alipay.png") ServerConfiguration.getRealLink("/resources/image/Payment/Alipay.png")
hashMap[getString(R.string.wechat_pay)] = hashMap[getString(R.string.wechat_pay)] =
ServerConfiguration.getRealLink("/resources/image/Payment/WeChat.png") ServerConfiguration.getRealLink("/resources/image/Payment/WeChat.png")
val array = resources.getStringArray(R.array.pay_type_entries) Glide.with(this@PayActivity)
viewBinding.typeSpinner.onItemSelectedListener = .load(hashMap[getString(R.string.wechat_pay)]).apply(GlobalMethod.getRequestOptions())
object : AdapterView.OnItemSelectedListener { .into(viewBinding.baseImageView)
override fun onItemSelected( viewBinding.typeAutoCompleteTextView.addTextChangedListener(object : TextWatcher {
parent: AdapterView<*>?, override fun beforeTextChanged(
view: View?, s: CharSequence?,
position: Int, start: Int,
id: Long count: Int,
after: Int
) { ) {
when (val type = array[position]) { }
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
}
override fun afterTextChanged(s: Editable?) {
val type = s.toString()
when (type) {
getString(R.string.qq_pay), getString(R.string.alipay), getString(R.string.wechat_pay) -> { getString(R.string.qq_pay), getString(R.string.alipay), getString(R.string.wechat_pay) -> {
viewBinding.saveCode.text = getString(R.string.sava_code_and_copy_id)
viewBinding.cardView.isVisible = true
Glide.with(this@PayActivity) Glide.with(this@PayActivity)
.load(hashMap[type]).apply(GlobalMethod.getRequestOptions()) .load(hashMap[type]).apply(GlobalMethod.getRequestOptions())
.into(viewBinding.baseImageView) .into(viewBinding.baseImageView)
} }
// getString(R.string.paypal) -> {
// viewBinding.cardView.isVisible = false
// viewBinding.saveCode.text = getString(R.string.paypal_payment)
// }
} }
} }
override fun onNothingSelected(parent: AdapterView<*>?) { })
}
}
viewBinding.saveCode.setOnClickListener { viewBinding.saveCode.setOnClickListener {
val text = viewBinding.saveCode.text.toString()
if (text == getString(R.string.paypal_payment)) {
//启动paypal
// val intent = Intent(this, BrowserActivity::class.java)
// intent.putExtra("link", "https://paypal.me/coldmint")
// startActivity(intent)
} else {
GlobalMethod.copyText(this, uuid) GlobalMethod.copyText(this, uuid)
val type = array[viewBinding.typeSpinner.selectedItemPosition] val type = viewBinding.typeAutoCompleteTextView.text.toString()
val link = hashMap[type] val link = hashMap[type]
val appName = when (type) { val appName = when (type) {
getString(R.string.qq_pay) -> { getString(R.string.qq_pay) -> {
@ -145,14 +170,10 @@ class PayActivity : BaseActivity<ActivityPayBinding>() {
}) })
} }
AppOperator.updateTheAlbum(this, targetFile) AppOperator.updateTheAlbum(this, targetFile)
MaterialDialog(this).show { CoreDialog(this).setTitle(R.string.pay).setMessage(String.format(
title(R.string.pay).message(
text = String.format(
getString(R.string.pay_tip2), getString(R.string.pay_tip2),
appName appName
) )).setPositiveButton(R.string.dialog_ok){
)
.positiveButton(R.string.dialog_ok).positiveButton {
val packName = when (type) { val packName = when (type) {
getString(R.string.qq_pay) -> { getString(R.string.qq_pay) -> {
"com.tencent.mobileqq" "com.tencent.mobileqq"
@ -169,13 +190,17 @@ class PayActivity : BaseActivity<ActivityPayBinding>() {
} else { } else {
Snackbar.make( Snackbar.make(
viewBinding.saveCode, viewBinding.saveCode,
String.format(getString(R.string.no_app_installed), appName), String.format(
getString(R.string.no_app_installed),
appName
),
Snackbar.LENGTH_SHORT Snackbar.LENGTH_SHORT
).show() ).show()
} }
}.negativeButton(R.string.dialog_cancel).cancelable(false) }.setNegativeButton(R.string.dialog_cancel){
}
}.setCancelable(false).show()
}
} }
ActivationApp.instance.getOrderInfo(account, uuid, object : ApiCallBack<OrderDataBean> { ActivationApp.instance.getOrderInfo(account, uuid, object : ApiCallBack<OrderDataBean> {
@ -221,7 +246,7 @@ class PayActivity : BaseActivity<ActivityPayBinding>() {
override fun onFinish() { override fun onFinish() {
past = true past = true
viewBinding.typeSpinner.isEnabled = false viewBinding.typeAutoCompleteTextView.isEnabled = false
viewBinding.baseImageView.isVisible = false viewBinding.baseImageView.isVisible = false
viewBinding.payMoneyView.text = getString(R.string.order_timeout) viewBinding.payMoneyView.text = getString(R.string.order_timeout)
viewBinding.saveCode.isEnabled = false viewBinding.saveCode.isEnabled = false
@ -249,15 +274,13 @@ class PayActivity : BaseActivity<ActivityPayBinding>() {
first = false first = false
} else { } else {
if (!past) { if (!past) {
MaterialDialog(this).show { CoreDialog(this).setTitle(R.string.pay).setMessage(R.string.is_paid).setPositiveButton(R.string.paid_yes){
title(R.string.pay).message(R.string.is_paid).positiveButton(R.string.paid_yes)
.positiveButton {
finish() finish()
} }.setNegativeButton(R.string.paid_no){
.negativeButton(R.string.paid_no).negativeButton {
askingQuit() askingQuit()
}.cancelable(false).neutralButton(R.string.paid_continue) }.setNeutralButton(R.string.paid_continue){
}
}.setCancelable(false).show()
} }
} }
} }
@ -287,17 +310,15 @@ class PayActivity : BaseActivity<ActivityPayBinding>() {
countDownTimer?.cancel() countDownTimer?.cancel()
finish() finish()
} else { } else {
MaterialDialog(this).show { CoreDialog(this).setTitle(R.string.paid_no).setMessage(String.format(
title(R.string.paid_no).message(
text = String.format(
getString(R.string.preferential_price), getString(R.string.preferential_price),
difference difference
) )).setPositiveButton(R.string.dialog_ok){
).positiveButton(R.string.dialog_ok).positiveButton {
countDownTimer?.cancel() countDownTimer?.cancel()
finish() finish()
}.negativeButton(R.string.dialog_cancel).cancelable(false) }.setNegativeButton(R.string.dialog_cancel){
}
}.setCancelable(false).show()
} }
} }
@ -316,8 +337,8 @@ class PayActivity : BaseActivity<ActivityPayBinding>() {
val start2 = tip.indexOf("") + 1 val start2 = tip.indexOf("") + 1
val end2 = tip.indexOf("") val end2 = tip.indexOf("")
val spannableString = SpannableString(tip) val spannableString = SpannableString(tip)
val colorSpan = ForegroundColorSpan(Color.parseColor("#0099EE")) val colorSpan = ForegroundColorSpan(color)
val colorSpan2 = ForegroundColorSpan(Color.parseColor("#0099EE")) val colorSpan2 = ForegroundColorSpan(color)
spannableString.setSpan( spannableString.setSpan(
colorSpan, colorSpan,
start, start,

View File

@ -8,12 +8,11 @@ import android.view.LayoutInflater
import com.coldmint.rust.pro.base.BaseActivity import com.coldmint.rust.pro.base.BaseActivity
import android.view.View import android.view.View
import androidx.core.view.isVisible import androidx.core.view.isVisible
import com.coldmint.dialog.CoreDialog
import com.coldmint.rust.pro.tool.AppSettings import com.coldmint.rust.pro.tool.AppSettings
import com.coldmint.rust.pro.tool.GlobalMethod import com.coldmint.rust.pro.tool.GlobalMethod
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
import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.input.input
import com.coldmint.rust.core.dataBean.ApiResponse import com.coldmint.rust.core.dataBean.ApiResponse
import com.coldmint.rust.core.dataBean.RegisterRequestData import com.coldmint.rust.core.dataBean.RegisterRequestData
import com.coldmint.rust.core.web.User import com.coldmint.rust.core.web.User
@ -164,12 +163,11 @@ class RegisterActivity : BaseActivity<ActivityRegisterBinding>() {
AppSettings.forceSetValue(AppSettings.Setting.Account, account) AppSettings.forceSetValue(AppSettings.Setting.Account, account)
AppSettings.forceSetValue(AppSettings.Setting.PassWord, passWord) AppSettings.forceSetValue(AppSettings.Setting.PassWord, passWord)
AppSettings.forceSetValue(AppSettings.Setting.UserName, userName) AppSettings.forceSetValue(AppSettings.Setting.UserName, userName)
MaterialDialog(this@RegisterActivity).show { CoreDialog(this@RegisterActivity).setTitle(R.string.register_successed)
title(R.string.register_successed).message(R.string.registration_success_message) .setMessage(R.string.registration_success_message)
.cancelable(false).positiveButton(R.string.close) { .setCancelable(false).setPositiveButton(R.string.close) {
finish() finish()
} }.show()
}
} else { } else {
val data = apiResponse.data val data = apiResponse.data
if (data != null && ServerConfiguration.isEvent(data)) { if (data != null && ServerConfiguration.isEvent(data)) {

View File

@ -15,15 +15,9 @@ import android.widget.Toast
import androidx.core.view.isVisible import androidx.core.view.isVisible
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.SnapHelper
import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.WhichButton
import com.afollestad.materialdialogs.actions.setActionButtonEnabled
import com.afollestad.materialdialogs.customview.customView
import com.afollestad.materialdialogs.input.getInputField
import com.afollestad.materialdialogs.input.input
import com.afollestad.materialdialogs.list.listItems
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
import com.coldmint.dialog.CoreDialog
import com.coldmint.dialog.InputDialog
import com.coldmint.rust.core.CompressionManager import com.coldmint.rust.core.CompressionManager
import com.coldmint.rust.core.ModClass import com.coldmint.rust.core.ModClass
import com.coldmint.rust.core.ModConfigurationManager import com.coldmint.rust.core.ModConfigurationManager
@ -45,6 +39,8 @@ import com.coldmint.rust.pro.tool.GlobalMethod
import com.coldmint.rust.pro.base.BaseActivity import com.coldmint.rust.pro.base.BaseActivity
import com.coldmint.rust.pro.databinding.LoadFileLayoutBinding import com.coldmint.rust.pro.databinding.LoadFileLayoutBinding
import com.github.promeg.pinyinhelper.Pinyin import com.github.promeg.pinyinhelper.Pinyin
import com.google.android.material.chip.Chip
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.snackbar.Snackbar import com.google.android.material.snackbar.Snackbar
import com.gyf.immersionbar.ktx.fitsStatusBarView import com.gyf.immersionbar.ktx.fitsStatusBarView
import com.yalantis.ucrop.UCrop import com.yalantis.ucrop.UCrop
@ -63,9 +59,10 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
private val list by lazy { private val list by lazy {
ArrayList<String>() ArrayList<String>()
} }
private val tags by lazy {
ArrayList<String>() // private val tags by lazy {
} // ArrayList<String>()
// }
lateinit var screenshotAdapter: ScreenshotAdapter lateinit var screenshotAdapter: ScreenshotAdapter
private var modClass: ModClass? = null private var modClass: ModClass? = null
private var iconLink: String? = null private var iconLink: String? = null
@ -122,12 +119,12 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
showError("模组id为空") showError("模组id为空")
return return
} }
val account = AppSettings.getValue(AppSettings.Setting.Account, "") val token = AppSettings.getValue(AppSettings.Setting.Token, "")
if (account.isBlank()) { if (token.isBlank()) {
showError(getString(R.string.please_login_first)) showError(getString(R.string.please_login_first))
return return
} }
WebMod.instance.getInfo(account, modId, object : ApiCallBack<WebModInfoData> { WebMod.instance.getInfo(token, modId, object : ApiCallBack<WebModInfoData> {
override fun onResponse(t: WebModInfoData) { override fun onResponse(t: WebModInfoData) {
if (t.code == ServerConfiguration.Success_Code) { if (t.code == ServerConfiguration.Success_Code) {
loadLoadModeAction(t) loadLoadModeAction(t)
@ -296,26 +293,24 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
viewBinding.addScreenshotButton.setOnClickListener { viewBinding.addScreenshotButton.setOnClickListener {
val fromUrl = getString(R.string.from_url) val fromUrl = getString(R.string.from_url)
val selectImage = getString(R.string.select_image) val selectImage = getString(R.string.select_image)
MaterialDialog(this).show { val array = resources.getStringArray(R.array.screenshot_addType)
title(R.string.add).listItems( MaterialAlertDialogBuilder(this).setTitle(R.string.add).setItems(array) { i, i2 ->
R.array.screenshot_addType, val text = array[i2]
waitForPositiveButton = false
) { dialog: MaterialDialog, index: Int, text: CharSequence ->
when (text) { when (text) {
fromUrl -> { fromUrl -> {
MaterialDialog(this@ReleaseModActivity).show { InputDialog(this).setTitle(R.string.from_url)
title(R.string.from_url).message(R.string.from_url_tip) .setMessage(R.string.from_url_tip).setErrorTip { s, textInputLayout ->
input(waitForPositiveButton = false) { dialog, text -> if (s.matches(Regex("^http://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?$|^https://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?$"))) {
if (text.matches(Regex("^http://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?$|^https://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?$"))) { textInputLayout.error = getString(R.string.from_url_tip)
dialog.setActionButtonEnabled(WhichButton.POSITIVE, true)
} else { } else {
dialog.setActionButtonEnabled(WhichButton.POSITIVE, false) textInputLayout.isErrorEnabled = false
} }
}.positiveButton(R.string.dialog_ok, null) { dialog -> }.setPositiveButton(R.string.dialog_ok) { input ->
val input = dialog.getInputField().text.toString()
screenshotAdapter.addItem(input) screenshotAdapter.addItem(input)
}.negativeButton(R.string.dialog_close) true
} }.setNegativeButton(R.string.dialog_close) {
}.show()
} }
selectImage -> { selectImage -> {
val startIntent = val startIntent =
@ -334,9 +329,8 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
} }
} }
dialog.dismiss() }.setPositiveButton(R.string.dialog_cancel) { i1, i2 ->
}.positiveButton(R.string.dialog_cancel) }.show()
}
} }
@ -381,19 +375,33 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
val tag = s.toString() val tag = s.toString()
checkModTag(tag) checkModTag(tag)
lineParser.text = tag lineParser.text = tag
tags.clear() var isNotEmpty = false
// tags.clear()
viewBinding.chipGroup.removeAllViews()
lineParser.analyse { lineNum, lineData, isEnd -> lineParser.analyse { lineNum, lineData, isEnd ->
isNotEmpty = true
if (lineData.isNotBlank()) { if (lineData.isNotBlank()) {
tags.add(lineData) // tags.add(lineData)
val chip = Chip(this@ReleaseModActivity)
chip.text = lineData
chip.setOnClickListener {
val bundle = Bundle()
bundle.putString("tag", lineData)
bundle.putString(
"title",
String.format(getString(R.string.tag_title), s)
)
bundle.putString("action", "tag")
val thisIntent =
Intent(this@ReleaseModActivity, TagActivity::class.java)
thisIntent.putExtra("data", bundle)
startActivity(thisIntent)
}
viewBinding.chipGroup.addView(chip)
} }
true true
} }
if (tags.size > 0) { viewBinding.chipGroup.isVisible = isNotEmpty
viewBinding.belongStackLabelView.labels = tags
viewBinding.belongStackLabelView.isVisible = true
} else {
viewBinding.belongStackLabelView.isVisible = false
}
} }
}) })
@ -427,19 +435,6 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
) )
) )
viewBinding.belongStackLabelView.setOnLabelClickListener { index, v, s ->
val bundle = Bundle()
bundle.putString("tag", s)
bundle.putString(
"title",
String.format(getString(R.string.tag_title), s)
)
bundle.putString("action", "tag")
val thisIntent =
Intent(this, TagActivity::class.java)
thisIntent.putExtra("data", bundle)
startActivity(thisIntent)
}
} }
private fun selectModFile() { private fun selectModFile() {
@ -476,19 +471,19 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
startIntent.putExtra("data", fileBundle) startIntent.putExtra("data", fileBundle)
startActivityForResult(startIntent, 3) startActivityForResult(startIntent, 3)
} else if (title == getString(R.string.from_url)) { } else if (title == getString(R.string.from_url)) {
MaterialDialog(this).show { InputDialog(this).setTitle(R.string.from_url).setMessage(R.string.from_url_tip)
title(R.string.from_url).message(R.string.from_url_tip) .setErrorTip { s, textInputLayout ->
input(waitForPositiveButton = false) { dialog, text -> if (s.matches(Regex("^http://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?$|^https://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?$"))) {
if (text.matches(Regex("^http://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?$|^https://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?$"))) { textInputLayout.error = getString(R.string.from_url_tip)
dialog.setActionButtonEnabled(WhichButton.POSITIVE, true)
} else { } else {
dialog.setActionButtonEnabled(WhichButton.POSITIVE, false) textInputLayout.isErrorEnabled = false
} }
}.positiveButton(R.string.dialog_ok, null) { dialog -> }.setPositiveButton(R.string.dialog_ok) { input ->
val input = dialog.getInputField().text.toString()
loadIcon(input) loadIcon(input)
}.negativeButton(R.string.dialog_close) true
} }.setNegativeButton(R.string.dialog_close) {
}.show()
} else { } else {
val link = iconLink val link = iconLink
if (link != null) { if (link != null) {
@ -767,14 +762,14 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
) )
} else { } else {
releaseModWork( releaseModWork(
modId, account, modName, modDescribe, versionName, modId, modName, modDescribe, versionName,
tagsBuilder, file tagsBuilder, file
) )
} }
} else { } else {
MaterialDialog(this).show { CoreDialog(this).setTitle(R.string.using_mobile_networks)
title(R.string.using_mobile_networks).message(R.string.using_mobile_networks_msg) .setMessage(R.string.using_mobile_networks_msg)
.positiveButton(R.string.only_one) { .setPositiveButton(R.string.only_one) {
if (isUpdateMode) { if (isUpdateMode) {
updateModWork( updateModWork(
modId, modId,
@ -788,12 +783,11 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
) )
} else { } else {
releaseModWork( releaseModWork(
modId, account, modName, modDescribe, versionName, modId, modName, modDescribe, versionName,
tagsBuilder, file tagsBuilder, file
) )
} }
} }.setNegativeButton(R.string.always_allow) {
negativeButton(R.string.always_allow) {
AppSettings.setValue(AppSettings.Setting.UseMobileNetwork, true) AppSettings.setValue(AppSettings.Setting.UseMobileNetwork, true)
if (isUpdateMode) { if (isUpdateMode) {
updateModWork( updateModWork(
@ -808,15 +802,13 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
) )
} else { } else {
releaseModWork( releaseModWork(
modId, account, modName, modDescribe, versionName, modId, modName, modDescribe, versionName,
tagsBuilder, file tagsBuilder, file
) )
} }
} }.setNeutralButton(R.string.dialog_cancel) {
neutralButton(R.string.dialog_cancel) {
} }.show()
}
} }
} }
AppOperator.NetWorkType.NetWorkType_Wifi -> { AppOperator.NetWorkType.NetWorkType_Wifi -> {
@ -833,7 +825,7 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
) )
} else { } else {
releaseModWork( releaseModWork(
modId, account, modName, modDescribe, versionName, modId, modName, modDescribe, versionName,
tagsBuilder, file tagsBuilder, file
) )
} }
@ -853,7 +845,6 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
*/ */
fun releaseModWork( fun releaseModWork(
modId: String, modId: String,
account: String,
modName: String, modName: String,
modDescribe: String, modDescribe: String,
versionName: String, versionName: String,
@ -861,11 +852,10 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
) { ) {
val loadFileLayoutBinding = LoadFileLayoutBinding.inflate(layoutInflater) val loadFileLayoutBinding = LoadFileLayoutBinding.inflate(layoutInflater)
loadFileLayoutBinding.LinearProgressIndicator.max = 100 loadFileLayoutBinding.LinearProgressIndicator.max = 100
val dialog = MaterialAlertDialogBuilder(this).setTitle(R.string.release)
.setView(loadFileLayoutBinding.root).setPositiveButton(R.string.dialog_ok) { i1, i2 ->
}.setCancelable(false).show()
val dialog = MaterialDialog(this).show {
title(R.string.release).customView(view = loadFileLayoutBinding.root)
.positiveButton(R.string.dialog_ok).cancelable(false)
}
WebMod.instance.releaseMod(AppSettings.getValue(AppSettings.Setting.AppID, ""), modId, WebMod.instance.releaseMod(AppSettings.getValue(AppSettings.Setting.AppID, ""), modId,
AppSettings.getValue(AppSettings.Setting.Token, ""), AppSettings.getValue(AppSettings.Setting.Token, ""),
modName, modName,
@ -904,15 +894,11 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
}) })
} }
CoreDialog(this@ReleaseModActivity).setTitle(R.string.release)
MaterialDialog(this@ReleaseModActivity).show { .setMessage(t.message).setCancelable(false)
title(R.string.release).message( .setPositiveButton(R.string.dialog_ok) {
text = t.message
).positiveButton(R.string.dialog_ok).cancelable(false)
.positiveButton {
finish() finish()
} }.show()
}
} else { } else {
handleEvent(t) handleEvent(t)
} }
@ -965,10 +951,11 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
val loadFileLayoutBinding = LoadFileLayoutBinding.inflate(layoutInflater) val loadFileLayoutBinding = LoadFileLayoutBinding.inflate(layoutInflater)
loadFileLayoutBinding.LinearProgressIndicator.max = 100 loadFileLayoutBinding.LinearProgressIndicator.max = 100
val dialog = MaterialDialog(this).show { val dialog = MaterialAlertDialogBuilder(this).setTitle(R.string.release)
title(R.string.release).customView(view = loadFileLayoutBinding.root) .setView(loadFileLayoutBinding.root).setPositiveButton(R.string.dialog_ok) { i1, i2 ->
.positiveButton(R.string.dialog_ok).cancelable(false) }.setCancelable(false).show()
}
WebMod.instance.updateMod(AppSettings.getValue(AppSettings.Setting.AppID, ""), modId, WebMod.instance.updateMod(AppSettings.getValue(AppSettings.Setting.AppID, ""), modId,
account, account,
modName, modName,
@ -1014,14 +1001,11 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
}) })
} }
MaterialDialog(this@ReleaseModActivity).show { CoreDialog(this@ReleaseModActivity).setTitle(R.string.release).setMessage(
title(R.string.release).message( t.message
text = t.message ).setPositiveButton(R.string.dialog_ok) {
).positiveButton(R.string.dialog_ok).cancelable(false)
.positiveButton {
finish() finish()
} }.setCancelable(false).show()
}
} else { } else {
handleEvent(t) handleEvent(t)
} }
@ -1103,7 +1087,6 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
} }
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data) super.onActivityResult(requestCode, resultCode, data)
if (data == null) { if (data == null) {

View File

@ -5,7 +5,6 @@ import android.text.Editable
import android.text.TextWatcher import android.text.TextWatcher
import android.view.LayoutInflater import android.view.LayoutInflater
import android.widget.ArrayAdapter import android.widget.ArrayAdapter
import com.afollestad.materialdialogs.MaterialDialog
import com.coldmint.rust.core.dataBean.ApiResponse import com.coldmint.rust.core.dataBean.ApiResponse
import com.coldmint.rust.core.interfaces.ApiCallBack import com.coldmint.rust.core.interfaces.ApiCallBack
import com.coldmint.rust.core.web.Report import com.coldmint.rust.core.web.Report

View File

@ -11,15 +11,18 @@ import android.view.LayoutInflater
import android.widget.Toast import android.widget.Toast
import androidx.appcompat.app.AppCompatDelegate import androidx.appcompat.app.AppCompatDelegate
import androidx.preference.* import androidx.preference.*
import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.list.listItemsMultiChoice
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
import com.coldmint.rust.core.tool.FileOperator import com.coldmint.rust.core.tool.FileOperator
import com.coldmint.rust.pro.databinding.ActivitySettingsBinding import com.coldmint.rust.pro.databinding.ActivitySettingsBinding
import com.coldmint.rust.pro.tool.GlobalMethod import com.coldmint.rust.pro.tool.GlobalMethod
import com.google.android.material.color.DynamicColors import com.google.android.material.color.DynamicColors
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Job
import kotlinx.coroutines.launch
import java.io.File import java.io.File
import java.util.* import java.util.*
import kotlin.collections.ArrayList
import kotlin.concurrent.thread import kotlin.concurrent.thread
class SettingsActivity : BaseActivity<ActivitySettingsBinding>() { class SettingsActivity : BaseActivity<ActivitySettingsBinding>() {
@ -98,16 +101,26 @@ class SettingsActivity : BaseActivity<ActivitySettingsBinding>() {
manager.findPreference<PreferenceScreen>(getString(R.string.setting_clear_cache)) manager.findPreference<PreferenceScreen>(getString(R.string.setting_clear_cache))
clearCache!!.onPreferenceClickListener = clearCache!!.onPreferenceClickListener =
Preference.OnPreferenceClickListener { Preference.OnPreferenceClickListener {
val items = ArrayList<String>()
val listData = listOf<String>( val listData = listOf<String>(
getString(R.string.history_cache), getString(R.string.history_cache),
getString(R.string.code_cache), getString(R.string.code_cache),
getString(R.string.glide_cache) getString(R.string.glide_cache)
) )
MaterialDialog(requireContext()).show { MaterialAlertDialogBuilder(requireContext()).setTitle(R.string.clear_cache)
title(R.string.clear_cache).listItemsMultiChoice(items = listData) .setMultiChoiceItems(listData.toTypedArray(), null) { dialog, index, bool ->
{ dialog, indices, items -> val string = listData[index]
if (bool) {
items.add(string)
} else {
items.remove(string)
}
}
.setPositiveButton(R.string.dialog_ok) { i, i2 ->
val handler = Handler(Looper.getMainLooper()) val handler = Handler(Looper.getMainLooper())
thread { val job = Job()
val scope = CoroutineScope(job)
scope.launch {
if (items.isNotEmpty()) { if (items.isNotEmpty()) {
for (item in items) { for (item in items) {
when (item) { when (item) {
@ -146,8 +159,10 @@ class SettingsActivity : BaseActivity<ActivitySettingsBinding>() {
} }
} }
} }
}.positiveButton(R.string.dialog_ok).negativeButton(R.string.dialog_cancel)
} }.setNegativeButton(R.string.dialog_cancel) { i, i2 ->
}.show()
true true
} }

View File

@ -15,9 +15,6 @@ import android.os.Looper
import android.view.* import android.view.*
import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.get import androidx.lifecycle.get
import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
import com.afollestad.materialdialogs.list.listItemsMultiChoice
import com.coldmint.dialog.CoreDialog import com.coldmint.dialog.CoreDialog
import com.coldmint.rust.core.LocalTemplatePackage import com.coldmint.rust.core.LocalTemplatePackage
import com.coldmint.rust.core.interfaces.LineParserEvent import com.coldmint.rust.core.interfaces.LineParserEvent

View File

@ -22,7 +22,6 @@ import android.view.inputmethod.InputMethodManager
import android.widget.* import android.widget.*
import androidx.core.view.isVisible import androidx.core.view.isVisible
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
import com.afollestad.materialdialogs.MaterialDialog
import com.coldmint.dialog.CoreDialog import com.coldmint.dialog.CoreDialog
import com.coldmint.rust.core.LocalTemplatePackage import com.coldmint.rust.core.LocalTemplatePackage
import com.coldmint.rust.core.dataBean.InputParserDataBean import com.coldmint.rust.core.dataBean.InputParserDataBean
@ -113,7 +112,9 @@ class TemplateParserActivity : BaseActivity<ActivityTemplateParserBinding>() {
if (name.isNotBlank()) { if (name.isNotBlank()) {
val build = viewModel.buildFile(this, name) val build = viewModel.buildFile(this, name)
if (build) { if (build) {
setResult(RESULT_OK) val data = Intent()
data.putExtra("File", viewModel.getOutputPath())
setResult(RESULT_OK, data)
finish() finish()
} else { } else {
Snackbar.make( Snackbar.make(

View File

@ -24,11 +24,13 @@ class ThanksActivity : BaseActivity<ActivityThanksBinding>() {
if (canUseView) { if (canUseView) {
title = getString(R.string.special_thanks_to) title = getString(R.string.special_thanks_to)
setReturnButton() setReturnButton()
viewBinding.recyclerView.addItemDecoration( val divider = MaterialDividerItemDecoration(
DividerItemDecoration(
this, this,
DividerItemDecoration.VERTICAL MaterialDividerItemDecoration.VERTICAL
) )
viewBinding.recyclerView.addItemDecoration(
divider
) )
viewBinding.recyclerView.layoutManager = LinearLayoutManager(this) viewBinding.recyclerView.layoutManager = LinearLayoutManager(this)
val list = ArrayList<ThanksDataBean>() val list = ArrayList<ThanksDataBean>()

View File

@ -12,12 +12,7 @@ import com.google.android.material.snackbar.Snackbar
import android.view.* import android.view.*
import android.widget.* import android.widget.*
import androidx.core.view.isVisible import androidx.core.view.isVisible
import com.afollestad.materialdialogs.MaterialDialog import com.coldmint.dialog.InputDialog
import com.afollestad.materialdialogs.WhichButton
import com.afollestad.materialdialogs.actions.setActionButtonEnabled
import com.afollestad.materialdialogs.customview.customView
import com.afollestad.materialdialogs.input.getInputField
import com.afollestad.materialdialogs.input.input
import com.coldmint.rust.core.database.code.CodeDataBase import com.coldmint.rust.core.database.code.CodeDataBase
import com.coldmint.rust.core.tool.FileOperator import com.coldmint.rust.core.tool.FileOperator
import com.coldmint.rust.pro.adapters.ModPageAdapter import com.coldmint.rust.pro.adapters.ModPageAdapter
@ -77,21 +72,19 @@ class UnitsActivity : BaseActivity<ActivityUnitsBinding>() {
override fun onOptionsItemSelected(item: MenuItem): Boolean { override fun onOptionsItemSelected(item: MenuItem): Boolean {
when (item.itemId) { when (item.itemId) {
R.id.filter_units -> { R.id.filter_units -> {
MaterialDialog(this).show { InputDialog(this).setTitle(R.string.filter).setMessage(R.string.filter_tip)
title(R.string.filter).message(R.string.filter_tip) .setHint(R.string.key_word)
input(maxLength = 20, waitForPositiveButton = false) { dialog, text -> .setMaxNumber(20).setInputCanBeEmpty(false)
if (text.isNotEmpty()) { .setPositiveButton(R.string.dialog_ok) { text ->
dialog.setActionButtonEnabled(WhichButton.POSITIVE, true) var key = text
}
}.positiveButton(R.string.dialog_ok, null) { dialog ->
var key = dialog.getInputField().text.toString()
if (key.length > 20) { if (key.length > 20) {
key = key.substring(0, 20) key = key.substring(0, 20)
} }
viewBinding.tabLayout.selectTab(viewBinding.tabLayout.getTabAt(1)) viewBinding.tabLayout.selectTab(viewBinding.tabLayout.getTabAt(1))
modPageAdapter.allUnitsFragment.filter(key) modPageAdapter.allUnitsFragment.filter(key)
}.negativeButton(R.string.dialog_close) true
} }.setNegativeButton(R.string.dialog_cancel) {
}.show()
} }
R.id.search_units -> { R.id.search_units -> {
viewBinding.tabLayout.selectTab(viewBinding.tabLayout.getTabAt(1)) viewBinding.tabLayout.selectTab(viewBinding.tabLayout.getTabAt(1))
@ -155,10 +148,9 @@ class UnitsActivity : BaseActivity<ActivityUnitsBinding>() {
} }
}) })
MaterialDialog(this).show { MaterialAlertDialogBuilder(this).setTitle(R.string.search)
title(R.string.search) .setView(dialogSearchUnitsBinding.root)
customView(view = dialogSearchUnitsBinding.root) .setPositiveButton(R.string.dialog_ok) { i, i1 ->
.positiveButton(R.string.dialog_ok).positiveButton {
modPageAdapter.allUnitsFragment.advancedSearch( modPageAdapter.allUnitsFragment.advancedSearch(
configuration = AllUnitsFragment.SearchConfiguration( configuration = AllUnitsFragment.SearchConfiguration(
dialogSearchUnitsBinding.unitNameInputView.text.toString(), dialogSearchUnitsBinding.unitNameInputView.text.toString(),
@ -169,9 +161,8 @@ class UnitsActivity : BaseActivity<ActivityUnitsBinding>() {
dialogSearchUnitsBinding.isCodeBox.isChecked dialogSearchUnitsBinding.isCodeBox.isChecked
) )
) )
} }.setNegativeButton(R.string.dialog_close) { i1, i2 ->
.negativeButton(R.string.dialog_close) }.show()
}
} }
R.id.rebuild -> { R.id.rebuild -> {
MaterialAlertDialogBuilder(this).setTitle(R.string.rebuild_project) MaterialAlertDialogBuilder(this).setTitle(R.string.rebuild_project)

View File

@ -12,16 +12,14 @@ import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.inputmethod.EditorInfo import android.view.inputmethod.EditorInfo
import android.widget.EditText import android.widget.EditText
import androidx.coordinatorlayout.widget.CoordinatorLayout
import androidx.core.view.isVisible import androidx.core.view.isVisible
import com.afollestad.materialdialogs.LayoutMode
import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
import com.afollestad.materialdialogs.input.getInputField
import com.afollestad.materialdialogs.input.input
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
import com.coldmint.dialog.CoreDialog
import com.coldmint.rust.core.dataBean.ApiResponse import com.coldmint.rust.core.dataBean.ApiResponse
import com.coldmint.rust.core.dataBean.user.SpaceInfoData import com.coldmint.rust.core.dataBean.user.SpaceInfoData
import com.coldmint.rust.core.interfaces.ApiCallBack import com.coldmint.rust.core.interfaces.ApiCallBack
import com.coldmint.rust.core.tool.DebugHelper
import com.coldmint.rust.core.web.* import com.coldmint.rust.core.web.*
import com.coldmint.rust.pro.adapters.UserHomeStateAdapter import com.coldmint.rust.pro.adapters.UserHomeStateAdapter
import com.coldmint.rust.pro.base.BaseActivity import com.coldmint.rust.pro.base.BaseActivity
@ -34,6 +32,7 @@ import com.google.android.material.appbar.CollapsingToolbarLayout
import com.google.android.material.snackbar.Snackbar 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.ImmersionBar
import com.gyf.immersionbar.ktx.immersionBar import com.gyf.immersionbar.ktx.immersionBar
@ -53,10 +52,26 @@ class UserHomePageActivity : BaseActivity<ActivityUserHomePageBinding>() {
@SuppressLint("CheckResult") @SuppressLint("CheckResult")
private fun initView() { private fun initView() {
// immersionBar { if (ImmersionBar.hasNavigationBar(this)) {
// transparentStatusBar().statusBarDarkFont(true) val layoutParams =
// .navigationBarDarkIcon(true) viewBinding.fab.layoutParams as CoordinatorLayout.LayoutParams
// } layoutParams.setMargins(
GlobalMethod.dp2px(16),
GlobalMethod.dp2px(16),
GlobalMethod.dp2px(16),
ImmersionBar.getNavigationBarHeight(this) + GlobalMethod.dp2px(16)
)
DebugHelper.printLog("导航适配", "已调整fab按钮的位置。")
}
val s = ImmersionBar.getStatusBarHeight(this)
val layoutParams =
viewBinding.toolbar.layoutParams as CollapsingToolbarLayout.LayoutParams
layoutParams.setMargins(
0,
s,
0,
0
)
val thisIntent = intent val thisIntent = intent
val temUserId = thisIntent.getStringExtra("userId") val temUserId = thisIntent.getStringExtra("userId")
@ -84,17 +99,6 @@ class UserHomePageActivity : BaseActivity<ActivityUserHomePageBinding>() {
openUserList(userId, false) openUserList(userId, false)
} }
initButton() initButton()
// val dlist = ArrayList<Drawable>()
// for (i in 1..30) {
//// dlist.add(getDrawable(R.drawable.emoji_2_3)!!)
// dlist.add(getDrawable(R.drawable.emoji_1_3)!!)
// }
// viewBinding.bubbleView.setDrawableList(dlist)
// viewBinding.bubbleView.startAnimation(5000, 5000,30)
// viewBinding.emojiRainLayout.addEmoji(R.drawable.emoji_1_3)
// viewBinding.emojiRainLayout.addEmoji(R.drawable.emoji_2_3)
// viewBinding.emojiRainLayout.addEmoji(R.drawable.emoji_3_3)
// viewBinding.emojiRainLayout.startDropping()
} }
@ -231,7 +235,6 @@ class UserHomePageActivity : BaseActivity<ActivityUserHomePageBinding>() {
val cover = spaceInfoData.data.cover val cover = spaceInfoData.data.cover
if (cover != null) { if (cover != null) {
Glide.with(this).load(ServerConfiguration.getRealLink(cover)) Glide.with(this).load(ServerConfiguration.getRealLink(cover))
.apply(GlobalMethod.getRequestOptions())
.into(viewBinding.coverView) .into(viewBinding.coverView)
} }
@ -429,9 +432,8 @@ class UserHomePageActivity : BaseActivity<ActivityUserHomePageBinding>() {
} }
getString(R.string.followed), getString(R.string.each_other_follow) -> { getString(R.string.followed), getString(R.string.each_other_follow) -> {
val de = String.format(getString(R.string.defollow_tip), userName ?: userId) val de = String.format(getString(R.string.defollow_tip), userName ?: userId)
MaterialDialog(this).show { CoreDialog(this).setTitle(R.string.defollow).setMessage(de)
title(R.string.defollow).message(text = de) .setPositiveButton(R.string.dialog_ok) {
.positiveButton(R.string.dialog_ok).positiveButton {
viewBinding.button.setBackgroundColor( viewBinding.button.setBackgroundColor(
GlobalMethod.getThemeColor( GlobalMethod.getThemeColor(
this@UserHomePageActivity, this@UserHomePageActivity,
@ -470,9 +472,9 @@ class UserHomePageActivity : BaseActivity<ActivityUserHomePageBinding>() {
} }
}) })
} }.setNegativeButton(R.string.dialog_cancel) {
}.negativeButton(R.string.dialog_cancel) }.show()
} }
getString(R.string.editData) -> { getString(R.string.editData) -> {
val intent = Intent(this, EditUserInfoActivity::class.java) val intent = Intent(this, EditUserInfoActivity::class.java)

View File

@ -20,6 +20,7 @@ import com.coldmint.rust.core.web.ServerConfiguration
import com.coldmint.rust.pro.adapters.UserAdapter import com.coldmint.rust.pro.adapters.UserAdapter
import com.coldmint.rust.pro.base.BaseActivity import com.coldmint.rust.pro.base.BaseActivity
import com.coldmint.rust.pro.databinding.ActivityUserListBinding import com.coldmint.rust.pro.databinding.ActivityUserListBinding
import com.google.android.material.divider.MaterialDividerItemDecoration
import com.google.android.material.snackbar.Snackbar import com.google.android.material.snackbar.Snackbar
class UserListActivity : BaseActivity<ActivityUserListBinding>() { class UserListActivity : BaseActivity<ActivityUserListBinding>() {
@ -70,11 +71,13 @@ class UserListActivity : BaseActivity<ActivityUserListBinding>() {
} }
viewBinding.recyclerView.layoutManager = viewBinding.recyclerView.layoutManager =
LinearLayoutManager(this@UserListActivity) LinearLayoutManager(this@UserListActivity)
viewBinding.recyclerView.addItemDecoration( val divider = MaterialDividerItemDecoration(
DividerItemDecoration(
this, this,
DividerItemDecoration.VERTICAL MaterialDividerItemDecoration.VERTICAL
) )
viewBinding.recyclerView.addItemDecoration(
divider
) )
loadList(account, isFollowMode, canRemoveFans) loadList(account, isFollowMode, canRemoveFans)
} }

View File

@ -290,7 +290,7 @@ class ValueTypeActivity : BaseActivity<ActivityValueTypeBinding>() {
override fun whenCreateActivity(savedInstanceState: Bundle?, canUseView: Boolean) { override fun whenCreateActivity(savedInstanceState: Bundle?, canUseView: Boolean) {
if (canUseView) { if (canUseView) {
viewBinding.toolbar.title = getText(R.string.value_type_manager) title = getText(R.string.value_type_manager)
viewBinding.valueList.layoutManager = LinearLayoutManager(this@ValueTypeActivity) viewBinding.valueList.layoutManager = LinearLayoutManager(this@ValueTypeActivity)
setReturnButton() setReturnButton()
loadList() loadList()

View File

@ -23,6 +23,7 @@ import com.coldmint.rust.pro.base.BaseActivity
import com.coldmint.rust.pro.databinding.ActivityWorkmangementBinding import com.coldmint.rust.pro.databinding.ActivityWorkmangementBinding
import com.coldmint.rust.pro.tool.AppSettings import com.coldmint.rust.pro.tool.AppSettings
import com.coldmint.rust.pro.tool.GlobalMethod import com.coldmint.rust.pro.tool.GlobalMethod
import com.google.android.material.divider.MaterialDividerItemDecoration
import com.google.android.material.snackbar.Snackbar import com.google.android.material.snackbar.Snackbar
/** /**
@ -259,11 +260,13 @@ class WorkManagementActivity : BaseActivity<ActivityWorkmangementBinding>() {
title = getString(R.string.work_management) title = getString(R.string.work_management)
setReturnButton() setReturnButton()
viewBinding.recyclerView.layoutManager = LinearLayoutManager(this) viewBinding.recyclerView.layoutManager = LinearLayoutManager(this)
viewBinding.recyclerView.addItemDecoration( val divider = MaterialDividerItemDecoration(
DividerItemDecoration(
this, this,
DividerItemDecoration.VERTICAL MaterialDividerItemDecoration.VERTICAL
) )
viewBinding.recyclerView.addItemDecoration(
divider
) )
} }
} }

View File

@ -2,7 +2,6 @@ package com.coldmint.rust.pro.adapters
import android.widget.BaseExpandableListAdapter import android.widget.BaseExpandableListAdapter
import android.view.LayoutInflater import android.view.LayoutInflater
import com.kongzue.stacklabelview.interfaces.OnLabelClickListener
import android.view.ViewGroup import android.view.ViewGroup
import com.coldmint.rust.pro.R import com.coldmint.rust.pro.R
import android.content.Context import android.content.Context
@ -20,6 +19,7 @@ import com.coldmint.rust.pro.databinding.CodeTableGroupBinding
import com.coldmint.rust.pro.databinding.CodeTableItemBinding import com.coldmint.rust.pro.databinding.CodeTableItemBinding
import com.coldmint.rust.pro.tool.AppSettings import com.coldmint.rust.pro.tool.AppSettings
import com.coldmint.rust.pro.tool.GlobalMethod import com.coldmint.rust.pro.tool.GlobalMethod
import com.google.android.material.chip.Chip
import java.util.concurrent.Executors import java.util.concurrent.Executors
class CodeTableAdapter( class CodeTableAdapter(
@ -131,9 +131,9 @@ class CodeTableAdapter(
val resultView: CodeTableItemBinding = val resultView: CodeTableItemBinding =
CodeTableItemBinding.inflate(layoutInflater, parent, false) CodeTableItemBinding.inflate(layoutInflater, parent, false)
val codeInfo = itemList[groupPosition][childPosition] val codeInfo = itemList[groupPosition][childPosition]
resultView.belongStackLabelView.onLabelClickListener = OnLabelClickListener { index, v, s ->
labelFunction?.invoke(index, v, s) // resultView.belongStackLabelView.onLabelClickListener = OnLabelClickListener { index, v, s ->
} // }
resultView.descriptionView.text = codeInfo.description resultView.descriptionView.text = codeInfo.description
resultView.descriptionView.setOnClickListener { resultView.descriptionView.setOnClickListener {
GlobalMethod.copyText(context, codeInfo.description, it) GlobalMethod.copyText(context, codeInfo.description, it)
@ -147,13 +147,22 @@ class CodeTableAdapter(
GlobalMethod.copyText(context, codeInfo.code, it) GlobalMethod.copyText(context, codeInfo.code, it)
} }
resultView.valueTypeView.text = typeNameMap?.get(codeInfo.type) ?: codeInfo.type resultView.valueTypeView.text = typeNameMap?.get(codeInfo.type) ?: codeInfo.type
val list = ArrayList<String>()
lineParser.text = codeInfo.section lineParser.text = codeInfo.section
resultView.chipGroup.removeAllViews()
var isNotEmpty = false
lineParser.analyse { lineNum, lineData, isEnd -> lineParser.analyse { lineNum, lineData, isEnd ->
list.add(sectionMap?.get(lineData) ?: lineData) isNotEmpty = true
val text = sectionMap?.get(lineData) ?: lineData
val chip = Chip(context)
chip.text = text
chip.setOnClickListener {
labelFunction?.invoke(lineNum, it, text )
} }
resultView.belongStackLabelView.isVisible = list.isNotEmpty() resultView.chipGroup.addView(chip)
resultView.belongStackLabelView.labels = list true
}
resultView.chipGroup.isVisible = isNotEmpty
resultView.valueTypeView.setOnClickListener { resultView.valueTypeView.setOnClickListener {
val handler = Handler(Looper.getMainLooper()) val handler = Handler(Looper.getMainLooper())
executorService.submit { executorService.submit {

View File

@ -9,7 +9,6 @@ import android.content.Intent
import android.net.Uri import android.net.Uri
import android.view.View import android.view.View
import android.widget.ImageView import android.widget.ImageView
import com.afollestad.materialdialogs.MaterialDialog
import android.widget.TextView import android.widget.TextView
import androidx.core.view.isVisible import androidx.core.view.isVisible
import com.coldmint.rust.pro.base.BaseAdapter import com.coldmint.rust.pro.base.BaseAdapter

View File

@ -24,6 +24,7 @@ import com.coldmint.rust.pro.base.BaseAdapter
import com.coldmint.rust.pro.databinding.TemplateBottomDialogBinding import com.coldmint.rust.pro.databinding.TemplateBottomDialogBinding
import com.coldmint.rust.pro.databinding.TemplateListItemBinding import com.coldmint.rust.pro.databinding.TemplateListItemBinding
import com.google.android.material.bottomsheet.BottomSheetDialog import com.google.android.material.bottomsheet.BottomSheetDialog
import com.google.android.material.divider.MaterialDividerItemDecoration
import java.io.File import java.io.File
class TemplateListAdapter( class TemplateListAdapter(
@ -316,11 +317,13 @@ class TemplateListAdapter(
} }
} }
templateBottomDialogBinding.templateActionList.adapter = adapter templateBottomDialogBinding.templateActionList.adapter = adapter
templateBottomDialogBinding.templateActionList.addItemDecoration( val divider = MaterialDividerItemDecoration(
DividerItemDecoration(
context, context,
DividerItemDecoration.VERTICAL MaterialDividerItemDecoration.VERTICAL
) )
templateBottomDialogBinding.templateActionList.addItemDecoration(
divider
) )
bottomSheetDialog.show() bottomSheetDialog.show()
} }

View File

@ -13,6 +13,7 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy
import com.coldmint.rust.pro.base.BaseAdapter import com.coldmint.rust.pro.base.BaseAdapter
import com.coldmint.rust.pro.databinding.UnitItemBinding import com.coldmint.rust.pro.databinding.UnitItemBinding
import com.coldmint.rust.pro.tool.GlobalMethod import com.coldmint.rust.pro.tool.GlobalMethod
import me.zhanghai.android.fastscroll.PopupTextProvider
import java.text.SimpleDateFormat import java.text.SimpleDateFormat
import java.util.* import java.util.*
import kotlin.Exception import kotlin.Exception
@ -21,7 +22,9 @@ class UnitAdapter(
context: Context, context: Context,
dataList: MutableList<SourceFile>, dataList: MutableList<SourceFile>,
val key: String val key: String
) : BaseAdapter<UnitItemBinding, SourceFile>(context, dataList) { ) : BaseAdapter<UnitItemBinding, SourceFile>(context, dataList), PopupTextProvider {
private val language: String by lazy { private val language: String by lazy {
AppSettings.getValue( AppSettings.getValue(
@ -29,8 +32,15 @@ class UnitAdapter(
Locale.getDefault().language Locale.getDefault().language
) )
} }
private val formatter = SimpleDateFormat("yyyy-MM-dd HH:mm:ss") private val formatter = SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
init {
dataList.sortBy {
getInitial(it.getName(language))
}
}
override fun getViewBindingObject( override fun getViewBindingObject(
layoutInflater: LayoutInflater, layoutInflater: LayoutInflater,
parent: ViewGroup, parent: ViewGroup,
@ -82,5 +92,9 @@ class UnitAdapter(
} }
} }
override fun getPopupText(position: Int): String {
return getInitial(dataList[position].getName(language)).toString()
}
} }

View File

@ -5,7 +5,6 @@ import android.content.ServiceConnection
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.PopupMenu import android.widget.PopupMenu
import com.afollestad.materialdialogs.MaterialDialog
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
import com.coldmint.rust.core.dataBean.ApiResponse import com.coldmint.rust.core.dataBean.ApiResponse
import com.coldmint.rust.core.dataBean.mod.WebModAllInfoData import com.coldmint.rust.core.dataBean.mod.WebModAllInfoData

View File

@ -17,7 +17,6 @@ import androidx.core.view.WindowCompat
import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.ViewModelProvider
import androidx.viewbinding.ViewBinding import androidx.viewbinding.ViewBinding
import com.afollestad.materialdialogs.MaterialDialog
import com.coldmint.dialog.CoreDialog import com.coldmint.dialog.CoreDialog
import com.coldmint.rust.pro.R import com.coldmint.rust.pro.R
import com.google.android.material.appbar.MaterialToolbar import com.google.android.material.appbar.MaterialToolbar
@ -131,9 +130,7 @@ abstract class BaseActivity<ViewBingType : ViewBinding> :
* @param msg String * @param msg String
*/ */
protected fun showDialog(msg: String) { protected fun showDialog(msg: String) {
MaterialDialog(this).show { CoreDialog(this).setMessage(msg).show()
message(text = msg)
}
} }
/** /**
@ -163,10 +160,10 @@ abstract class BaseActivity<ViewBingType : ViewBinding> :
Snackbar.LENGTH_SHORT Snackbar.LENGTH_SHORT
) )
.setAction(R.string.show_details) { .setAction(R.string.show_details) {
MaterialDialog(this).show { CoreDialog(this).setTitle(R.string.details).setMessage( thisMsg)
title(R.string.details).message(text = thisMsg) .setPositiveButton(R.string.dialog_ok){
.positiveButton(R.string.dialog_ok)
} }.show()
}.show() }.show()
} }
} }

View File

@ -14,6 +14,7 @@ class RustAutoCompleteProvider {
private val key = "自动完成提供者" private val key = "自动完成提供者"
private val jobList = ArrayList<AutoCompleteJob>() private val jobList = ArrayList<AutoCompleteJob>()
companion object { companion object {
var keyWord = "" var keyWord = ""
} }
@ -58,25 +59,33 @@ class RustAutoCompleteProvider {
} else { } else {
//行内容 //行内容
val lineData = contentReference.getLine(charPosition.getLine()) val lineData = contentReference.getLine(charPosition.getLine())
if (lineData.isBlank()) { keyWord = if (lineData.isNullOrBlank()) {
DebugHelper.printLog(requireKey, "行内容为空,无需提示。") ""
return } else {
}
//光标前内容 //光标前内容
val cursorPrefix = lineData.subSequence(0, charPosition.getColumn()).toString() val cursorPrefix = lineData.subSequence(0, charPosition.getColumn()).toString()
val symbolIndex = cursorPrefix.lastIndexOf(':') val symbolIndex = cursorPrefix.lastIndexOf(':')
keyWord = if (symbolIndex > 0) { if (symbolIndex > 0) {
//有冒号 //有冒号
cursorPrefix.substring(symbolIndex + 1) cursorPrefix.substring(symbolIndex + 1)
} else { } else {
//无 //无
cursorPrefix cursorPrefix
} }
}
var executeNumber = 0 var executeNumber = 0
jobList.forEach { jobList.forEach {
//如果需要执行 //如果需要执行
if (it.needPerform(contentReference, charPosition)) { if (it.needPerform(contentReference, charPosition)) {
executeNumber++ executeNumber++
if (keyWord.isBlank()) {
DebugHelper.printLog(key, "${it.getName()}执行了空关键字响应。", requireKey)
it.respondingEmptyKeyword(
contentReference,
charPosition,
completionPublisher, lineData
)
} else {
it.requireAutoComplete( it.requireAutoComplete(
contentReference, contentReference,
charPosition, charPosition,
@ -85,6 +94,7 @@ class RustAutoCompleteProvider {
) )
} }
} }
}
DebugHelper.printLog(key, "执行了${executeNumber}个任务。", requireKey) DebugHelper.printLog(key, "执行了${executeNumber}个任务。", requireKey)
} }
} }

View File

@ -12,7 +12,9 @@ import com.bumptech.glide.Glide
import android.text.style.ForegroundColorSpan import android.text.style.ForegroundColorSpan
import android.util.TypedValue import android.util.TypedValue
import androidx.core.view.isVisible import androidx.core.view.isVisible
import com.coldmint.rust.pro.R
import com.coldmint.rust.pro.databinding.EditItemBinding import com.coldmint.rust.pro.databinding.EditItemBinding
import com.coldmint.rust.pro.tool.AppSettings
import com.coldmint.rust.pro.tool.GlobalMethod import com.coldmint.rust.pro.tool.GlobalMethod
import io.github.rosemoe.sora.widget.component.EditorCompletionAdapter import io.github.rosemoe.sora.widget.component.EditorCompletionAdapter
import java.util.* import java.util.*
@ -29,17 +31,36 @@ class RustCompletionAdapter : EditorCompletionAdapter() {
private val layoutInflater by lazy { private val layoutInflater by lazy {
LayoutInflater.from(context) LayoutInflater.from(context)
} }
private val simpleDisplayOfAutoCompleteMenu by lazy {
AppSettings.getValue(AppSettings.Setting.SimpleDisplayOfAutoCompleteMenu, true)
}
private val spannableStringBuilder: SpannableStringBuilder = SpannableStringBuilder() private val spannableStringBuilder: SpannableStringBuilder = SpannableStringBuilder()
private val colorSpan: ForegroundColorSpan = ForegroundColorSpan(Color.parseColor("#2196F3")) private val colorSpan: ForegroundColorSpan by lazy {
ForegroundColorSpan(GlobalMethod.getColorPrimary(context))
}
private val bold = StyleSpan(Typeface.BOLD) private val bold = StyleSpan(Typeface.BOLD)
private var useEditBackground = false
/**
* 使用编辑器背景
* @param enable Boolean
*/
fun setEditBackground(enable: Boolean) {
useEditBackground = enable
}
override fun getView( override fun getView(
position: Int, position: Int,
view: View?, view: View?,
parent: ViewGroup, parent: ViewGroup,
isCurrentCursorPosition: Boolean isCurrentCursorPosition: Boolean
): View { ): View {
val editItem = EditItemBinding.inflate(layoutInflater, parent, false) val editItem = EditItemBinding.inflate(layoutInflater, parent, false)
if (useEditBackground) {
editItem.root.setBackgroundResource(R.drawable.edit_item_background)
}
val completionItem = getItem(position) as RustCompletionItem val completionItem = getItem(position) as RustCompletionItem
spannableStringBuilder.clear() spannableStringBuilder.clear()
val label = completionItem.title val label = completionItem.title
@ -47,7 +68,10 @@ class RustCompletionAdapter : EditorCompletionAdapter() {
//节补丁 //节补丁
if (RustAutoCompleteProvider.keyWord.startsWith('[') && RustAutoCompleteProvider.keyWord.length > 1) { if (RustAutoCompleteProvider.keyWord.startsWith('[') && RustAutoCompleteProvider.keyWord.length > 1) {
RustAutoCompleteProvider.keyWord = RustAutoCompleteProvider.keyWord =
RustAutoCompleteProvider.keyWord.subSequence(0, RustAutoCompleteProvider.keyWord.length) RustAutoCompleteProvider.keyWord.subSequence(
0,
RustAutoCompleteProvider.keyWord.length
)
.toString() .toString()
} }
val start = label.lowercase(Locale.getDefault()) val start = label.lowercase(Locale.getDefault())
@ -63,6 +87,15 @@ class RustCompletionAdapter : EditorCompletionAdapter() {
spannableStringBuilder.setSpan(bold, start, end, Spanned.SPAN_INCLUSIVE_EXCLUSIVE) spannableStringBuilder.setSpan(bold, start, end, Spanned.SPAN_INCLUSIVE_EXCLUSIVE)
} }
editItem.titleView.text = spannableStringBuilder editItem.titleView.text = spannableStringBuilder
if (simpleDisplayOfAutoCompleteMenu) {
editItem.contentView.isVisible = false
editItem.subTitleView.isVisible = false
editItem.iconView.isVisible = false
} else {
editItem.contentView.isVisible = true
editItem.subTitleView.isVisible = true
editItem.iconView.isVisible = true
editItem.contentView.text = completionItem.desc editItem.contentView.text = completionItem.desc
if (completionItem.subtitle != null) { if (completionItem.subtitle != null) {
editItem.subTitleView.text = completionItem.subtitle editItem.subTitleView.text = completionItem.subtitle
@ -71,7 +104,9 @@ class RustCompletionAdapter : EditorCompletionAdapter() {
} }
val icon = completionItem.icon val icon = completionItem.icon
if (icon != null) { if (icon != null) {
Glide.with(context).load(icon).apply(GlobalMethod.getRequestOptions()).into(editItem.iconView) Glide.with(context).load(icon).apply(GlobalMethod.getRequestOptions())
.into(editItem.iconView)
}
} }
return editItem.root return editItem.root
} }

View File

@ -1,24 +1,40 @@
package com.coldmint.rust.pro.edit package com.coldmint.rust.pro.edit
import com.coldmint.rust.core.CodeTranslate
import com.coldmint.rust.core.tool.DebugHelper
import io.github.rosemoe.sora.lang.format.Formatter import io.github.rosemoe.sora.lang.format.Formatter
import io.github.rosemoe.sora.text.Content import io.github.rosemoe.sora.text.Content
import io.github.rosemoe.sora.text.TextRange import io.github.rosemoe.sora.text.TextRange
class RustFormatter : Formatter { class RustFormatter : Formatter {
private val key = "Rust代码格式化"
private var formatResultReceiver: Formatter.FormatResultReceiver? = null
private var running = false
override fun format(p0: Content, p1: TextRange) { override fun format(p0: Content, p1: TextRange) {
running = true
//io.github.rosemoe. ora.lang. Format . formatter将给定的内容从开始位置格式化到结束位置
//直接格式化内容并调用Formatter。FormatResultReceiver用于在格式化完成时从编辑器接收格式化的内容*
DebugHelper.printLog(key, "调用了格式化${p0} 文本范围${p1}")
formatResultReceiver?.onFormatSucceed(CodeTranslate.format(p0.toString()), null)
running = false
} }
override fun formatRegion(p0: Content, p1: TextRange, p2: TextRange) { override fun formatRegion(p0: Content, p1: TextRange, p2: TextRange) {
// io.github.rosemoe. ora.lang. Format . formatter将给定的内容从开始位置格式化到结束位置
// 直接格式化内容并调用Formatter。FormatResultReceiver用于在格式化完成时从编辑器接收格式化的内容
DebugHelper.printLog(key, "调用了格式化区域${p0} 文本范围${p1}")
} }
override fun setReceiver(p0: Formatter.FormatResultReceiver?) { override fun setReceiver(p0: Formatter.FormatResultReceiver?) {
//设置结果接收器
DebugHelper.printLog(key, "设置了结果接收器 为空?${p0 == null}")
formatResultReceiver = p0
} }
override fun isRunning(): Boolean { override fun isRunning(): Boolean {
return false return running
} }
override fun destroy() { override fun destroy() {

View File

@ -68,6 +68,7 @@ class RustLanguage() : Language, EnglishMode {
private var codeDataBase: CodeDataBase? = null private var codeDataBase: CodeDataBase? = null
/** /**
* 设置代码数据库 * 设置代码数据库
* @param codeDataBean CodeDataBase * @param codeDataBean CodeDataBase

View File

@ -31,6 +31,18 @@ interface AutoCompleteJob {
charPosition: CharPosition charPosition: CharPosition
): Boolean ): Boolean
/**
* 处理空白关键字或者行内容响应
* 即不输入任何内容执行的操作
* @return Boolean 返回true即响应返回false反之
*/
fun respondingEmptyKeyword(
contentReference: ContentReference,
charPosition: CharPosition,
completionPublisher: CompletionPublisher, lineData: String
)
/** /**
* 请求自动完成 * 请求自动完成
* @param contentReference ContentReference * @param contentReference ContentReference

View File

@ -76,6 +76,35 @@ class CodeAutoCompleteJob : AutoCompleteJob {
return true return true
} }
override fun respondingEmptyKeyword(
contentReference: ContentReference,
charPosition: CharPosition,
completionPublisher: CompletionPublisher,
lineData: String
) {
val section = getSection(charPosition.getLine(), contentReference)
if (section != null) {
val trueSection = getSectionType(section)
val list = codeDao.findCodeBySection(
trueSection
)
list?.forEach { codeInfo ->
completionPublisher.addItem(
CompletionItemConverter.codeInfoToCompletionItem(
codeInfo
)
)
}
DebugHelper.printLog(
debugKey,
"${getName()}响应空白关键字,查询${trueSection}节,返回了${list?.size ?: -1}个内容。"
)
} else {
DebugHelper.printLog(debugKey, "${getName()}响应空白关键字,无法获取节。")
}
}
override fun requireAutoComplete( override fun requireAutoComplete(
contentReference: ContentReference, contentReference: ContentReference,
charPosition: CharPosition, charPosition: CharPosition,

View File

@ -14,6 +14,7 @@ import android.view.LayoutInflater
import android.view.View import android.view.View
import androidx.core.view.isVisible import androidx.core.view.isVisible
import androidx.fragment.app.FragmentActivity import androidx.fragment.app.FragmentActivity
import androidx.recyclerview.widget.DividerItemDecoration
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import com.coldmint.rust.core.ModClass import com.coldmint.rust.core.ModClass
import com.coldmint.rust.core.SourceFile import com.coldmint.rust.core.SourceFile
@ -29,6 +30,8 @@ import com.coldmint.rust.pro.adapters.UnitAdapter
import com.coldmint.rust.pro.base.BaseFragment import com.coldmint.rust.pro.base.BaseFragment
import com.coldmint.rust.pro.databinding.FragmentAllUnitsBinding import com.coldmint.rust.pro.databinding.FragmentAllUnitsBinding
import com.coldmint.rust.pro.tool.AppSettings import com.coldmint.rust.pro.tool.AppSettings
import com.google.android.material.divider.MaterialDividerItemDecoration
import me.zhanghai.android.fastscroll.FastScrollerBuilder
import java.io.File import java.io.File
import java.text.SimpleDateFormat import java.text.SimpleDateFormat
import java.util.* import java.util.*
@ -51,6 +54,18 @@ class AllUnitsFragment(
override fun whenViewCreated(inflater: LayoutInflater, savedInstanceState: Bundle?) { override fun whenViewCreated(inflater: LayoutInflater, savedInstanceState: Bundle?) {
viewBinding.unitList.layoutManager = LinearLayoutManager(requireContext()) viewBinding.unitList.layoutManager = LinearLayoutManager(requireContext())
val divider = MaterialDividerItemDecoration(
requireContext(),
MaterialDividerItemDecoration.VERTICAL
)
viewBinding.unitList.addItemDecoration(
divider
)
viewBinding.swipeRefreshLayout.setOnRefreshListener {
loadFiles()
viewBinding.swipeRefreshLayout.isRefreshing = false
}
loadFiles() loadFiles()
} }
@ -129,7 +144,7 @@ class AllUnitsFragment(
val handler = Handler(Looper.getMainLooper()) val handler = Handler(Looper.getMainLooper())
executorService.submit { executorService.submit {
handler.post { handler.post {
viewBinding.unitList.isVisible = false viewBinding.swipeRefreshLayout.isVisible = false
viewBinding.progressBar.isVisible = true viewBinding.progressBar.isVisible = true
viewBinding.unitError.isVisible = false viewBinding.unitError.isVisible = false
} }
@ -166,7 +181,7 @@ class AllUnitsFragment(
notFindUnits(handler) notFindUnits(handler)
} else { } else {
handler.post { handler.post {
viewBinding.unitList.isVisible = true viewBinding.swipeRefreshLayout.isVisible = true
viewBinding.progressBar.isVisible = false viewBinding.progressBar.isVisible = false
viewBinding.unitError.isVisible = false viewBinding.unitError.isVisible = false
val adapter = UnitAdapter(requireContext(), dataList, "") val adapter = UnitAdapter(requireContext(), dataList, "")
@ -181,6 +196,8 @@ class AllUnitsFragment(
loadFiles() loadFiles()
} }
} }
FastScrollerBuilder(viewBinding.unitList).useMd2Style()
.setPopupTextProvider(adapter).build()
viewBinding.unitList.adapter = adapter viewBinding.unitList.adapter = adapter
whenNumberChanged?.invoke(dataList.size) whenNumberChanged?.invoke(dataList.size)
} }
@ -196,7 +213,7 @@ class AllUnitsFragment(
fun notFindUnits(handler: Handler? = null, key: String? = null, searchMode: Boolean = false) { fun notFindUnits(handler: Handler? = null, key: String? = null, searchMode: Boolean = false) {
val temHandler = handler ?: Handler(Looper.getMainLooper()) val temHandler = handler ?: Handler(Looper.getMainLooper())
temHandler.post { temHandler.post {
viewBinding.unitList.isVisible = false viewBinding.swipeRefreshLayout.isVisible = false
viewBinding.progressBar.isVisible = false viewBinding.progressBar.isVisible = false
viewBinding.unitError.isVisible = true viewBinding.unitError.isVisible = true
if (key != null) { if (key != null) {
@ -233,7 +250,7 @@ class AllUnitsFragment(
val handler = Handler(Looper.getMainLooper()) val handler = Handler(Looper.getMainLooper())
executorService.submit { executorService.submit {
handler.post { handler.post {
viewBinding.unitList.isVisible = false viewBinding.swipeRefreshLayout.isVisible = false
viewBinding.progressBar.isVisible = true viewBinding.progressBar.isVisible = true
viewBinding.unitError.isVisible = false viewBinding.unitError.isVisible = false
} }
@ -295,7 +312,7 @@ class AllUnitsFragment(
notFindUnits(handler, searchMode = true) notFindUnits(handler, searchMode = true)
} else { } else {
handler.post { handler.post {
viewBinding.unitList.isVisible = true viewBinding.swipeRefreshLayout.isVisible = true
viewBinding.progressBar.isVisible = false viewBinding.progressBar.isVisible = false
viewBinding.unitError.isVisible = true viewBinding.unitError.isVisible = true
viewBinding.unitError.text = getString(R.string.search_tip) viewBinding.unitError.text = getString(R.string.search_tip)
@ -343,7 +360,7 @@ class AllUnitsFragment(
notFindUnits(handler, key) notFindUnits(handler, key)
} else { } else {
handler.post { handler.post {
viewBinding.unitList.isVisible = true viewBinding.swipeRefreshLayout.isVisible = true
viewBinding.progressBar.isVisible = false viewBinding.progressBar.isVisible = false
viewBinding.unitError.isVisible = true viewBinding.unitError.isVisible = true
viewBinding.unitError.text = getString(R.string.not_find_units_action) viewBinding.unitError.text = getString(R.string.not_find_units_action)

View File

@ -33,12 +33,11 @@ import kotlin.collections.ArrayList
class DatabaseFragment : BaseFragment<FragmentDatabaseBinding>() { class DatabaseFragment : BaseFragment<FragmentDatabaseBinding>() {
fun loadList() {
override fun whenViewCreated(inflater: LayoutInflater, savedInstanceState: Bundle?) {
viewBinding.databaseList.layoutManager = LinearLayoutManager(requireContext()) viewBinding.databaseList.layoutManager = LinearLayoutManager(requireContext())
val database_directory = AppSettings.getValue( val database_directory = AppSettings.getValue(
AppSettings.Setting.DatabaseDirectory, AppSettings.Setting.DatabaseDirectory,
requireContext().filesDir.absolutePath + "/database/" requireContext().filesDir.absolutePath + "/databases/"
) )
val directory = File(database_directory) val directory = File(database_directory)
if (!directory.exists()) { if (!directory.exists()) {
@ -165,6 +164,15 @@ class DatabaseFragment : BaseFragment<FragmentDatabaseBinding>() {
} }
override fun whenViewCreated(inflater: LayoutInflater, savedInstanceState: Bundle?) {
}
override fun onResume() {
super.onResume()
loadList()
}
override fun getViewBindingObject(layoutInflater: LayoutInflater): FragmentDatabaseBinding { override fun getViewBindingObject(layoutInflater: LayoutInflater): FragmentDatabaseBinding {
return FragmentDatabaseBinding.inflate(layoutInflater) return FragmentDatabaseBinding.inflate(layoutInflater)
} }

View File

@ -8,6 +8,7 @@ import android.os.Looper
import android.view.LayoutInflater import android.view.LayoutInflater
import androidx.core.view.isVisible import androidx.core.view.isVisible
import androidx.fragment.app.FragmentActivity import androidx.fragment.app.FragmentActivity
import androidx.recyclerview.widget.DividerItemDecoration
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import com.coldmint.rust.core.ModClass import com.coldmint.rust.core.ModClass
import com.coldmint.rust.core.SourceFile import com.coldmint.rust.core.SourceFile
@ -16,6 +17,7 @@ import com.coldmint.rust.pro.R
import com.coldmint.rust.pro.adapters.HistoryAdapter import com.coldmint.rust.pro.adapters.HistoryAdapter
import com.coldmint.rust.pro.base.BaseFragment import com.coldmint.rust.pro.base.BaseFragment
import com.coldmint.rust.pro.databinding.FragmentHistoryBinding import com.coldmint.rust.pro.databinding.FragmentHistoryBinding
import com.google.android.material.divider.MaterialDividerItemDecoration
import java.io.File import java.io.File
import java.util.concurrent.ExecutorService import java.util.concurrent.ExecutorService
import java.util.concurrent.Executors import java.util.concurrent.Executors
@ -34,6 +36,14 @@ class HistoryUnitFragment(
val executorService: ExecutorService = Executors.newSingleThreadExecutor() val executorService: ExecutorService = Executors.newSingleThreadExecutor()
override fun whenViewCreated(inflater: LayoutInflater, savedInstanceState: Bundle?) { override fun whenViewCreated(inflater: LayoutInflater, savedInstanceState: Bundle?) {
viewBinding.unitList.layoutManager = LinearLayoutManager(requireContext()) viewBinding.unitList.layoutManager = LinearLayoutManager(requireContext())
val divider = MaterialDividerItemDecoration(
requireContext(),
MaterialDividerItemDecoration.VERTICAL
)
viewBinding.unitList.addItemDecoration(
divider
)
loadList() loadList()
} }
@ -96,6 +106,7 @@ class HistoryUnitFragment(
} }
} }
viewBinding.unitList.adapter = adapter viewBinding.unitList.adapter = adapter
whenNumberChanged?.invoke(dataList.size) whenNumberChanged?.invoke(dataList.size)
} }
} }
@ -110,12 +121,6 @@ class HistoryUnitFragment(
fun openEditActivity(file: SourceFile) { fun openEditActivity(file: SourceFile) {
val bundle = Bundle() val bundle = Bundle()
val path = file.file.absolutePath val path = file.file.absolutePath
// val name = fileClass.getName(
// AppSettings.getValue(
// AppSettings.Setting.AppLanguage,
// Locale.getDefault().language
// )
// )
bundle.putString("path", path) bundle.putString("path", path)
bundle.putString("modPath", modClass.modFile.absolutePath) bundle.putString("modPath", modClass.modFile.absolutePath)
val intent = Intent(requireContext(), EditActivity::class.java) val intent = Intent(requireContext(), EditActivity::class.java)

View File

@ -1,5 +1,6 @@
package com.coldmint.rust.pro.fragments package com.coldmint.rust.pro.fragments
import android.content.Intent
import android.os.Bundle import android.os.Bundle
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
@ -15,10 +16,12 @@ import com.coldmint.rust.core.dataBean.mod.InsertCoinHistoryData
import com.coldmint.rust.core.interfaces.ApiCallBack import com.coldmint.rust.core.interfaces.ApiCallBack
import com.coldmint.rust.core.web.WebMod import com.coldmint.rust.core.web.WebMod
import com.coldmint.rust.pro.R import com.coldmint.rust.pro.R
import com.coldmint.rust.pro.UserHomePageActivity
import com.coldmint.rust.pro.adapters.InsertCoinsAdapter import com.coldmint.rust.pro.adapters.InsertCoinsAdapter
import com.coldmint.rust.pro.base.BaseFragment import com.coldmint.rust.pro.base.BaseFragment
import com.coldmint.rust.pro.databinding.FragmentInsertCoinsBinding import com.coldmint.rust.pro.databinding.FragmentInsertCoinsBinding
import com.coldmint.rust.pro.tool.AppSettings import com.coldmint.rust.pro.tool.AppSettings
import com.google.android.material.divider.MaterialDividerItemDecoration
/** /**
* 投币碎片 * 投币碎片
@ -30,11 +33,13 @@ class InsertCoinsFragment(val modId: String) : BaseFragment<FragmentInsertCoinsB
override fun whenViewCreated(inflater: LayoutInflater, savedInstanceState: Bundle?) { override fun whenViewCreated(inflater: LayoutInflater, savedInstanceState: Bundle?) {
viewBinding.recyclerView.layoutManager = LinearLayoutManager(requireContext()) viewBinding.recyclerView.layoutManager = LinearLayoutManager(requireContext())
viewBinding.recyclerView.addItemDecoration( val divider = MaterialDividerItemDecoration(
DividerItemDecoration(
requireContext(), requireContext(),
DividerItemDecoration.VERTICAL MaterialDividerItemDecoration.VERTICAL
) )
viewBinding.recyclerView.addItemDecoration(
divider
) )
viewBinding.swipeRefreshLayout.setOnRefreshListener { viewBinding.swipeRefreshLayout.setOnRefreshListener {
loadList(false) loadList(false)
@ -85,8 +90,14 @@ class InsertCoinsFragment(val modId: String) : BaseFragment<FragmentInsertCoinsB
viewBinding.loadLayout.isVisible = true viewBinding.loadLayout.isVisible = true
viewBinding.coinRecordsView.text = getString(R.string.coin_records) viewBinding.coinRecordsView.text = getString(R.string.coin_records)
} else { } else {
val adapter = InsertCoinsAdapter(requireContext(), dataList)
adapter.setItemEvent { i, itemInsertCoinsBinding, viewHolder, data ->
itemInsertCoinsBinding.imageView.setOnClickListener {
gotoUserPage(data.account)
}
}
viewBinding.recyclerView.adapter = viewBinding.recyclerView.adapter =
InsertCoinsAdapter(requireContext(), dataList) adapter
val data = getString(R.string.coin_records) + "(" + dataList.size + ")" val data = getString(R.string.coin_records) + "(" + dataList.size + ")"
viewBinding.coinRecordsView.text = data viewBinding.coinRecordsView.text = data
viewBinding.recyclerView.isVisible = true viewBinding.recyclerView.isVisible = true
@ -110,6 +121,21 @@ class InsertCoinsFragment(val modId: String) : BaseFragment<FragmentInsertCoinsB
}) })
} }
/**
* 打开用户主页
* @param userId String
*/
fun gotoUserPage(userId: String) {
val intent = Intent(
requireContext(),
UserHomePageActivity::class.java
)
intent.putExtra("userId", userId)
startActivity(
intent
)
}
fun loadButton() { fun loadButton() {
WebMod.instance.getCoinStatus(token, modId, object : ApiCallBack<CoinStatusData> { WebMod.instance.getCoinStatus(token, modId, object : ApiCallBack<CoinStatusData> {
override fun onResponse(t: CoinStatusData) { override fun onResponse(t: CoinStatusData) {

View File

@ -14,6 +14,7 @@ import android.widget.TextView
import android.widget.Toast import android.widget.Toast
import androidx.activity.result.ActivityResultLauncher import androidx.activity.result.ActivityResultLauncher
import androidx.activity.result.contract.ActivityResultContracts import androidx.activity.result.contract.ActivityResultContracts
import androidx.appcompat.app.AppCompatActivity
import androidx.lifecycle.MutableLiveData import androidx.lifecycle.MutableLiveData
import com.coldmint.dialog.CoreDialog import com.coldmint.dialog.CoreDialog
import com.coldmint.rust.core.LocalTemplatePackage import com.coldmint.rust.core.LocalTemplatePackage
@ -133,6 +134,7 @@ class InstalledTemplateFragment : BaseFragment<FragmentInstalledTemplateBinding>
registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { registerForActivityResult(ActivityResultContracts.StartActivityForResult()) {
if (it.resultCode == Activity.RESULT_OK) { if (it.resultCode == Activity.RESULT_OK) {
Log.d("启动模板解析器", "收到成功回调,关闭界面。") Log.d("启动模板解析器", "收到成功回调,关闭界面。")
requireActivity().setResult(AppCompatActivity.RESULT_OK, it.data)
requireActivity().finish() requireActivity().finish()
} else { } else {
Log.w("启动模板解析器", "未收到有效回调。") Log.w("启动模板解析器", "未收到有效回调。")

View File

@ -12,7 +12,7 @@ import androidx.core.content.FileProvider
import androidx.core.view.isVisible import androidx.core.view.isVisible
import androidx.recyclerview.widget.DividerItemDecoration import androidx.recyclerview.widget.DividerItemDecoration
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import com.afollestad.materialdialogs.MaterialDialog import com.coldmint.dialog.CoreDialog
import com.coldmint.rust.core.MapClass import com.coldmint.rust.core.MapClass
import com.coldmint.rust.core.tool.AppOperator import com.coldmint.rust.core.tool.AppOperator
import com.coldmint.rust.core.tool.FileOperator import com.coldmint.rust.core.tool.FileOperator
@ -59,22 +59,22 @@ class MapFragment : BaseFragment<FragmentMapBinding>() {
itemMapBinding.mapLinearlayout.setOnClickListener { itemMapBinding.mapLinearlayout.setOnClickListener {
val packName = "com.mirwanda.nottiled" val packName = "com.mirwanda.nottiled"
val materialDialog = val materialDialog =
MaterialDialog(requireContext()).title(R.string.edit_map) CoreDialog(requireContext()).setTitle(R.string.edit_map)
.message(R.string.edit_map_tip) .setMessage(R.string.edit_map_tip)
.negativeButton(R.string.dialog_close).cancelable(false) .setNegativeButton(R.string.dialog_close) {
}.setCancelable(false)
if (AppOperator.isAppInstalled( if (AppOperator.isAppInstalled(
requireContext(), requireContext(),
packName packName
) )
) { ) {
materialDialog.positiveButton(R.string.open_nottiled) materialDialog.setPositiveButton(R.string.open_nottiled) {
.positiveButton {
materialDialog.dismiss() materialDialog.dismiss()
AppOperator.openApp(requireContext(), packName) AppOperator.openApp(requireContext(), packName)
} }
} else { } else {
materialDialog.positiveButton(R.string.downlod_nottiled) materialDialog.setPositiveButton(R.string.downlod_nottiled) {
.positiveButton {
AppOperator.useBrowserAccessWebPage( AppOperator.useBrowserAccessWebPage(
requireContext(), requireContext(),
"https://mint.lanzouo.com/ilXgJyfol8h" "https://mint.lanzouo.com/ilXgJyfol8h"
@ -137,11 +137,13 @@ class MapFragment : BaseFragment<FragmentMapBinding>() {
override fun whenViewCreated(inflater: LayoutInflater, savedInstanceState: Bundle?) { override fun whenViewCreated(inflater: LayoutInflater, savedInstanceState: Bundle?) {
viewBinding.mapList.layoutManager = LinearLayoutManager(requireContext()) viewBinding.mapList.layoutManager = LinearLayoutManager(requireContext())
viewBinding.mapList.addItemDecoration( val divider = MaterialDividerItemDecoration(
DividerItemDecoration(
requireContext(), requireContext(),
DividerItemDecoration.VERTICAL MaterialDividerItemDecoration.VERTICAL
) )
viewBinding.mapList.addItemDecoration(
divider
) )
val path = AppSettings.getValue(AppSettings.Setting.MapFolder, "") val path = AppSettings.getValue(AppSettings.Setting.MapFolder, "")
if (path.isNotBlank()) { if (path.isNotBlank()) {

View File

@ -24,6 +24,7 @@ import com.coldmint.rust.pro.base.BaseFragment
import com.coldmint.rust.pro.databinding.FragmentModCommentsBinding import com.coldmint.rust.pro.databinding.FragmentModCommentsBinding
import com.coldmint.rust.pro.dialog.CommentDialog import com.coldmint.rust.pro.dialog.CommentDialog
import com.coldmint.rust.pro.tool.AppSettings import com.coldmint.rust.pro.tool.AppSettings
import com.google.android.material.divider.MaterialDividerItemDecoration
import com.google.android.material.snackbar.Snackbar import com.google.android.material.snackbar.Snackbar
/** /**
@ -32,11 +33,13 @@ import com.google.android.material.snackbar.Snackbar
class ModCommentsFragment(val modId: String) : BaseFragment<FragmentModCommentsBinding>() { class ModCommentsFragment(val modId: String) : BaseFragment<FragmentModCommentsBinding>() {
override fun whenViewCreated(inflater: LayoutInflater, savedInstanceState: Bundle?) { override fun whenViewCreated(inflater: LayoutInflater, savedInstanceState: Bundle?) {
viewBinding.recyclerView.layoutManager = LinearLayoutManager(requireContext()) viewBinding.recyclerView.layoutManager = LinearLayoutManager(requireContext())
viewBinding.recyclerView.addItemDecoration( val divider = MaterialDividerItemDecoration(
DividerItemDecoration(
requireContext(), requireContext(),
DividerItemDecoration.VERTICAL MaterialDividerItemDecoration.VERTICAL
) )
viewBinding.recyclerView.addItemDecoration(
divider
) )
viewBinding.swipeRefreshLayout.setOnRefreshListener { viewBinding.swipeRefreshLayout.setOnRefreshListener {
loadCommentList(modId, false) loadCommentList(modId, false)

View File

@ -22,6 +22,7 @@ import com.coldmint.rust.pro.tool.AppSettings
import com.coldmint.rust.pro.tool.GlobalMethod import com.coldmint.rust.pro.tool.GlobalMethod
import com.coldmint.rust.pro.viewmodel.ModViewModel import com.coldmint.rust.pro.viewmodel.ModViewModel
import com.google.android.material.bottomsheet.BottomSheetDialog import com.google.android.material.bottomsheet.BottomSheetDialog
import com.google.android.material.divider.MaterialDividerItemDecoration
import com.google.android.material.snackbar.Snackbar import com.google.android.material.snackbar.Snackbar
import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Job import kotlinx.coroutines.Job
@ -337,11 +338,12 @@ class ModFragment : BaseFragment<FragmentModBinding>() {
override fun whenViewCreated(inflater: LayoutInflater, savedInstanceState: Bundle?) { override fun whenViewCreated(inflater: LayoutInflater, savedInstanceState: Bundle?) {
viewBinding.modList.layoutManager = LinearLayoutManager(context) viewBinding.modList.layoutManager = LinearLayoutManager(context)
viewBinding.modList.addItemDecoration( val divider = MaterialDividerItemDecoration(
DividerItemDecoration(
requireContext(), requireContext(),
DividerItemDecoration.VERTICAL MaterialDividerItemDecoration.VERTICAL
) )
viewBinding.modList.addItemDecoration(
divider
) )
viewBinding.swipeRefreshLayout.setOnRefreshListener { viewBinding.swipeRefreshLayout.setOnRefreshListener {
loadModList() loadModList()

View File

@ -7,8 +7,8 @@ import android.view.LayoutInflater
import android.view.View import android.view.View
import androidx.core.view.isVisible import androidx.core.view.isVisible
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import com.afollestad.materialdialogs.MaterialDialog
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
import com.coldmint.dialog.CoreDialog
import com.coldmint.rust.core.dataBean.BannerItemDataBean import com.coldmint.rust.core.dataBean.BannerItemDataBean
import com.coldmint.rust.core.dataBean.mod.WebModListData import com.coldmint.rust.core.dataBean.mod.WebModListData
import com.coldmint.rust.core.interfaces.ApiCallBack import com.coldmint.rust.core.interfaces.ApiCallBack
@ -163,10 +163,11 @@ class RecommendedFragment : BaseFragment<FragmentRecommendedBinding>() {
val type = textStyleMaker.getType(data.link) val type = textStyleMaker.getType(data.link)
val linkData = textStyleMaker.getData(data.link) val linkData = textStyleMaker.getData(data.link)
if (type == null || linkData == null) { if (type == null || linkData == null) {
MaterialDialog(requireContext()).show { CoreDialog(requireContext()).setTitle(data.title)
title(text = data.title).message(text = data.link) .setMessage(data.link)
.positiveButton(R.string.dialog_ok) .setPositiveButton(R.string.dialog_ok) {
}
}.setCancelable(false).show()
} else { } else {
textStyleMaker.clickEvent( textStyleMaker.clickEvent(
requireContext(), requireContext(),

View File

@ -19,6 +19,7 @@ import com.coldmint.rust.pro.adapters.WebTemplateAdapter
import com.coldmint.rust.pro.base.BaseFragment import com.coldmint.rust.pro.base.BaseFragment
import com.coldmint.rust.pro.databinding.FragmentTemplateCommunityBinding import com.coldmint.rust.pro.databinding.FragmentTemplateCommunityBinding
import com.coldmint.rust.pro.tool.AppSettings import com.coldmint.rust.pro.tool.AppSettings
import com.google.android.material.divider.MaterialDividerItemDecoration
import me.zhanghai.android.fastscroll.FastScrollerBuilder import me.zhanghai.android.fastscroll.FastScrollerBuilder
/** /**
@ -28,11 +29,12 @@ class TemplateCommunityFragment : BaseFragment<FragmentTemplateCommunityBinding>
val token = AppSettings.getValue(AppSettings.Setting.Token, "") val token = AppSettings.getValue(AppSettings.Setting.Token, "")
override fun whenViewCreated(inflater: LayoutInflater, savedInstanceState: Bundle?) { override fun whenViewCreated(inflater: LayoutInflater, savedInstanceState: Bundle?) {
viewBinding.recyclerView.addItemDecoration( val divider = MaterialDividerItemDecoration(
DividerItemDecoration(
requireContext(), requireContext(),
DividerItemDecoration.VERTICAL MaterialDividerItemDecoration.VERTICAL
) )
viewBinding.recyclerView.addItemDecoration(
divider
) )
viewBinding.recyclerView.layoutManager = LinearLayoutManager(requireContext()) viewBinding.recyclerView.layoutManager = LinearLayoutManager(requireContext())
@ -55,8 +57,10 @@ class TemplateCommunityFragment : BaseFragment<FragmentTemplateCommunityBinding>
val adapter = WebTemplateAdapter(requireContext(), t.data!!) val adapter = WebTemplateAdapter(requireContext(), t.data!!)
adapter.setItemEvent { i, itemWebTemplateBinding, viewHolder, data -> adapter.setItemEvent { i, itemWebTemplateBinding, viewHolder, data ->
itemWebTemplateBinding.root.setOnClickListener { itemWebTemplateBinding.root.setOnClickListener {
val intent = Intent(requireContext(), val intent = Intent(
NetworkTemplatePackageDetailsActivity::class.java) requireContext(),
NetworkTemplatePackageDetailsActivity::class.java
)
intent.putExtra("id", data.id) intent.putExtra("id", data.id)
intent.putExtra("createDirectory", data.id) intent.putExtra("createDirectory", data.id)
startActivity(intent) startActivity(intent)

View File

@ -42,9 +42,6 @@ class WebModDetailsFragment(val modId: String,val modNameLiveData: MutableLiveDa
return link return link
} }
/** /**
* 获取此模组是否对外开放 * 获取此模组是否对外开放
* @return Boolean * @return Boolean

View File

@ -38,7 +38,7 @@ object AppSettings {
} }
enum class Setting { enum class Setting {
DatabaseDirectory, DatabasePath, TemplateDirectory, AppLanguage, DeveloperMode, CustomSymbol, AutoCreateNomedia, OnlyLoadConantLanguageTemple, NightMode, GamePackage, KeywordColor, KeywordColorDark, AnnotationColor, AnnotationColorDark, TextColor, TextColorDark, SectionColor, SectionColorDark, 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, DynamicColor, ExperiencePlan, FileSortType, CodeEditBackGroundEnable, BlurTransformationValue, CodeEditBackGroundPath DatabaseDirectory, DatabasePath, TemplateDirectory, AppLanguage, DeveloperMode, CustomSymbol, AutoCreateNomedia, OnlyLoadConantLanguageTemple, NightMode, GamePackage, KeywordColor, KeywordColorDark, AnnotationColor, AnnotationColorDark, TextColor, TextColorDark, SectionColor, SectionColorDark, 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, DynamicColor, ExperiencePlan, FileSortType, CodeEditBackGroundEnable, BlurTransformationValue, CodeEditBackGroundPath, SimpleDisplayOfAutoCompleteMenu
} }
@ -130,6 +130,8 @@ object AppSettings {
map[Setting.DynamicColor] = mApplication.getString(R.string.setting_dynamic_color) map[Setting.DynamicColor] = mApplication.getString(R.string.setting_dynamic_color)
map[Setting.ExperiencePlan] = mApplication.getString(R.string.setting_experience_the_plan) map[Setting.ExperiencePlan] = mApplication.getString(R.string.setting_experience_the_plan)
map[Setting.FileSortType] = mApplication.getString(R.string.setting_file_sort_type) map[Setting.FileSortType] = mApplication.getString(R.string.setting_file_sort_type)
map[Setting.SimpleDisplayOfAutoCompleteMenu] =
mApplication.getString(R.string.setting_simple_display_of_auto_complete_menu)
//仅保存不可显示 //仅保存不可显示
map[Setting.SetGameStorage] = "SetGameStorage" map[Setting.SetGameStorage] = "SetGameStorage"
map[Setting.AppID] = "AppId" map[Setting.AppID] = "AppId"

View File

@ -5,6 +5,7 @@ import android.content.ClipData
import android.content.ClipboardManager import android.content.ClipboardManager
import android.content.Context import android.content.Context
import android.content.res.ColorStateList import android.content.res.ColorStateList
import android.content.res.Resources
import android.graphics.Bitmap import android.graphics.Bitmap
import android.graphics.Color import android.graphics.Color
import android.graphics.Paint import android.graphics.Paint
@ -16,8 +17,6 @@ import android.widget.TextView
import android.widget.Toast import android.widget.Toast
import androidx.core.graphics.drawable.DrawableCompat import androidx.core.graphics.drawable.DrawableCompat
import androidx.fragment.app.FragmentActivity import androidx.fragment.app.FragmentActivity
import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
import com.bumptech.glide.load.MultiTransformation import com.bumptech.glide.load.MultiTransformation
import com.bumptech.glide.request.RequestOptions import com.bumptech.glide.request.RequestOptions
import com.coldmint.rust.core.dataBean.mod.WebModUpdateLogData import com.coldmint.rust.core.dataBean.mod.WebModUpdateLogData
@ -27,6 +26,7 @@ import com.coldmint.rust.core.web.WebMod
import com.coldmint.rust.pro.R import com.coldmint.rust.pro.R
import com.flask.colorpicker.ColorPickerView import com.flask.colorpicker.ColorPickerView
import com.flask.colorpicker.builder.ColorPickerDialogBuilder import com.flask.colorpicker.builder.ColorPickerDialogBuilder
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.snackbar.Snackbar import com.google.android.material.snackbar.Snackbar
import com.permissionx.guolindev.PermissionX import com.permissionx.guolindev.PermissionX
import jp.wasabeef.glide.transformations.* import jp.wasabeef.glide.transformations.*
@ -43,6 +43,15 @@ object GlobalMethod {
const val DEBUG_SIGN = "963dfd616924b27f9247a35e45bc130a" const val DEBUG_SIGN = "963dfd616924b27f9247a35e45bc130a"
const val RELEASE_SIGN = "5320b24894fe7ed449842a81a2dfceda" const val RELEASE_SIGN = "5320b24894fe7ed449842a81a2dfceda"
/**
* 转dp
* @param i Int
* @return Int
*/
fun dp2px(i: Int): Int {
return (Resources.getSystem().displayMetrics.density * i + 0.5f).toInt()
}
/** /**
* 获取主题色 * 获取主题色
@ -211,11 +220,10 @@ object GlobalMethod {
} }
val title = val title =
context.getString(R.string.update_record) + "(" + data.size + ")" context.getString(R.string.update_record) + "(" + data.size + ")"
MaterialDialog(context, BottomSheet()).show { MaterialAlertDialogBuilder(context).setTitle(title)
title(text = title).message(text = stringBuilder.toString()) .setMessage(stringBuilder.toString()).setCancelable(false)
.cancelable(false) .setPositiveButton(R.string.dialog_ok) { i, i2 ->
.positiveButton(R.string.dialog_ok) }.show()
}
} else { } else {
Toast.makeText(context, t.message, Toast.LENGTH_SHORT).show() Toast.makeText(context, t.message, Toast.LENGTH_SHORT).show()
} }

View File

@ -17,7 +17,6 @@ import androidx.appcompat.app.AppCompatDelegate
import androidx.core.app.ActivityCompat import androidx.core.app.ActivityCompat
import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat
import androidx.lifecycle.MutableLiveData import androidx.lifecycle.MutableLiveData
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
@ -28,6 +27,7 @@ import com.coldmint.rust.core.database.code.CodeDataBase
import com.coldmint.rust.core.interfaces.ApiCallBack import com.coldmint.rust.core.interfaces.ApiCallBack
import com.coldmint.rust.core.interfaces.UnzipListener import com.coldmint.rust.core.interfaces.UnzipListener
import com.coldmint.rust.core.tool.AppOperator import com.coldmint.rust.core.tool.AppOperator
import com.coldmint.rust.core.tool.DebugHelper
import com.coldmint.rust.core.tool.FileOperator import com.coldmint.rust.core.tool.FileOperator
import com.coldmint.rust.core.web.ServerConfiguration import com.coldmint.rust.core.web.ServerConfiguration
import com.coldmint.rust.core.web.User import com.coldmint.rust.core.web.User
@ -184,7 +184,7 @@ class StartViewModel(application: Application) : BaseAndroidViewModel(applicatio
AppSettings.initSetting(AppSettings.Setting.DeveloperMode, false) AppSettings.initSetting(AppSettings.Setting.DeveloperMode, false)
AppSettings.initSetting( AppSettings.initSetting(
AppSettings.Setting.DatabaseDirectory, AppSettings.Setting.DatabaseDirectory,
context.filesDir.absolutePath + "/database/" context.filesDir.absolutePath + "/databases/"
) )
AppSettings.initSetting( AppSettings.initSetting(
AppSettings.Setting.TemplateDirectory, AppSettings.Setting.TemplateDirectory,
@ -221,6 +221,7 @@ class StartViewModel(application: Application) : BaseAndroidViewModel(applicatio
AppSettings.initSetting(AppSettings.Setting.EnglishEditingMode, false) AppSettings.initSetting(AppSettings.Setting.EnglishEditingMode, false)
AppSettings.initSetting(AppSettings.Setting.NightModeFollowSystem, true) AppSettings.initSetting(AppSettings.Setting.NightModeFollowSystem, true)
AppSettings.initSetting(AppSettings.Setting.UseTheCommunityAsTheLaunchPage, true) AppSettings.initSetting(AppSettings.Setting.UseTheCommunityAsTheLaunchPage, true)
AppSettings.initSetting(AppSettings.Setting.SimpleDisplayOfAutoCompleteMenu, true)
AppSettings.initSetting( AppSettings.initSetting(
AppSettings.Setting.ServerAddress, AppSettings.Setting.ServerAddress,
ServerConfiguration.defaultIp ServerConfiguration.defaultIp
@ -265,24 +266,24 @@ class StartViewModel(application: Application) : BaseAndroidViewModel(applicatio
} }
/** /**
* 初始化资源 * 解压数据集
* @param resFileName String
* @param useDataSet Boolean
*/ */
private fun initRes() { private fun unzipDataSet(resFileName: String, useDataSet: Boolean = false) {
val defaultDatabase = File( val cacheFile = File(context.cacheDir.toString() + "/system/" + resFileName)
val prefixName = FileOperator.getPrefixName(resFileName)
val cacheFolder =
File(context.cacheDir.toString() + "/system/" + prefixName)
FileOperator.outputResourceFile(context, resFileName, cacheFile)
val databaseFolder = File(
AppSettings.getValue( AppSettings.getValue(
AppSettings.Setting.DatabaseDirectory, AppSettings.Setting.DatabaseDirectory,
context.filesDir.absolutePath + "/database/" context.filesDir.absolutePath + "/databases/"
) + "official" ) + prefixName
) )
AppSettings.initSetting(
AppSettings.Setting.DatabasePath,
defaultDatabase.absolutePath
)
val cacheFile = File(context.cacheDir.toString() + "/System/DataBase.rdb")
val cacheFolder = File(context.cacheDir.toString() + "/System/official")
FileOperator.outputResourceFile(context, "dataBase.rdb", cacheFile)
try {
val updateDataSet: (File) -> Unit = { val updateDataSet: (File) -> Unit = {
CompressionManager.instance.unzip( CompressionManager.instance.unzip(
cacheFile, cacheFile,
@ -297,28 +298,57 @@ class StartViewModel(application: Application) : BaseAndroidViewModel(applicatio
} }
override fun whenUnzipComplete(result: Boolean) { override fun whenUnzipComplete(result: Boolean) {
if (useDataSet) {
val init = AppSettings.initSetting(
AppSettings.Setting.DatabasePath,
databaseFolder.absolutePath
)
if (init) {
DebugHelper.printLog("加载数据集", "已初始化加载" + databaseFolder)
var codeDataBase = CodeDataBase.getInstance(context) var codeDataBase = CodeDataBase.getInstance(context)
codeDataBase.loadDataSet( codeDataBase.loadDataSet(
DataSet(defaultDatabase), DataSet(databaseFolder),
CodeDataBase.ReadMode.Copy CodeDataBase.ReadMode.Copy
) )
} else {
DebugHelper.printLog("加载数据集", "无法二次加载" + databaseFolder)
}
} else {
DebugHelper.printLog("加载数据集", "已解压" + databaseFolder + "但不使用。")
}
} }
}) })
} }
if (defaultDatabase.exists()) { if (databaseFolder.exists()) {
updateDataSet.invoke(cacheFolder) updateDataSet.invoke(cacheFolder)
val oldDataSet = DataSet(defaultDatabase) val oldDataSet = DataSet(databaseFolder)
val newDataSet = DataSet(cacheFolder) val newDataSet = DataSet(cacheFolder)
val update = oldDataSet.update(newDataSet) val update = oldDataSet.update(newDataSet)
if (update) { if (update) {
dataSetMsgLiveData.value = context.getString(R.string.dataset_update_ok) dataSetMsgLiveData.value = context.getString(R.string.dataset_update_ok)
} }
} else { } else {
updateDataSet.invoke(defaultDatabase) updateDataSet.invoke(databaseFolder)
} }
}
/**
* 初始化资源
*/
private fun initRes() {
try {
val language = Locale.getDefault().language
DebugHelper.printLog("初始化资源","语言"+language)
if (language == "zh") {
unzipDataSet("dataBase.rdb", true)
unzipDataSet("dataBase_en.rdb")
} else {
unzipDataSet("dataBase.rdb")
unzipDataSet("dataBase_en.rdb", true)
}
val defaultValues = File(context.filesDir.absolutePath + "/values.json") val defaultValues = File(context.filesDir.absolutePath + "/values.json")
if (!defaultValues.exists()) { if (!defaultValues.exists()) {
FileOperator.outputResourceFile( FileOperator.outputResourceFile(

View File

@ -26,6 +26,8 @@ class TemplateParserViewModel : BaseViewModel() {
private var jsonData: JSONObject? = null private var jsonData: JSONObject? = null
private var template: Template? = null private var template: Template? = null
private lateinit var arrayList :ArrayList<TemplateParser> private lateinit var arrayList :ArrayList<TemplateParser>
//文件输出目录
private var outPutPath : String? = null
//创建目录 //创建目录
@ -111,9 +113,18 @@ class TemplateParserViewModel : BaseViewModel() {
Log.e("构建文件", "目标文件${path}已存在。") Log.e("构建文件", "目标文件${path}已存在。")
return false return false
} }
outPutPath = path.absolutePath
return FileOperator.writeFile(path, generatingCode(context)) return FileOperator.writeFile(path, generatingCode(context))
} }
/**
* 获取文件输出目录当构建文件完毕后返回有效值否则返回null
* @return String?
*/
fun getOutputPath():String?{
return outPutPath
}
/** /**
* 生成代码 * 生成代码
* @return String * @return String

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="?android:windowBackground" />
<!-- <corners-->
<!-- android:topLeftRadius="32dp"-->
<!-- android:topRightRadius="32dp" />-->
<!-- android:bottomLeftRadius="16dp"-->
<!-- android:bottomRightRadius="16dp"-->
<!-- <stroke-->
<!-- android:width="3dp"-->
<!-- android:color="?android:windowBackground" />-->
</shape>

View File

@ -8,5 +8,5 @@
android:topRightRadius="16dp" /> android:topRightRadius="16dp" />
<stroke <stroke
android:width="1dp" android:width="1dp"
android:color="?attr/textColor" /> android:color="?attr/textFillColor" />
</shape> </shape>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="?android:windowBackground" />
<corners
android:topLeftRadius="32dp"
android:topRightRadius="32dp" />
<!-- android:bottomLeftRadius="16dp"-->
<!-- android:bottomRightRadius="16dp"-->
<!-- <stroke-->
<!-- android:width="3dp"-->
<!-- android:color="?android:windowBackground" />-->
</shape>

View File

@ -97,7 +97,9 @@
android:id="@+id/action_divider" android:id="@+id/action_divider"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_above="@id/privacyPolicyView" /> android:layout_above="@id/privacyPolicyView"
android:layout_marginTop="16dp"
app:dividerThickness="0.8dp" />
<Button <Button
android:id="@+id/serviceAgreementView" android:id="@+id/serviceAgreementView"

View File

@ -6,9 +6,9 @@
android:layout_height="match_parent"> android:layout_height="match_parent">
<RelativeLayout <RelativeLayout
android:fitsSystemWindows="true"
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:id="@+id/appBarLayout" android:id="@+id/appBarLayout"
@ -25,37 +25,138 @@
<com.google.android.material.tabs.TabLayout <com.google.android.material.tabs.TabLayout
android:id="@id/tabLayout" android:id="@id/tabLayout"
android:visibility="gone"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="8dp" android:layout_marginBottom="8dp"
android:background="@android:color/transparent" android:background="@android:color/transparent"
android:contentDescription="@string/action" android:contentDescription="@string/action"
android:visibility="gone"
app:tabMode="scrollable" app:tabMode="scrollable"
app:tabTextAppearance="@style/TabLayoutTextStyle" /> app:tabTextAppearance="@style/TabLayoutTextStyle" />
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<ProgressBar <ProgressBar
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:id="@+id/myProgressBar" android:id="@+id/myProgressBar"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" /> android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true" />
<io.github.rosemoe.sora.widget.CodeEditor <io.github.rosemoe.sora.widget.CodeEditor
android:id="@+id/codeEditor" android:id="@+id/codeEditor"
android:visibility="gone"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_above="@id/recyclerview" android:layout_above="@id/searchLayout"
android:layout_below="@id/appBarLayout" /> android:layout_below="@id/appBarLayout"
android:visibility="visible" />
<com.google.android.material.card.MaterialCardView
android:id="@+id/searchLayout"
style="@style/Widget.Material3.CardView.Elevated"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@id/recyclerview"
android:layout_margin="8dp"
android:orientation="vertical"
android:visibility="gone">
<LinearLayout
android:animateLayoutChanges="true"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="8dp"
android:orientation="vertical">
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:hint="@string/find">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/findEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/replaceLayout"
android:visibility="gone"
android:layout_marginTop="8dp"
android:hint="@string/replace">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/replaceEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</com.google.android.material.textfield.TextInputLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp">
<Button
android:id="@+id/lastButton"
style="@style/Widget.MaterialComponents.Button.TextButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/last" />
<Button
android:id="@+id/nextButton"
style="@style/Widget.MaterialComponents.Button.TextButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/next" />
<Button
android:id="@+id/replaceButton"
style="@style/Widget.MaterialComponents.Button.TextButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/replace" />
<Button
android:visibility="gone"
android:id="@+id/allButton"
style="@style/Widget.MaterialComponents.Button.TextButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/all" />
<Button
android:id="@+id/closeButton"
style="@style/Widget.MaterialComponents.Button.TextButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/close" />
</LinearLayout>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@id/recyclerview" android:id="@id/recyclerview"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="50dp" android:layout_height="wrap_content"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:visibility="invisible" /> android:visibility="invisible" />

View File

@ -3,7 +3,8 @@
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/apk/res-auto"
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

View File

@ -3,19 +3,18 @@
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:fitsSystemWindows="false"
android:animateLayoutChanges="true" android:layout_height="match_parent">
android:fitsSystemWindows="false">
<androidx.coordinatorlayout.widget.CoordinatorLayout <androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/rootLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:fitsSystemWindows="true" 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:fitsSystemWindows="true">
<com.google.android.material.appbar.MaterialToolbar <com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar" android:id="@+id/toolbar"
@ -43,6 +42,7 @@
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<fragment <fragment
android:id="@+id/baseFragment" android:id="@+id/baseFragment"
android:name="androidx.navigation.fragment.NavHostFragment" android:name="androidx.navigation.fragment.NavHostFragment"
@ -51,6 +51,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.FloatingActionButton
android:id="@+id/mainButton" android:id="@+id/mainButton"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -59,16 +60,20 @@
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:fitsSystemWindows="true"
android:src="@drawable/add" /> android:src="@drawable/add" />
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
<com.google.android.material.navigation.NavigationView <com.google.android.material.navigation.NavigationView
android:id="@+id/navaiagtion" android:id="@+id/navaiagtion"
android:fitsSystemWindows="true"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="start" android:layout_gravity="start"
app:elevation="2dp" app:elevation="2dp"
app:menu="@menu/menu_drawer_left" /> app:menu="@menu/menu_drawer_left" />
</androidx.drawerlayout.widget.DrawerLayout> </androidx.drawerlayout.widget.DrawerLayout>

View File

@ -67,7 +67,9 @@
<com.google.android.material.divider.MaterialDivider <com.google.android.material.divider.MaterialDivider
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp" /> android:layout_marginHorizontal="16dp"
android:layout_marginTop="16dp"
app:dividerThickness="0.8dp" />
<TextView <TextView
android:id="@+id/title" android:id="@+id/title"

View File

@ -32,6 +32,7 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginBottom="80dp"
android:orientation="vertical"> android:orientation="vertical">
<TextView <TextView
@ -46,31 +47,41 @@
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:text="@string/info" /> android:text="@string/info" />
<LinearLayout
android:layout_width="wrap_content" <com.google.android.material.textfield.TextInputLayout
style="@style/Widget.Material3.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:hint="@string/pay_type">
<com.google.android.material.textfield.MaterialAutoCompleteTextView
android:id="@+id/typeAutoCompleteTextView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:inputType="none"
android:text="@string/wechat_pay"
app:simpleItems="@array/pay_type_entries" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.card.MaterialCardView
android:id="@+id/cardView"
style="@style/Widget.Material3.CardView.Filled"
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp"> android:layout_marginTop="8dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/pay_type" />
<Spinner
android:id="@+id/typeSpinner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:entries="@array/pay_type_entries" />
</LinearLayout>
<ImageView <ImageView
android:scaleType="centerCrop"
android:id="@+id/baseImageView" android:id="@+id/baseImageView"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="450dp" android:layout_height="450dp"
android:layout_marginTop="8dp"
android:src="@drawable/image" /> android:src="@drawable/image" />
</com.google.android.material.card.MaterialCardView>
<TextView <TextView
android:id="@+id/payMoneyView" android:id="@+id/payMoneyView"
android:layout_width="wrap_content" android:layout_width="wrap_content"

View File

@ -180,12 +180,14 @@
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<com.kongzue.stacklabelview.StackLabel
android:id="@+id/belongStackLabelView" <com.google.android.material.chip.ChipGroup
android:id="@+id/chipGroup"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:visibility="gone"
android:visibility="gone" /> app:singleLine="false" />
</LinearLayout> </LinearLayout>
</com.google.android.material.card.MaterialCardView> </com.google.android.material.card.MaterialCardView>

View File

@ -2,6 +2,7 @@
<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"
android:layout_width="match_parent" android:layout_width="match_parent"
android:fitsSystemWindows="true"
android:layout_height="match_parent"> android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout <com.google.android.material.appbar.AppBarLayout

View File

@ -2,8 +2,7 @@
<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"
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
@ -16,7 +15,6 @@
<com.google.android.material.appbar.CollapsingToolbarLayout <com.google.android.material.appbar.CollapsingToolbarLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:fitsSystemWindows="true"
app:contentScrim="?android:windowBackground" app:contentScrim="?android:windowBackground"
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap" app:layout_scrollFlags="scroll|exitUntilCollapsed|snap"
app:titleCollapseMode="scale" app:titleCollapseMode="scale"
@ -31,15 +29,17 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="150dp" android:layout_height="150dp"
android:layout_alignParentTop="true" android:layout_alignParentTop="true"
android:layout_marginBottom="-32dp"
android:scaleType="matrix" android:scaleType="matrix"
android:transitionName="@string/transition_cover" /> android:transitionName="@string/transition_cover" />
<RelativeLayout <RelativeLayout
android:id="@+id/baseInfoView" android:id="@+id/baseInfoView"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="100dp" android:layout_height="match_parent"
android:layout_below="@id/coverView" android:layout_below="@id/coverView"
android:layout_alignParentBottom="true"> android:layout_alignParentBottom="true"
android:background="@drawable/user_home_background">
</RelativeLayout> </RelativeLayout>
@ -50,7 +50,7 @@
android:layout_height="100dp" android:layout_height="100dp"
android:layout_alignTop="@id/baseInfoView" android:layout_alignTop="@id/baseInfoView"
android:layout_marginLeft="16dp" android:layout_marginLeft="16dp"
android:layout_marginTop="-8dp" android:layout_marginTop="8dp"
android:src="@drawable/head_icon" android:src="@drawable/head_icon"
android:theme="@style/Theme.rust.Concept" /> android:theme="@style/Theme.rust.Concept" />
@ -135,6 +135,7 @@
<LinearLayout <LinearLayout
android:id="@+id/numberLayout" android:id="@+id/numberLayout"
android:layout_marginTop="8dp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="46dp"> android:layout_height="46dp">

View File

@ -56,7 +56,6 @@
<com.google.android.material.floatingactionbutton.FloatingActionButton <com.google.android.material.floatingactionbutton.FloatingActionButton
app:tint="@color/white"
android:id="@+id/fab" android:id="@+id/fab"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@ -2,34 +2,38 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout 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"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:padding="16dp"> android:padding="16dp">
<TextView <TextView
android:id="@+id/titleView" android:id="@+id/titleView"
style="@style/TextAppearance.Material3.TitleMedium"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="名称" android:text="名称"
android:textColor="?attr/colorPrimary" android:textColor="?android:colorPrimary" />
android:textSize="16dp" />
<TextView <TextView
android:id="@+id/subTitleView" android:id="@+id/subTitleView"
style="@style/TextAppearance.Material3.BodyMedium"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/titleView" android:layout_below="@id/titleView"
android:layout_marginTop="5dp" android:layout_marginTop="8dp"
android:text="副标题" android:text="副标题"
android:textColor="?attr/colorSecondary" /> android:textColor="?attr/colorSecondary" />
<TextView <TextView
android:id="@+id/descriptionView" android:id="@+id/descriptionView"
android:layout_width="match_parent" android:layout_width="match_parent"
style="@style/TextAppearance.Material3.BodyMedium"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/subTitleView" android:layout_below="@id/subTitleView"
android:layout_marginTop="5dp" android:layout_marginTop="5dp"
android:text="描述" /> android:text="描述" />
<TextView <TextView
style="@style/TextAppearance.Material3.BodySmall"
android:id="@+id/valueTypeView" android:id="@+id/valueTypeView"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -46,12 +50,15 @@
android:layout_toRightOf="@id/valueTypeView" android:layout_toRightOf="@id/valueTypeView"
android:text="版本信息" /> android:text="版本信息" />
<com.kongzue.stacklabelview.StackLabel <com.google.android.material.chip.ChipGroup
android:id="@+id/belongStackLabelView" android:id="@+id/chipGroup"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:singleLine="false"
android:layout_below="@id/valueTypeView" android:layout_below="@id/valueTypeView"
android:layout_marginTop="5dp" /> android:layout_marginTop="8dp">
</com.google.android.material.chip.ChipGroup>
</RelativeLayout> </RelativeLayout>

View File

@ -2,14 +2,14 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center" android:gravity="center">
android:padding="8dp">
<TextView <Button
style="@style/Widget.MaterialComponents.Button.TextButton.Dialog"
android:id="@+id/codeTextItemView" android:id="@+id/codeTextItemView"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15dp"
android:text="项目"/> android:text="项目"/>
</LinearLayout> </LinearLayout>

View File

@ -41,6 +41,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="top" android:gravity="top"
android:maxLines="5"
android:maxLength="255" android:maxLength="255"
android:minLines="3" /> android:minLines="3" />

View File

@ -5,7 +5,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:animateLayoutChanges="true" android:animateLayoutChanges="true"
android:orientation="vertical" android:orientation="vertical"
android:padding="8dp"> android:padding="24dp">
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/unitNameInputLayout" android:id="@+id/unitNameInputLayout"

View File

@ -23,13 +23,18 @@
android:textSize="16dp" android:textSize="16dp"
android:visibility="gone" /> android:visibility="gone" />
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/swipeRefreshLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone">
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/unitList" android:id="@+id/unitList"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent" />
android:layout_marginLeft="16dp"
android:layout_marginTop="8dp" </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
android:layout_marginRight="16dp"
android:visibility="gone" />
</LinearLayout> </LinearLayout>

View File

@ -27,9 +27,6 @@
android:id="@+id/unitList" android:id="@+id/unitList"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginLeft="16dp"
android:layout_marginTop="8dp"
android:layout_marginRight="16dp"
android:visibility="gone" /> android:visibility="gone" />
</LinearLayout> </LinearLayout>

View File

@ -68,9 +68,10 @@
<com.google.android.material.divider.MaterialDivider <com.google.android.material.divider.MaterialDivider
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_marginTop="16dp" android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp" android:layout_marginHorizontal="16dp"
android:layout_height="wrap_content" /> android:layout_marginTop="16dp"
app:dividerThickness="0.8dp" />
<LinearLayout <LinearLayout

View File

@ -8,12 +8,20 @@
android:orientation="horizontal" android:orientation="horizontal"
android:padding="8dp"> android:padding="8dp">
<com.google.android.material.card.MaterialCardView
style="@style/Widget.Material3.CardView.Filled"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView <ImageView
android:id="@+id/iconView" android:id="@+id/iconView"
android:layout_width="56dp" android:layout_width="56dp"
android:layout_height="56dp" android:layout_height="56dp"
android:src="@drawable/image" /> android:src="@drawable/image" />
</com.google.android.material.card.MaterialCardView>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -21,23 +29,23 @@
android:orientation="vertical"> android:orientation="vertical">
<TextView <TextView
style="@style/TextAppearance.Material3.TitleMedium"
android:id="@+id/unitNameView" android:id="@+id/unitNameView"
style="@style/TextAppearance.Material3.TitleMedium"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="单位名称" /> android:text="单位名称" />
<TextView <TextView
style="@style/TextAppearance.Material3.BodyMedium"
android:id="@+id/unitDescribeView" android:id="@+id/unitDescribeView"
style="@style/TextAppearance.Material3.BodyMedium"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:text="单位描述" /> android:text="单位描述" />
<TextView <TextView
style="@style/TextAppearance.Material3.BodySmall"
android:id="@+id/unitTimeView" android:id="@+id/unitTimeView"
style="@style/TextAppearance.Material3.BodySmall"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"

View File

@ -12,6 +12,7 @@
<ImageView <ImageView
android:id="@+id/mod_icon" android:id="@+id/mod_icon"
android:layout_width="56dp" android:layout_width="56dp"
android:scaleType="centerCrop"
android:layout_height="56dp" android:layout_height="56dp"
android:src="@drawable/image" /> android:src="@drawable/image" />

View File

@ -12,16 +12,20 @@
<string name="select_directents">Select Directory</string> <string name="select_directents">Select Directory</string>
<string name="select_file">Select File</string> <string name="select_file">Select File</string>
<string name="select_file_ok">Selected\"%1$s\"</string> <string name="select_file_ok">Selected\"%1$s\"</string>
<string name="root_path">The root directory</string>
<string name="select_image">Select Image</string> <string name="select_image">Select Image</string>
<string name="change_image">Change Image</string> <string name="change_image">Change Image</string>
<string name="del_image">Remove Image</string> <string name="del_image">Remove Image</string>
<string name="remove">remove</string> <string name="remove">remove</string>
<string name="remove_image_item">Remove image at \\"%1$s\\"\?</string> <string name="remove_image_item">Remove image at \\"%1$s\\"\?</string>
<string name="open">Open</string> <string name="open">Open</string>
<string name="open_public">public</string>
<string name="open_private">private</string>
<string name="open_nottiled">Turn on NoTiled</string> <string name="open_nottiled">Turn on NoTiled</string>
<string name="create_unit_complete">unit created</string> <string name="create_unit_complete">unit created</string>
<string name="create_unit_failed">Unit creation failed</string> <string name="create_unit_failed">Unit creation failed</string>
<string name="create_uniting">Building unit…</string> <string name="create_uniting">Building unit…</string>
<string name="build_unit">To build the unit</string>
<string name="dialog_ok">Sure</string> <string name="dialog_ok">Sure</string>
<string name="activation_app">Activate Rust Helper</string> <string name="activation_app">Activate Rust Helper</string>
<string name="activation_app_tip">Your activation time has expired, please activate Rust Assistant.</string> <string name="activation_app_tip">Your activation time has expired, please activate Rust Assistant.</string>
@ -32,6 +36,7 @@
<string name="pay_yes">Yes, did receive</string> <string name="pay_yes">Yes, did receive</string>
<string name="pay_no">no, no</string> <string name="pay_no">no, no</string>
<string name="creation_assistant">Create Assistant</string> <string name="creation_assistant">Create Assistant</string>
<string name="drag_the_slider_to_set_num">Drag the slider to select the amount.</string>
<string name="dialog_cancel">Cancel</string> <string name="dialog_cancel">Cancel</string>
<string name="no_longer_prompt">Do not remind again</string> <string name="no_longer_prompt">Do not remind again</string>
<string name="navigation_tip">A total of %1$d items support quick navigation.</string> <string name="navigation_tip">A total of %1$d items support quick navigation.</string>
@ -58,7 +63,7 @@
<string name="data_array">Data array (separated by \\"|\\"):</string> <string name="data_array">Data array (separated by \\"|\\"):</string>
<string name="delete_title">delete</string> <string name="delete_title">delete</string>
<string name="del_moding">deleting…</string> <string name="del_moding">deleting…</string>
<string name="del_moding_tip">Deleting \\"%1$s\\"…</string> <string name="del_moding_tip">Deleting "%1$s"…</string>
<string name="restoreing">Restoring…</string> <string name="restoreing">Restoring…</string>
<string name="file_importer">Import into Rust Helper</string> <string name="file_importer">Import into Rust Helper</string>
<string name="file_manager">file manager</string> <string name="file_manager">file manager</string>
@ -80,13 +85,14 @@
<string name="describe">describe</string> <string name="describe">describe</string>
<string name="mod_tags">Label</string> <string name="mod_tags">Label</string>
<string name="tags_error">Please enter a label.</string> <string name="tags_error">Please enter a label.</string>
<string name="mod_tags_help">Please use \\",\\" to separate tags, works with the same tag will be classified into one category.</string> <string name="mod_tags_help">Please use \",\" to separate tags, works with the same tag will be classified into one category.</string>
<string name="create_mod_lable">Create mod</string> <string name="create_mod_lable">Create mod</string>
<string name="create_mod_describe">Create a new mod.</string> <string name="create_mod_describe">Create a new mod.</string>
<string name="filter">filter</string> <string name="filter">filter</string>
<string name="activate_the_account">Activate account</string> <string name="activate_the_account">Activate account</string>
<string name="activate_the_account_ok">Activation succeeded, please log in again.</string> <string name="activate_the_account_ok">Activation succeeded, please log in again.</string>
<string name="activate_the_account_tip">Please enter the activation verification code:</string> <string name="activate_the_account_tip">Please enter the activation verification code:</string>
<string name="verification_code">Verification code</string>
<string name="search">search</string> <string name="search">search</string>
<string name="find">find</string> <string name="find">find</string>
<string name="create">create</string> <string name="create">create</string>
@ -95,6 +101,7 @@
<string name="enter_file_path">Please enter a file path.</string> <string name="enter_file_path">Please enter a file path.</string>
<string name="create_bookmark">Create bookmarks</string> <string name="create_bookmark">Create bookmarks</string>
<string name="name_error">Please enter a mod name.</string> <string name="name_error">Please enter a mod name.</string>
<string name="file_name_error">Please enter a file name.</string>
<string name="action_name_error">Please enter an event name.</string> <string name="action_name_error">Please enter an event name.</string>
<string name="database_null">This dataset could not be loaded, error: %1$s.</string> <string name="database_null">This dataset could not be loaded, error: %1$s.</string>
<string name="describe_error">Please enter a description.</string> <string name="describe_error">Please enter a description.</string>
@ -113,6 +120,7 @@
<string name="mod_action1">Editing unit</string> <string name="mod_action1">Editing unit</string>
<string name="mod_action2">Edit information</string> <string name="mod_action2">Edit information</string>
<string name="mod_action8">decompress</string> <string name="mod_action8">decompress</string>
<string name="rename">rename</string>
<string name="mod_action10">Repair information file</string> <string name="mod_action10">Repair information file</string>
<string name="open_action1">Edit text</string> <string name="open_action1">Edit text</string>
@ -141,14 +149,14 @@
<string name="loading_bookmarks">Loading bookmarks...</string> <string name="loading_bookmarks">Loading bookmarks...</string>
<string name="calculating">Calculating...</string> <string name="calculating">Calculating...</string>
<string name="no_bookmark">No bookmark</string> <string name="no_bookmark">No bookmark</string>
<string name="filenum">Total %1$S items</string> <string name="filenum">Total %1$s items</string>
<string name="not_find_database">No data set was found</string> <string name="not_find_database">No data set was found</string>
<string name="use_database">use</string> <string name="use_database">use</string>
<string name="unuse_dataabse">Has been used</string> <string name="unuse_dataabse">Has been used</string>
<string name="create_unit">Create a unit</string> <string name="create_unit">Create a unit</string>
<string name="unit_path">Create path :%1$s</string> <string name="unit_path">Create path :%1$s</string>
<string name="key_notfind">The %1$s key was not found</string> <string name="key_notfind">The %1$s key was not found</string>
<string name="template_num">Total %1$S templates</string> <string name="template_num">Total %1$s templates</string>
<string name="template_not_find_info">No template-info.txt found</string> <string name="template_not_find_info">No template-info.txt found</string>
<string name="change_path">To change the</string> <string name="change_path">To change the</string>
<string name="change_path_ok">The creation directory has been changed.</string> <string name="change_path_ok">The creation directory has been changed.</string>
@ -166,7 +174,7 @@
<string name="copy_file_name">Copy file name</string> <string name="copy_file_name">Copy file name</string>
<string name="copy_file_path">Copy file path</string> <string name="copy_file_path">Copy file path</string>
<string name="error">error</string> <string name="error">error</string>
<string name="load_mod_file">Mod file at \\"%1$s\\" has been read.</string> <string name="load_mod_file">Mod file at "%1$s" has been read.</string>
<string name="file_operation">File operations</string> <string name="file_operation">File operations</string>
<string name="operation">operation</string> <string name="operation">operation</string>
<string name="copy_file_absolutely_path">Copy the absolute path (starting with ROOT)</string> <string name="copy_file_absolutely_path">Copy the absolute path (starting with ROOT)</string>
@ -175,7 +183,7 @@
<string name="create_folder">Creating a folder</string> <string name="create_folder">Creating a folder</string>
<string name="photo_album">Photo album</string> <string name="photo_album">Photo album</string>
<string name="unable_load_mod_info">Unable to load mod information, please %1$s.</string> <string name="unable_load_mod_info">Unable to load mod information, please %1$s.</string>
<string name="unit_and_downloadnum">Unit number: % 1 $d | downloads | version name: % 2 $d % 3 $s</string> <string name="unit_and_downloadnum">Unit number: %1$d | %2$d downloads | version name: %3$s</string>
<string name="unit_num">Unit number: %1$d</string> <string name="unit_num">Unit number: %1$d</string>
<string name="system_file_manager">file manager</string> <string name="system_file_manager">file manager</string>
<string name="reload_files">The refresh</string> <string name="reload_files">The refresh</string>
@ -199,6 +207,9 @@
<string name="template_update_error">Please enter the update link.</string> <string name="template_update_error">Please enter the update link.</string>
<string name="template_version_num_error">Please enter the version number.</string> <string name="template_version_num_error">Please enter the version number.</string>
<string name="template_version_name_error">Please enter a version name.</string> <string name="template_version_name_error">Please enter a version name.</string>
<string name="template_id_error">Please enter ID.</string>
<string name="template_id_error2">The ID has been occupied.</string>
<string name="template_name_error2">The template package name is already occupied.</string>
<string name="template_developer">developers</string> <string name="template_developer">developers</string>
<string name="template_error">Could not be created because the template already exists.</string> <string name="template_error">Could not be created because the template already exists.</string>
<string name="consent">agree</string> <string name="consent">agree</string>
@ -210,6 +221,7 @@
<string name="update_link">Update the link</string> <string name="update_link">Update the link</string>
<string name="template_version_name">Version of</string> <string name="template_version_name">Version of</string>
<string name="template_version_num">The version number</string> <string name="template_version_num">The version number</string>
<string name="open_state">Open state</string>
<string name="code_table">Code table</string> <string name="code_table">Code table</string>
<string name="upgrade_database">The dataset you are using is out of date. Would you like to upgrade to the latest version\?</string> <string name="upgrade_database">The dataset you are using is out of date. Would you like to upgrade to the latest version\?</string>
<string name="upgrade">upgrade</string> <string name="upgrade">upgrade</string>
@ -223,11 +235,13 @@
<!--编译错误--> <!--编译错误-->
<string name="not_save_exit">Exit without saving</string> <string name="not_save_exit">Exit without saving</string>
<string name="save_settings">Check for configuration updates. Do you want to save the changes\?</string>
<string name="saveing">Saving %1$s...</string> <string name="saveing">Saving %1$s...</string>
<string name="save_complete">%1$s saved.</string> <string name="save_complete">%1$s saved.</string>
<string name="save_complete2">The save is complete.</string>
<string name="type_information">Explain the %1$s</string> <string name="type_information">Explain the %1$s</string>
<string name="unknown_type">Unknown type \\"%1$s\\".</string> <string name="unknown_type">Unknown type "%1$s".</string>
<string name="create_section">Create %1$s</string> <string name="create_section">Create %1$s</string>
<string name="create_key">Create %1$s</string> <string name="create_key">Create %1$s</string>
<string name="symbol9">formatting</string> <string name="symbol9">formatting</string>
@ -237,7 +251,7 @@
<string name="import_error1">Error extracting file.</string> <string name="import_error1">Error extracting file.</string>
<string name="import_effor7">An unrecognized path.</string> <string name="import_effor7">An unrecognized path.</string>
<string name="delete_unit">Remove the unit</string> <string name="delete_unit">Remove the unit</string>
<string name="delete_prompt">Delete %1$s\?</string> <string name="delete_prompt">Delete %1$s?</string>
<!--导入--> <!--导入-->
<string name="importing">In the import...</string> <string name="importing">In the import...</string>
<string name="import_name">The import</string> <string name="import_name">The import</string>
@ -245,8 +259,8 @@
<string name="import_failed">%1$s import failed.</string> <string name="import_failed">%1$s import failed.</string>
<string name="app_version_error">%1$s was developed for advanced assistant and cannot be imported.</string> <string name="app_version_error">%1$s was developed for advanced assistant and cannot be imported.</string>
<string name="import_failed2">Unable to read message file.</string> <string name="import_failed2">Unable to read message file.</string>
<string name="import_tip2">Import this mod (%1$s)\?</string> <string name="import_tip2">Import this mod (%1$s)?</string>
<string name="import_tip3">Import this template package (%1$s)\?</string> <string name="import_tip3">Import this template package (%1$s)?</string>
<string name="editer_show_line_num">Show line Numbers</string> <string name="editer_show_line_num">Show line Numbers</string>
<string name="empty_file">Empty file</string> <string name="empty_file">Empty file</string>
<string name="empty_folder">An empty folder</string> <string name="empty_folder">An empty folder</string>
@ -260,7 +274,7 @@
<string name="set_failed">Setup failed</string> <string name="set_failed">Setup failed</string>
<string name="is_empty_line">Is a blank line.</string> <string name="is_empty_line">Is a blank line.</string>
<string name="empty_line_prompt">Find %1$d blank lines to view details</string> <string name="empty_line_prompt">Find %1$d blank lines to view details</string>
<string name="note_prompt">Find %1$D comments to see the details</string> <string name="note_prompt">Find %1$d comments to see the details</string>
<string name="no_optimized_content">There are no projects to optimize.</string> <string name="no_optimized_content">There are no projects to optimize.</string>
<string name="load_optimized_item">Load optimization projects...</string> <string name="load_optimized_item">Load optimization projects...</string>
<string name="optimizationing">In the optimization...</string> <string name="optimizationing">In the optimization...</string>
@ -277,9 +291,12 @@
<string name="mod_title">Mods</string> <string name="mod_title">Mods</string>
<string name="edit_title">The code editor</string> <string name="edit_title">The code editor</string>
<string name="template_title">The template package</string> <string name="template_title">The template package</string>
<string name="template_list">The template list</string>
<string name="close">Shut down</string> <string name="close">Shut down</string>
<string name="qq_group">Qq group</string> <string name="qq_group">Qq group</string>
<string name="del_completed">\\"%1$s\\" has been deleted.</string> <string name="details">details</string>
<string name="insert_coins">coin</string>
<string name="del_completed">"%1$s" has been deleted.</string>
<!-- Messages Preferences --> <!-- Messages Preferences -->
@ -321,7 +338,7 @@
<string name="add_extra_maps">Add additional maps for paths</string> <string name="add_extra_maps">Add additional maps for paths</string>
<string name="disabled">disable</string> <string name="disabled">disable</string>
<string name="enabled">To enable the</string> <string name="enabled">To enable the</string>
<string name="setting_enabled">\\"%1$s\\" is enabled and you can turn it off at any time in Settings.</string> <string name="setting_enabled">"%1$s" is enabled and you can turn it off at any time in Settings.</string>
<string name="add_icon_error">Invalid icon.</string> <string name="add_icon_error">Invalid icon.</string>
<string name="dialog_close_tip2">It has been switched to background repair.</string> <string name="dialog_close_tip2">It has been switched to background repair.</string>
<string name="dialog_close_tip3">It\'s been switched to backstage packaging.</string> <string name="dialog_close_tip3">It\'s been switched to backstage packaging.</string>
@ -334,7 +351,6 @@
<string name="update_num">%1$s records have been updated.</string> <string name="update_num">%1$s records have been updated.</string>
<string name="clean_up_code_cache_complete">Code cache cleanup complete.</string> <string name="clean_up_code_cache_complete">Code cache cleanup complete.</string>
<string name="clean">empty</string> <string name="clean">empty</string>
<string name="details">details</string>
<string name="show_details">Check the details</string> <string name="show_details">Check the details</string>
<string name="goto_line">Jump to wrong location</string> <string name="goto_line">Jump to wrong location</string>
<string name="code_navigation">Code navigation</string> <string name="code_navigation">Code navigation</string>
@ -344,6 +360,9 @@
<string name="code_language_on">English</string> <string name="code_language_on">English</string>
<string name="code_language_off">Chinese</string> <string name="code_language_off">Chinese</string>
<string name="save_tip">Please save the current content first.</string> <string name="save_tip">Please save the current content first.</string>
<string name="not_find_turret">Couldn\'t find the turret.</string>
<string name="please_enter_the_x_coordinate">Please enter the X coordinate.</string>
<string name="please_enter_the_y_coordinate">Please enter the Y coordinate.</string>
<string name="copy_rule">Copy the rules</string> <string name="copy_rule">Copy the rules</string>
<string name="rule">The rules</string> <string name="rule">The rules</string>
<string name="search_rule">To find the rule</string> <string name="search_rule">To find the rule</string>
@ -357,6 +376,7 @@
<string name="collapse_info">The collapse of information</string> <string name="collapse_info">The collapse of information</string>
<string name="load_system_application">Display system application</string> <string name="load_system_application">Display system application</string>
<string name="choose_color">Choose a color</string> <string name="choose_color">Choose a color</string>
<string name="profile_picture_box_color">Profile picture Box color</string>
<string name="game_pack">The game package</string> <string name="game_pack">The game package</string>
<string name="select_the_game_pack">Choose a game pack</string> <string name="select_the_game_pack">Choose a game pack</string>
<string name="enable_the_recovery_station">Mod recycle bin</string> <string name="enable_the_recovery_station">Mod recycle bin</string>
@ -372,29 +392,13 @@
<string name="keep_rwmod_file_description">When unpacking the mod, keep the source files.</string> <string name="keep_rwmod_file_description">When unpacking the mod, keep the source files.</string>
<string name="keep_rwmod_file">Keep source files</string> <string name="keep_rwmod_file">Keep source files</string>
<string name="clear_recovery_station">Empty the recycle bin</string> <string name="clear_recovery_station">Empty the recycle bin</string>
<string name="setting_database_path" translatable="false">DatabasePath</string>
<string name="setting_app_language" translatable="false">AppLanguage</string>
<string name="setting_database_directory" translatable="false">DatabaseDirectory</string>
<string name="setting_developer_mode" translatable="false">DeveloperMode</string>
<string name="setting_custom_symbol" translatable="false">CustomSymbol</string>
<string name="setting_template_directory" translatable="false">TemplateDirectory</string>
<string name="setting_auto_create_nomedia" translatable="false">AutoCreateNomedia</string>
<string name="setting_only_load_conant_language_temple" translatable="false">OnlyLoadConantLanguageTemple</string>
<string name="setting_night_mode" translatable="false">NightMode</string>
<string name="setting_independent_folder" translatable="false">IndependentFolder</string>
<string name="setting_app_version" translatable="false">AppVersion</string>
<string name="setting_game_package" translatable="false">GamePackage</string>
<string name="setting_keep_rwmod_file" translatable="false">KeepRwmodFile</string>
<string name="setting_enable_recovery_station" translatable="false">EnableRecoveryStation</string>
<string name="setting_recovery_station_file_save_days" translatable="false">RecoveryStationFileSaveDays</string>
<string name="setting_recovery_station_folder" translatable="false">RecoveryStationFolder</string>
<string name="independent_folder_description">Create a separate folder for each unit.</string> <string name="independent_folder_description">Create a separate folder for each unit.</string>
<string name="independent_folder">Create a separate folder</string> <string name="independent_folder">Create a separate folder</string>
<string name="unable_rename">Cannot rename this folder because it contains files in use.</string> <string name="unable_rename">Cannot rename this folder because it contains files in use.</string>
<string name="unable_cut">Unable to cut this folder because it has files in use.</string> <string name="unable_cut">Unable to cut this folder because it has files in use.</string>
<string name="unable_del">Unable to delete this folder because it contains files in use.</string> <string name="unable_del">Unable to delete this folder because it contains files in use.</string>
<string name="recovery_prompt">\\"%1$s\\" has been moved to the recycle bin.</string> <string name="recovery_prompt">"%1$s" has been moved to the recycle bin.</string>
<string name="recoverying_prompt">Moving \\"%1$s\\"...</string> <string name="recoverying_prompt">Moving "%1$s"...</string>
<string name="open_directory_of_file">Open the file directory</string> <string name="open_directory_of_file">Open the file directory</string>
<string name="unable_to_detect">Your mods may not be checked by the game.</string> <string name="unable_to_detect">Your mods may not be checked by the game.</string>
<string name="failed_to_check_descripiton">For 1.15 and later, set the storage to Internal(read/write) and External. The game reads and writes internal mods, while external mods are managed by assistants.</string> <string name="failed_to_check_descripiton">For 1.15 and later, set the storage to Internal(read/write) and External. The game reads and writes internal mods, while external mods are managed by assistants.</string>
@ -405,8 +409,7 @@
<string name="edit">The editor</string> <string name="edit">The editor</string>
<string name="no_app_installed">%1$s is not installed.</string> <string name="no_app_installed">%1$s is not installed.</string>
<string name="restore_all">All reduction</string> <string name="restore_all">All reduction</string>
<string name="all_saves_are_completed">%1$D files saved.</string> <string name="all_saves_are_completed">%1$d files saved.</string>
<string name="copyright" translatable="false">Copyright ©coldmint 2020-%1$d All Rights Reserved.</string>
<string name="about">About</string> <string name="about">About</string>
<string name="libs">Open source license</string> <string name="libs">Open source license</string>
<string name="additional_selection">Additional items</string> <string name="additional_selection">Additional items</string>
@ -415,15 +418,14 @@
<string name="open_tip">Open immediately with %1$.2F yuan</string> <string name="open_tip">Open immediately with %1$.2F yuan</string>
<string name="packing">In the packaging...</string> <string name="packing">In the packaging...</string>
<string name="share_mod">share</string> <string name="share_mod">share</string>
<string name="setting_pack_directory" translatable="false">PackDirectory</string>
<string name="clear_code_cache">Clean up the code cache</string> <string name="clear_code_cache">Clean up the code cache</string>
<string name="custom_symbol">Custom symbol bar</string> <string name="custom_symbol">Custom symbol bar</string>
<string name="setting_identifiers_prompt_number" translatable="false">IdentifiersPromptNumber</string>
<string name="identifiers_prompt_number">Number of identifier prompts</string> <string name="identifiers_prompt_number">Number of identifier prompts</string>
<string name="recovery_file">reduction</string> <string name="recovery_file">reduction</string>
<string name="pack_directory">Package directory</string> <string name="pack_directory">Package directory</string>
<string name="info">information</string> <string name="info">information</string>
<string name="cut_board_operation">Shear-plate operation</string> <string name="cut_board_operation">Shear-plate operation</string>
<string name="mine_bookmarks">My bookmarks</string>
<string name="bookmark_manager">Bookmark Manager</string> <string name="bookmark_manager">Bookmark Manager</string>
<string name="jump_a_bookmark">Jump a bookmark</string> <string name="jump_a_bookmark">Jump a bookmark</string>
<string name="remove_bookmark">Remove the bookmark</string> <string name="remove_bookmark">Remove the bookmark</string>
@ -434,25 +436,29 @@
<string name="add_bookmark_fail">Failed to add bookmark.</string> <string name="add_bookmark_fail">Failed to add bookmark.</string>
<string name="bookmark_jump_failed">The file the bookmark points to does not exist.</string> <string name="bookmark_jump_failed">The file the bookmark points to does not exist.</string>
<string name="unit_directory">The unit directory</string> <string name="unit_directory">The unit directory</string>
<string name="setting_user_name" translatable="false">UserName</string>
<string name="user_name">The user name</string> <string name="user_name">The user name</string>
<string name="report_mod">Report mod</string> <string name="report_mod">Report mod</string>
<string name="report_user">To report the user</string> <string name="report_user">To report the user</string>
<string name="view_the_report_object">Check (%1$s)</string> <string name="view_the_report_object">Check (%1$s)</string>
<string name="bookmark_already_exists">The book label already exists. Please change the path.</string> <string name="bookmark_already_exists">The book label already exists. Please change the path.</string>
<string name="feedback">feedback</string> <string name="feedback">feedback</string>
<string name="setting_use_jetBrains_mono_font">UseJetBrainsMonoFont</string> <string name="please_set_main_image">Please set the main image.</string>
<string name="use_jetBrains_mono_font">Use the JetBrains Mono font</string> <string name="use_jetBrains_mono_font">Use the JetBrains Mono font</string>
<string name="use_jetBrains_mono_font_describe">Assistant built-in font, highly recommended.</string> <string name="use_jetBrains_mono_font_describe">Assistant built-in font, highly recommended.</string>
<string name="directory_does_not_exist">The directory does not exist.</string> <string name="directory_does_not_exist">The directory does not exist.</string>
<string name="special_thanks_to">Special thanks to</string> <string name="special_thanks_to">Special thanks to</string>
<string name="email">email</string> <string name="email">email</string>
<string name="coin_number">Coin: %1$d</string>
<string name="insert_coins_tip">Put %1$d coins.</string>
<string name="insert_coins_num_tip">How many coins do I put in\?</string>
<string name="coin_records">Coin records</string>
<string name="insert_coins_no">Support your favorite works.</string>
<string name="insert_coins_ok">We have received your support.</string>
<string name="register_successed">Registered successfully</string> <string name="register_successed">Registered successfully</string>
<string name="registration_success_message">The account activation code has been sent to your email address. If not, the mailbox may be considered spam. Please check your dustbin.</string> <string name="registration_success_message">The account activation code has been sent to your email address. If not, the mailbox may be considered spam. Please check your dustbin.</string>
<string name="please_login_first">Please log in first.</string> <string name="please_login_first">Please log in first.</string>
<string name="network_error">Network error.</string> <string name="network_error">Network error.</string>
<string name="check_update_failure">Failed to check the update.</string> <string name="check_update_failure">Failed to check the update.</string>
<string name="setting_check_beta_update">CheckBetaUpdate</string>
<string name="check_beta_update">Check for Beta updates</string> <string name="check_beta_update">Check for Beta updates</string>
<string name="check_beta_update_describe">Only available in Release, Beta, forced update.</string> <string name="check_beta_update_describe">Only available in Release, Beta, forced update.</string>
<string name="loading_values">Loading value...</string> <string name="loading_values">Loading value...</string>
@ -484,7 +490,7 @@
<string name="not_found_data2">This template has no static data.</string> <string name="not_found_data2">This template has no static data.</string>
<string name="remove_empty_lines">Remove empty lines</string> <string name="remove_empty_lines">Remove empty lines</string>
<string name="recycle_source_file">Recycle the source file after the package is complete</string> <string name="recycle_source_file">Recycle the source file after the package is complete</string>
<string name="error_title">Detected that \\"%1$s\\" has unexpectedly quit.</string> <string name="error_title">Detected that "%1$s" has unexpectedly quit.</string>
<string name="error_content">A crash report has been generated. Developers will use this crash report to find a future solution to this problem.</string> <string name="error_content">A crash report has been generated. Developers will use this crash report to find a future solution to this problem.</string>
<string name="share_log">Sharing error Reports</string> <string name="share_log">Sharing error Reports</string>
<string name="restart">Restart the program</string> <string name="restart">Restart the program</string>
@ -513,8 +519,8 @@
<string name="rebuild_project">Reconstruction project</string> <string name="rebuild_project">Reconstruction project</string>
<string name="rebuild_project_tip">Do you want to clean up the cached data and rebuild the index\?</string> <string name="rebuild_project_tip">Do you want to clean up the cached data and rebuild the index\?</string>
<string name="clean_up_cache_and_rebuild">Refactor the project immediately</string> <string name="clean_up_cache_and_rebuild">Refactor the project immediately</string>
<string name="import_type_could_not_be_resolved">Unable to resolve import type \\"%1$s\\".</string> <string name="import_type_could_not_be_resolved">Unable to resolve import type "%1$s".</string>
<string name="import_path_could_not_be_resolved">Path \\"%1$s\\" could not be recognized.</string> <string name="import_path_could_not_be_resolved">Path "%1$s" could not be recognized.</string>
<string name="uri_null">Uri errors.</string> <string name="uri_null">Uri errors.</string>
<string name="location_info">In line %1$s %2$d:</string> <string name="location_info">In line %1$s %2$d:</string>
<string name="covers_the_import">You are trying to import the lower version of the template package (%1$s), the current version (%2$s), which will overwrite the updated content. Do you want to continue\?</string> <string name="covers_the_import">You are trying to import the lower version of the template package (%1$s), the current version (%2$s), which will overwrite the updated content. Do you want to continue\?</string>
@ -524,9 +530,9 @@
<string name="value_selector_array_describe">Use \\",\\" to split parameters. You can also use \\"[\\" and \\"]\\" to annotate parameters. For example :[like :like], the like will be displayed to the user, after selected, write like.</string> <string name="value_selector_array_describe">Use \\",\\" to split parameters. You can also use \\"[\\" and \\"]\\" to annotate parameters. For example :[like :like], the like will be displayed to the user, after selected, write like.</string>
<string name="template_save_complete">Templates have been added. Would you please exit the template maker now\?</string> <string name="template_save_complete">Templates have been added. Would you please exit the template maker now\?</string>
<string name="edit_template">Edit template</string> <string name="edit_template">Edit template</string>
<string name="file_type_tip">The file type has been intelligently inferred to be \\"%1$s\\".</string> <string name="file_type_tip">The file type has been intelligently inferred to be "%1$s".</string>
<string name="file_type_define">Ini files are created by default.</string> <string name="file_type_define">Ini files are created by default.</string>
<string name="file_type_tip2">You might want to type \\"%1$s\\"\?</string> <string name="file_type_tip2">You might want to type "%1$s"?</string>
<string name="is_building">Unit data is being loaded. Try using this feature after loading.</string> <string name="is_building">Unit data is being loaded. Try using this feature after loading.</string>
<string name="english_editing_mode_describe">Write your mods in English, with Chinese tips and syntax highlighting.</string> <string name="english_editing_mode_describe">Write your mods in English, with Chinese tips and syntax highlighting.</string>
<string name="english_editing_mode">Native development model</string> <string name="english_editing_mode">Native development model</string>
@ -535,29 +541,33 @@
<string name="expiration_time_tip">Due time :%1$s</string> <string name="expiration_time_tip">Due time :%1$s</string>
<string name="community">community</string> <string name="community">community</string>
<string name="recommended">Recommend</string> <string name="recommended">Recommend</string>
<string name="local">local</string>
<string name="network">network</string>
<string name="template_maker">Template maker</string>
<string name="ranking">Ranking</string> <string name="ranking">Ranking</string>
<string name="my">My</string> <string name="my">My</string>
<string name="latest_release">The latest release</string> <string name="latest_release">The latest release</string>
<string name="describe_tip">Too long content displayed in the list will be truncated.</string> <string name="describe_tip">Too long content displayed in the list will be truncated.</string>
<string name="describe_tip2">\\"%1$s\\" will be truncated as the list subheading.</string> <string name="describe_tip2">"%1$s" will be truncated as the list subheading.</string>
<string name="name_tip">The name is displayed in the list as a title.</string> <string name="name_tip">The name is displayed in the list as a title.</string>
<string name="screenshot">Screenshots:</string> <string name="screenshot">Screenshots:</string>
<string name="required">mandatory</string> <string name="required">mandatory</string>
<string name="selectable">optional</string> <string name="selectable">optional</string>
<string name="exit_tip">Exit \\"%1$s\\"\?</string> <string name="exit_tip">Exit "%1$s"?</string>
<string name="path">The path</string> <string name="path">The path</string>
<string name="from_url">From the url to add</string> <string name="from_url">From the url to add</string>
<string name="sign_error">Security verification</string> <string name="sign_error">Security verification</string>
<string name="sign_error_message">The assistant has been tampered with by a third party. To protect your device, the process has been terminated. You are recommended to install the official version, mint long-term support, research and development of new functions.</string> <string name="sign_error_message">The assistant has been tampered with by a third party. To protect your device, the process has been terminated. You are recommended to install the official version, mint long-term support, research and development of new functions.</string>
<string name="id_tip">Used to identify your mod and cannot be modified after publication.</string> <string name="id_tip">Used to identify your mod and cannot be modified after publication.</string>
<string name="mod_id">Mod Id</string> <string name="mod_id">Mod Id</string>
<string name="auto_send">I uploaded a new mod \@mod{%1$s}, check it out</string> <string name="auto_send">I uploaded a new mod @mod{%1$s}, check it out</string>
<string name="auto_send2">Mod \@mod{%1$s}, %2$s Update log \n:%3$s</string> <string name="auto_send2">Mod @mod{%1$s}, %2$s Update log \n:%3$s</string>
<string name="default_tags">Assistant exclusive,%1$S creation</string> <string name="default_tags">Assistant exclusive,%1$S creation</string>
<string name="mod_id_error2">The mod Id can contain only letters and digits and underscores (_).</string> <string name="mod_id_error2">The mod Id can contain only letters and digits and underscores (_).</string>
<string name="installation">The installation</string> <string name="installation">The installation</string>
<string name="installation_ing">In the installation...</string> <string name="installation_ing">In the installation...</string>
<string name="installated">Has been installed</string> <string name="installated">Has been installed</string>
<string name="template_community">Template community</string>
<string name="work_of_home_page">Check the work</string> <string name="work_of_home_page">Check the work</string>
<string name="audit">This mod is hidden from the outside and only visible to you and your administrator.</string> <string name="audit">This mod is hidden from the outside and only visible to you and your administrator.</string>
<string name="follow">Follow</string> <string name="follow">Follow</string>
@ -565,8 +575,8 @@
<string name="transition_cover">cover</string> <string name="transition_cover">cover</string>
<string name="fans">fans</string> <string name="fans">fans</string>
<string name="not_audit">Pending approval...</string> <string name="not_audit">Pending approval...</string>
<string name="fans_information">Fans: | attention: % 1 $s % 2 $s | won praise: % 3 $s</string> <string name="fans_information">Fans: %1$s| attention:%2$s | praise:%3$s</string>
<string name="praise_number">Won the praise</string> <string name="praise_number">praise</string>
<string name="no_content">No content</string> <string name="no_content">No content</string>
<string name="homepage">The home page</string> <string name="homepage">The home page</string>
<string name="dynamic">dynamic</string> <string name="dynamic">dynamic</string>
@ -582,7 +592,7 @@
<string name="each_other_follow">We are fans of each other</string> <string name="each_other_follow">We are fans of each other</string>
<string name="followed">Has been focused on</string> <string name="followed">Has been focused on</string>
<string name="defollow">Cancel the attention</string> <string name="defollow">Cancel the attention</string>
<string name="defollow_tip">Unfollow \\"%1$s\\"\?</string> <string name="defollow_tip">Unfollow "%1$s"\?</string>
<string name="head_icon">Head:</string> <string name="head_icon">Head:</string>
<string name="signature">Individuality signature</string> <string name="signature">Individuality signature</string>
<string name="gender">Gender:</string> <string name="gender">Gender:</string>
@ -610,13 +620,13 @@
<string name="file_upload_ok">The file is uploaded and waiting for the processing result...</string> <string name="file_upload_ok">The file is uploaded and waiting for the processing result...</string>
<string name="file_download_ok">File download completed</string> <string name="file_download_ok">File download completed</string>
<string name="file_download_fail">File download failure</string> <string name="file_download_fail">File download failure</string>
<string name="tag_title">Works containing \\"%1$s\\"</string> <string name="tag_title">Works containing "%1$s"</string>
<string name="discussion">comments</string> <string name="discussion">comments</string>
<string name="discussion_num">Comment (%1$d)</string> <string name="discussion_num">Comment (%1$d)</string>
<string name="send_discussion">Post a comment</string> <string name="send_discussion">Post a comment</string>
<string name="latest_work">The latest work</string> <string name="latest_work">The latest work</string>
<string name="highest_score">bestseller</string> <string name="highest_score">bestseller</string>
<string name="web_mod_info">%1$S %2$d times download</string> <string name="web_mod_info">time %1$s %2$d download</string>
<string name="load_all">Look at all</string> <string name="load_all">Look at all</string>
<string name="game_configured">The game is configured</string> <string name="game_configured">The game is configured</string>
<string name="export_file">The export file</string> <string name="export_file">The export file</string>
@ -647,7 +657,7 @@
<string name="pay_attention_new">Pay attention to new</string> <string name="pay_attention_new">Pay attention to new</string>
<string name="version_name_tip">The version name is displayed in the update record.</string> <string name="version_name_tip">The version name is displayed in the update record.</string>
<string name="sold_out_mod_tip">The shelves need to be reviewed again. Should they be removed\?</string> <string name="sold_out_mod_tip">The shelves need to be reviewed again. Should they be removed\?</string>
<string name="review_audit_mod_tip">Do you want to review %1$s\?</string> <string name="review_audit_mod_tip">Do you want to review %1$s?</string>
<string name="review_audit">review</string> <string name="review_audit">review</string>
<string name="warehouse">warehouse</string> <string name="warehouse">warehouse</string>
<string name="not_find_map">No map found</string> <string name="not_find_map">No map found</string>
@ -704,7 +714,7 @@
<string name="ban_fans">Add the user to the blacklist</string> <string name="ban_fans">Add the user to the blacklist</string>
<string name="reject_follow">Refuse to focus on</string> <string name="reject_follow">Refuse to focus on</string>
<string name="all_units">all</string> <string name="all_units">all</string>
<string name="recently_opened">Recently,</string> <string name="recently_opened">History</string>
<string name="not_find_history">No historical record was found</string> <string name="not_find_history">No historical record was found</string>
<string name="delete_source_file_check">Deleting source Files</string> <string name="delete_source_file_check">Deleting source Files</string>
<string name="init_all_units">Initialize the unit list...</string> <string name="init_all_units">Initialize the unit list...</string>
@ -728,6 +738,7 @@
<string name="undo">undo</string> <string name="undo">undo</string>
<string name="redo">redo</string> <string name="redo">redo</string>
<string name="del_mod">delete</string> <string name="del_mod">delete</string>
<string name="delete_error">The deletion failed. Procedure</string>
<string name="need_save">[unsaved]%1$s</string> <string name="need_save">[unsaved]%1$s</string>
<string name="game_data_and_synchronization">Game data and synchronization</string> <string name="game_data_and_synchronization">Game data and synchronization</string>
<string name="game_data_and_synchronization_describe">Manage synchronized game data.</string> <string name="game_data_and_synchronization_describe">Manage synchronized game data.</string>
@ -757,7 +768,7 @@
<string name="update_log">Update log</string> <string name="update_log">Update log</string>
<string name="recent_update">Last updated :%1$s</string> <string name="recent_update">Last updated :%1$s</string>
<string name="update_record">Update record</string> <string name="update_record">Update record</string>
<string name="search_mod_key">Search results for \\"%1$s\\"</string> <string name="search_mod_key">Search results for "%1$s"</string>
<string name="result">The results of</string> <string name="result">The results of</string>
<string name="data_set_read_mode">Read mode</string> <string name="data_set_read_mode">Read mode</string>
<string name="read_mode_additional">additional</string> <string name="read_mode_additional">additional</string>
@ -800,7 +811,7 @@
<string name="value_describe_error">The value description cannot be empty</string> <string name="value_describe_error">The value description cannot be empty</string>
<string name="value_identifier_error">Value identifiers cannot be null</string> <string name="value_identifier_error">Value identifiers cannot be null</string>
<string name="value_selector_type_error">Value selectors cannot be null</string> <string name="value_selector_type_error">Value selectors cannot be null</string>
<string name="list_of_affected">The following %1$D files will be affected.</string> <string name="list_of_affected">The following %1$d files will be affected.</string>
<string name="affect_list">Impact list</string> <string name="affect_list">Impact list</string>
<string name="substitution_is_same">The new content is the same as the original content.</string> <string name="substitution_is_same">The new content is the same as the original content.</string>
<string name="figure_out">Processing is complete</string> <string name="figure_out">Processing is complete</string>
@ -808,6 +819,7 @@
<string name="turret_design">Turret design</string> <string name="turret_design">Turret design</string>
<string name="experience_the_plan">User Experience Plan</string> <string name="experience_the_plan">User Experience Plan</string>
<string name="experience_the_plan_describe">Send software crash message anonymously .</string> <string name="experience_the_plan_describe">Send software crash message anonymously .</string>
<string name="anonymous_send_completed">An error has been sent anonymously</string>
<string name="update_and_iteration">Version update and user experience planning</string> <string name="update_and_iteration">Version update and user experience planning</string>
<string name="is_paid">Have you paid yet\? (Unpaid orders will expire and can no longer be paid for).</string> <string name="is_paid">Have you paid yet\? (Unpaid orders will expire and can no longer be paid for).</string>
<string name="paid_yes">Yes, I did</string> <string name="paid_yes">Yes, I did</string>
@ -824,13 +836,53 @@
<string name="dynamic_color">Dynamic color</string> <string name="dynamic_color">Dynamic color</string>
<string name="dynamic_color_tip">Follow the device wallpaper to change the theme color.</string> <string name="dynamic_color_tip">Follow the device wallpaper to change the theme color.</string>
<string name="dynamic_color_disabled">Dynamic colors are not supported on this device.</string> <string name="dynamic_color_disabled">Dynamic colors are not supported on this device.</string>
<string name="an_unsupported_file_type">Unsupported file format %1$s.</string>
<string name="title">The title</string> <string name="title">The title</string>
<string name="hotSearch">Top Searches</string>
<string name="search_type_mod_all">All</string>
<string name="search_type_purchase_plan">plan</string>
<string name="search_type_mod_versions">Mod update log</string>
<string name="search_type_mod_comments">Mod comments</string>
<string name="search_type_dynamic">Dynamics</string>
<string name="search_type_user">Users</string>
<string name="search_type_mod">Mods</string> <string name="search_type_mod">Mods</string>
<string name="search_type_user">Users</string>
<string name="search_type_dynamic">Dynamics</string>
<string name="search_type_mod_comments">Mod comments</string>
<string name="search_type_mod_versions">Mod update log</string>
<string name="search_type_purchase_plan">plan</string>
<string name="search_type_mod_all">All</string>
<string name="hotSearch">Top Searches</string>
<string name="soft">The sorting</string>
<string name="file_list_action_sort_by_name">The name of the</string>
<string name="file_list_action_sort_by_type">type</string>
<string name="file_list_action_sort_by_size">The size of the</string>
<string name="file_list_action_sort_by_last_modified">Modify the time</string>
<string name="file_sort_type">File sorting Mode</string>
<string name="template_id">Template id</string>
<string name="customize_edit_text">Custom edit box</string>
<string name="subscription">To subscribe to</string>
<string name="de_subscription">unsubscribe</string>
<string name="de_subscription_msg">Want to unsubscribe %1$s?</string>
<string name="keyword_color">Keyword Color</string>
<string name="text_color">Plain text color</string>
<string name="edit_text_color">The font color</string>
<string name="section_color">Section color</string>
<string name="annotation_color">Annotation color</string>
<string name="customize_edit_text_description">Customize edit box font color, edit box background image, etc.</string>
<string name="restore_default">Restore the default</string>
<string name="edit_background">background</string>
<string name="file_path">The file path</string>
<string name="dim_value">The fuzzy degree of</string>
<string name="auto_generate_color_scheme">Automatic generation of color schemes</string>
<string name="display_coordinate_system">Display coordinate system</string>
<string name="automatically_disable_coordinate_system">The current image size is too large, coordinate system display has been disabled.</string>
<string name="coordinates_x">X coordinate</string>
<string name="coordinates_y">y</string>
<string name="turret">turret</string>
<string name="control_panel">The control panel</string>
<string name="show_guides">Display auxiliary line</string>
<string name="save_template">Save the template</string>
<string name="all">all</string>
<string name="new_password">The new password</string>
<string name="edit_text_color_dark">Dark theme font color</string>
<string name="user_group">The user group</string>
<string name="discord_group">Discord server</string>
<string name="search_suggestions_null">No search suggestion.</string>
<string name="search_suggestions_loading">Get search suggestions...</string>
<string name="search_suggestions_number">Total %1$d search suggestions.</string>
</resources> </resources>

View File

@ -12,16 +12,20 @@
<string name="select_directents">目次を選択する</string> <string name="select_directents">目次を選択する</string>
<string name="select_file">ファイルを選択する</string> <string name="select_file">ファイルを選択する</string>
<string name="select_file_ok">已選\\"%1$s\\"</string> <string name="select_file_ok">已選\\"%1$s\\"</string>
<string name="root_path">ルートディレクトリ</string>
<string name="select_image">画像を選択する</string> <string name="select_image">画像を選択する</string>
<string name="change_image">画像を入れ替える</string> <string name="change_image">画像を入れ替える</string>
<string name="del_image">画像を除去する</string> <string name="del_image">画像を除去する</string>
<string name="remove">除去</string> <string name="remove">除去</string>
<string name="remove_image_item">\\"%1$s\\"に位置する画像を除去する\?</string> <string name="remove_image_item">\\"%1$s\\"に位置する画像を除去する\?</string>
<string name="open">开き</string> <string name="open">开き</string>
<string name="open_public">公開</string>
<string name="open_private">私有</string>
<string name="open_nottiled">NoTiledをつける</string> <string name="open_nottiled">NoTiledをつける</string>
<string name="create_unit_complete">単位の創設が完了した</string> <string name="create_unit_complete">単位の創設が完了した</string>
<string name="create_unit_failed">組織の創設に失敗する</string> <string name="create_unit_failed">組織の創設に失敗する</string>
<string name="create_uniting">ユニットを構筑中…</string> <string name="create_uniting">ユニットを構筑中…</string>
<string name="build_unit">単位を構築する</string>
<string name="dialog_ok">確定</string> <string name="dialog_ok">確定</string>
<string name="activation_app">サビ助手を活性化させる</string> <string name="activation_app">サビ助手を活性化させる</string>
<string name="activation_app_tip">起動時間が過ぎましたので、サビヘルパーを起動してください。</string> <string name="activation_app_tip">起動時間が過ぎましたので、サビヘルパーを起動してください。</string>
@ -31,6 +35,8 @@
<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_assistant">アシスタントを作る</string>
<string name="drag_the_slider_to_set_num">スライダーをドラッグして数を選択します。</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>
@ -86,6 +92,7 @@
<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>
<string name="activate_the_account_tip">アクティブ認証コードを入力してください:</string> <string name="activate_the_account_tip">アクティブ認証コードを入力してください:</string>
<string name="verification_code">captcha</string>
<string name="search">検索</string> <string name="search">検索</string>
<string name="find">検索</string> <string name="find">検索</string>
<string name="create">創建</string> <string name="create">創建</string>
@ -94,6 +101,7 @@
<string name="enter_file_path">ファイルパスを入力してください。</string> <string name="enter_file_path">ファイルパスを入力してください。</string>
<string name="create_bookmark">しおりを作る</string> <string name="create_bookmark">しおりを作る</string>
<string name="name_error">モジュール名を入力してください。</string> <string name="name_error">モジュール名を入力してください。</string>
<string name="file_name_error">ファイル名を入力してください。</string>
<string name="action_name_error">キャンペーン名を入力してください。</string> <string name="action_name_error">キャンペーン名を入力してください。</string>
<string name="database_null">このデータセットはロードできません、エラー原因:%1$s。</string> <string name="database_null">このデータセットはロードできません、エラー原因:%1$s。</string>
<string name="describe_error">記述を入力してください。</string> <string name="describe_error">記述を入力してください。</string>
@ -112,6 +120,7 @@
<string name="mod_action1">編集単位</string> <string name="mod_action1">編集単位</string>
<string name="mod_action2">情報を編集する</string> <string name="mod_action2">情報を編集する</string>
<string name="mod_action8">だしぬけ</string> <string name="mod_action8">だしぬけ</string>
<string name="rename">命名を改める</string>
<string name="mod_action10">リペア情報ファイル</string> <string name="mod_action10">リペア情報ファイル</string>
<string name="open_action1">テキストを編集する</string> <string name="open_action1">テキストを編集する</string>
@ -198,6 +207,9 @@
<string name="template_update_error">更新リンクを入力してください。</string> <string name="template_update_error">更新リンクを入力してください。</string>
<string name="template_version_num_error">バージョン番号を入力してください。</string> <string name="template_version_num_error">バージョン番号を入力してください。</string>
<string name="template_version_name_error">バージョン名を入力してください。</string> <string name="template_version_name_error">バージョン名を入力してください。</string>
<string name="template_id_error">idを入力してください。</string>
<string name="template_id_error2">idが占有されています。</string>
<string name="template_name_error2">テンプレートパッケージ名が使用されています。</string>
<string name="template_developer">開発者</string> <string name="template_developer">開発者</string>
<string name="template_error">作成できません。このテンプレートはすでに存在します。</string> <string name="template_error">作成できません。このテンプレートはすでに存在します。</string>
<string name="consent">同意</string> <string name="consent">同意</string>
@ -209,6 +221,7 @@
<string name="update_link">リンクを更新する</string> <string name="update_link">リンクを更新する</string>
<string name="template_version_name">バージョン名</string> <string name="template_version_name">バージョン名</string>
<string name="template_version_num">バージョン番号</string> <string name="template_version_num">バージョン番号</string>
<string name="open_state">公開状態</string>
<string name="code_table">符号表</string> <string name="code_table">符号表</string>
<string name="upgrade_database">使用しているデータセットは古くなっていますが、最新バージョンにアップグレードされていますか\?</string> <string name="upgrade_database">使用しているデータセットは古くなっていますが、最新バージョンにアップグレードされていますか\?</string>
<string name="upgrade">アップグレード</string> <string name="upgrade">アップグレード</string>
@ -222,8 +235,10 @@
<!--编译错误--> <!--编译错误-->
<string name="not_save_exit">保存せずにログアウト</string> <string name="not_save_exit">保存せずにログアウト</string>
<string name="save_settings">構成情報の更新をチェックしたら、変更を保存しますか\?</string>
<string name="saveing">保存中%1$s…</string> <string name="saveing">保存中%1$s…</string>
<string name="save_complete">%1$s保存完了。</string> <string name="save_complete">%1$s保存完了。</string>
<string name="save_complete2">保存完了。</string>
<string name="type_information">%1$sを説明する</string> <string name="type_information">%1$sを説明する</string>
<string name="unknown_type">未知のタイプ\\"%1$s\\"。</string> <string name="unknown_type">未知のタイプ\\"%1$s\\"。</string>
@ -236,7 +251,7 @@
<string name="import_error1">ファイルを伸張するときにエラーが発生します。</string> <string name="import_error1">ファイルを伸張するときにエラーが発生します。</string>
<string name="import_effor7">識別できない経路です</string> <string name="import_effor7">識別できない経路です</string>
<string name="delete_unit">単位を削除する</string> <string name="delete_unit">単位を削除する</string>
<string name="delete_prompt">%1$sを削除しますか\?</string> <string name="delete_prompt">%1$s を削除しますか\\?</string>
<!--导入--> <!--导入-->
<string name="importing">導入中…</string> <string name="importing">導入中…</string>
<string name="import_name">导入</string> <string name="import_name">导入</string>
@ -276,8 +291,11 @@
<string name="mod_title">同じ組の</string> <string name="mod_title">同じ組の</string>
<string name="edit_title">コード編集</string> <string name="edit_title">コード編集</string>
<string name="template_title">テンプレートパッケージ</string> <string name="template_title">テンプレートパッケージ</string>
<string name="template_list">テンプレート一覧</string>
<string name="close">閉鎖</string> <string name="close">閉鎖</string>
<string name="qq_group">qq群</string> <string name="qq_group">qq群</string>
<string name="details">详细</string>
<string name="insert_coins">コイン式</string>
<string name="del_completed">\\"%1$s\\"を削除しました。</string> <string name="del_completed">\\"%1$s\\"を削除しました。</string>
@ -333,7 +351,6 @@
<string name="update_num">%1$sの記録を更新しました。</string> <string name="update_num">%1$sの記録を更新しました。</string>
<string name="clean_up_code_cache_complete">コードキャッシュのクリーンアップ完了。</string> <string name="clean_up_code_cache_complete">コードキャッシュのクリーンアップ完了。</string>
<string name="clean"></string> <string name="clean"></string>
<string name="details">详细</string>
<string name="show_details">詳細を調べる</string> <string name="show_details">詳細を調べる</string>
<string name="goto_line">誤った位置にジャンプする</string> <string name="goto_line">誤った位置にジャンプする</string>
<string name="code_navigation">コードナビゲーション</string> <string name="code_navigation">コードナビゲーション</string>
@ -343,6 +360,9 @@
<string name="code_language_on">英文</string> <string name="code_language_on">英文</string>
<string name="code_language_off">中文</string> <string name="code_language_off">中文</string>
<string name="save_tip">現在のコンテンツを先に保存してください。</string> <string name="save_tip">現在のコンテンツを先に保存してください。</string>
<string name="not_find_turret">砲塔が見つからない。</string>
<string name="please_enter_the_x_coordinate">X座標を入力してください。</string>
<string name="please_enter_the_y_coordinate">Y座標を入力してください。</string>
<string name="copy_rule">ルールを複製する</string> <string name="copy_rule">ルールを複製する</string>
<string name="rule">ルール</string> <string name="rule">ルール</string>
<string name="search_rule">ルール探し</string> <string name="search_rule">ルール探し</string>
@ -356,6 +376,7 @@
<string name="collapse_info">クラッシュ・メッセージ</string> <string name="collapse_info">クラッシュ・メッセージ</string>
<string name="load_system_application">表示システムアプリケーション</string> <string name="load_system_application">表示システムアプリケーション</string>
<string name="choose_color">色を選ぶ</string> <string name="choose_color">色を選ぶ</string>
<string name="profile_picture_box_color">アイコンの枠の色</string>
<string name="game_pack">ゲームパック</string> <string name="game_pack">ゲームパック</string>
<string name="select_the_game_pack">ゲームパックを選ぶ</string> <string name="select_the_game_pack">ゲームパックを選ぶ</string>
<string name="enable_the_recovery_station">モジュールごみ箱</string> <string name="enable_the_recovery_station">モジュールごみ箱</string>
@ -371,22 +392,6 @@
<string name="keep_rwmod_file_description">モジュールを伸張する際、ソースファイルを保持する。</string> <string name="keep_rwmod_file_description">モジュールを伸張する際、ソースファイルを保持する。</string>
<string name="keep_rwmod_file">ソースファイルを保存する</string> <string name="keep_rwmod_file">ソースファイルを保存する</string>
<string name="clear_recovery_station">ごみ箱を空にする</string> <string name="clear_recovery_station">ごみ箱を空にする</string>
<string name="setting_database_path" translatable="false">DatabasePath</string>
<string name="setting_app_language" translatable="false">AppLanguage</string>
<string name="setting_database_directory" translatable="false">DatabaseDirectory</string>
<string name="setting_developer_mode" translatable="false">DeveloperMode</string>
<string name="setting_custom_symbol" translatable="false">CustomSymbol</string>
<string name="setting_template_directory" translatable="false">TemplateDirectory</string>
<string name="setting_auto_create_nomedia" translatable="false">AutoCreateNomedia</string>
<string name="setting_only_load_conant_language_temple" translatable="false">OnlyLoadConantLanguageTemple</string>
<string name="setting_night_mode" translatable="false">NightMode</string>
<string name="setting_independent_folder" translatable="false">IndependentFolder</string>
<string name="setting_app_version" translatable="false">AppVersion</string>
<string name="setting_game_package" translatable="false">GamePackage</string>
<string name="setting_keep_rwmod_file" translatable="false">KeepRwmodFile</string>
<string name="setting_enable_recovery_station" translatable="false">EnableRecoveryStation</string>
<string name="setting_recovery_station_file_save_days" translatable="false">RecoveryStationFileSaveDays</string>
<string name="setting_recovery_station_folder" translatable="false">RecoveryStationFolder</string>
<string name="independent_folder_description">ユニットごとに独立したフォルダを作成する。</string> <string name="independent_folder_description">ユニットごとに独立したフォルダを作成する。</string>
<string name="independent_folder">独立フォルダを作成する</string> <string name="independent_folder">独立フォルダを作成する</string>
<string name="unable_rename">ファイルを使用しているフォルダの名前を変更することはできません。</string> <string name="unable_rename">ファイルを使用しているフォルダの名前を変更することはできません。</string>
@ -405,7 +410,6 @@
<string name="no_app_installed">%1$sはインストールされていません。</string> <string name="no_app_installed">%1$sはインストールされていません。</string>
<string name="restore_all">全部還元する</string> <string name="restore_all">全部還元する</string>
<string name="all_saves_are_completed">%1$dファイルを保存しました。</string> <string name="all_saves_are_completed">%1$dファイルを保存しました。</string>
<string name="copyright" translatable="false">Copyright ©coldmint 2020-%1$d All Rights Reserved.</string>
<string name="about">について</string> <string name="about">について</string>
<string name="libs">オープンソース・ライセンス</string> <string name="libs">オープンソース・ライセンス</string>
<string name="additional_selection">付加項</string> <string name="additional_selection">付加項</string>
@ -414,15 +418,14 @@
<string name="open_tip">直ちに%1$.2f元で開通する</string> <string name="open_tip">直ちに%1$.2f元で開通する</string>
<string name="packing">お持ち帰り中…</string> <string name="packing">お持ち帰り中…</string>
<string name="share_mod">分かち合い</string> <string name="share_mod">分かち合い</string>
<string name="setting_pack_directory" translatable="false">PackDirectory</string>
<string name="clear_code_cache">コードキャッシュのクリーンアップ</string> <string name="clear_code_cache">コードキャッシュのクリーンアップ</string>
<string name="custom_symbol">カスタム記号バー</string> <string name="custom_symbol">カスタム記号バー</string>
<string name="setting_identifiers_prompt_number" translatable="false">IdentifiersPromptNumber</string>
<string name="identifiers_prompt_number">識別子が数を示す</string> <string name="identifiers_prompt_number">識別子が数を示す</string>
<string name="recovery_file">还元</string> <string name="recovery_file">还元</string>
<string name="pack_directory">カタログを梱包する</string> <string name="pack_directory">カタログを梱包する</string>
<string name="info">情報</string> <string name="info">情報</string>
<string name="cut_board_operation">せん断板操作</string> <string name="cut_board_operation">せん断板操作</string>
<string name="mine_bookmarks">私のしおり</string>
<string name="bookmark_manager">ブックマークマネージャ</string> <string name="bookmark_manager">ブックマークマネージャ</string>
<string name="jump_a_bookmark">飛びしおり</string> <string name="jump_a_bookmark">飛びしおり</string>
<string name="remove_bookmark">しおりを取り除く</string> <string name="remove_bookmark">しおりを取り除く</string>
@ -433,25 +436,29 @@
<string name="add_bookmark_fail">しおりを付けるのに失敗します。</string> <string name="add_bookmark_fail">しおりを付けるのに失敗します。</string>
<string name="bookmark_jump_failed">しおりが指し示す書類は存在しない。</string> <string name="bookmark_jump_failed">しおりが指し示す書類は存在しない。</string>
<string name="unit_directory">単位目録。</string> <string name="unit_directory">単位目録。</string>
<string name="setting_user_name" translatable="false">UserName</string>
<string name="user_name">ユーザー名</string> <string name="user_name">ユーザー名</string>
<string name="report_mod">通報モジュール</string> <string name="report_mod">通報モジュール</string>
<string name="report_user">ユーザーを通報する</string> <string name="report_user">ユーザーを通報する</string>
<string name="view_the_report_object">(%1$s)を見る</string> <string name="view_the_report_object">(%1$s)を見る</string>
<string name="bookmark_already_exists">サインがありますので、パスを変更してください。</string> <string name="bookmark_already_exists">サインがありますので、パスを変更してください。</string>
<string name="feedback">意見のフィードバック</string> <string name="feedback">意見のフィードバック</string>
<string name="setting_use_jetBrains_mono_font">UseJetBrainsMonoFont</string> <string name="please_set_main_image">本体画像を設定してください。</string>
<string name="use_jetBrains_mono_font">JetBrains Monoフォントを使う</string> <string name="use_jetBrains_mono_font">JetBrains Monoフォントを使う</string>
<string name="use_jetBrains_mono_font_describe">アシスタントに内蔵されているフォントは、強くお勧めします。</string> <string name="use_jetBrains_mono_font_describe">アシスタントに内蔵されているフォントは、強くお勧めします。</string>
<string name="directory_does_not_exist">目次は存在しない。</string> <string name="directory_does_not_exist">目次は存在しない。</string>
<string name="special_thanks_to">特にお礼を言う</string> <string name="special_thanks_to">特にお礼を言う</string>
<string name="email">メール</string> <string name="email">メール</string>
<string name="coin_number">コイン:%1$d</string>
<string name="insert_coins_tip">%1$dコインを投げた。</string>
<string name="insert_coins_num_tip">コインを何個投げますか\?</string>
<string name="coin_records">コイン記録</string>
<string name="insert_coins_no">好きな作品を応援しましょう。</string>
<string name="insert_coins_ok">あなたの支持を受け取りました。</string>
<string name="register_successed">登録に成功する</string> <string name="register_successed">登録に成功する</string>
<string name="registration_success_message">アカウントのアクティベーションコードをメールアドレスに送信しました。受信していない場合、メールボックスは迷惑メールと見なされる可能性があります。ごみ箱をチェックしてください。</string> <string name="registration_success_message">アカウントのアクティベーションコードをメールアドレスに送信しました。受信していない場合、メールボックスは迷惑メールと見なされる可能性があります。ごみ箱をチェックしてください。</string>
<string name="please_login_first">まず登録してください。</string> <string name="please_login_first">まず登録してください。</string>
<string name="network_error">ネットワークエラー。</string> <string name="network_error">ネットワークエラー。</string>
<string name="check_update_failure">アップデートの失敗をチェックする。</string> <string name="check_update_failure">アップデートの失敗をチェックする。</string>
<string name="setting_check_beta_update">チェックベータアップデート</string>
<string name="check_beta_update">ベータアップデートをチェックする</string> <string name="check_beta_update">ベータアップデートをチェックする</string>
<string name="check_beta_update_describe">Releaseバージョンでのみ有効となり、ベータバージョンでは、強制アップデートが采用されます。</string> <string name="check_beta_update_describe">Releaseバージョンでのみ有効となり、ベータバージョンでは、強制アップデートが采用されます。</string>
<string name="loading_values">数値を載せる…</string> <string name="loading_values">数値を載せる…</string>
@ -534,6 +541,9 @@
<string name="expiration_time_tip">期限:%1$s</string> <string name="expiration_time_tip">期限:%1$s</string>
<string name="community">コミュニティ</string> <string name="community">コミュニティ</string>
<string name="recommended">推薦</string> <string name="recommended">推薦</string>
<string name="local">地元</string>
<string name="network">インターネット</string>
<string name="template_maker">テンプレート・プロデューサ</string>
<string name="ranking">ランキング</string> <string name="ranking">ランキング</string>
<string name="my">私の</string> <string name="my">私の</string>
<string name="latest_release">最新リリース</string> <string name="latest_release">最新リリース</string>
@ -557,6 +567,7 @@
<string name="installation">インストール</string> <string name="installation">インストール</string>
<string name="installation_ing">インストール中…</string> <string name="installation_ing">インストール中…</string>
<string name="installated">インストール済み</string> <string name="installated">インストール済み</string>
<string name="template_community">テンプレート・コミュニティー</string>
<string name="work_of_home_page">作品を調べる</string> <string name="work_of_home_page">作品を調べる</string>
<string name="audit">このモジュールは外部には隠されていて、あなたと管理人にしか見えません。</string> <string name="audit">このモジュールは外部には隠されていて、あなたと管理人にしか見えません。</string>
<string name="follow">注目</string> <string name="follow">注目</string>
@ -727,6 +738,7 @@
<string name="undo">撤回</string> <string name="undo">撤回</string>
<string name="redo">重を</string> <string name="redo">重を</string>
<string name="del_mod">削除</string> <string name="del_mod">削除</string>
<string name="delete_error">削除に失敗します。</string>
<string name="need_save">[未保存]%1$s</string> <string name="need_save">[未保存]%1$s</string>
<string name="game_data_and_synchronization">ゲームデータと同期</string> <string name="game_data_and_synchronization">ゲームデータと同期</string>
<string name="game_data_and_synchronization_describe">同期されたゲームデータを管理する。</string> <string name="game_data_and_synchronization_describe">同期されたゲームデータを管理する。</string>
@ -807,6 +819,7 @@
<string name="turret_design">砲塔の設計</string> <string name="turret_design">砲塔の設計</string>
<string name="experience_the_plan">ユーザー体験プログラム</string> <string name="experience_the_plan">ユーザー体験プログラム</string>
<string name="experience_the_plan_describe">匿名送信ソフト奔砕情報。</string> <string name="experience_the_plan_describe">匿名送信ソフト奔砕情報。</string>
<string name="anonymous_send_completed">匿名送信済みエラー</string>
<string name="update_and_iteration">アップデートとユーザー体験プログラム</string> <string name="update_and_iteration">アップデートとユーザー体験プログラム</string>
<string name="is_paid">お支払いはされましたか\?未払いの注文は期限が切れ、支払いができなくなります。</string> <string name="is_paid">お支払いはされましたか\?未払いの注文は期限が切れ、支払いができなくなります。</string>
<string name="paid_yes">はい、支払いました</string> <string name="paid_yes">はい、支払いました</string>
@ -823,5 +836,53 @@
<string name="dynamic_color">ダイナミックカラー</string> <string name="dynamic_color">ダイナミックカラー</string>
<string name="dynamic_color_tip">壁紙に合わせてテーマカラーを変更します。</string> <string name="dynamic_color_tip">壁紙に合わせてテーマカラーを変更します。</string>
<string name="dynamic_color_disabled">この装置は動的色をサポートしない。</string> <string name="dynamic_color_disabled">この装置は動的色をサポートしない。</string>
<string name="an_unsupported_file_type">サポートされていないファイルフォーマット%1$s。</string>
<string name="title">タイトル</string> <string name="title">タイトル</string>
<string name="search_type_mod">同じ組の</string>
<string name="search_type_user">ユーザー</string>
<string name="search_type_dynamic">動態</string>
<string name="search_type_mod_comments">モジュールレビュー</string>
<string name="search_type_mod_versions">モジュール更新日誌</string>
<string name="search_type_purchase_plan">定食</string>
<string name="search_type_mod_all">すべて</string>
<string name="hotSearch">人気検索</string>
<string name="soft">序列</string>
<string name="file_list_action_sort_by_name">名称</string>
<string name="file_list_action_sort_by_type">タイプ</string>
<string name="file_list_action_sort_by_size">大きさ</string>
<string name="file_list_action_sort_by_last_modified">時間を修正する</string>
<string name="file_sort_type">書類並べ替え方式</string>
<string name="template_id">テンプレートid</string>
<string name="customize_edit_text">カスタマイズ編集ボックス</string>
<string name="subscription">購読</string>
<string name="de_subscription">·</string>
<string name="de_subscription_msg">%1$sをキャンセルしますか\?</string>
<string name="keyword_color">キーワードカラー</string>
<string name="text_color">通常のテキストカラー</string>
<string name="edit_text_color">書体の色</string>
<string name="section_color">節色</string>
<string name="annotation_color">注釈の色</string>
<string name="customize_edit_text_description">編集ボックスのフォントカラーをカスタマイズしたり、背景画像を編集したりします。</string>
<string name="restore_default">デフォルトに戻す</string>
<string name="edit_background">背景</string>
<string name="file_path">ファイルパス</string>
<string name="dim_value">ぼかし度</string>
<string name="auto_generate_color_scheme">配色を自動生成する</string>
<string name="display_coordinate_system">座標系を表示する</string>
<string name="automatically_disable_coordinate_system">現在の画像サイズが大きすぎて、座標系表示を無効にしています。</string>
<string name="coordinates_x">x座標</string>
<string name="coordinates_y">y座標</string>
<string name="turret">炮塔</string>
<string name="control_panel">コントロールパネル</string>
<string name="show_guides">補助線を表示する</string>
<string name="save_template">テンプレートを保存する</string>
<string name="all">すべて</string>
<string name="new_password">新しいパスワード</string>
<string name="edit_text_color_dark">ダーク・テーマ・フォント・カラー</string>
<string name="user_group">ユーザーベース</string>
<string name="discord_group">Discordサーバ</string>
<string name="search_suggestions_null">検索の提案はない。</string>
<string name="search_suggestions_loading">検索の提案を得る…</string>
<string name="search_suggestions_number">合計%1$dの検索提案。</string>
</resources> </resources>

View File

@ -11,17 +11,20 @@
<string name="parse_file_exception">Файл анализирует аномалию</string> <string name="parse_file_exception">Файл анализирует аномалию</string>
<string name="select_directents">Выбирать каталог</string> <string name="select_directents">Выбирать каталог</string>
<string name="select_file">Выбери файл.</string> <string name="select_file">Выбери файл.</string>
<string name="select_file_ok">/ % \</string> <string name="root_path">Корневой каталог</string>
<string name="select_image">Выбери образ.</string> <string name="select_image">Выбери образ.</string>
<string name="change_image">Смени изображение.</string> <string name="change_image">Смени изображение.</string>
<string name="del_image">Удалите изображение.</string> <string name="del_image">Удалите изображение.</string>
<string name="remove">удал</string> <string name="remove">удал</string>
<string name="remove_image_item">Удаление изображения, расположенного в \ % $\ \\?</string> <string name="remove_image_item">Удаление изображения, расположенного в \ % $\ \\?</string>
<string name="open">откр</string> <string name="open">откр</string>
<string name="open_public">публичн</string>
<string name="open_private">частн</string>
<string name="open_nottiled">откройте</string> <string name="open_nottiled">откройте</string>
<string name="create_unit_complete">Создание единицы завершено</string> <string name="create_unit_complete">Создание единицы завершено</string>
<string name="create_unit_failed">Ошибка создания единицы</string> <string name="create_unit_failed">Ошибка создания единицы</string>
<string name="create_uniting">Создаем единицу...</string> <string name="create_uniting">Создаем единицу...</string>
<string name="build_unit">Строительная единица</string>
<string name="dialog_ok">увер</string> <string name="dialog_ok">увер</string>
<string name="activation_app">Активировать помощника ржавчины</string> <string name="activation_app">Активировать помощника ржавчины</string>
<string name="activation_app_tip">Время активации прошло. Пожалуйста, активируйте ржавчину.</string> <string name="activation_app_tip">Время активации прошло. Пожалуйста, активируйте ржавчину.</string>
@ -31,6 +34,8 @@
<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_assistant">Создавать помощника</string>
<string name="drag_the_slider_to_set_num">Тягач выбирает число.</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 % проектов поддерживают быструю навигацию.</string> <string name="navigation_tip">В общей сложности 1 % проектов поддерживают быструю навигацию.</string>
@ -86,6 +91,7 @@
<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>
<string name="activate_the_account_tip">Введите код активации:</string> <string name="activate_the_account_tip">Введите код активации:</string>
<string name="verification_code">Код подтверждения.</string>
<string name="search">поиск</string> <string name="search">поиск</string>
<string name="find">поиск</string> <string name="find">поиск</string>
<string name="create">созда</string> <string name="create">созда</string>
@ -94,6 +100,7 @@
<string name="enter_file_path">Введите, пожалуйста, маршрут файла.</string> <string name="enter_file_path">Введите, пожалуйста, маршрут файла.</string>
<string name="create_bookmark">Создавать закладку</string> <string name="create_bookmark">Создавать закладку</string>
<string name="name_error">Пожалуйста, введите имя модуля.</string> <string name="name_error">Пожалуйста, введите имя модуля.</string>
<string name="file_name_error">Введите имя файла.</string>
<string name="action_name_error">Введите имя мероприятия.</string> <string name="action_name_error">Введите имя мероприятия.</string>
<string name="database_null">Этот набор данных не может быть загружен по ложной причине :% $.</string> <string name="database_null">Этот набор данных не может быть загружен по ложной причине :% $.</string>
<string name="describe_error">Введите описание, пожалуйста.</string> <string name="describe_error">Введите описание, пожалуйста.</string>
@ -112,6 +119,7 @@
<string name="mod_action1">Монтажная единица</string> <string name="mod_action1">Монтажная единица</string>
<string name="mod_action2">Редактирование.</string> <string name="mod_action2">Редактирование.</string>
<string name="mod_action8">декомпресс</string> <string name="mod_action8">декомпресс</string>
<string name="rename">Переименовать.</string>
<string name="mod_action10">Восстанавливать файл информации</string> <string name="mod_action10">Восстанавливать файл информации</string>
<string name="open_action1">Редактировать текст</string> <string name="open_action1">Редактировать текст</string>
@ -198,6 +206,9 @@
<string name="template_update_error">Введите обновленную ссылку.</string> <string name="template_update_error">Введите обновленную ссылку.</string>
<string name="template_version_num_error">Введите номер, пожалуйста.</string> <string name="template_version_num_error">Введите номер, пожалуйста.</string>
<string name="template_version_name_error">Введите, пожалуйста, имя версии.</string> <string name="template_version_name_error">Введите, пожалуйста, имя версии.</string>
<string name="template_id_error">Введите идентификатор.</string>
<string name="template_id_error2">Удостоверение личности занято.</string>
<string name="template_name_error2">Название шаблона было занято.</string>
<string name="template_developer">Застройщик.</string> <string name="template_developer">Застройщик.</string>
<string name="template_error">Невозможно создать шаблон, который уже существует.</string> <string name="template_error">Невозможно создать шаблон, который уже существует.</string>
<string name="consent">соглас</string> <string name="consent">соглас</string>
@ -209,6 +220,7 @@
<string name="update_link">Обновить связь</string> <string name="update_link">Обновить связь</string>
<string name="template_version_name">Название версии</string> <string name="template_version_name">Название версии</string>
<string name="template_version_num">Номер версии.</string> <string name="template_version_num">Номер версии.</string>
<string name="open_state">Открытый режим</string>
<string name="code_table">Таблица кодов.</string> <string name="code_table">Таблица кодов.</string>
<string name="upgrade_database">Набор данных, который вы используете, устарел и был обновлен до последней версии\?</string> <string name="upgrade_database">Набор данных, который вы используете, устарел и был обновлен до последней версии\?</string>
<string name="upgrade">эскалац</string> <string name="upgrade">эскалац</string>
@ -222,8 +234,10 @@
<!--编译错误--> <!--编译错误-->
<string name="not_save_exit">Выход без сохранения</string> <string name="not_save_exit">Выход без сохранения</string>
<string name="save_settings">Ты хочешь сохранить изменения\?</string>
<string name="saveing">Сохраняю 10%...</string> <string name="saveing">Сохраняю 10%...</string>
<string name="save_complete">10 процентов на сохранение завершено.</string> <string name="save_complete">10 процентов на сохранение завершено.</string>
<string name="save_complete2">Сохранность завершена.</string>
<string name="type_information">объясняю</string> <string name="type_information">объясняю</string>
<string name="unknown_type">Неизвестные типы. \"% \ $\</string> <string name="unknown_type">Неизвестные типы. \"% \ $\</string>
@ -236,7 +250,7 @@
<string name="import_error1">Произошла ошибка при разгерметизации файла.</string> <string name="import_error1">Произошла ошибка при разгерметизации файла.</string>
<string name="import_effor7">Неидентифицированный путь.</string> <string name="import_effor7">Неидентифицированный путь.</string>
<string name="delete_unit">Удалите устройство.</string> <string name="delete_unit">Удалите устройство.</string>
<string name="delete_prompt">Вы хотите, чтобы я удалила $1 %\?</string> <string name="delete_prompt">Вы хотите, чтобы я удалила %1$s?</string>
<!--导入--> <!--导入-->
<string name="importing">Импорт...</string> <string name="importing">Импорт...</string>
<string name="import_name">импортирова</string> <string name="import_name">импортирова</string>
@ -276,8 +290,11 @@
<string name="mod_title">модул</string> <string name="mod_title">модул</string>
<string name="edit_title">Редактирование кода</string> <string name="edit_title">Редактирование кода</string>
<string name="template_title">Шаблон.</string> <string name="template_title">Шаблон.</string>
<string name="template_list">Список шаблонов</string>
<string name="close">закр</string> <string name="close">закр</string>
<string name="qq_group">Qq групп</string> <string name="qq_group">Qq групп</string>
<string name="details">подробн</string>
<string name="insert_coins">автомат</string>
<string name="del_completed">Удалена \ % \ \ \</string> <string name="del_completed">Удалена \ % \ \ \</string>
@ -333,7 +350,6 @@
<string name="update_num">Обновляется запись на $1 %.</string> <string name="update_num">Обновляется запись на $1 %.</string>
<string name="clean_up_code_cache_complete">Очистка кэша кода завершена.</string> <string name="clean_up_code_cache_complete">Очистка кэша кода завершена.</string>
<string name="clean">очист</string> <string name="clean">очист</string>
<string name="details">подробн</string>
<string name="show_details">Проверьте детали.</string> <string name="show_details">Проверьте детали.</string>
<string name="goto_line">Прыжок в неправильную позицию</string> <string name="goto_line">Прыжок в неправильную позицию</string>
<string name="code_navigation">Навигация по коду</string> <string name="code_navigation">Навигация по коду</string>
@ -343,6 +359,9 @@
<string name="code_language_on">английск</string> <string name="code_language_on">английск</string>
<string name="code_language_off">китайск</string> <string name="code_language_off">китайск</string>
<string name="save_tip">Пожалуйста, сохраните текущее содержимое.</string> <string name="save_tip">Пожалуйста, сохраните текущее содержимое.</string>
<string name="not_find_turret">Не могу найти башню.</string>
<string name="please_enter_the_x_coordinate">Введите координаты х.</string>
<string name="please_enter_the_y_coordinate">Введите координаты Y.</string>
<string name="copy_rule">Правило копирования</string> <string name="copy_rule">Правило копирования</string>
<string name="rule">прав</string> <string name="rule">прав</string>
<string name="search_rule">Ищите правила.</string> <string name="search_rule">Ищите правила.</string>
@ -356,6 +375,7 @@
<string name="collapse_info">Информация о крушении</string> <string name="collapse_info">Информация о крушении</string>
<string name="load_system_application">Приложение для отображения системы</string> <string name="load_system_application">Приложение для отображения системы</string>
<string name="choose_color">Выбери цвет.</string> <string name="choose_color">Выбери цвет.</string>
<string name="profile_picture_box_color">Цвет головы в раме</string>
<string name="game_pack">Сумка.</string> <string name="game_pack">Сумка.</string>
<string name="select_the_game_pack">Выбери сумку.</string> <string name="select_the_game_pack">Выбери сумку.</string>
<string name="enable_the_recovery_station">Мусорная станция</string> <string name="enable_the_recovery_station">Мусорная станция</string>
@ -371,22 +391,6 @@
<string name="keep_rwmod_file_description">Когда распакуете модуль, сохраните исходный файл.</string> <string name="keep_rwmod_file_description">Когда распакуете модуль, сохраните исходный файл.</string>
<string name="keep_rwmod_file">Сохранять исходный файл</string> <string name="keep_rwmod_file">Сохранять исходный файл</string>
<string name="clear_recovery_station">Очистите место сброса</string> <string name="clear_recovery_station">Очистите место сброса</string>
<string name="setting_database_path" translatable="false">DatabasePath</string>
<string name="setting_app_language" translatable="false">AppLanguage</string>
<string name="setting_database_directory" translatable="false">DatabaseDirectory</string>
<string name="setting_developer_mode" translatable="false">DeveloperMode</string>
<string name="setting_custom_symbol" translatable="false">CustomSymbol</string>
<string name="setting_template_directory" translatable="false">TemplateDirectory</string>
<string name="setting_auto_create_nomedia" translatable="false">AutoCreateNomedia</string>
<string name="setting_only_load_conant_language_temple" translatable="false">OnlyLoadConantLanguageTemple</string>
<string name="setting_night_mode" translatable="false">NightMode</string>
<string name="setting_independent_folder" translatable="false">IndependentFolder</string>
<string name="setting_app_version" translatable="false">AppVersion</string>
<string name="setting_game_package" translatable="false">GamePackage</string>
<string name="setting_keep_rwmod_file" translatable="false">KeepRwmodFile</string>
<string name="setting_enable_recovery_station" translatable="false">EnableRecoveryStation</string>
<string name="setting_recovery_station_file_save_days" translatable="false">RecoveryStationFileSaveDays</string>
<string name="setting_recovery_station_folder" translatable="false">RecoveryStationFolder</string>
<string name="independent_folder_description">Создать независимые папки для каждой единицы.</string> <string name="independent_folder_description">Создать независимые папки для каждой единицы.</string>
<string name="independent_folder">Создание независимой папки</string> <string name="independent_folder">Создание независимой папки</string>
<string name="unable_rename">Эту папку нельзя переименовать, в ней используются файлы.</string> <string name="unable_rename">Эту папку нельзя переименовать, в ней используются файлы.</string>
@ -405,7 +409,6 @@
<string name="no_app_installed">Не было установлено никаких $%.</string> <string name="no_app_installed">Не было установлено никаких $%.</string>
<string name="restore_all">Полное восстановление.</string> <string name="restore_all">Полное восстановление.</string>
<string name="all_saves_are_completed">Сохранились документы на сумму $1 %.</string> <string name="all_saves_are_completed">Сохранились документы на сумму $1 %.</string>
<string name="copyright" translatable="false">Copyright ©coldmint 2020-%1$d All Rights Reserved.</string>
<string name="about">о</string> <string name="about">о</string>
<string name="libs">Открытый исходный код</string> <string name="libs">Открытый исходный код</string>
<string name="additional_selection">Дополнительный член</string> <string name="additional_selection">Дополнительный член</string>
@ -414,15 +417,14 @@
<string name="open_tip">Немедленное открытие на сумму $1.2f</string> <string name="open_tip">Немедленное открытие на сумму $1.2f</string>
<string name="packing">В упаковке...</string> <string name="packing">В упаковке...</string>
<string name="share_mod">подел</string> <string name="share_mod">подел</string>
<string name="setting_pack_directory" translatable="false">PackDirectory</string>
<string name="clear_code_cache">Очистить кэш кода</string> <string name="clear_code_cache">Очистить кэш кода</string>
<string name="custom_symbol">Самоопределение колонки символов</string> <string name="custom_symbol">Самоопределение колонки символов</string>
<string name="setting_identifiers_prompt_number" translatable="false">IdentifiersPromptNumber</string>
<string name="identifiers_prompt_number">Идентификатор указывает на количество</string> <string name="identifiers_prompt_number">Идентификатор указывает на количество</string>
<string name="recovery_file">восстановлен</string> <string name="recovery_file">восстановлен</string>
<string name="pack_directory">Паковать каталог</string> <string name="pack_directory">Паковать каталог</string>
<string name="info">информац</string> <string name="info">информац</string>
<string name="cut_board_operation">Операция по монтажу</string> <string name="cut_board_operation">Операция по монтажу</string>
<string name="mine_bookmarks">Моя закладка</string>
<string name="bookmark_manager">Менеджер закладок</string> <string name="bookmark_manager">Менеджер закладок</string>
<string name="jump_a_bookmark">закладка</string> <string name="jump_a_bookmark">закладка</string>
<string name="remove_bookmark">Убрать закладку</string> <string name="remove_bookmark">Убрать закладку</string>
@ -433,25 +435,29 @@
<string name="add_bookmark_fail">Закладка не удалась.</string> <string name="add_bookmark_fail">Закладка не удалась.</string>
<string name="bookmark_jump_failed">Бумаги, на которые указывает закладка, не существуют.</string> <string name="bookmark_jump_failed">Бумаги, на которые указывает закладка, не существуют.</string>
<string name="unit_directory">Единичный каталог</string> <string name="unit_directory">Единичный каталог</string>
<string name="setting_user_name" translatable="false">UserName</string>
<string name="user_name">Имя пользователя.</string> <string name="user_name">Имя пользователя.</string>
<string name="report_mod">Группа доноров</string> <string name="report_mod">Группа доноров</string>
<string name="report_user">Сообщать о потребителе</string> <string name="report_user">Сообщать о потребителе</string>
<string name="view_the_report_object">Смотрите.</string> <string name="view_the_report_object">Смотрите.</string>
<string name="bookmark_already_exists">Подписание книги уже существует.</string> <string name="bookmark_already_exists">Подписание книги уже существует.</string>
<string name="feedback">Обратная связь мнений</string> <string name="feedback">Обратная связь мнений</string>
<string name="setting_use_jetBrains_mono_font">UseJetBrainsМоноФонт</string> <string name="please_set_main_image">Пожалуйста, установите основные изображения.</string>
<string name="use_jetBrains_mono_font">Используйте шрифт JetBrains Mono</string> <string name="use_jetBrains_mono_font">Используйте шрифт JetBrains Mono</string>
<string name="use_jetBrains_mono_font_describe">Шрифт, встроенный в ассистентку, настоятельно рекомендуется использовать.</string> <string name="use_jetBrains_mono_font_describe">Шрифт, встроенный в ассистентку, настоятельно рекомендуется использовать.</string>
<string name="directory_does_not_exist">Каталога не существует.</string> <string name="directory_does_not_exist">Каталога не существует.</string>
<string name="special_thanks_to">Особая благодарность.</string> <string name="special_thanks_to">Особая благодарность.</string>
<string name="email">Почтов ящик</string> <string name="email">Почтов ящик</string>
<string name="coin_number">Монета: 1 доллар</string>
<string name="insert_coins_tip">Бросил монетку в 10 центов.</string>
<string name="insert_coins_num_tip">Сколько монет\?</string>
<string name="coin_records">Записи о валютах.</string>
<string name="insert_coins_no">Поддержите то, что вам нравится.</string>
<string name="insert_coins_ok">Я получил вашу поддержку.</string>
<string name="register_successed">Регистрация прошла успешно.</string> <string name="register_successed">Регистрация прошла успешно.</string>
<string name="registration_success_message">Код активации аккаунта был отправлен на ваш почтовый ящик. Если письмо не было получено, почтовый ящик можно рассматривать как спам. Пожалуйста, проверьте мусорные баки.</string> <string name="registration_success_message">Код активации аккаунта был отправлен на ваш почтовый ящик. Если письмо не было получено, почтовый ящик можно рассматривать как спам. Пожалуйста, проверьте мусорные баки.</string>
<string name="please_login_first">Заходите, пожалуйста.</string> <string name="please_login_first">Заходите, пожалуйста.</string>
<string name="network_error">Интернет-ошибка.</string> <string name="network_error">Интернет-ошибка.</string>
<string name="check_update_failure">Проверка не удалась.</string> <string name="check_update_failure">Проверка не удалась.</string>
<string name="setting_check_beta_update">ПроверитьБетаОбновление</string>
<string name="check_beta_update">Проверь бета-обновления</string> <string name="check_beta_update">Проверь бета-обновления</string>
<string name="check_beta_update_describe">Введена в действие только в версии Release, бета-версии, с обязательным обновлением.</string> <string name="check_beta_update_describe">Введена в действие только в версии Release, бета-версии, с обязательным обновлением.</string>
<string name="loading_values">Количество загрузки...</string> <string name="loading_values">Количество загрузки...</string>
@ -534,6 +540,9 @@
<string name="expiration_time_tip">Срок действия: 1 %</string> <string name="expiration_time_tip">Срок действия: 1 %</string>
<string name="community">сообществ</string> <string name="community">сообществ</string>
<string name="recommended">рекомендова</string> <string name="recommended">рекомендова</string>
<string name="local">местн</string>
<string name="network">сет</string>
<string name="template_maker">Сборщик шаблонов</string>
<string name="ranking">сем</string> <string name="ranking">сем</string>
<string name="my">мо</string> <string name="my">мо</string>
<string name="latest_release">Последний выпуск.</string> <string name="latest_release">Последний выпуск.</string>
@ -557,6 +566,7 @@
<string name="installation">установк</string> <string name="installation">установк</string>
<string name="installation_ing">Установка...</string> <string name="installation_ing">Установка...</string>
<string name="installated">Установлено.</string> <string name="installated">Установлено.</string>
<string name="template_community">Сообщество шаблонов</string>
<string name="work_of_home_page">Смотри.</string> <string name="work_of_home_page">Смотри.</string>
<string name="audit">Этот модуль скрыт снаружи, видимый только вами и администратором.</string> <string name="audit">Этот модуль скрыт снаружи, видимый только вами и администратором.</string>
<string name="follow">вниман</string> <string name="follow">вниман</string>
@ -727,6 +737,7 @@
<string name="undo">снят</string> <string name="undo">снят</string>
<string name="redo">передела</string> <string name="redo">передела</string>
<string name="del_mod">удал</string> <string name="del_mod">удал</string>
<string name="delete_error">Удаление не удалось.</string>
<string name="need_save">[несохраненные</string> <string name="need_save">[несохраненные</string>
<string name="game_data_and_synchronization">Данные игры синхронизированы</string> <string name="game_data_and_synchronization">Данные игры синхронизированы</string>
<string name="game_data_and_synchronization_describe">Управление синхронизированными данными игры.</string> <string name="game_data_and_synchronization_describe">Управление синхронизированными данными игры.</string>
@ -807,6 +818,7 @@
<string name="turret_design">Проектирование башни</string> <string name="turret_design">Проектирование башни</string>
<string name="experience_the_plan">Программа пользовательского опыта</string> <string name="experience_the_plan">Программа пользовательского опыта</string>
<string name="experience_the_plan_describe">Анонимная отправка программного обеспечения для уничтожения информации.</string> <string name="experience_the_plan_describe">Анонимная отправка программного обеспечения для уничтожения информации.</string>
<string name="anonymous_send_completed">Анонимная ошибка отправлена</string>
<string name="update_and_iteration">Обновление версии с программой пользовательского опыта</string> <string name="update_and_iteration">Обновление версии с программой пользовательского опыта</string>
<string name="is_paid">Вы заплатили\? (неоплаченный заказ будет просрочен и не сможет больше платить за него).</string> <string name="is_paid">Вы заплатили\? (неоплаченный заказ будет просрочен и не сможет больше платить за него).</string>
<string name="paid_yes">Да, я заплатил за него</string> <string name="paid_yes">Да, я заплатил за него</string>
@ -823,5 +835,54 @@
<string name="dynamic_color">Динамический цвет</string> <string name="dynamic_color">Динамический цвет</string>
<string name="dynamic_color_tip">Следуйте за обоями устройства для замены тематического цвета.</string> <string name="dynamic_color_tip">Следуйте за обоями устройства для замены тематического цвета.</string>
<string name="dynamic_color_disabled">Это устройство не поддерживает динамические цвета.</string> <string name="dynamic_color_disabled">Это устройство не поддерживает динамические цвета.</string>
<string name="an_unsupported_file_type">Неподдерживаемый формат файла составляет 1 %.</string>
<string name="title">заголовк</string> <string name="title">заголовк</string>
<string name="search_type_mod">модул</string>
<string name="search_type_user">пользовател</string>
<string name="search_type_dynamic">динамическ</string>
<string name="search_type_mod_comments">Групповой обзор</string>
<string name="search_type_mod_versions">Модуль обновил журнал</string>
<string name="search_type_purchase_plan">пакет</string>
<string name="search_type_mod_all">все</string>
<string name="hotSearch">Поиск.</string>
<string name="soft">сортировк</string>
<string name="file_list_action_sort_by_name">назван</string>
<string name="file_list_action_sort_by_type">тип</string>
<string name="file_list_action_sort_by_size">размер</string>
<string name="file_list_action_sort_by_last_modified">Время на изменение.</string>
<string name="file_sort_type">Способ сортировки файлов</string>
<string name="template_id">Удостоверение шаблона</string>
<string name="customize_edit_text">Специальная монтажная рама</string>
<string name="subscription">подписк</string>
<string name="de_subscription">отписа</string>
<string name="de_subscription_msg">Вы хотите вернуть 10%\?</string>
<string name="keyword_color">Цвет ключевого слова</string>
<string name="text_color">Общий текстовый цвет</string>
<string name="edit_text_color">Цвет шрифта</string>
<string name="section_color">Узкий цвет.</string>
<string name="annotation_color">Окраска для комментариев</string>
<string name="customize_edit_text_description">Редактирование цвета шрифта, редактирование фоновых изображений рамки и т.д.</string>
<string name="restore_default">Восстановление по умолчанию</string>
<string name="edit_background">фон</string>
<string name="file_path">Путь файла</string>
<string name="dim_value">Размытость.</string>
<string name="auto_generate_color_scheme">Автоматически генерирует цветовую гамму</string>
<string name="display_coordinate_system">Покажи систему координат</string>
<string name="automatically_disable_coordinate_system">Нынешний размер изображения слишком велик, и система координат отключена.</string>
<string name="coordinates_x">Икс-координаты.</string>
<string name="coordinates_y">Координаты y.</string>
<string name="turret">башн</string>
<string name="control_panel">Панель управления.</string>
<string name="show_guides">Покажи вспомогательную линию.</string>
<string name="save_template">Шаблон сохранения</string>
<string name="all">все</string>
<string name="new_password">Новый пароль.</string>
<string name="edit_text_color_dark">Темный тематический цвет шрифта</string>
<string name="user_group">Пользовательская группа</string>
<string name="discord_group">Дискорд-сервер</string>
<string name="search_suggestions_null">Никаких советов по поиску.</string>
<string name="search_suggestions_loading">Получить ордер на обыск...</string>
<string name="search_suggestions_number">1 % от общей суммы рекомендаций по поиску.</string>
<string name="select_file_ok">%1$s</string>
</resources> </resources>

View File

@ -53,6 +53,7 @@
<item>@string/wechat_pay</item> <item>@string/wechat_pay</item>
<item>@string/alipay</item> <item>@string/alipay</item>
<item>@string/qq_pay</item> <item>@string/qq_pay</item>
<!-- <item>@string/paypal</item>-->
</string-array> </string-array>
<string-array name="gender_entries"> <string-array name="gender_entries">

View File

@ -42,6 +42,7 @@
<string name="navigation_tip">共%1$d个项目支持快速导航。</string> <string name="navigation_tip">共%1$d个项目支持快速导航。</string>
<string name="qq_pay">QQ钱包</string> <string name="qq_pay">QQ钱包</string>
<string name="wechat_pay">微信支付</string> <string name="wechat_pay">微信支付</string>
<string name="paypal">PayPal</string>
<string name="alipay">支付宝</string> <string name="alipay">支付宝</string>
<string name="dialog_title2">解压</string> <string name="dialog_title2">解压</string>
<string name="dialog_title3">修复</string> <string name="dialog_title3">修复</string>
@ -729,9 +730,12 @@
<string name="time_limit">有效期至:%1$s 可使用%2$s次</string> <string name="time_limit">有效期至:%1$s 可使用%2$s次</string>
<string name="payment_reminders">我们会在收到您的订单后24小时内充值进您的账户请耐心等待。若您的订单未在24小时内处理请向我们提交您的订单号申请处理.</string> <string name="payment_reminders">我们会在收到您的订单后24小时内充值进您的账户请耐心等待。若您的订单未在24小时内处理请向我们提交您的订单号申请处理.</string>
<string name="pay">支付</string> <string name="pay">支付</string>
<string name="pay_type">支付方式:</string> <string name="pay_type">支付方式</string>
<string name="next">下个</string>
<string name="last">上个</string>
<string name="pay_tip">请在%1$s内支付%2$s元</string> <string name="pay_tip">请在%1$s内支付%2$s元</string>
<string name="sava_code_and_copy_id">保存收款码,并复制备注</string> <string name="sava_code_and_copy_id">保存收款码,并复制备注</string>
<string name="paypal_payment">使用PayPal支付</string>
<string name="pay_tip2">我们已将二维码图像存放到了您的设备上。是否现在跳转至%1$s付款?</string> <string name="pay_tip2">我们已将二维码图像存放到了您的设备上。是否现在跳转至%1$s付款?</string>
<string name="qq">QQ</string> <string name="qq">QQ</string>
<string name="wechat">微信</string> <string name="wechat">微信</string>
@ -871,6 +875,7 @@
<string name="setting_dynamic_color" translatable="false">DynamicColor</string> <string name="setting_dynamic_color" translatable="false">DynamicColor</string>
<string name="dynamic_color_tip">跟随设备壁纸更换主题色。</string> <string name="dynamic_color_tip">跟随设备壁纸更换主题色。</string>
<string name="dynamic_color_disabled">此设备不支持动态颜色。</string> <string name="dynamic_color_disabled">此设备不支持动态颜色。</string>
<string name="an_unsupported_file_type">不支持的文件格式%1$s。</string>
<string name="title">标题</string> <string name="title">标题</string>
<string name="search_type_mod">模组</string> <string name="search_type_mod">模组</string>
<string name="search_type_user">用户</string> <string name="search_type_user">用户</string>
@ -891,6 +896,7 @@
<string name="setting_file_list_action_sort_by_last_modified" translatable="false">ByLastModified</string> <string name="setting_file_list_action_sort_by_last_modified" translatable="false">ByLastModified</string>
<string name="file_sort_type">文件排序方式</string> <string name="file_sort_type">文件排序方式</string>
<string name="setting_file_sort_type" translatable="false">FileSortType</string> <string name="setting_file_sort_type" translatable="false">FileSortType</string>
<string name="setting_simple_display_of_auto_complete_menu" translatable="false">SimpleDisplayOfAutoCompleteMenu</string>
<string name="template_id">模板id</string> <string name="template_id">模板id</string>
<string name="customize_edit_text">定制编辑框</string> <string name="customize_edit_text">定制编辑框</string>
<string name="subscription">订阅</string> <string name="subscription">订阅</string>
@ -923,5 +929,8 @@
<string name="search_suggestions_null">无搜索建议。</string> <string name="search_suggestions_null">无搜索建议。</string>
<string name="search_suggestions_loading">获取搜索建议...</string> <string name="search_suggestions_loading">获取搜索建议...</string>
<string name="search_suggestions_number">共%1$d个搜索建议。</string> <string name="search_suggestions_number">共%1$d个搜索建议。</string>
<string name="simple_display_of_auto_complete_menu_describe">隐藏自动完成菜单内的描述和图像。</string>
<string name="simple_display_of_auto_complete_menu">简版自动完成菜单</string>
<string name="search_key">搜索关键字</string>
</resources> </resources>

View File

@ -94,6 +94,12 @@
app:title="@string/custom_symbol" app:title="@string/custom_symbol"
app:useSimpleSummaryProvider="true" /> app:useSimpleSummaryProvider="true" />
<SwitchPreference
android:defaultValue="true"
android:key="@string/setting_simple_display_of_auto_complete_menu"
android:title="@string/simple_display_of_auto_complete_menu"
android:summary="@string/simple_display_of_auto_complete_menu_describe"/>
<SeekBarPreference <SeekBarPreference
android:max="160" android:max="160"
app:key="@string/setting_identifiers_prompt_number" app:key="@string/setting_identifiers_prompt_number"

View File

@ -19,25 +19,14 @@ class ListParser(val context: Context, val data: ListParserDataBean) : TemplateP
private val itemList: List<String> = data.itemList.split(",") private val itemList: List<String> = data.itemList.split(",")
private val dataList: List<String>? = data.dataList?.split(",") private val dataList: List<String>? = data.dataList?.split(",")
override fun getInput(): String { override fun getInput(): String {
val index = parserListBinding.spacer.selectedItemPosition return parserListBinding.inputEditText.text.toString()
return if (dataList != null && dataList.size == itemList.size) {
dataList[index]
} else {
itemList[index]
}
} }
override val contextView: View override val contextView: View
get() { get() {
val adapter = parserListBinding.inputEditText.setSimpleItems(itemList.toTypedArray())
ArrayAdapter<String>( parserListBinding.inputLayout.hint = data.name
context,
android.R.layout.simple_spinner_dropdown_item,
itemList
)
parserListBinding.spacer.adapter = adapter
parserListBinding.nameView.text = data.name
return parserListBinding.root return parserListBinding.root
} }

View File

@ -4,15 +4,19 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="8dp"> android:padding="8dp">
<TextView
android:id="@+id/nameView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="提示" />
<Spinner <com.google.android.material.textfield.TextInputLayout
android:id="@+id/spacer" android:layout_width="match_parent"
android:layout_width="wrap_content" android:id="@+id/inputLayout"
android:layout_height="wrap_content">
<com.google.android.material.textfield.MaterialAutoCompleteTextView
android:layout_width="match_parent"
android:inputType="none"
android:id="@+id/inputEditText"
android:layout_height="wrap_content"/> android:layout_height="wrap_content"/>
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout> </LinearLayout>