正在迁移对话框。
This commit is contained in:
parent
f9dee274b0
commit
5e96af168f
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -27,8 +27,8 @@ android {
|
|||
applicationId "com.coldmint.rust.pro"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 32
|
||||
versionCode 19
|
||||
versionName "2.1 Beta1 (2022-9-1)"
|
||||
versionCode 21
|
||||
versionName "2.1 Bata1_patch4(2022-9-3)"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
@ -91,10 +91,10 @@ dependencies {
|
|||
implementation 'com.github.promeg:tinypinyin:2.0.3'
|
||||
implementation 'io.github.youth5201314:banner:2.2.2'
|
||||
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.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 project(path: ':assistantCoreLibrary')
|
||||
implementation project(path: ':dialog')
|
||||
|
@ -107,7 +107,7 @@ dependencies {
|
|||
implementation 'cat.ereza:customactivityoncrash:2.3.0'
|
||||
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.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.navigation:navigation-fragment-ktx:$nav_version"
|
||||
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 19,
|
||||
"versionName": "2.1 Beta1 (2022-9-1)",
|
||||
"versionCode": 21,
|
||||
"versionName": "2.1 Bata1_patch4(2022-9-3)",
|
||||
"outputFile": "app-release.apk"
|
||||
}
|
||||
],
|
||||
|
|
BIN
app/src/main/assets/dataBase_en.rdb
Normal file
BIN
app/src/main/assets/dataBase_en.rdb
Normal file
Binary file not shown.
|
@ -53,7 +53,8 @@ class AboutActivity : BaseActivity<ActivityAboutBinding>() {
|
|||
|
|
||||
|<p>《铁锈助手》2.0版本,用零零散散的时间开发了1年。开发语言以及开发环境都特别的正式了。</p>
|
||||
|<p>环境移到了电脑上使用《Android Studio》开发,开发语言也从java迁移至了Kotlin。</p>
|
||||
|<p>越来越正式了,更多的新功能也在慢慢的加入。</p>
|
||||
|
|
||||
|<p>为了安全使用了加固。</p>
|
||||
|
|
||||
|
|
||||
""".trimMargin()
|
||||
|
|
|
@ -8,11 +8,7 @@ import android.text.method.LinkMovementMethod
|
|||
import android.text.style.ClickableSpan
|
||||
import android.view.*
|
||||
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.rust.core.database.code.CodeDataBase
|
||||
import com.coldmint.rust.core.database.code.CodeInfo
|
||||
import com.coldmint.rust.core.database.code.SectionInfo
|
||||
|
@ -163,20 +159,18 @@ class CodeTableActivity : BaseActivity<ActivityCodeTableBinding>() {
|
|||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
when (item.itemId) {
|
||||
R.id.filter_units -> {
|
||||
MaterialDialog(this).show {
|
||||
title(R.string.filter).message(R.string.filter_tip)
|
||||
input(maxLength = 20, waitForPositiveButton = false) { dialog, text ->
|
||||
if (text.isNotEmpty()) {
|
||||
dialog.setActionButtonEnabled(WhichButton.POSITIVE, true)
|
||||
}
|
||||
}.positiveButton(R.string.dialog_ok, null) { dialog ->
|
||||
var key = dialog.getInputField().text.toString()
|
||||
InputDialog(this).setTitle(R.string.filter).setMessage(R.string.filter_tip)
|
||||
.setInputCanBeEmpty(false).setMaxNumber(20)
|
||||
.setPositiveButton(R.string.dialog_ok) { text ->
|
||||
var key = text
|
||||
if (key.length > 20) {
|
||||
key = key.substring(0, 20)
|
||||
}
|
||||
loadData(key)
|
||||
}.negativeButton(R.string.dialog_close)
|
||||
}
|
||||
true
|
||||
}.setNegativeButton(R.string.dialog_close) {
|
||||
|
||||
}.show()
|
||||
}
|
||||
android.R.id.home -> {
|
||||
ifNeedFinish()
|
||||
|
|
|
@ -12,7 +12,6 @@ import androidx.activity.result.ActivityResultLauncher
|
|||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.palette.graphics.Palette
|
||||
import com.afollestad.materialdialogs.utils.MDUtil.getWidthAndHeight
|
||||
import com.bumptech.glide.Glide
|
||||
import com.bumptech.glide.request.RequestOptions.bitmapTransform
|
||||
import com.coldmint.dialog.CoreDialog
|
||||
|
@ -62,8 +61,8 @@ class CustomizeEditTextActivity : BaseActivity<ActivityCustomizeEditTextBinding>
|
|||
val type = FileOperator.getFileType(file)
|
||||
if (type == "png" || type == "jpg") {
|
||||
val bitmap = BitmapFactory.decodeFile(path)
|
||||
val width = windowManager.getWidthAndHeight().first
|
||||
val height = windowManager.getWidthAndHeight().second
|
||||
val width = windowManager.defaultDisplay.width
|
||||
val height = windowManager.defaultDisplay.height
|
||||
val imageWidth = bitmap.width
|
||||
val imageHeight = bitmap.height
|
||||
if (width % imageWidth == 0 && height % imageHeight == 0) {
|
||||
|
|
|
@ -19,16 +19,12 @@ import androidx.drawerlayout.widget.DrawerLayout
|
|||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
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.request.RequestOptions
|
||||
import com.bumptech.glide.request.target.CustomTarget
|
||||
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.database.code.CodeDataBase
|
||||
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.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
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 jp.wasabeef.glide.transformations.BlurTransformation
|
||||
import java.io.File
|
||||
|
@ -161,32 +162,33 @@ class EditActivity : BaseActivity<ActivityEditBinding>() {
|
|||
fun loadMainObserve() {
|
||||
viewModel.needSaveLiveData.observe(this) {
|
||||
if (it) {
|
||||
MaterialDialog(this).show {
|
||||
title(R.string.edit_function).message(R.string.text_changed)
|
||||
.positiveButton(R.string.edit_function) {
|
||||
viewModel.saveAllFile(
|
||||
viewBinding.tabLayout.selectedTabPosition,
|
||||
viewBinding.codeEditor.text.toString()
|
||||
) {
|
||||
CoreDialog(this).setTitle(R.string.edit_function).setMessage(R.string.text_changed)
|
||||
.setPositiveButton(R.string.edit_function) {
|
||||
viewModel.saveAllFile(
|
||||
viewBinding.tabLayout.selectedTabPosition,
|
||||
viewBinding.codeEditor.text.toString()
|
||||
) {
|
||||
viewModel.needCheckAutoSave = false
|
||||
finish()
|
||||
}
|
||||
}.setNegativeButton(R.string.dialog_cancel) {
|
||||
|
||||
}.setNeutralButton(R.string.not_save_exit) {
|
||||
CoreDialog(this@EditActivity).setTitle(R.string.not_save_exit)
|
||||
.setMessage(R.string.not_save_exit_tip)
|
||||
.setNegativeButton(R.string.dialog_cancel) {
|
||||
|
||||
}
|
||||
.setPositiveButton(R.string.dialog_ok) {
|
||||
viewModel.needCheckAutoSave = false
|
||||
finish()
|
||||
}
|
||||
}.negativeButton(R.string.dialog_cancel)
|
||||
.neutralButton(R.string.not_save_exit).neutralButton {
|
||||
MaterialDialog(this@EditActivity).show {
|
||||
title(R.string.not_save_exit).message(R.string.not_save_exit_tip)
|
||||
.negativeButton(R.string.dialog_cancel)
|
||||
.positiveButton(R.string.dialog_ok) {
|
||||
viewModel.needCheckAutoSave = false
|
||||
finish()
|
||||
}.cancelable(false)
|
||||
}
|
||||
}.cancelable(false)
|
||||
}
|
||||
}.setCancelable(false).show()
|
||||
}.setCancelable(false).show()
|
||||
}
|
||||
}
|
||||
|
||||
viewModel.englishModeLiveData.observe(this) {
|
||||
viewModel.englishModeLiveData.observe(this)
|
||||
{
|
||||
rustLanguage.setEnglish(it)
|
||||
}
|
||||
|
||||
|
@ -225,7 +227,8 @@ class EditActivity : BaseActivity<ActivityEditBinding>() {
|
|||
// }
|
||||
// true
|
||||
// }
|
||||
viewModel.openedSourceFileListLiveData.observe(this) {
|
||||
viewModel.openedSourceFileListLiveData.observe(this)
|
||||
{
|
||||
viewBinding.tabLayout.removeAllTabs()
|
||||
viewBinding.tabLayout.isVisible = true
|
||||
it.forEach {
|
||||
|
@ -271,17 +274,14 @@ class EditActivity : BaseActivity<ActivityEditBinding>() {
|
|||
when (it.title.toString()) {
|
||||
getString(R.string.close) -> {
|
||||
if (openedSourceFile.isNeedSave()) {
|
||||
MaterialDialog(this).show {
|
||||
title(R.string.edit_function).message(
|
||||
R.string.text_changed
|
||||
).positiveButton(R.string.edit_function).positiveButton {
|
||||
CoreDialog(this).setTitle(R.string.edit_function)
|
||||
.setMessage(R.string.text_changed)
|
||||
.setPositiveButton(R.string.edit_function) {
|
||||
viewModel.saveOneFile(openedSourceFile)
|
||||
viewModel.closeFile(openedSourceFile)
|
||||
}
|
||||
.negativeButton(R.string.dialog_cancel).negativeButton {
|
||||
viewModel.closeFile(openedSourceFile)
|
||||
}
|
||||
}
|
||||
}.setNegativeButton(R.string.dialog_cancel) {
|
||||
viewModel.closeFile(openedSourceFile)
|
||||
}.show()
|
||||
} else {
|
||||
viewModel.closeFile(openedSourceFile)
|
||||
}
|
||||
|
@ -305,7 +305,8 @@ class EditActivity : BaseActivity<ActivityEditBinding>() {
|
|||
}
|
||||
}
|
||||
|
||||
viewModel.codeLiveData.observe(this) {
|
||||
viewModel.codeLiveData.observe(this)
|
||||
{
|
||||
// rustLanguage.autoCompleteProvider.setSourceFolder(
|
||||
// FileOperator.getSuperDirectory(
|
||||
// viewModel.getNowOpenFilePath()
|
||||
|
@ -319,7 +320,8 @@ class EditActivity : BaseActivity<ActivityEditBinding>() {
|
|||
}
|
||||
viewModel.loadingLiveData.observe(
|
||||
this
|
||||
) {
|
||||
)
|
||||
{
|
||||
if (it) {
|
||||
viewBinding.myProgressBar.isVisible = true
|
||||
viewBinding.codeEditor.isVisible = false
|
||||
|
@ -478,6 +480,7 @@ class EditActivity : BaseActivity<ActivityEditBinding>() {
|
|||
// initEndView()
|
||||
showRenewalTip()
|
||||
loadCustomStyle()
|
||||
loadSearchLayout()
|
||||
turretCoordinateResults =
|
||||
registerForActivityResult(ActivityResultContracts.StartActivityForResult()) {
|
||||
viewModel.reloadCode()
|
||||
|
@ -557,30 +560,26 @@ class EditActivity : BaseActivity<ActivityEditBinding>() {
|
|||
startActivityForResult(intent, 3)
|
||||
}
|
||||
getText(R.string.create_folder) -> {
|
||||
MaterialDialog(this).show {
|
||||
title(R.string.create_folder)
|
||||
input(maxLength = 255, waitForPositiveButton = false) { dialog, text ->
|
||||
if (text.length in 1..255) {
|
||||
dialog.setActionButtonEnabled(WhichButton.POSITIVE, true)
|
||||
InputDialog(this).setTitle(R.string.create_folder)
|
||||
.setHint(R.string.file_name)
|
||||
.setCancelable(false).setInputCanBeEmpty(false).setMaxNumber(255)
|
||||
.setErrorTip { s, textInputLayout ->
|
||||
val newFolder =
|
||||
File(editStartViewModel.loadPathLiveData.value + "/" + s)
|
||||
if (newFolder.exists()) {
|
||||
textInputLayout.error = getString(R.string.folder_error)
|
||||
} else {
|
||||
textInputLayout.isErrorEnabled = false
|
||||
}
|
||||
}.positiveButton(R.string.dialog_ok, null) { dialog ->
|
||||
val string = dialog.getInputField().text.toString()
|
||||
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 {
|
||||
file.mkdirs()
|
||||
editStartViewModel.reloadList()
|
||||
}
|
||||
}
|
||||
}.negativeButton(R.string.dialog_close)
|
||||
}
|
||||
}.setPositiveButton(R.string.dialog_ok) { i ->
|
||||
val newFolder =
|
||||
File(editStartViewModel.loadPathLiveData.value + "/" + i)
|
||||
val res = newFolder.mkdirs()
|
||||
editStartViewModel.reloadList()
|
||||
res
|
||||
}.setNegativeButton(R.string.dialog_cancel) {
|
||||
|
||||
}.show()
|
||||
}
|
||||
getText(R.string.copy_to_this) -> {
|
||||
viewModel.executorService.submit {
|
||||
|
@ -832,28 +831,19 @@ class EditActivity : BaseActivity<ActivityEditBinding>() {
|
|||
return@OnMenuItemClickListener false
|
||||
}
|
||||
val oldName = file.name
|
||||
MaterialDialog(this@EditActivity).show {
|
||||
title(R.string.rename)
|
||||
input(
|
||||
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()
|
||||
InputDialog(this).setTitle(R.string.rename).setMaxNumber(255)
|
||||
.setText(oldName).setPositiveButton(R.string.dialog_ok) { it ->
|
||||
val newName = it
|
||||
if (newName != oldName) {
|
||||
val reNameFile =
|
||||
File(editStartViewModel.loadPathLiveData.value + "/" + newName)
|
||||
file.renameTo(reNameFile)
|
||||
editStartViewModel.reloadList()
|
||||
}
|
||||
}.negativeButton(R.string.dialog_close)
|
||||
}
|
||||
true
|
||||
}.setNegativeButton(R.string.dialog_close) {
|
||||
|
||||
}.show()
|
||||
} else if (title == getString(R.string.remove_bookmark)) {
|
||||
viewBinding.editDrawerlayout.closeDrawer(GravityCompat.START)
|
||||
val removeBookmark =
|
||||
|
@ -957,7 +947,7 @@ class EditActivity : BaseActivity<ActivityEditBinding>() {
|
|||
}
|
||||
val codeToolAdapter = CodeToolAdapter(this, items)
|
||||
codeToolAdapter.setItemEvent { i, codeToolItemBinding, viewHolder, item ->
|
||||
codeToolItemBinding.root.setOnClickListener {
|
||||
codeToolItemBinding.codeTextItemView.setOnClickListener {
|
||||
if (item == getString(R.string.symbol11)) {
|
||||
GlobalMethod.showColorPickerDialog(this) {
|
||||
viewBinding.codeEditor.insertText(it, it.length)
|
||||
|
@ -978,7 +968,9 @@ class EditActivity : BaseActivity<ActivityEditBinding>() {
|
|||
).show()
|
||||
}
|
||||
} else if (item == getString(R.string.code_tip)) {
|
||||
// viewModel.executorService.submit {
|
||||
viewBinding.codeEditor.getComponent(EditorAutoCompletion::class.java)
|
||||
.requireCompletion()
|
||||
// viewModel.executorService.submit {
|
||||
// try {
|
||||
// val list = ArrayList<CompletionItem>()
|
||||
// //如果不包含:搜索键
|
||||
|
@ -1112,7 +1104,12 @@ class EditActivity : BaseActivity<ActivityEditBinding>() {
|
|||
)
|
||||
)
|
||||
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
|
||||
val path = viewModel.modClass?.modFile?.absolutePath ?: ""
|
||||
CompletionItemConverter.configurationFileConversion(
|
||||
|
@ -1275,10 +1272,9 @@ class EditActivity : BaseActivity<ActivityEditBinding>() {
|
|||
R.id.display_source_code -> {
|
||||
val file = File(viewModel.getNowOpenFilePath())
|
||||
val code = FileOperator.readFile(file)
|
||||
MaterialDialog(this, BottomSheet()).show {
|
||||
title(text = file.name).message(text = code).negativeButton(R.string.dialog_ok)
|
||||
.cancelable(false)
|
||||
}
|
||||
MaterialAlertDialogBuilder(this).setTitle(file.name).setMessage(code).setNegativeButton(R.string.dialog_ok){
|
||||
i,i2->
|
||||
}.setCancelable(false).show()
|
||||
}
|
||||
R.id.clear_code_cache -> {
|
||||
Snackbar.make(
|
||||
|
@ -1396,14 +1392,59 @@ class EditActivity : BaseActivity<ActivityEditBinding>() {
|
|||
viewBinding.codeEditor.redo()
|
||||
}
|
||||
R.id.search_view -> {
|
||||
viewBinding.codeEditor.searcher.stopSearch()
|
||||
viewBinding.codeEditor.beginSearchMode()
|
||||
viewBinding.searchLayout.isVisible = true
|
||||
viewBinding.allButton.isVisible = false
|
||||
viewBinding.replaceEditText.setText("")
|
||||
viewBinding.replaceEditText.isVisible = false
|
||||
viewBinding.findEditText.setText("")
|
||||
}
|
||||
}
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 打开侧滑
|
||||
*/
|
||||
|
|
|
@ -14,16 +14,13 @@ import android.view.View
|
|||
import android.widget.PopupMenu
|
||||
import android.widget.Toast
|
||||
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.request.RequestOptions
|
||||
import com.coldmint.dialog.InputDialog
|
||||
import com.coldmint.rust.core.dataBean.ApiResponse
|
||||
import com.coldmint.rust.core.dataBean.user.SpaceInfoData
|
||||
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.web.Community
|
||||
import com.coldmint.rust.core.web.ServerConfiguration
|
||||
|
@ -171,20 +168,20 @@ class EditUserInfoActivity : BaseActivity<ActivityEditUserInfoBinding>() {
|
|||
startIntent.putExtra("data", fileBundle)
|
||||
startActivityForResult(startIntent, 1)
|
||||
} else if (title == getString(R.string.from_url)) {
|
||||
MaterialDialog(this).show {
|
||||
title(R.string.from_url).message(R.string.from_url_tip)
|
||||
input(waitForPositiveButton = false) { dialog, text ->
|
||||
if (text.matches(Regex("^http://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?$|^https://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?$"))) {
|
||||
dialog.setActionButtonEnabled(WhichButton.POSITIVE, true)
|
||||
} else {
|
||||
dialog.setActionButtonEnabled(WhichButton.POSITIVE, false)
|
||||
}
|
||||
}.positiveButton(R.string.dialog_ok, null) { dialog ->
|
||||
val input = dialog.getInputField().text.toString()
|
||||
needCleanCache = true
|
||||
loadIcon(input)
|
||||
}.negativeButton(R.string.dialog_close)
|
||||
}
|
||||
InputDialog(this).setTitle(R.string.from_url).setMessage(R.string.from_url_tip).setErrorTip { s, textInputLayout ->
|
||||
if (s.matches(Regex("^http://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?$|^https://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?$"))) {
|
||||
textInputLayout.error = getString(R.string.from_url_tip)
|
||||
} else {
|
||||
textInputLayout.isErrorEnabled = false
|
||||
}
|
||||
}.setPositiveButton(R.string.dialog_ok){
|
||||
input->
|
||||
needCleanCache = true
|
||||
loadIcon(input)
|
||||
true
|
||||
}.setNegativeButton(R.string.dialog_close){
|
||||
|
||||
}.show()
|
||||
} else {
|
||||
val link = iconLink
|
||||
if (link != null) {
|
||||
|
@ -217,20 +214,22 @@ class EditUserInfoActivity : BaseActivity<ActivityEditUserInfoBinding>() {
|
|||
startIntent.putExtra("data", fileBundle)
|
||||
startActivityForResult(startIntent, 2)
|
||||
} else if (title == getString(R.string.from_url)) {
|
||||
MaterialDialog(this).show {
|
||||
title(R.string.from_url).message(R.string.from_url_tip)
|
||||
input(waitForPositiveButton = false) { dialog, text ->
|
||||
if (text.matches(Regex("^http://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?$|^https://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?$"))) {
|
||||
dialog.setActionButtonEnabled(WhichButton.POSITIVE, true)
|
||||
} else {
|
||||
dialog.setActionButtonEnabled(WhichButton.POSITIVE, false)
|
||||
}
|
||||
}.positiveButton(R.string.dialog_ok, null) { dialog ->
|
||||
val input = dialog.getInputField().text.toString()
|
||||
needCleanCache = true
|
||||
loadCover(input)
|
||||
}.negativeButton(R.string.dialog_close)
|
||||
}
|
||||
InputDialog(this).setTitle(R.string.from_url).setMessage(R.string.from_url_tip).setErrorTip { s, textInputLayout ->
|
||||
if (s.matches(Regex("^http://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?$|^https://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?$"))) {
|
||||
textInputLayout.error = getString(R.string.from_url_tip)
|
||||
} else {
|
||||
textInputLayout.isErrorEnabled = false
|
||||
}
|
||||
}.setPositiveButton(R.string.dialog_ok){
|
||||
input->
|
||||
needCleanCache = true
|
||||
loadCover(input)
|
||||
true
|
||||
}.setNegativeButton(R.string.dialog_close){
|
||||
|
||||
}.show()
|
||||
|
||||
|
||||
} else {
|
||||
val link = coverLink
|
||||
if (link != null) {
|
||||
|
|
|
@ -15,17 +15,11 @@ import android.net.Uri
|
|||
import android.os.*
|
||||
import android.view.*
|
||||
import android.widget.*
|
||||
import android.widget.Toast.makeText
|
||||
import androidx.activity.result.ActivityResultLauncher
|
||||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.core.view.isVisible
|
||||
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.coldmint.dialog.CoreDialog
|
||||
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.dialog.MaterialAlertDialogBuilder
|
||||
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 java.io.BufferedReader
|
||||
import java.io.File
|
||||
|
@ -49,6 +46,7 @@ import java.io.InputStreamReader
|
|||
import java.lang.Exception
|
||||
import java.util.*
|
||||
import java.util.concurrent.Executors
|
||||
import javax.sql.CommonDataSource
|
||||
import kotlin.collections.ArrayList
|
||||
|
||||
class FileManagerActivity : BaseActivity<ActivityFileBinding>() {
|
||||
|
@ -229,16 +227,16 @@ class FileManagerActivity : BaseActivity<ActivityFileBinding>() {
|
|||
// }
|
||||
FileManagerViewModel.StartType.DEFAULT, FileManagerViewModel.StartType.SELECT_FILE, FileManagerViewModel.StartType.SELECT_DIRECTORY -> {
|
||||
val popupMenu = PopupMenu(this@FileManagerActivity, viewBinding.fab)
|
||||
// if (mFileAdapter != null) {
|
||||
// val selectPath = mFileAdapter!!.selectPath
|
||||
// if (selectPath != null && mProcessFiles == false) {
|
||||
// if (mFileAdapter!!.isCopyFile) {
|
||||
// popupMenu.menu.add(R.string.copy_to_this)
|
||||
// } else {
|
||||
// popupMenu.menu.add(R.string.cut_to_this)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
if (adapter != null) {
|
||||
val selectPath = adapter!!.selectPath
|
||||
if (selectPath != null) {
|
||||
if (adapter!!.isCopyFile) {
|
||||
popupMenu.menu.add(R.string.copy_to_this)
|
||||
} else {
|
||||
popupMenu.menu.add(R.string.cut_to_this)
|
||||
}
|
||||
}
|
||||
}
|
||||
popupMenu.menu.add(R.string.create_unit)
|
||||
popupMenu.menu.add(R.string.create_folder)
|
||||
popupMenu.menu.add(R.string.select_file)
|
||||
|
@ -270,52 +268,63 @@ class FileManagerActivity : BaseActivity<ActivityFileBinding>() {
|
|||
getText(R.string.create_folder) -> {
|
||||
createFolderAction()
|
||||
}
|
||||
// getText(R.string.copy_to_this) -> {
|
||||
// Thread {
|
||||
// mProcessFiles = true
|
||||
// val oldFile = File(mFileAdapter!!.selectPath)
|
||||
// val newFile = File(directs.absolutePath + "/" + oldFile.name)
|
||||
// if (FileOperator.copyFiles(oldFile, newFile)) {
|
||||
// handler.post {
|
||||
// loadFiles(directs)
|
||||
// mFileAdapter!!.cleanSelectPath()
|
||||
// mProcessFiles = false
|
||||
// }
|
||||
// } else {
|
||||
// handler.post {
|
||||
// Toast.makeText(
|
||||
// this@FileManagerActivity,
|
||||
// getText(R.string.copy_failed),
|
||||
// Toast.LENGTH_SHORT
|
||||
// ).show()
|
||||
// mProcessFiles = false
|
||||
// }
|
||||
// }
|
||||
// }.start()
|
||||
// }
|
||||
// getText(R.string.cut_to_this) -> {
|
||||
// Thread {
|
||||
// mProcessFiles = true
|
||||
// val oldFile = File(mFileAdapter!!.selectPath)
|
||||
// val newFile = File(directs.absolutePath + "/" + oldFile.name)
|
||||
// if (FileOperator.removeFiles(oldFile, newFile)) {
|
||||
// handler.post {
|
||||
// loadFiles(directs)
|
||||
// mFileAdapter!!.cleanSelectPath()
|
||||
// mProcessFiles = false
|
||||
// }
|
||||
// } else {
|
||||
// handler.post {
|
||||
// Toast.makeText(
|
||||
// this@FileManagerActivity,
|
||||
// getText(R.string.cut_failed),
|
||||
// Toast.LENGTH_SHORT
|
||||
// ).show()
|
||||
// mProcessFiles = false
|
||||
// }
|
||||
// }
|
||||
// }.start()
|
||||
// }
|
||||
getText(R.string.copy_to_this) -> {
|
||||
val job = Job()
|
||||
val handler = Handler(Looper.getMainLooper())
|
||||
val scope = CoroutineScope(job)
|
||||
scope.launch {
|
||||
val oldFile = File(adapter!!.selectPath)
|
||||
val newFile =
|
||||
File(viewModel.getCurrentPath() + "/" + oldFile.name)
|
||||
DebugHelper.printLog(
|
||||
"文件管理器",
|
||||
"复制文件 旧文件${oldFile.absolutePath} 新文件${newFile.absolutePath}"
|
||||
)
|
||||
adapter!!.cleanSelectPath()
|
||||
if (FileOperator.copyFiles(oldFile, newFile)) {
|
||||
handler.post {
|
||||
viewModel.loadFiles(viewModel.getCurrentPath())
|
||||
}
|
||||
} else {
|
||||
|
||||
handler.post {
|
||||
Snackbar.make(
|
||||
viewBinding.fab,
|
||||
getText(R.string.copy_failed),
|
||||
Snackbar.LENGTH_SHORT
|
||||
).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
getText(R.string.cut_to_this) -> {
|
||||
val job = Job()
|
||||
val handler = Handler(Looper.getMainLooper())
|
||||
val scope = CoroutineScope(job)
|
||||
scope.launch {
|
||||
val oldFile = File(adapter!!.selectPath)
|
||||
val newFile =
|
||||
File(viewModel.getCurrentPath() + "/" + oldFile.name)
|
||||
DebugHelper.printLog(
|
||||
"文件管理器",
|
||||
"移动文件 旧文件${oldFile.absolutePath} 新文件${newFile.absolutePath}"
|
||||
)
|
||||
adapter!!.cleanSelectPath()
|
||||
if (FileOperator.removeFiles(oldFile, newFile)) {
|
||||
handler.post {
|
||||
viewModel.loadFiles(viewModel.getCurrentPath())
|
||||
}
|
||||
} else {
|
||||
handler.post {
|
||||
Snackbar.make(
|
||||
viewBinding.fab,
|
||||
getText(R.string.cut_failed),
|
||||
Snackbar.LENGTH_SHORT
|
||||
).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
false
|
||||
}
|
||||
|
@ -478,7 +487,7 @@ class FileManagerActivity : BaseActivity<ActivityFileBinding>() {
|
|||
* 使用系统文件选择器选择回调
|
||||
* @param uri Uri
|
||||
*/
|
||||
fun selectFileCallback(uri: Uri?){
|
||||
fun selectFileCallback(uri: Uri?) {
|
||||
val path = viewModel.parseFilePath(this, uri)
|
||||
if (path != null) {
|
||||
CoreDialog(this).setTitle(R.string.system_file_manager).setMessage(path)
|
||||
|
@ -520,7 +529,7 @@ class FileManagerActivity : BaseActivity<ActivityFileBinding>() {
|
|||
}
|
||||
systemFileManagerResultLauncher =
|
||||
registerForActivityResult(ActivityResultContracts.GetContent()) {
|
||||
selectFileCallback(it)
|
||||
selectFileCallback(it)
|
||||
}
|
||||
FastScrollerBuilder(viewBinding.recyclerView).useMd2Style()
|
||||
.setPopupTextProvider(adapter).build()
|
||||
|
@ -690,6 +699,26 @@ class FileManagerActivity : BaseActivity<ActivityFileBinding>() {
|
|||
).setAction(R.string.dialog_ok) {
|
||||
setResultAndFinish(file.absolutePath)
|
||||
}.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()
|
||||
}
|
||||
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
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ import androidx.core.view.isVisible
|
|||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
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.pro.adapters.AttachFileAdapter
|
||||
import com.coldmint.rust.pro.base.BaseActivity
|
||||
|
@ -145,9 +145,9 @@ class GlobalOperationsActivity : BaseActivity<ActivityGlobalOperationsBinding>()
|
|||
viewBinding.actionEditText1.text.toString(),
|
||||
viewBinding.actionEditText2.text.toString()
|
||||
)
|
||||
MaterialDialog(this).title(text = data).message(R.string.figure_out)
|
||||
.cancelable(false)
|
||||
.positiveButton(R.string.dialog_ok).show()
|
||||
CoreDialog(this).setTitle(data).setMessage(R.string.figure_out).setPositiveButton(R.string.dialog_ok){
|
||||
|
||||
}.setCancelable(false).show()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import android.view.LayoutInflater
|
|||
import android.widget.Toast
|
||||
import androidx.core.view.isVisible
|
||||
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.LocalTemplatePackage
|
||||
import com.coldmint.rust.core.dataBean.template.TemplateInfo
|
||||
|
@ -235,24 +235,23 @@ class ImporterActivity : BaseActivity<ActivityImporterBinding>() {
|
|||
}
|
||||
if (newInfo.versionNum < oldInfo.versionNum) {
|
||||
handler.post {
|
||||
MaterialDialog(this).show {
|
||||
title(text = oldInfo.name).cancelable(false).message(
|
||||
text = String.format(
|
||||
CoreDialog(this).setTitle(oldInfo.name).setCancelable(false)
|
||||
.setMessage(
|
||||
String.format(
|
||||
getString(R.string.covers_the_import),
|
||||
newInfo.versionName, oldInfo.versionName
|
||||
)
|
||||
).positiveButton(R.string.dialog_ok).positiveButton {
|
||||
).setPositiveButton(R.string.dialog_ok) {
|
||||
FileOperator.delete_files(templateDirectory)
|
||||
importTemplate(outputDirectory, templateDirectory)
|
||||
}.negativeButton(R.string.dialog_cancel).negativeButton {
|
||||
}.setNegativeButton(R.string.dialog_cancel) {
|
||||
viewBinding.okButton.setBackgroundColor(
|
||||
GlobalMethod.getColorPrimary(
|
||||
this@ImporterActivity
|
||||
)
|
||||
)
|
||||
viewBinding.okButton.setText(R.string.import_name)
|
||||
}
|
||||
}
|
||||
}.show()
|
||||
}
|
||||
return@Runnable
|
||||
} else {
|
||||
|
|
|
@ -183,11 +183,12 @@ class LibraryActivity : BaseActivity<ActivityLibraryBinding>() {
|
|||
if (canUseView) {
|
||||
setReturnButton()
|
||||
title = getString(R.string.libs)
|
||||
val divider = MaterialDividerItemDecoration(
|
||||
this,
|
||||
MaterialDividerItemDecoration.VERTICAL
|
||||
)
|
||||
viewBinding.libsView.addItemDecoration(
|
||||
DividerItemDecoration(
|
||||
this,
|
||||
DividerItemDecoration.VERTICAL
|
||||
)
|
||||
divider
|
||||
)
|
||||
viewBinding.libsView.layoutManager = LinearLayoutManager(this@LibraryActivity)
|
||||
val libAdapter = LibAdapter(this@LibraryActivity, getLibInfoList())
|
||||
|
|
|
@ -17,11 +17,6 @@ import android.util.Log
|
|||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
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.rust.core.dataBean.ApiResponse
|
||||
import com.coldmint.rust.core.dataBean.LoginRequestData
|
||||
|
@ -42,10 +37,10 @@ class LoginActivity : BaseActivity<ActivityLoginBinding>() {
|
|||
private var isLogin = false
|
||||
|
||||
private fun initAction() {
|
||||
immersionBar {
|
||||
transparentStatusBar().statusBarDarkFont(true)
|
||||
.transparentNavigationBar().navigationBarDarkIcon(true)
|
||||
}
|
||||
// immersionBar {
|
||||
// transparentStatusBar().statusBarDarkFont(true)
|
||||
// .transparentNavigationBar().navigationBarDarkIcon(true)
|
||||
// }
|
||||
Log.d("应用识别码", AppSettings.getValue(AppSettings.Setting.AppID, "无"))
|
||||
viewBinding.changeServerView.isVisible = BuildConfig.DEBUG
|
||||
viewBinding.changePasswordView.setOnClickListener {
|
||||
|
@ -147,27 +142,13 @@ class LoginActivity : BaseActivity<ActivityLoginBinding>() {
|
|||
} else {
|
||||
when (userData.message) {
|
||||
"请先激活您的账户" -> {
|
||||
MaterialDialog(this@LoginActivity).show {
|
||||
title(R.string.activate_the_account).message(R.string.activate_the_account_tip)
|
||||
.cancelable(false)
|
||||
input(
|
||||
maxLength = 6,
|
||||
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 ->
|
||||
InputDialog(this@LoginActivity).setTitle(R.string.activate_the_account)
|
||||
.setMessage(R.string.activate_the_account_tip)
|
||||
.setHint(R.string.verification_code)
|
||||
.setCancelable(false).setMaxNumber(6)
|
||||
.setPositiveButton(R.string.dialog_ok) { text ->
|
||||
User.activateAccount(account,
|
||||
dialog.getInputField().text.toString(),
|
||||
text,
|
||||
object : ApiCallBack<ApiResponse> {
|
||||
override fun onResponse(t: ApiResponse) {
|
||||
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(
|
||||
|
@ -226,32 +209,16 @@ class LoginActivity : BaseActivity<ActivityLoginBinding>() {
|
|||
override fun onResponse(t: ApiResponse) {
|
||||
viewBinding.button.isEnabled = true
|
||||
if (t.code == ServerConfiguration.Success_Code) {
|
||||
MaterialDialog(this@LoginActivity).show {
|
||||
title(R.string.verification).message(
|
||||
R.string.activate_the_account_tip
|
||||
)
|
||||
.cancelable(false)
|
||||
input(
|
||||
maxLength = 6,
|
||||
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 ->
|
||||
InputDialog(this@LoginActivity).setMaxNumber(
|
||||
6
|
||||
).setHint(R.string.verification_code)
|
||||
.setInputCanBeEmpty(false)
|
||||
.setTitle(R.string.verification)
|
||||
.setMessage(R.string.activate_the_account_tip)
|
||||
.setCancelable(false)
|
||||
.setPositiveButton(R.string.dialog_ok) { it ->
|
||||
User.changeAppId(account,
|
||||
dialog.getInputField().text.toString(),
|
||||
it,
|
||||
appId,
|
||||
object :
|
||||
ApiCallBack<ApiResponse> {
|
||||
|
@ -279,8 +246,11 @@ class LoginActivity : BaseActivity<ActivityLoginBinding>() {
|
|||
}
|
||||
|
||||
})
|
||||
}.negativeButton(R.string.dialog_close)
|
||||
}
|
||||
true
|
||||
}
|
||||
.setNegativeButton(R.string.dialog_close) {
|
||||
|
||||
}.show()
|
||||
} else {
|
||||
Snackbar.make(
|
||||
viewBinding.button,
|
||||
|
|
|
@ -7,11 +7,14 @@ import android.content.pm.PackageInfo
|
|||
import com.coldmint.rust.pro.tool.AppSettings
|
||||
import android.content.Intent
|
||||
import android.content.pm.PackageManager
|
||||
import android.content.res.Resources
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import android.os.*
|
||||
import android.util.Log
|
||||
import android.view.*
|
||||
import androidx.appcompat.app.ActionBarDrawerToggle
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
import androidx.core.view.GravityCompat
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
|
@ -20,7 +23,6 @@ import androidx.navigation.ui.AppBarConfiguration
|
|||
import androidx.navigation.ui.navigateUp
|
||||
import androidx.navigation.ui.setupActionBarWithNavController
|
||||
import androidx.navigation.ui.setupWithNavController
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.bumptech.glide.Glide
|
||||
import com.coldmint.dialog.CoreDialog
|
||||
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.tabs.TabLayout
|
||||
import com.google.gson.Gson
|
||||
import com.gyf.immersionbar.ImmersionBar
|
||||
import org.json.JSONObject
|
||||
import java.io.File
|
||||
import java.util.concurrent.Executors
|
||||
|
@ -107,6 +110,8 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
|||
)
|
||||
viewBinding.drawerlayout.addDrawerListener(actionToggle)
|
||||
actionToggle.syncState()
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -669,13 +674,11 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
|||
startViewModel.signatureErrorLiveData.observe(this) {
|
||||
if (it) {
|
||||
//显示签名错误
|
||||
MaterialDialog(this).show {
|
||||
title(R.string.sign_error).cancelable(false)
|
||||
.message(R.string.sign_error_message)
|
||||
.positiveButton(R.string.dialog_close) {
|
||||
finish()
|
||||
}
|
||||
}
|
||||
CoreDialog(this).setTitle(R.string.sign_error)
|
||||
.setMessage(R.string.sign_error_message).setCancelable(false)
|
||||
.setPositiveButton(R.string.dialog_close) {
|
||||
finish()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -709,6 +712,18 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
|||
useToolbarSetSupportActionBar()
|
||||
initNav()
|
||||
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()
|
||||
} else {
|
||||
startViewModel.initAllData()
|
||||
|
|
|
@ -15,10 +15,11 @@ import com.coldmint.rust.pro.adapters.TemplateItemAdapter
|
|||
import com.coldmint.rust.pro.base.BaseActivity
|
||||
import com.coldmint.rust.pro.databinding.ActivityNetworkTemplatePackageDetailsBinding
|
||||
import com.coldmint.rust.pro.tool.AppSettings
|
||||
import com.google.android.material.divider.MaterialDividerItemDecoration
|
||||
|
||||
class NetworkTemplatePackageDetailsActivity :
|
||||
BaseActivity<ActivityNetworkTemplatePackageDetailsBinding>() {
|
||||
// private var createDirectory: String? = null
|
||||
// private var createDirectory: String? = null
|
||||
override fun whenCreateActivity(savedInstanceState: Bundle?, canUseView: Boolean) {
|
||||
val id = intent.getStringExtra("id")
|
||||
if (id == null) {
|
||||
|
@ -31,11 +32,12 @@ class NetworkTemplatePackageDetailsActivity :
|
|||
title = getString(R.string.title)
|
||||
setReturnButton()
|
||||
viewBinding.recyclerView.layoutManager = LinearLayoutManager(this)
|
||||
val divider = MaterialDividerItemDecoration(
|
||||
this,
|
||||
MaterialDividerItemDecoration.VERTICAL
|
||||
)
|
||||
viewBinding.recyclerView.addItemDecoration(
|
||||
DividerItemDecoration(
|
||||
this,
|
||||
DividerItemDecoration.VERTICAL
|
||||
)
|
||||
divider
|
||||
)
|
||||
TemplatePhp.instance.getTemplateList(
|
||||
id,
|
||||
|
@ -52,10 +54,13 @@ class NetworkTemplatePackageDetailsActivity :
|
|||
)
|
||||
adapter.setItemEvent { i, itemTemplateBinding, viewHolder, template ->
|
||||
itemTemplateBinding.root.setOnClickListener {
|
||||
val intent = Intent(this@NetworkTemplatePackageDetailsActivity,TemplateMakerActivity::class.java)
|
||||
intent.putExtra("name",template.title)
|
||||
intent.putExtra("local",false)
|
||||
intent.putExtra("path",template.id)
|
||||
val intent = Intent(
|
||||
this@NetworkTemplatePackageDetailsActivity,
|
||||
TemplateMakerActivity::class.java
|
||||
)
|
||||
intent.putExtra("name", template.title)
|
||||
intent.putExtra("local", false)
|
||||
intent.putExtra("path", template.id)
|
||||
startActivity(intent)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ import android.view.ViewGroup
|
|||
import android.widget.PopupMenu
|
||||
import androidx.core.view.isVisible
|
||||
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.OrderListDataBean
|
||||
import com.coldmint.rust.core.interfaces.ApiCallBack
|
||||
|
@ -80,16 +80,11 @@ class OrderListActivity : BaseActivity<ActivityOrderListBinding>() {
|
|||
"设置订单" -> {
|
||||
when (data.state) {
|
||||
"false" -> {
|
||||
MaterialDialog(this@OrderListActivity).show {
|
||||
title(text = data.name).message(text = "确认收到" + data.account + "的付款了嘛?\n订单创建时间:" + data.createTime)
|
||||
.positiveButton(R.string.pay_yes)
|
||||
.positiveButton {
|
||||
confirmOrder(data.flag, true)
|
||||
}.negativeButton(R.string.pay_no)
|
||||
.negativeButton {
|
||||
confirmOrder(data.flag, false)
|
||||
}
|
||||
}
|
||||
CoreDialog(this@OrderListActivity).setTitle(data.name).setMessage("确认收到" + data.account + "的付款了嘛?\n订单创建时间:" + data.createTime).setPositiveButton(R.string.pay_yes){
|
||||
confirmOrder(data.flag, true)
|
||||
}.setNegativeButton(R.string.pay_no){
|
||||
confirmOrder(data.flag, false)
|
||||
}.show()
|
||||
}
|
||||
else -> {
|
||||
showToast("无需处理")
|
||||
|
@ -109,26 +104,23 @@ class OrderListActivity : BaseActivity<ActivityOrderListBinding>() {
|
|||
}
|
||||
|
||||
} else {
|
||||
MaterialDialog(this@OrderListActivity).show {
|
||||
title(text = data.name).message(
|
||||
text = String.format(
|
||||
getString(R.string.copy_orderid),
|
||||
data.flag
|
||||
)
|
||||
).positiveButton(R.string.copy).positiveButton {
|
||||
val flag = data.flag
|
||||
GlobalMethod.copyText(this@OrderListActivity, flag)
|
||||
Snackbar.make(
|
||||
viewBinding.progressBar,
|
||||
String.format(
|
||||
getString(R.string.copy_complete),
|
||||
flag
|
||||
),
|
||||
Snackbar.LENGTH_SHORT
|
||||
).show()
|
||||
}.cancelable(false)
|
||||
.negativeButton(R.string.dialog_cancel)
|
||||
}
|
||||
CoreDialog(this@OrderListActivity).setTitle(String.format(
|
||||
getString(R.string.copy_orderid),
|
||||
data.flag
|
||||
)).setPositiveButton(R.string.copy){
|
||||
val flag = data.flag
|
||||
GlobalMethod.copyText(this@OrderListActivity, flag)
|
||||
Snackbar.make(
|
||||
viewBinding.progressBar,
|
||||
String.format(
|
||||
getString(R.string.copy_complete),
|
||||
flag
|
||||
),
|
||||
Snackbar.LENGTH_SHORT
|
||||
).show()
|
||||
}.setNegativeButton(R.string.dialog_cancel){
|
||||
|
||||
}.setCancelable(false).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
package com.coldmint.rust.pro
|
||||
|
||||
import android.content.Intent
|
||||
import android.graphics.Color
|
||||
import android.graphics.Typeface
|
||||
import android.os.Bundle
|
||||
import android.os.CountDownTimer
|
||||
import android.text.Editable
|
||||
import android.text.SpannableString
|
||||
import android.text.Spanned
|
||||
import android.text.TextWatcher
|
||||
import android.view.View
|
||||
import android.widget.AdapterView
|
||||
import android.widget.Toast
|
||||
|
@ -20,7 +23,7 @@ import android.view.KeyEvent
|
|||
import android.view.LayoutInflater
|
||||
import android.view.MenuItem
|
||||
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.interfaces.ApiCallBack
|
||||
import com.coldmint.rust.core.tool.AppOperator
|
||||
|
@ -53,9 +56,14 @@ class PayActivity : BaseActivity<ActivityPayBinding>() {
|
|||
//倒计时器
|
||||
var countDownTimer: CountDownTimer? = null
|
||||
|
||||
val color by lazy {
|
||||
GlobalMethod.getColorPrimary(this)
|
||||
}
|
||||
|
||||
|
||||
override fun whenCreateActivity(savedInstanceState: Bundle?, canUseView: Boolean) {
|
||||
if (canUseView) {
|
||||
viewBinding.toolbar.title = getText(R.string.pay)
|
||||
title = getText(R.string.pay)
|
||||
setReturnButton()
|
||||
val thisIntent = intent
|
||||
val uuid = thisIntent.getStringExtra("uuid")
|
||||
|
@ -70,112 +78,129 @@ class PayActivity : BaseActivity<ActivityPayBinding>() {
|
|||
ServerConfiguration.getRealLink("/resources/image/Payment/Alipay.png")
|
||||
hashMap[getString(R.string.wechat_pay)] =
|
||||
ServerConfiguration.getRealLink("/resources/image/Payment/WeChat.png")
|
||||
val array = resources.getStringArray(R.array.pay_type_entries)
|
||||
viewBinding.typeSpinner.onItemSelectedListener =
|
||||
object : AdapterView.OnItemSelectedListener {
|
||||
override fun onItemSelected(
|
||||
parent: AdapterView<*>?,
|
||||
view: View?,
|
||||
position: Int,
|
||||
id: Long
|
||||
) {
|
||||
when (val type = array[position]) {
|
||||
getString(R.string.qq_pay), getString(R.string.alipay), getString(R.string.wechat_pay) -> {
|
||||
Glide.with(this@PayActivity)
|
||||
.load(hashMap[type]).apply(GlobalMethod.getRequestOptions())
|
||||
.into(viewBinding.baseImageView)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onNothingSelected(parent: AdapterView<*>?) {
|
||||
|
||||
}
|
||||
|
||||
Glide.with(this@PayActivity)
|
||||
.load(hashMap[getString(R.string.wechat_pay)]).apply(GlobalMethod.getRequestOptions())
|
||||
.into(viewBinding.baseImageView)
|
||||
viewBinding.typeAutoCompleteTextView.addTextChangedListener(object : TextWatcher {
|
||||
override fun beforeTextChanged(
|
||||
s: CharSequence?,
|
||||
start: Int,
|
||||
count: Int,
|
||||
after: Int
|
||||
) {
|
||||
}
|
||||
|
||||
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) -> {
|
||||
viewBinding.saveCode.text = getString(R.string.sava_code_and_copy_id)
|
||||
viewBinding.cardView.isVisible = true
|
||||
Glide.with(this@PayActivity)
|
||||
.load(hashMap[type]).apply(GlobalMethod.getRequestOptions())
|
||||
.into(viewBinding.baseImageView)
|
||||
}
|
||||
// getString(R.string.paypal) -> {
|
||||
// viewBinding.cardView.isVisible = false
|
||||
// viewBinding.saveCode.text = getString(R.string.paypal_payment)
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
viewBinding.saveCode.setOnClickListener {
|
||||
GlobalMethod.copyText(this, uuid)
|
||||
val type = array[viewBinding.typeSpinner.selectedItemPosition]
|
||||
val link = hashMap[type]
|
||||
val appName = when (type) {
|
||||
getString(R.string.qq_pay) -> {
|
||||
getString(R.string.qq)
|
||||
}
|
||||
getString(R.string.wechat_pay) -> {
|
||||
getString(R.string.wechat)
|
||||
}
|
||||
else -> {
|
||||
getString(R.string.alipay)
|
||||
}
|
||||
}
|
||||
val targetFile = File(AppSettings.dataRootDirectory + "/pay/" + type + ".png")
|
||||
//获取下载链接,保存二维码(如果二维码存在则不会保存)
|
||||
if (link != null && !targetFile.exists()) {
|
||||
val okHttpClient = ServerConfiguration.initOkHttpClient()
|
||||
val request = Request.Builder()
|
||||
.url(link).build()
|
||||
val call = okHttpClient.newCall(request)
|
||||
call.enqueue(object : Callback {
|
||||
override fun onFailure(call: Call, e: IOException) {
|
||||
Snackbar.make(
|
||||
viewBinding.saveCode,
|
||||
R.string.file_download_fail,
|
||||
Snackbar.LENGTH_SHORT
|
||||
).show()
|
||||
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)
|
||||
val type = viewBinding.typeAutoCompleteTextView.text.toString()
|
||||
val link = hashMap[type]
|
||||
val appName = when (type) {
|
||||
getString(R.string.qq_pay) -> {
|
||||
getString(R.string.qq)
|
||||
}
|
||||
|
||||
override fun onResponse(call: Call, response: Response) {
|
||||
val body = response.body
|
||||
if (body != null) {
|
||||
val inputStream = body.byteStream()
|
||||
FileOperator.copyFile(
|
||||
inputStream,
|
||||
targetFile
|
||||
)
|
||||
} else {
|
||||
getString(R.string.wechat_pay) -> {
|
||||
getString(R.string.wechat)
|
||||
}
|
||||
else -> {
|
||||
getString(R.string.alipay)
|
||||
}
|
||||
}
|
||||
val targetFile = File(AppSettings.dataRootDirectory + "/pay/" + type + ".png")
|
||||
//获取下载链接,保存二维码(如果二维码存在则不会保存)
|
||||
if (link != null && !targetFile.exists()) {
|
||||
val okHttpClient = ServerConfiguration.initOkHttpClient()
|
||||
val request = Request.Builder()
|
||||
.url(link).build()
|
||||
val call = okHttpClient.newCall(request)
|
||||
call.enqueue(object : Callback {
|
||||
override fun onFailure(call: Call, e: IOException) {
|
||||
Snackbar.make(
|
||||
viewBinding.saveCode,
|
||||
R.string.file_download_fail,
|
||||
Snackbar.LENGTH_SHORT
|
||||
).show()
|
||||
}
|
||||
|
||||
override fun onResponse(call: Call, response: Response) {
|
||||
val body = response.body
|
||||
if (body != null) {
|
||||
val inputStream = body.byteStream()
|
||||
FileOperator.copyFile(
|
||||
inputStream,
|
||||
targetFile
|
||||
)
|
||||
} else {
|
||||
Snackbar.make(
|
||||
viewBinding.saveCode,
|
||||
R.string.file_download_fail,
|
||||
Snackbar.LENGTH_SHORT
|
||||
).show()
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
AppOperator.updateTheAlbum(this, targetFile)
|
||||
CoreDialog(this).setTitle(R.string.pay).setMessage(String.format(
|
||||
getString(R.string.pay_tip2),
|
||||
appName
|
||||
)).setPositiveButton(R.string.dialog_ok){
|
||||
val packName = when (type) {
|
||||
getString(R.string.qq_pay) -> {
|
||||
"com.tencent.mobileqq"
|
||||
}
|
||||
getString(R.string.wechat_pay) -> {
|
||||
"com.tencent.mm"
|
||||
}
|
||||
else -> {
|
||||
"com.eg.android.AlipayGphone"
|
||||
}
|
||||
}
|
||||
if (AppOperator.isAppInstalled(this@PayActivity, packName)) {
|
||||
AppOperator.openApp(this@PayActivity, packName)
|
||||
} else {
|
||||
Snackbar.make(
|
||||
viewBinding.saveCode,
|
||||
String.format(
|
||||
getString(R.string.no_app_installed),
|
||||
appName
|
||||
),
|
||||
Snackbar.LENGTH_SHORT
|
||||
).show()
|
||||
}
|
||||
}.setNegativeButton(R.string.dialog_cancel){
|
||||
|
||||
})
|
||||
}.setCancelable(false).show()
|
||||
}
|
||||
AppOperator.updateTheAlbum(this, targetFile)
|
||||
MaterialDialog(this).show {
|
||||
title(R.string.pay).message(
|
||||
text = String.format(
|
||||
getString(R.string.pay_tip2),
|
||||
appName
|
||||
)
|
||||
)
|
||||
.positiveButton(R.string.dialog_ok).positiveButton {
|
||||
val packName = when (type) {
|
||||
getString(R.string.qq_pay) -> {
|
||||
"com.tencent.mobileqq"
|
||||
}
|
||||
getString(R.string.wechat_pay) -> {
|
||||
"com.tencent.mm"
|
||||
}
|
||||
else -> {
|
||||
"com.eg.android.AlipayGphone"
|
||||
}
|
||||
}
|
||||
if (AppOperator.isAppInstalled(this@PayActivity, packName)) {
|
||||
AppOperator.openApp(this@PayActivity, packName)
|
||||
} else {
|
||||
Snackbar.make(
|
||||
viewBinding.saveCode,
|
||||
String.format(getString(R.string.no_app_installed), appName),
|
||||
Snackbar.LENGTH_SHORT
|
||||
).show()
|
||||
}
|
||||
}.negativeButton(R.string.dialog_cancel).cancelable(false)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ActivationApp.instance.getOrderInfo(account, uuid, object : ApiCallBack<OrderDataBean> {
|
||||
|
@ -221,7 +246,7 @@ class PayActivity : BaseActivity<ActivityPayBinding>() {
|
|||
|
||||
override fun onFinish() {
|
||||
past = true
|
||||
viewBinding.typeSpinner.isEnabled = false
|
||||
viewBinding.typeAutoCompleteTextView.isEnabled = false
|
||||
viewBinding.baseImageView.isVisible = false
|
||||
viewBinding.payMoneyView.text = getString(R.string.order_timeout)
|
||||
viewBinding.saveCode.isEnabled = false
|
||||
|
@ -249,15 +274,13 @@ class PayActivity : BaseActivity<ActivityPayBinding>() {
|
|||
first = false
|
||||
} else {
|
||||
if (!past) {
|
||||
MaterialDialog(this).show {
|
||||
title(R.string.pay).message(R.string.is_paid).positiveButton(R.string.paid_yes)
|
||||
.positiveButton {
|
||||
finish()
|
||||
}
|
||||
.negativeButton(R.string.paid_no).negativeButton {
|
||||
askingQuit()
|
||||
}.cancelable(false).neutralButton(R.string.paid_continue)
|
||||
}
|
||||
CoreDialog(this).setTitle(R.string.pay).setMessage(R.string.is_paid).setPositiveButton(R.string.paid_yes){
|
||||
finish()
|
||||
}.setNegativeButton(R.string.paid_no){
|
||||
askingQuit()
|
||||
}.setNeutralButton(R.string.paid_continue){
|
||||
|
||||
}.setCancelable(false).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -287,17 +310,15 @@ class PayActivity : BaseActivity<ActivityPayBinding>() {
|
|||
countDownTimer?.cancel()
|
||||
finish()
|
||||
} else {
|
||||
MaterialDialog(this).show {
|
||||
title(R.string.paid_no).message(
|
||||
text = String.format(
|
||||
getString(R.string.preferential_price),
|
||||
difference
|
||||
)
|
||||
).positiveButton(R.string.dialog_ok).positiveButton {
|
||||
countDownTimer?.cancel()
|
||||
finish()
|
||||
}.negativeButton(R.string.dialog_cancel).cancelable(false)
|
||||
}
|
||||
CoreDialog(this).setTitle(R.string.paid_no).setMessage(String.format(
|
||||
getString(R.string.preferential_price),
|
||||
difference
|
||||
)).setPositiveButton(R.string.dialog_ok){
|
||||
countDownTimer?.cancel()
|
||||
finish()
|
||||
}.setNegativeButton(R.string.dialog_cancel){
|
||||
|
||||
}.setCancelable(false).show()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -316,8 +337,8 @@ class PayActivity : BaseActivity<ActivityPayBinding>() {
|
|||
val start2 = tip.indexOf("付") + 1
|
||||
val end2 = tip.indexOf("元")
|
||||
val spannableString = SpannableString(tip)
|
||||
val colorSpan = ForegroundColorSpan(Color.parseColor("#0099EE"))
|
||||
val colorSpan2 = ForegroundColorSpan(Color.parseColor("#0099EE"))
|
||||
val colorSpan = ForegroundColorSpan(color)
|
||||
val colorSpan2 = ForegroundColorSpan(color)
|
||||
spannableString.setSpan(
|
||||
colorSpan,
|
||||
start,
|
||||
|
|
|
@ -8,12 +8,11 @@ import android.view.LayoutInflater
|
|||
import com.coldmint.rust.pro.base.BaseActivity
|
||||
import android.view.View
|
||||
import androidx.core.view.isVisible
|
||||
import com.coldmint.dialog.CoreDialog
|
||||
import com.coldmint.rust.pro.tool.AppSettings
|
||||
import com.coldmint.rust.pro.tool.GlobalMethod
|
||||
import com.coldmint.rust.core.interfaces.ApiCallBack
|
||||
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.RegisterRequestData
|
||||
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.PassWord, passWord)
|
||||
AppSettings.forceSetValue(AppSettings.Setting.UserName, userName)
|
||||
MaterialDialog(this@RegisterActivity).show {
|
||||
title(R.string.register_successed).message(R.string.registration_success_message)
|
||||
.cancelable(false).positiveButton(R.string.close) {
|
||||
finish()
|
||||
}
|
||||
}
|
||||
CoreDialog(this@RegisterActivity).setTitle(R.string.register_successed)
|
||||
.setMessage(R.string.registration_success_message)
|
||||
.setCancelable(false).setPositiveButton(R.string.close) {
|
||||
finish()
|
||||
}.show()
|
||||
} else {
|
||||
val data = apiResponse.data
|
||||
if (data != null && ServerConfiguration.isEvent(data)) {
|
||||
|
|
|
@ -15,15 +15,9 @@ import android.widget.Toast
|
|||
import androidx.core.view.isVisible
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
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.coldmint.dialog.CoreDialog
|
||||
import com.coldmint.dialog.InputDialog
|
||||
import com.coldmint.rust.core.CompressionManager
|
||||
import com.coldmint.rust.core.ModClass
|
||||
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.databinding.LoadFileLayoutBinding
|
||||
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.gyf.immersionbar.ktx.fitsStatusBarView
|
||||
import com.yalantis.ucrop.UCrop
|
||||
|
@ -63,9 +59,10 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
|
|||
private val list by lazy {
|
||||
ArrayList<String>()
|
||||
}
|
||||
private val tags by lazy {
|
||||
ArrayList<String>()
|
||||
}
|
||||
|
||||
// private val tags by lazy {
|
||||
// ArrayList<String>()
|
||||
// }
|
||||
lateinit var screenshotAdapter: ScreenshotAdapter
|
||||
private var modClass: ModClass? = null
|
||||
private var iconLink: String? = null
|
||||
|
@ -122,12 +119,12 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
|
|||
showError("模组id为空")
|
||||
return
|
||||
}
|
||||
val account = AppSettings.getValue(AppSettings.Setting.Account, "")
|
||||
if (account.isBlank()) {
|
||||
val token = AppSettings.getValue(AppSettings.Setting.Token, "")
|
||||
if (token.isBlank()) {
|
||||
showError(getString(R.string.please_login_first))
|
||||
return
|
||||
}
|
||||
WebMod.instance.getInfo(account, modId, object : ApiCallBack<WebModInfoData> {
|
||||
WebMod.instance.getInfo(token, modId, object : ApiCallBack<WebModInfoData> {
|
||||
override fun onResponse(t: WebModInfoData) {
|
||||
if (t.code == ServerConfiguration.Success_Code) {
|
||||
loadLoadModeAction(t)
|
||||
|
@ -296,47 +293,44 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
|
|||
viewBinding.addScreenshotButton.setOnClickListener {
|
||||
val fromUrl = getString(R.string.from_url)
|
||||
val selectImage = getString(R.string.select_image)
|
||||
MaterialDialog(this).show {
|
||||
title(R.string.add).listItems(
|
||||
R.array.screenshot_addType,
|
||||
waitForPositiveButton = false
|
||||
) { dialog: MaterialDialog, index: Int, text: CharSequence ->
|
||||
when (text) {
|
||||
fromUrl -> {
|
||||
MaterialDialog(this@ReleaseModActivity).show {
|
||||
title(R.string.from_url).message(R.string.from_url_tip)
|
||||
input(waitForPositiveButton = false) { dialog, text ->
|
||||
if (text.matches(Regex("^http://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?$|^https://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?$"))) {
|
||||
dialog.setActionButtonEnabled(WhichButton.POSITIVE, true)
|
||||
} else {
|
||||
dialog.setActionButtonEnabled(WhichButton.POSITIVE, false)
|
||||
}
|
||||
}.positiveButton(R.string.dialog_ok, null) { dialog ->
|
||||
val input = dialog.getInputField().text.toString()
|
||||
screenshotAdapter.addItem(input)
|
||||
}.negativeButton(R.string.dialog_close)
|
||||
}
|
||||
}
|
||||
selectImage -> {
|
||||
val startIntent =
|
||||
Intent(this@ReleaseModActivity, FileManagerActivity::class.java)
|
||||
val fileBundle = Bundle()
|
||||
if (modClass != null) {
|
||||
fileBundle.putString("path", modClass!!.modFile.absolutePath)
|
||||
}
|
||||
fileBundle.putString("type", "selectFile")
|
||||
startIntent.putExtra("data", fileBundle)
|
||||
startActivityForResult(startIntent, 2)
|
||||
}
|
||||
else -> {
|
||||
Toast.makeText(this@ReleaseModActivity, "未知的操作", Toast.LENGTH_SHORT)
|
||||
.show()
|
||||
}
|
||||
val array = resources.getStringArray(R.array.screenshot_addType)
|
||||
MaterialAlertDialogBuilder(this).setTitle(R.string.add).setItems(array) { i, i2 ->
|
||||
val text = array[i2]
|
||||
when (text) {
|
||||
fromUrl -> {
|
||||
InputDialog(this).setTitle(R.string.from_url)
|
||||
.setMessage(R.string.from_url_tip).setErrorTip { s, textInputLayout ->
|
||||
if (s.matches(Regex("^http://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?$|^https://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?$"))) {
|
||||
textInputLayout.error = getString(R.string.from_url_tip)
|
||||
} else {
|
||||
textInputLayout.isErrorEnabled = false
|
||||
}
|
||||
}.setPositiveButton(R.string.dialog_ok) { input ->
|
||||
screenshotAdapter.addItem(input)
|
||||
true
|
||||
}.setNegativeButton(R.string.dialog_close) {
|
||||
|
||||
}.show()
|
||||
}
|
||||
dialog.dismiss()
|
||||
}.positiveButton(R.string.dialog_cancel)
|
||||
}
|
||||
selectImage -> {
|
||||
val startIntent =
|
||||
Intent(this@ReleaseModActivity, FileManagerActivity::class.java)
|
||||
val fileBundle = Bundle()
|
||||
if (modClass != null) {
|
||||
fileBundle.putString("path", modClass!!.modFile.absolutePath)
|
||||
}
|
||||
fileBundle.putString("type", "selectFile")
|
||||
startIntent.putExtra("data", fileBundle)
|
||||
startActivityForResult(startIntent, 2)
|
||||
}
|
||||
else -> {
|
||||
Toast.makeText(this@ReleaseModActivity, "未知的操作", Toast.LENGTH_SHORT)
|
||||
.show()
|
||||
}
|
||||
|
||||
}
|
||||
}.setPositiveButton(R.string.dialog_cancel) { i1, i2 ->
|
||||
}.show()
|
||||
}
|
||||
|
||||
|
||||
|
@ -381,19 +375,33 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
|
|||
val tag = s.toString()
|
||||
checkModTag(tag)
|
||||
lineParser.text = tag
|
||||
tags.clear()
|
||||
var isNotEmpty = false
|
||||
// tags.clear()
|
||||
viewBinding.chipGroup.removeAllViews()
|
||||
lineParser.analyse { lineNum, lineData, isEnd ->
|
||||
isNotEmpty = true
|
||||
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
|
||||
}
|
||||
if (tags.size > 0) {
|
||||
viewBinding.belongStackLabelView.labels = tags
|
||||
viewBinding.belongStackLabelView.isVisible = true
|
||||
} else {
|
||||
viewBinding.belongStackLabelView.isVisible = false
|
||||
}
|
||||
viewBinding.chipGroup.isVisible = isNotEmpty
|
||||
}
|
||||
|
||||
})
|
||||
|
@ -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() {
|
||||
|
@ -476,19 +471,19 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
|
|||
startIntent.putExtra("data", fileBundle)
|
||||
startActivityForResult(startIntent, 3)
|
||||
} else if (title == getString(R.string.from_url)) {
|
||||
MaterialDialog(this).show {
|
||||
title(R.string.from_url).message(R.string.from_url_tip)
|
||||
input(waitForPositiveButton = false) { dialog, text ->
|
||||
if (text.matches(Regex("^http://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?$|^https://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?$"))) {
|
||||
dialog.setActionButtonEnabled(WhichButton.POSITIVE, true)
|
||||
InputDialog(this).setTitle(R.string.from_url).setMessage(R.string.from_url_tip)
|
||||
.setErrorTip { s, textInputLayout ->
|
||||
if (s.matches(Regex("^http://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?$|^https://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?$"))) {
|
||||
textInputLayout.error = getString(R.string.from_url_tip)
|
||||
} else {
|
||||
dialog.setActionButtonEnabled(WhichButton.POSITIVE, false)
|
||||
textInputLayout.isErrorEnabled = false
|
||||
}
|
||||
}.positiveButton(R.string.dialog_ok, null) { dialog ->
|
||||
val input = dialog.getInputField().text.toString()
|
||||
}.setPositiveButton(R.string.dialog_ok) { input ->
|
||||
loadIcon(input)
|
||||
}.negativeButton(R.string.dialog_close)
|
||||
}
|
||||
true
|
||||
}.setNegativeButton(R.string.dialog_close) {
|
||||
|
||||
}.show()
|
||||
} else {
|
||||
val link = iconLink
|
||||
if (link != null) {
|
||||
|
@ -767,33 +762,32 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
|
|||
)
|
||||
} else {
|
||||
releaseModWork(
|
||||
modId, account, modName, modDescribe, versionName,
|
||||
modId, modName, modDescribe, versionName,
|
||||
tagsBuilder, file
|
||||
)
|
||||
}
|
||||
} else {
|
||||
MaterialDialog(this).show {
|
||||
title(R.string.using_mobile_networks).message(R.string.using_mobile_networks_msg)
|
||||
.positiveButton(R.string.only_one) {
|
||||
if (isUpdateMode) {
|
||||
updateModWork(
|
||||
modId,
|
||||
account,
|
||||
modName,
|
||||
modDescribe,
|
||||
updateLog,
|
||||
versionName,
|
||||
tagsBuilder,
|
||||
file
|
||||
)
|
||||
} else {
|
||||
releaseModWork(
|
||||
modId, account, modName, modDescribe, versionName,
|
||||
tagsBuilder, file
|
||||
)
|
||||
}
|
||||
CoreDialog(this).setTitle(R.string.using_mobile_networks)
|
||||
.setMessage(R.string.using_mobile_networks_msg)
|
||||
.setPositiveButton(R.string.only_one) {
|
||||
if (isUpdateMode) {
|
||||
updateModWork(
|
||||
modId,
|
||||
account,
|
||||
modName,
|
||||
modDescribe,
|
||||
updateLog,
|
||||
versionName,
|
||||
tagsBuilder,
|
||||
file
|
||||
)
|
||||
} else {
|
||||
releaseModWork(
|
||||
modId, modName, modDescribe, versionName,
|
||||
tagsBuilder, file
|
||||
)
|
||||
}
|
||||
negativeButton(R.string.always_allow) {
|
||||
}.setNegativeButton(R.string.always_allow) {
|
||||
AppSettings.setValue(AppSettings.Setting.UseMobileNetwork, true)
|
||||
if (isUpdateMode) {
|
||||
updateModWork(
|
||||
|
@ -808,15 +802,13 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
|
|||
)
|
||||
} else {
|
||||
releaseModWork(
|
||||
modId, account, modName, modDescribe, versionName,
|
||||
modId, modName, modDescribe, versionName,
|
||||
tagsBuilder, file
|
||||
)
|
||||
}
|
||||
}
|
||||
neutralButton(R.string.dialog_cancel) {
|
||||
}.setNeutralButton(R.string.dialog_cancel) {
|
||||
|
||||
}
|
||||
}
|
||||
}.show()
|
||||
}
|
||||
}
|
||||
AppOperator.NetWorkType.NetWorkType_Wifi -> {
|
||||
|
@ -833,7 +825,7 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
|
|||
)
|
||||
} else {
|
||||
releaseModWork(
|
||||
modId, account, modName, modDescribe, versionName,
|
||||
modId, modName, modDescribe, versionName,
|
||||
tagsBuilder, file
|
||||
)
|
||||
}
|
||||
|
@ -853,7 +845,6 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
|
|||
*/
|
||||
fun releaseModWork(
|
||||
modId: String,
|
||||
account: String,
|
||||
modName: String,
|
||||
modDescribe: String,
|
||||
versionName: String,
|
||||
|
@ -861,11 +852,10 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
|
|||
) {
|
||||
val loadFileLayoutBinding = LoadFileLayoutBinding.inflate(layoutInflater)
|
||||
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,
|
||||
AppSettings.getValue(AppSettings.Setting.Token, ""),
|
||||
modName,
|
||||
|
@ -904,15 +894,11 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
|
|||
|
||||
})
|
||||
}
|
||||
|
||||
MaterialDialog(this@ReleaseModActivity).show {
|
||||
title(R.string.release).message(
|
||||
text = t.message
|
||||
).positiveButton(R.string.dialog_ok).cancelable(false)
|
||||
.positiveButton {
|
||||
finish()
|
||||
}
|
||||
}
|
||||
CoreDialog(this@ReleaseModActivity).setTitle(R.string.release)
|
||||
.setMessage(t.message).setCancelable(false)
|
||||
.setPositiveButton(R.string.dialog_ok) {
|
||||
finish()
|
||||
}.show()
|
||||
} else {
|
||||
handleEvent(t)
|
||||
}
|
||||
|
@ -965,10 +951,11 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
|
|||
val loadFileLayoutBinding = LoadFileLayoutBinding.inflate(layoutInflater)
|
||||
loadFileLayoutBinding.LinearProgressIndicator.max = 100
|
||||
|
||||
val dialog = MaterialDialog(this).show {
|
||||
title(R.string.release).customView(view = loadFileLayoutBinding.root)
|
||||
.positiveButton(R.string.dialog_ok).cancelable(false)
|
||||
}
|
||||
val dialog = MaterialAlertDialogBuilder(this).setTitle(R.string.release)
|
||||
.setView(loadFileLayoutBinding.root).setPositiveButton(R.string.dialog_ok) { i1, i2 ->
|
||||
}.setCancelable(false).show()
|
||||
|
||||
|
||||
WebMod.instance.updateMod(AppSettings.getValue(AppSettings.Setting.AppID, ""), modId,
|
||||
account,
|
||||
modName,
|
||||
|
@ -1014,14 +1001,11 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
|
|||
})
|
||||
}
|
||||
|
||||
MaterialDialog(this@ReleaseModActivity).show {
|
||||
title(R.string.release).message(
|
||||
text = t.message
|
||||
).positiveButton(R.string.dialog_ok).cancelable(false)
|
||||
.positiveButton {
|
||||
finish()
|
||||
}
|
||||
}
|
||||
CoreDialog(this@ReleaseModActivity).setTitle(R.string.release).setMessage(
|
||||
t.message
|
||||
).setPositiveButton(R.string.dialog_ok) {
|
||||
finish()
|
||||
}.setCancelable(false).show()
|
||||
} else {
|
||||
handleEvent(t)
|
||||
}
|
||||
|
@ -1103,7 +1087,6 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
|
|||
}
|
||||
|
||||
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
super.onActivityResult(requestCode, resultCode, data)
|
||||
if (data == null) {
|
||||
|
|
|
@ -5,7 +5,6 @@ import android.text.Editable
|
|||
import android.text.TextWatcher
|
||||
import android.view.LayoutInflater
|
||||
import android.widget.ArrayAdapter
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.coldmint.rust.core.dataBean.ApiResponse
|
||||
import com.coldmint.rust.core.interfaces.ApiCallBack
|
||||
import com.coldmint.rust.core.web.Report
|
||||
|
|
|
@ -11,15 +11,18 @@ import android.view.LayoutInflater
|
|||
import android.widget.Toast
|
||||
import androidx.appcompat.app.AppCompatDelegate
|
||||
import androidx.preference.*
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.afollestad.materialdialogs.list.listItemsMultiChoice
|
||||
import com.bumptech.glide.Glide
|
||||
import com.coldmint.rust.core.tool.FileOperator
|
||||
import com.coldmint.rust.pro.databinding.ActivitySettingsBinding
|
||||
import com.coldmint.rust.pro.tool.GlobalMethod
|
||||
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.util.*
|
||||
import kotlin.collections.ArrayList
|
||||
import kotlin.concurrent.thread
|
||||
|
||||
class SettingsActivity : BaseActivity<ActivitySettingsBinding>() {
|
||||
|
@ -98,16 +101,26 @@ class SettingsActivity : BaseActivity<ActivitySettingsBinding>() {
|
|||
manager.findPreference<PreferenceScreen>(getString(R.string.setting_clear_cache))
|
||||
clearCache!!.onPreferenceClickListener =
|
||||
Preference.OnPreferenceClickListener {
|
||||
val items = ArrayList<String>()
|
||||
val listData = listOf<String>(
|
||||
getString(R.string.history_cache),
|
||||
getString(R.string.code_cache),
|
||||
getString(R.string.glide_cache)
|
||||
)
|
||||
MaterialDialog(requireContext()).show {
|
||||
title(R.string.clear_cache).listItemsMultiChoice(items = listData)
|
||||
{ dialog, indices, items ->
|
||||
MaterialAlertDialogBuilder(requireContext()).setTitle(R.string.clear_cache)
|
||||
.setMultiChoiceItems(listData.toTypedArray(), null) { dialog, index, bool ->
|
||||
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())
|
||||
thread {
|
||||
val job = Job()
|
||||
val scope = CoroutineScope(job)
|
||||
scope.launch {
|
||||
if (items.isNotEmpty()) {
|
||||
for (item in items) {
|
||||
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
|
||||
}
|
||||
|
||||
|
|
|
@ -15,9 +15,6 @@ import android.os.Looper
|
|||
import android.view.*
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
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.rust.core.LocalTemplatePackage
|
||||
import com.coldmint.rust.core.interfaces.LineParserEvent
|
||||
|
|
|
@ -22,7 +22,6 @@ import android.view.inputmethod.InputMethodManager
|
|||
import android.widget.*
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.coldmint.dialog.CoreDialog
|
||||
import com.coldmint.rust.core.LocalTemplatePackage
|
||||
import com.coldmint.rust.core.dataBean.InputParserDataBean
|
||||
|
@ -113,7 +112,9 @@ class TemplateParserActivity : BaseActivity<ActivityTemplateParserBinding>() {
|
|||
if (name.isNotBlank()) {
|
||||
val build = viewModel.buildFile(this, name)
|
||||
if (build) {
|
||||
setResult(RESULT_OK)
|
||||
val data = Intent()
|
||||
data.putExtra("File", viewModel.getOutputPath())
|
||||
setResult(RESULT_OK, data)
|
||||
finish()
|
||||
} else {
|
||||
Snackbar.make(
|
||||
|
|
|
@ -24,11 +24,13 @@ class ThanksActivity : BaseActivity<ActivityThanksBinding>() {
|
|||
if (canUseView) {
|
||||
title = getString(R.string.special_thanks_to)
|
||||
setReturnButton()
|
||||
val divider = MaterialDividerItemDecoration(
|
||||
this,
|
||||
MaterialDividerItemDecoration.VERTICAL
|
||||
)
|
||||
|
||||
viewBinding.recyclerView.addItemDecoration(
|
||||
DividerItemDecoration(
|
||||
this,
|
||||
DividerItemDecoration.VERTICAL
|
||||
)
|
||||
divider
|
||||
)
|
||||
viewBinding.recyclerView.layoutManager = LinearLayoutManager(this)
|
||||
val list = ArrayList<ThanksDataBean>()
|
||||
|
|
|
@ -12,12 +12,7 @@ import com.google.android.material.snackbar.Snackbar
|
|||
import android.view.*
|
||||
import android.widget.*
|
||||
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.customview.customView
|
||||
import com.afollestad.materialdialogs.input.getInputField
|
||||
import com.afollestad.materialdialogs.input.input
|
||||
import com.coldmint.dialog.InputDialog
|
||||
import com.coldmint.rust.core.database.code.CodeDataBase
|
||||
import com.coldmint.rust.core.tool.FileOperator
|
||||
import com.coldmint.rust.pro.adapters.ModPageAdapter
|
||||
|
@ -77,21 +72,19 @@ class UnitsActivity : BaseActivity<ActivityUnitsBinding>() {
|
|||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
when (item.itemId) {
|
||||
R.id.filter_units -> {
|
||||
MaterialDialog(this).show {
|
||||
title(R.string.filter).message(R.string.filter_tip)
|
||||
input(maxLength = 20, waitForPositiveButton = false) { dialog, text ->
|
||||
if (text.isNotEmpty()) {
|
||||
dialog.setActionButtonEnabled(WhichButton.POSITIVE, true)
|
||||
}
|
||||
}.positiveButton(R.string.dialog_ok, null) { dialog ->
|
||||
var key = dialog.getInputField().text.toString()
|
||||
InputDialog(this).setTitle(R.string.filter).setMessage(R.string.filter_tip)
|
||||
.setHint(R.string.key_word)
|
||||
.setMaxNumber(20).setInputCanBeEmpty(false)
|
||||
.setPositiveButton(R.string.dialog_ok) { text ->
|
||||
var key = text
|
||||
if (key.length > 20) {
|
||||
key = key.substring(0, 20)
|
||||
}
|
||||
viewBinding.tabLayout.selectTab(viewBinding.tabLayout.getTabAt(1))
|
||||
modPageAdapter.allUnitsFragment.filter(key)
|
||||
}.negativeButton(R.string.dialog_close)
|
||||
}
|
||||
true
|
||||
}.setNegativeButton(R.string.dialog_cancel) {
|
||||
}.show()
|
||||
}
|
||||
R.id.search_units -> {
|
||||
viewBinding.tabLayout.selectTab(viewBinding.tabLayout.getTabAt(1))
|
||||
|
@ -155,23 +148,21 @@ class UnitsActivity : BaseActivity<ActivityUnitsBinding>() {
|
|||
}
|
||||
|
||||
})
|
||||
MaterialDialog(this).show {
|
||||
title(R.string.search)
|
||||
customView(view = dialogSearchUnitsBinding.root)
|
||||
.positiveButton(R.string.dialog_ok).positiveButton {
|
||||
modPageAdapter.allUnitsFragment.advancedSearch(
|
||||
configuration = AllUnitsFragment.SearchConfiguration(
|
||||
dialogSearchUnitsBinding.unitNameInputView.text.toString(),
|
||||
dialogSearchUnitsBinding.fileNameInputView.text.toString(),
|
||||
dialogSearchUnitsBinding.matchesFileNamesByReBox.isChecked,
|
||||
dialogSearchUnitsBinding.fileContentInputView.text.toString(),
|
||||
dialogSearchUnitsBinding.advancedSearchBox.isChecked,
|
||||
dialogSearchUnitsBinding.isCodeBox.isChecked
|
||||
)
|
||||
MaterialAlertDialogBuilder(this).setTitle(R.string.search)
|
||||
.setView(dialogSearchUnitsBinding.root)
|
||||
.setPositiveButton(R.string.dialog_ok) { i, i1 ->
|
||||
modPageAdapter.allUnitsFragment.advancedSearch(
|
||||
configuration = AllUnitsFragment.SearchConfiguration(
|
||||
dialogSearchUnitsBinding.unitNameInputView.text.toString(),
|
||||
dialogSearchUnitsBinding.fileNameInputView.text.toString(),
|
||||
dialogSearchUnitsBinding.matchesFileNamesByReBox.isChecked,
|
||||
dialogSearchUnitsBinding.fileContentInputView.text.toString(),
|
||||
dialogSearchUnitsBinding.advancedSearchBox.isChecked,
|
||||
dialogSearchUnitsBinding.isCodeBox.isChecked
|
||||
)
|
||||
}
|
||||
.negativeButton(R.string.dialog_close)
|
||||
}
|
||||
)
|
||||
}.setNegativeButton(R.string.dialog_close) { i1, i2 ->
|
||||
}.show()
|
||||
}
|
||||
R.id.rebuild -> {
|
||||
MaterialAlertDialogBuilder(this).setTitle(R.string.rebuild_project)
|
||||
|
|
|
@ -12,16 +12,14 @@ import android.view.LayoutInflater
|
|||
import android.view.View
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import android.widget.EditText
|
||||
import androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
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.coldmint.dialog.CoreDialog
|
||||
import com.coldmint.rust.core.dataBean.ApiResponse
|
||||
import com.coldmint.rust.core.dataBean.user.SpaceInfoData
|
||||
import com.coldmint.rust.core.interfaces.ApiCallBack
|
||||
import com.coldmint.rust.core.tool.DebugHelper
|
||||
import com.coldmint.rust.core.web.*
|
||||
import com.coldmint.rust.pro.adapters.UserHomeStateAdapter
|
||||
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.tabs.TabLayout
|
||||
import com.google.android.material.tabs.TabLayoutMediator
|
||||
import com.gyf.immersionbar.ImmersionBar
|
||||
import com.gyf.immersionbar.ktx.immersionBar
|
||||
|
||||
|
||||
|
@ -53,10 +52,26 @@ class UserHomePageActivity : BaseActivity<ActivityUserHomePageBinding>() {
|
|||
|
||||
@SuppressLint("CheckResult")
|
||||
private fun initView() {
|
||||
// immersionBar {
|
||||
// transparentStatusBar().statusBarDarkFont(true)
|
||||
// .navigationBarDarkIcon(true)
|
||||
// }
|
||||
if (ImmersionBar.hasNavigationBar(this)) {
|
||||
val layoutParams =
|
||||
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 temUserId = thisIntent.getStringExtra("userId")
|
||||
|
@ -84,17 +99,6 @@ class UserHomePageActivity : BaseActivity<ActivityUserHomePageBinding>() {
|
|||
openUserList(userId, false)
|
||||
}
|
||||
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
|
||||
if (cover != null) {
|
||||
Glide.with(this).load(ServerConfiguration.getRealLink(cover))
|
||||
.apply(GlobalMethod.getRequestOptions())
|
||||
.into(viewBinding.coverView)
|
||||
}
|
||||
|
||||
|
@ -429,50 +432,49 @@ class UserHomePageActivity : BaseActivity<ActivityUserHomePageBinding>() {
|
|||
}
|
||||
getString(R.string.followed), getString(R.string.each_other_follow) -> {
|
||||
val de = String.format(getString(R.string.defollow_tip), userName ?: userId)
|
||||
MaterialDialog(this).show {
|
||||
title(R.string.defollow).message(text = de)
|
||||
.positiveButton(R.string.dialog_ok).positiveButton {
|
||||
viewBinding.button.setBackgroundColor(
|
||||
GlobalMethod.getThemeColor(
|
||||
this@UserHomePageActivity,
|
||||
R.attr.colorPrimaryVariant
|
||||
)
|
||||
CoreDialog(this).setTitle(R.string.defollow).setMessage(de)
|
||||
.setPositiveButton(R.string.dialog_ok) {
|
||||
viewBinding.button.setBackgroundColor(
|
||||
GlobalMethod.getThemeColor(
|
||||
this@UserHomePageActivity,
|
||||
R.attr.colorPrimaryVariant
|
||||
)
|
||||
viewBinding.button.setText(R.string.request_data)
|
||||
Community.deFollow(
|
||||
account,
|
||||
userId,
|
||||
object : ApiCallBack<ApiResponse> {
|
||||
override fun onResponse(t: ApiResponse) {
|
||||
viewBinding.button.setBackgroundColor(
|
||||
GlobalMethod.getColorPrimary(
|
||||
this@UserHomePageActivity
|
||||
)
|
||||
)
|
||||
viewBinding.button.setText(R.string.request_data)
|
||||
Community.deFollow(
|
||||
account,
|
||||
userId,
|
||||
object : ApiCallBack<ApiResponse> {
|
||||
override fun onResponse(t: ApiResponse) {
|
||||
viewBinding.button.setBackgroundColor(
|
||||
GlobalMethod.getColorPrimary(
|
||||
this@UserHomePageActivity
|
||||
)
|
||||
if (t.code == ServerConfiguration.Success_Code) {
|
||||
fans--
|
||||
viewBinding.fansNumView.text =
|
||||
ServerConfiguration.numberToString(fans)
|
||||
viewBinding.button.text =
|
||||
getString(R.string.follow)
|
||||
} else {
|
||||
Snackbar.make(
|
||||
viewBinding.button,
|
||||
t.message,
|
||||
Snackbar.LENGTH_SHORT
|
||||
).show()
|
||||
viewBinding.button.text = type
|
||||
}
|
||||
)
|
||||
if (t.code == ServerConfiguration.Success_Code) {
|
||||
fans--
|
||||
viewBinding.fansNumView.text =
|
||||
ServerConfiguration.numberToString(fans)
|
||||
viewBinding.button.text =
|
||||
getString(R.string.follow)
|
||||
} else {
|
||||
Snackbar.make(
|
||||
viewBinding.button,
|
||||
t.message,
|
||||
Snackbar.LENGTH_SHORT
|
||||
).show()
|
||||
viewBinding.button.text = type
|
||||
}
|
||||
}
|
||||
|
||||
override fun onFailure(e: Exception) {
|
||||
showInternetError(viewBinding.button, e)
|
||||
}
|
||||
override fun onFailure(e: Exception) {
|
||||
showInternetError(viewBinding.button, e)
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
}.setNegativeButton(R.string.dialog_cancel) {
|
||||
|
||||
}.negativeButton(R.string.dialog_cancel)
|
||||
}.show()
|
||||
}
|
||||
getString(R.string.editData) -> {
|
||||
val intent = Intent(this, EditUserInfoActivity::class.java)
|
||||
|
|
|
@ -20,6 +20,7 @@ import com.coldmint.rust.core.web.ServerConfiguration
|
|||
import com.coldmint.rust.pro.adapters.UserAdapter
|
||||
import com.coldmint.rust.pro.base.BaseActivity
|
||||
import com.coldmint.rust.pro.databinding.ActivityUserListBinding
|
||||
import com.google.android.material.divider.MaterialDividerItemDecoration
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
|
||||
class UserListActivity : BaseActivity<ActivityUserListBinding>() {
|
||||
|
@ -70,11 +71,13 @@ class UserListActivity : BaseActivity<ActivityUserListBinding>() {
|
|||
}
|
||||
viewBinding.recyclerView.layoutManager =
|
||||
LinearLayoutManager(this@UserListActivity)
|
||||
val divider = MaterialDividerItemDecoration(
|
||||
this,
|
||||
MaterialDividerItemDecoration.VERTICAL
|
||||
)
|
||||
|
||||
viewBinding.recyclerView.addItemDecoration(
|
||||
DividerItemDecoration(
|
||||
this,
|
||||
DividerItemDecoration.VERTICAL
|
||||
)
|
||||
divider
|
||||
)
|
||||
loadList(account, isFollowMode, canRemoveFans)
|
||||
}
|
||||
|
|
|
@ -290,7 +290,7 @@ class ValueTypeActivity : BaseActivity<ActivityValueTypeBinding>() {
|
|||
|
||||
override fun whenCreateActivity(savedInstanceState: Bundle?, canUseView: Boolean) {
|
||||
if (canUseView) {
|
||||
viewBinding.toolbar.title = getText(R.string.value_type_manager)
|
||||
title = getText(R.string.value_type_manager)
|
||||
viewBinding.valueList.layoutManager = LinearLayoutManager(this@ValueTypeActivity)
|
||||
setReturnButton()
|
||||
loadList()
|
||||
|
|
|
@ -23,6 +23,7 @@ import com.coldmint.rust.pro.base.BaseActivity
|
|||
import com.coldmint.rust.pro.databinding.ActivityWorkmangementBinding
|
||||
import com.coldmint.rust.pro.tool.AppSettings
|
||||
import com.coldmint.rust.pro.tool.GlobalMethod
|
||||
import com.google.android.material.divider.MaterialDividerItemDecoration
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
|
||||
/**
|
||||
|
@ -259,11 +260,13 @@ class WorkManagementActivity : BaseActivity<ActivityWorkmangementBinding>() {
|
|||
title = getString(R.string.work_management)
|
||||
setReturnButton()
|
||||
viewBinding.recyclerView.layoutManager = LinearLayoutManager(this)
|
||||
val divider = MaterialDividerItemDecoration(
|
||||
this,
|
||||
MaterialDividerItemDecoration.VERTICAL
|
||||
)
|
||||
|
||||
viewBinding.recyclerView.addItemDecoration(
|
||||
DividerItemDecoration(
|
||||
this,
|
||||
DividerItemDecoration.VERTICAL
|
||||
)
|
||||
divider
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ package com.coldmint.rust.pro.adapters
|
|||
|
||||
import android.widget.BaseExpandableListAdapter
|
||||
import android.view.LayoutInflater
|
||||
import com.kongzue.stacklabelview.interfaces.OnLabelClickListener
|
||||
import android.view.ViewGroup
|
||||
import com.coldmint.rust.pro.R
|
||||
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.tool.AppSettings
|
||||
import com.coldmint.rust.pro.tool.GlobalMethod
|
||||
import com.google.android.material.chip.Chip
|
||||
import java.util.concurrent.Executors
|
||||
|
||||
class CodeTableAdapter(
|
||||
|
@ -131,9 +131,9 @@ class CodeTableAdapter(
|
|||
val resultView: CodeTableItemBinding =
|
||||
CodeTableItemBinding.inflate(layoutInflater, parent, false)
|
||||
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.setOnClickListener {
|
||||
GlobalMethod.copyText(context, codeInfo.description, it)
|
||||
|
@ -147,13 +147,22 @@ class CodeTableAdapter(
|
|||
GlobalMethod.copyText(context, codeInfo.code, it)
|
||||
}
|
||||
resultView.valueTypeView.text = typeNameMap?.get(codeInfo.type) ?: codeInfo.type
|
||||
val list = ArrayList<String>()
|
||||
lineParser.text = codeInfo.section
|
||||
resultView.chipGroup.removeAllViews()
|
||||
var isNotEmpty = false
|
||||
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.chipGroup.addView(chip)
|
||||
true
|
||||
}
|
||||
resultView.belongStackLabelView.isVisible = list.isNotEmpty()
|
||||
resultView.belongStackLabelView.labels = list
|
||||
|
||||
resultView.chipGroup.isVisible = isNotEmpty
|
||||
resultView.valueTypeView.setOnClickListener {
|
||||
val handler = Handler(Looper.getMainLooper())
|
||||
executorService.submit {
|
||||
|
|
|
@ -9,7 +9,6 @@ import android.content.Intent
|
|||
import android.net.Uri
|
||||
import android.view.View
|
||||
import android.widget.ImageView
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import android.widget.TextView
|
||||
import androidx.core.view.isVisible
|
||||
import com.coldmint.rust.pro.base.BaseAdapter
|
||||
|
|
|
@ -24,6 +24,7 @@ import com.coldmint.rust.pro.base.BaseAdapter
|
|||
import com.coldmint.rust.pro.databinding.TemplateBottomDialogBinding
|
||||
import com.coldmint.rust.pro.databinding.TemplateListItemBinding
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialog
|
||||
import com.google.android.material.divider.MaterialDividerItemDecoration
|
||||
import java.io.File
|
||||
|
||||
class TemplateListAdapter(
|
||||
|
@ -316,11 +317,13 @@ class TemplateListAdapter(
|
|||
}
|
||||
}
|
||||
templateBottomDialogBinding.templateActionList.adapter = adapter
|
||||
val divider = MaterialDividerItemDecoration(
|
||||
context,
|
||||
MaterialDividerItemDecoration.VERTICAL
|
||||
)
|
||||
|
||||
templateBottomDialogBinding.templateActionList.addItemDecoration(
|
||||
DividerItemDecoration(
|
||||
context,
|
||||
DividerItemDecoration.VERTICAL
|
||||
)
|
||||
divider
|
||||
)
|
||||
bottomSheetDialog.show()
|
||||
}
|
||||
|
|
|
@ -13,15 +13,18 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy
|
|||
import com.coldmint.rust.pro.base.BaseAdapter
|
||||
import com.coldmint.rust.pro.databinding.UnitItemBinding
|
||||
import com.coldmint.rust.pro.tool.GlobalMethod
|
||||
import me.zhanghai.android.fastscroll.PopupTextProvider
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
import kotlin.Exception
|
||||
|
||||
class UnitAdapter(
|
||||
context: Context,
|
||||
context: Context,
|
||||
dataList: MutableList<SourceFile>,
|
||||
val key: String
|
||||
) : BaseAdapter<UnitItemBinding, SourceFile>(context, dataList) {
|
||||
) : BaseAdapter<UnitItemBinding, SourceFile>(context, dataList), PopupTextProvider {
|
||||
|
||||
|
||||
|
||||
private val language: String by lazy {
|
||||
AppSettings.getValue(
|
||||
|
@ -29,8 +32,15 @@ class UnitAdapter(
|
|||
Locale.getDefault().language
|
||||
)
|
||||
}
|
||||
|
||||
private val formatter = SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
|
||||
|
||||
init {
|
||||
dataList.sortBy {
|
||||
getInitial(it.getName(language))
|
||||
}
|
||||
}
|
||||
|
||||
override fun getViewBindingObject(
|
||||
layoutInflater: LayoutInflater,
|
||||
parent: ViewGroup,
|
||||
|
@ -82,5 +92,9 @@ class UnitAdapter(
|
|||
}
|
||||
}
|
||||
|
||||
override fun getPopupText(position: Int): String {
|
||||
return getInitial(dataList[position].getName(language)).toString()
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -5,7 +5,6 @@ import android.content.ServiceConnection
|
|||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import android.widget.PopupMenu
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.bumptech.glide.Glide
|
||||
import com.coldmint.rust.core.dataBean.ApiResponse
|
||||
import com.coldmint.rust.core.dataBean.mod.WebModAllInfoData
|
||||
|
|
|
@ -17,7 +17,6 @@ import androidx.core.view.WindowCompat
|
|||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.viewbinding.ViewBinding
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.coldmint.dialog.CoreDialog
|
||||
import com.coldmint.rust.pro.R
|
||||
import com.google.android.material.appbar.MaterialToolbar
|
||||
|
@ -131,9 +130,7 @@ abstract class BaseActivity<ViewBingType : ViewBinding> :
|
|||
* @param msg String
|
||||
*/
|
||||
protected fun showDialog(msg: String) {
|
||||
MaterialDialog(this).show {
|
||||
message(text = msg)
|
||||
}
|
||||
CoreDialog(this).setMessage(msg).show()
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -163,10 +160,10 @@ abstract class BaseActivity<ViewBingType : ViewBinding> :
|
|||
Snackbar.LENGTH_SHORT
|
||||
)
|
||||
.setAction(R.string.show_details) {
|
||||
MaterialDialog(this).show {
|
||||
title(R.string.details).message(text = thisMsg)
|
||||
.positiveButton(R.string.dialog_ok)
|
||||
}
|
||||
CoreDialog(this).setTitle(R.string.details).setMessage( thisMsg)
|
||||
.setPositiveButton(R.string.dialog_ok){
|
||||
|
||||
}.show()
|
||||
}.show()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,8 @@ class RustAutoCompleteProvider {
|
|||
|
||||
private val key = "自动完成提供者"
|
||||
private val jobList = ArrayList<AutoCompleteJob>()
|
||||
companion object{
|
||||
|
||||
companion object {
|
||||
var keyWord = ""
|
||||
}
|
||||
|
||||
|
@ -58,31 +59,40 @@ class RustAutoCompleteProvider {
|
|||
} else {
|
||||
//行内容
|
||||
val lineData = contentReference.getLine(charPosition.getLine())
|
||||
if (lineData.isBlank()) {
|
||||
DebugHelper.printLog(requireKey, "行内容为空,无需提示。")
|
||||
return
|
||||
}
|
||||
//光标前内容
|
||||
val cursorPrefix = lineData.subSequence(0, charPosition.getColumn()).toString()
|
||||
val symbolIndex = cursorPrefix.lastIndexOf(':')
|
||||
keyWord = if (symbolIndex > 0) {
|
||||
//有冒号
|
||||
cursorPrefix.substring(symbolIndex + 1)
|
||||
keyWord = if (lineData.isNullOrBlank()) {
|
||||
""
|
||||
} else {
|
||||
//无
|
||||
cursorPrefix
|
||||
//光标前内容
|
||||
val cursorPrefix = lineData.subSequence(0, charPosition.getColumn()).toString()
|
||||
val symbolIndex = cursorPrefix.lastIndexOf(':')
|
||||
if (symbolIndex > 0) {
|
||||
//有冒号
|
||||
cursorPrefix.substring(symbolIndex + 1)
|
||||
} else {
|
||||
//无
|
||||
cursorPrefix
|
||||
}
|
||||
}
|
||||
var executeNumber = 0
|
||||
jobList.forEach {
|
||||
//如果需要执行
|
||||
if (it.needPerform(contentReference, charPosition)) {
|
||||
executeNumber++
|
||||
it.requireAutoComplete(
|
||||
contentReference,
|
||||
charPosition,
|
||||
completionPublisher,
|
||||
lineData, keyWord
|
||||
)
|
||||
if (keyWord.isBlank()) {
|
||||
DebugHelper.printLog(key, "${it.getName()}执行了空关键字响应。", requireKey)
|
||||
it.respondingEmptyKeyword(
|
||||
contentReference,
|
||||
charPosition,
|
||||
completionPublisher, lineData
|
||||
)
|
||||
} else {
|
||||
it.requireAutoComplete(
|
||||
contentReference,
|
||||
charPosition,
|
||||
completionPublisher,
|
||||
lineData, keyWord
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
DebugHelper.printLog(key, "执行了${executeNumber}个任务。", requireKey)
|
||||
|
|
|
@ -12,7 +12,9 @@ import com.bumptech.glide.Glide
|
|||
import android.text.style.ForegroundColorSpan
|
||||
import android.util.TypedValue
|
||||
import androidx.core.view.isVisible
|
||||
import com.coldmint.rust.pro.R
|
||||
import com.coldmint.rust.pro.databinding.EditItemBinding
|
||||
import com.coldmint.rust.pro.tool.AppSettings
|
||||
import com.coldmint.rust.pro.tool.GlobalMethod
|
||||
import io.github.rosemoe.sora.widget.component.EditorCompletionAdapter
|
||||
import java.util.*
|
||||
|
@ -29,17 +31,36 @@ class RustCompletionAdapter : EditorCompletionAdapter() {
|
|||
private val layoutInflater by lazy {
|
||||
LayoutInflater.from(context)
|
||||
}
|
||||
private val simpleDisplayOfAutoCompleteMenu by lazy {
|
||||
AppSettings.getValue(AppSettings.Setting.SimpleDisplayOfAutoCompleteMenu, true)
|
||||
}
|
||||
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 var useEditBackground = false
|
||||
|
||||
/**
|
||||
* 使用编辑器背景
|
||||
* @param enable Boolean
|
||||
*/
|
||||
fun setEditBackground(enable: Boolean) {
|
||||
useEditBackground = enable
|
||||
}
|
||||
|
||||
override fun getView(
|
||||
position: Int,
|
||||
view: View?,
|
||||
parent: ViewGroup,
|
||||
isCurrentCursorPosition: Boolean
|
||||
): View {
|
||||
|
||||
val editItem = EditItemBinding.inflate(layoutInflater, parent, false)
|
||||
if (useEditBackground) {
|
||||
editItem.root.setBackgroundResource(R.drawable.edit_item_background)
|
||||
}
|
||||
val completionItem = getItem(position) as RustCompletionItem
|
||||
spannableStringBuilder.clear()
|
||||
val label = completionItem.title
|
||||
|
@ -47,7 +68,10 @@ class RustCompletionAdapter : EditorCompletionAdapter() {
|
|||
//节补丁
|
||||
if (RustAutoCompleteProvider.keyWord.startsWith('[') && RustAutoCompleteProvider.keyWord.length > 1) {
|
||||
RustAutoCompleteProvider.keyWord =
|
||||
RustAutoCompleteProvider.keyWord.subSequence(0, RustAutoCompleteProvider.keyWord.length)
|
||||
RustAutoCompleteProvider.keyWord.subSequence(
|
||||
0,
|
||||
RustAutoCompleteProvider.keyWord.length
|
||||
)
|
||||
.toString()
|
||||
}
|
||||
val start = label.lowercase(Locale.getDefault())
|
||||
|
@ -63,15 +87,26 @@ class RustCompletionAdapter : EditorCompletionAdapter() {
|
|||
spannableStringBuilder.setSpan(bold, start, end, Spanned.SPAN_INCLUSIVE_EXCLUSIVE)
|
||||
}
|
||||
editItem.titleView.text = spannableStringBuilder
|
||||
editItem.contentView.text = completionItem.desc
|
||||
if (completionItem.subtitle != null) {
|
||||
editItem.subTitleView.text = completionItem.subtitle
|
||||
} else {
|
||||
if (simpleDisplayOfAutoCompleteMenu) {
|
||||
editItem.contentView.isVisible = false
|
||||
editItem.subTitleView.isVisible = false
|
||||
}
|
||||
val icon = completionItem.icon
|
||||
if (icon != null) {
|
||||
Glide.with(context).load(icon).apply(GlobalMethod.getRequestOptions()).into(editItem.iconView)
|
||||
editItem.iconView.isVisible = false
|
||||
|
||||
} else {
|
||||
editItem.contentView.isVisible = true
|
||||
editItem.subTitleView.isVisible = true
|
||||
editItem.iconView.isVisible = true
|
||||
editItem.contentView.text = completionItem.desc
|
||||
if (completionItem.subtitle != null) {
|
||||
editItem.subTitleView.text = completionItem.subtitle
|
||||
} else {
|
||||
editItem.subTitleView.isVisible = false
|
||||
}
|
||||
val icon = completionItem.icon
|
||||
if (icon != null) {
|
||||
Glide.with(context).load(icon).apply(GlobalMethod.getRequestOptions())
|
||||
.into(editItem.iconView)
|
||||
}
|
||||
}
|
||||
return editItem.root
|
||||
}
|
||||
|
|
|
@ -1,24 +1,40 @@
|
|||
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.text.Content
|
||||
import io.github.rosemoe.sora.text.TextRange
|
||||
|
||||
class RustFormatter : Formatter {
|
||||
private val key = "Rust代码格式化"
|
||||
private var formatResultReceiver: Formatter.FormatResultReceiver? = null
|
||||
private var running = false
|
||||
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) {
|
||||
// io.github.rosemoe. ora.lang. Format . formatter将给定的内容从开始位置格式化到结束位置
|
||||
// 直接格式化内容,并调用Formatter。FormatResultReceiver用于在格式化完成时从编辑器接收格式化的内容
|
||||
DebugHelper.printLog(key, "调用了格式化区域${p0} 文本范围${p1}")
|
||||
|
||||
}
|
||||
|
||||
override fun setReceiver(p0: Formatter.FormatResultReceiver?) {
|
||||
|
||||
//设置结果接收器
|
||||
DebugHelper.printLog(key, "设置了结果接收器 为空?${p0 == null}")
|
||||
formatResultReceiver = p0
|
||||
}
|
||||
|
||||
override fun isRunning(): Boolean {
|
||||
return false
|
||||
return running
|
||||
}
|
||||
|
||||
override fun destroy() {
|
||||
|
|
|
@ -68,6 +68,7 @@ class RustLanguage() : Language, EnglishMode {
|
|||
private var codeDataBase: CodeDataBase? = null
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 设置代码数据库
|
||||
* @param codeDataBean CodeDataBase
|
||||
|
|
|
@ -17,7 +17,7 @@ interface AutoCompleteJob {
|
|||
/**
|
||||
* 获取工作名称
|
||||
*/
|
||||
fun getName():String
|
||||
fun getName(): String
|
||||
|
||||
|
||||
/**
|
||||
|
@ -31,6 +31,18 @@ interface AutoCompleteJob {
|
|||
charPosition: CharPosition
|
||||
): Boolean
|
||||
|
||||
|
||||
/**
|
||||
* 处理空白关键字,或者行内容响应
|
||||
* 即不输入任何内容执行的操作
|
||||
* @return Boolean 返回true即响应,返回false反之
|
||||
*/
|
||||
fun respondingEmptyKeyword(
|
||||
contentReference: ContentReference,
|
||||
charPosition: CharPosition,
|
||||
completionPublisher: CompletionPublisher, lineData: String
|
||||
)
|
||||
|
||||
/**
|
||||
* 请求自动完成
|
||||
* @param contentReference ContentReference
|
||||
|
@ -44,7 +56,7 @@ interface AutoCompleteJob {
|
|||
charPosition: CharPosition,
|
||||
completionPublisher: CompletionPublisher,
|
||||
lineData: String,
|
||||
keyWord:String
|
||||
keyWord: String
|
||||
)
|
||||
|
||||
}
|
|
@ -76,6 +76,35 @@ class CodeAutoCompleteJob : AutoCompleteJob {
|
|||
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(
|
||||
contentReference: ContentReference,
|
||||
charPosition: CharPosition,
|
||||
|
|
|
@ -14,6 +14,7 @@ import android.view.LayoutInflater
|
|||
import android.view.View
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import androidx.recyclerview.widget.DividerItemDecoration
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.coldmint.rust.core.ModClass
|
||||
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.databinding.FragmentAllUnitsBinding
|
||||
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.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
|
@ -51,6 +54,18 @@ class AllUnitsFragment(
|
|||
|
||||
override fun whenViewCreated(inflater: LayoutInflater, savedInstanceState: Bundle?) {
|
||||
viewBinding.unitList.layoutManager = LinearLayoutManager(requireContext())
|
||||
val divider = MaterialDividerItemDecoration(
|
||||
requireContext(),
|
||||
MaterialDividerItemDecoration.VERTICAL
|
||||
)
|
||||
|
||||
viewBinding.unitList.addItemDecoration(
|
||||
divider
|
||||
)
|
||||
viewBinding.swipeRefreshLayout.setOnRefreshListener {
|
||||
loadFiles()
|
||||
viewBinding.swipeRefreshLayout.isRefreshing = false
|
||||
}
|
||||
loadFiles()
|
||||
}
|
||||
|
||||
|
@ -129,7 +144,7 @@ class AllUnitsFragment(
|
|||
val handler = Handler(Looper.getMainLooper())
|
||||
executorService.submit {
|
||||
handler.post {
|
||||
viewBinding.unitList.isVisible = false
|
||||
viewBinding.swipeRefreshLayout.isVisible = false
|
||||
viewBinding.progressBar.isVisible = true
|
||||
viewBinding.unitError.isVisible = false
|
||||
}
|
||||
|
@ -166,7 +181,7 @@ class AllUnitsFragment(
|
|||
notFindUnits(handler)
|
||||
} else {
|
||||
handler.post {
|
||||
viewBinding.unitList.isVisible = true
|
||||
viewBinding.swipeRefreshLayout.isVisible = true
|
||||
viewBinding.progressBar.isVisible = false
|
||||
viewBinding.unitError.isVisible = false
|
||||
val adapter = UnitAdapter(requireContext(), dataList, "")
|
||||
|
@ -181,6 +196,8 @@ class AllUnitsFragment(
|
|||
loadFiles()
|
||||
}
|
||||
}
|
||||
FastScrollerBuilder(viewBinding.unitList).useMd2Style()
|
||||
.setPopupTextProvider(adapter).build()
|
||||
viewBinding.unitList.adapter = adapter
|
||||
whenNumberChanged?.invoke(dataList.size)
|
||||
}
|
||||
|
@ -196,7 +213,7 @@ class AllUnitsFragment(
|
|||
fun notFindUnits(handler: Handler? = null, key: String? = null, searchMode: Boolean = false) {
|
||||
val temHandler = handler ?: Handler(Looper.getMainLooper())
|
||||
temHandler.post {
|
||||
viewBinding.unitList.isVisible = false
|
||||
viewBinding.swipeRefreshLayout.isVisible = false
|
||||
viewBinding.progressBar.isVisible = false
|
||||
viewBinding.unitError.isVisible = true
|
||||
if (key != null) {
|
||||
|
@ -233,7 +250,7 @@ class AllUnitsFragment(
|
|||
val handler = Handler(Looper.getMainLooper())
|
||||
executorService.submit {
|
||||
handler.post {
|
||||
viewBinding.unitList.isVisible = false
|
||||
viewBinding.swipeRefreshLayout.isVisible = false
|
||||
viewBinding.progressBar.isVisible = true
|
||||
viewBinding.unitError.isVisible = false
|
||||
}
|
||||
|
@ -295,7 +312,7 @@ class AllUnitsFragment(
|
|||
notFindUnits(handler, searchMode = true)
|
||||
} else {
|
||||
handler.post {
|
||||
viewBinding.unitList.isVisible = true
|
||||
viewBinding.swipeRefreshLayout.isVisible = true
|
||||
viewBinding.progressBar.isVisible = false
|
||||
viewBinding.unitError.isVisible = true
|
||||
viewBinding.unitError.text = getString(R.string.search_tip)
|
||||
|
@ -343,7 +360,7 @@ class AllUnitsFragment(
|
|||
notFindUnits(handler, key)
|
||||
} else {
|
||||
handler.post {
|
||||
viewBinding.unitList.isVisible = true
|
||||
viewBinding.swipeRefreshLayout.isVisible = true
|
||||
viewBinding.progressBar.isVisible = false
|
||||
viewBinding.unitError.isVisible = true
|
||||
viewBinding.unitError.text = getString(R.string.not_find_units_action)
|
||||
|
|
|
@ -33,12 +33,11 @@ import kotlin.collections.ArrayList
|
|||
|
||||
class DatabaseFragment : BaseFragment<FragmentDatabaseBinding>() {
|
||||
|
||||
|
||||
override fun whenViewCreated(inflater: LayoutInflater, savedInstanceState: Bundle?) {
|
||||
fun loadList() {
|
||||
viewBinding.databaseList.layoutManager = LinearLayoutManager(requireContext())
|
||||
val database_directory = AppSettings.getValue(
|
||||
AppSettings.Setting.DatabaseDirectory,
|
||||
requireContext().filesDir.absolutePath + "/database/"
|
||||
requireContext().filesDir.absolutePath + "/databases/"
|
||||
)
|
||||
val directory = File(database_directory)
|
||||
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 {
|
||||
return FragmentDatabaseBinding.inflate(layoutInflater)
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ import android.os.Looper
|
|||
import android.view.LayoutInflater
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import androidx.recyclerview.widget.DividerItemDecoration
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.coldmint.rust.core.ModClass
|
||||
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.base.BaseFragment
|
||||
import com.coldmint.rust.pro.databinding.FragmentHistoryBinding
|
||||
import com.google.android.material.divider.MaterialDividerItemDecoration
|
||||
import java.io.File
|
||||
import java.util.concurrent.ExecutorService
|
||||
import java.util.concurrent.Executors
|
||||
|
@ -34,6 +36,14 @@ class HistoryUnitFragment(
|
|||
val executorService: ExecutorService = Executors.newSingleThreadExecutor()
|
||||
override fun whenViewCreated(inflater: LayoutInflater, savedInstanceState: Bundle?) {
|
||||
viewBinding.unitList.layoutManager = LinearLayoutManager(requireContext())
|
||||
val divider = MaterialDividerItemDecoration(
|
||||
requireContext(),
|
||||
MaterialDividerItemDecoration.VERTICAL
|
||||
)
|
||||
|
||||
viewBinding.unitList.addItemDecoration(
|
||||
divider
|
||||
)
|
||||
loadList()
|
||||
}
|
||||
|
||||
|
@ -96,6 +106,7 @@ class HistoryUnitFragment(
|
|||
}
|
||||
}
|
||||
viewBinding.unitList.adapter = adapter
|
||||
|
||||
whenNumberChanged?.invoke(dataList.size)
|
||||
}
|
||||
}
|
||||
|
@ -110,12 +121,6 @@ class HistoryUnitFragment(
|
|||
fun openEditActivity(file: SourceFile) {
|
||||
val bundle = Bundle()
|
||||
val path = file.file.absolutePath
|
||||
// val name = fileClass.getName(
|
||||
// AppSettings.getValue(
|
||||
// AppSettings.Setting.AppLanguage,
|
||||
// Locale.getDefault().language
|
||||
// )
|
||||
// )
|
||||
bundle.putString("path", path)
|
||||
bundle.putString("modPath", modClass.modFile.absolutePath)
|
||||
val intent = Intent(requireContext(), EditActivity::class.java)
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.coldmint.rust.pro.fragments
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
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.web.WebMod
|
||||
import com.coldmint.rust.pro.R
|
||||
import com.coldmint.rust.pro.UserHomePageActivity
|
||||
import com.coldmint.rust.pro.adapters.InsertCoinsAdapter
|
||||
import com.coldmint.rust.pro.base.BaseFragment
|
||||
import com.coldmint.rust.pro.databinding.FragmentInsertCoinsBinding
|
||||
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?) {
|
||||
viewBinding.recyclerView.layoutManager = LinearLayoutManager(requireContext())
|
||||
val divider = MaterialDividerItemDecoration(
|
||||
requireContext(),
|
||||
MaterialDividerItemDecoration.VERTICAL
|
||||
)
|
||||
|
||||
viewBinding.recyclerView.addItemDecoration(
|
||||
DividerItemDecoration(
|
||||
requireContext(),
|
||||
DividerItemDecoration.VERTICAL
|
||||
)
|
||||
divider
|
||||
)
|
||||
viewBinding.swipeRefreshLayout.setOnRefreshListener {
|
||||
loadList(false)
|
||||
|
@ -85,8 +90,14 @@ class InsertCoinsFragment(val modId: String) : BaseFragment<FragmentInsertCoinsB
|
|||
viewBinding.loadLayout.isVisible = true
|
||||
viewBinding.coinRecordsView.text = getString(R.string.coin_records)
|
||||
} else {
|
||||
val adapter = InsertCoinsAdapter(requireContext(), dataList)
|
||||
adapter.setItemEvent { i, itemInsertCoinsBinding, viewHolder, data ->
|
||||
itemInsertCoinsBinding.imageView.setOnClickListener {
|
||||
gotoUserPage(data.account)
|
||||
}
|
||||
}
|
||||
viewBinding.recyclerView.adapter =
|
||||
InsertCoinsAdapter(requireContext(), dataList)
|
||||
adapter
|
||||
val data = getString(R.string.coin_records) + "(" + dataList.size + ")"
|
||||
viewBinding.coinRecordsView.text = data
|
||||
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() {
|
||||
WebMod.instance.getCoinStatus(token, modId, object : ApiCallBack<CoinStatusData> {
|
||||
override fun onResponse(t: CoinStatusData) {
|
||||
|
|
|
@ -14,6 +14,7 @@ import android.widget.TextView
|
|||
import android.widget.Toast
|
||||
import androidx.activity.result.ActivityResultLauncher
|
||||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.coldmint.dialog.CoreDialog
|
||||
import com.coldmint.rust.core.LocalTemplatePackage
|
||||
|
@ -133,6 +134,7 @@ class InstalledTemplateFragment : BaseFragment<FragmentInstalledTemplateBinding>
|
|||
registerForActivityResult(ActivityResultContracts.StartActivityForResult()) {
|
||||
if (it.resultCode == Activity.RESULT_OK) {
|
||||
Log.d("启动模板解析器", "收到成功回调,关闭界面。")
|
||||
requireActivity().setResult(AppCompatActivity.RESULT_OK, it.data)
|
||||
requireActivity().finish()
|
||||
} else {
|
||||
Log.w("启动模板解析器", "未收到有效回调。")
|
||||
|
|
|
@ -12,7 +12,7 @@ import androidx.core.content.FileProvider
|
|||
import androidx.core.view.isVisible
|
||||
import androidx.recyclerview.widget.DividerItemDecoration
|
||||
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.tool.AppOperator
|
||||
import com.coldmint.rust.core.tool.FileOperator
|
||||
|
@ -59,27 +59,27 @@ class MapFragment : BaseFragment<FragmentMapBinding>() {
|
|||
itemMapBinding.mapLinearlayout.setOnClickListener {
|
||||
val packName = "com.mirwanda.nottiled"
|
||||
val materialDialog =
|
||||
MaterialDialog(requireContext()).title(R.string.edit_map)
|
||||
.message(R.string.edit_map_tip)
|
||||
.negativeButton(R.string.dialog_close).cancelable(false)
|
||||
CoreDialog(requireContext()).setTitle(R.string.edit_map)
|
||||
.setMessage(R.string.edit_map_tip)
|
||||
.setNegativeButton(R.string.dialog_close) {
|
||||
|
||||
}.setCancelable(false)
|
||||
if (AppOperator.isAppInstalled(
|
||||
requireContext(),
|
||||
packName
|
||||
)
|
||||
) {
|
||||
materialDialog.positiveButton(R.string.open_nottiled)
|
||||
.positiveButton {
|
||||
materialDialog.dismiss()
|
||||
AppOperator.openApp(requireContext(), packName)
|
||||
}
|
||||
materialDialog.setPositiveButton(R.string.open_nottiled) {
|
||||
materialDialog.dismiss()
|
||||
AppOperator.openApp(requireContext(), packName)
|
||||
}
|
||||
} else {
|
||||
materialDialog.positiveButton(R.string.downlod_nottiled)
|
||||
.positiveButton {
|
||||
AppOperator.useBrowserAccessWebPage(
|
||||
requireContext(),
|
||||
"https://mint.lanzouo.com/ilXgJyfol8h"
|
||||
)
|
||||
}
|
||||
materialDialog.setPositiveButton(R.string.downlod_nottiled) {
|
||||
AppOperator.useBrowserAccessWebPage(
|
||||
requireContext(),
|
||||
"https://mint.lanzouo.com/ilXgJyfol8h"
|
||||
)
|
||||
}
|
||||
}
|
||||
materialDialog.show()
|
||||
}
|
||||
|
@ -137,11 +137,13 @@ class MapFragment : BaseFragment<FragmentMapBinding>() {
|
|||
|
||||
override fun whenViewCreated(inflater: LayoutInflater, savedInstanceState: Bundle?) {
|
||||
viewBinding.mapList.layoutManager = LinearLayoutManager(requireContext())
|
||||
val divider = MaterialDividerItemDecoration(
|
||||
requireContext(),
|
||||
MaterialDividerItemDecoration.VERTICAL
|
||||
)
|
||||
|
||||
viewBinding.mapList.addItemDecoration(
|
||||
DividerItemDecoration(
|
||||
requireContext(),
|
||||
DividerItemDecoration.VERTICAL
|
||||
)
|
||||
divider
|
||||
)
|
||||
val path = AppSettings.getValue(AppSettings.Setting.MapFolder, "")
|
||||
if (path.isNotBlank()) {
|
||||
|
|
|
@ -24,6 +24,7 @@ import com.coldmint.rust.pro.base.BaseFragment
|
|||
import com.coldmint.rust.pro.databinding.FragmentModCommentsBinding
|
||||
import com.coldmint.rust.pro.dialog.CommentDialog
|
||||
import com.coldmint.rust.pro.tool.AppSettings
|
||||
import com.google.android.material.divider.MaterialDividerItemDecoration
|
||||
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>() {
|
||||
override fun whenViewCreated(inflater: LayoutInflater, savedInstanceState: Bundle?) {
|
||||
viewBinding.recyclerView.layoutManager = LinearLayoutManager(requireContext())
|
||||
val divider = MaterialDividerItemDecoration(
|
||||
requireContext(),
|
||||
MaterialDividerItemDecoration.VERTICAL
|
||||
)
|
||||
|
||||
viewBinding.recyclerView.addItemDecoration(
|
||||
DividerItemDecoration(
|
||||
requireContext(),
|
||||
DividerItemDecoration.VERTICAL
|
||||
)
|
||||
divider
|
||||
)
|
||||
viewBinding.swipeRefreshLayout.setOnRefreshListener {
|
||||
loadCommentList(modId, false)
|
||||
|
|
|
@ -22,6 +22,7 @@ import com.coldmint.rust.pro.tool.AppSettings
|
|||
import com.coldmint.rust.pro.tool.GlobalMethod
|
||||
import com.coldmint.rust.pro.viewmodel.ModViewModel
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialog
|
||||
import com.google.android.material.divider.MaterialDividerItemDecoration
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Job
|
||||
|
@ -337,11 +338,12 @@ class ModFragment : BaseFragment<FragmentModBinding>() {
|
|||
|
||||
override fun whenViewCreated(inflater: LayoutInflater, savedInstanceState: Bundle?) {
|
||||
viewBinding.modList.layoutManager = LinearLayoutManager(context)
|
||||
val divider = MaterialDividerItemDecoration(
|
||||
requireContext(),
|
||||
MaterialDividerItemDecoration.VERTICAL
|
||||
)
|
||||
viewBinding.modList.addItemDecoration(
|
||||
DividerItemDecoration(
|
||||
requireContext(),
|
||||
DividerItemDecoration.VERTICAL
|
||||
)
|
||||
divider
|
||||
)
|
||||
viewBinding.swipeRefreshLayout.setOnRefreshListener {
|
||||
loadModList()
|
||||
|
|
|
@ -7,8 +7,8 @@ import android.view.LayoutInflater
|
|||
import android.view.View
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.bumptech.glide.Glide
|
||||
import com.coldmint.dialog.CoreDialog
|
||||
import com.coldmint.rust.core.dataBean.BannerItemDataBean
|
||||
import com.coldmint.rust.core.dataBean.mod.WebModListData
|
||||
import com.coldmint.rust.core.interfaces.ApiCallBack
|
||||
|
@ -163,10 +163,11 @@ class RecommendedFragment : BaseFragment<FragmentRecommendedBinding>() {
|
|||
val type = textStyleMaker.getType(data.link)
|
||||
val linkData = textStyleMaker.getData(data.link)
|
||||
if (type == null || linkData == null) {
|
||||
MaterialDialog(requireContext()).show {
|
||||
title(text = data.title).message(text = data.link)
|
||||
.positiveButton(R.string.dialog_ok)
|
||||
}
|
||||
CoreDialog(requireContext()).setTitle(data.title)
|
||||
.setMessage(data.link)
|
||||
.setPositiveButton(R.string.dialog_ok) {
|
||||
|
||||
}.setCancelable(false).show()
|
||||
} else {
|
||||
textStyleMaker.clickEvent(
|
||||
requireContext(),
|
||||
|
|
|
@ -19,6 +19,7 @@ import com.coldmint.rust.pro.adapters.WebTemplateAdapter
|
|||
import com.coldmint.rust.pro.base.BaseFragment
|
||||
import com.coldmint.rust.pro.databinding.FragmentTemplateCommunityBinding
|
||||
import com.coldmint.rust.pro.tool.AppSettings
|
||||
import com.google.android.material.divider.MaterialDividerItemDecoration
|
||||
import me.zhanghai.android.fastscroll.FastScrollerBuilder
|
||||
|
||||
/**
|
||||
|
@ -28,11 +29,12 @@ class TemplateCommunityFragment : BaseFragment<FragmentTemplateCommunityBinding>
|
|||
val token = AppSettings.getValue(AppSettings.Setting.Token, "")
|
||||
|
||||
override fun whenViewCreated(inflater: LayoutInflater, savedInstanceState: Bundle?) {
|
||||
val divider = MaterialDividerItemDecoration(
|
||||
requireContext(),
|
||||
MaterialDividerItemDecoration.VERTICAL
|
||||
)
|
||||
viewBinding.recyclerView.addItemDecoration(
|
||||
DividerItemDecoration(
|
||||
requireContext(),
|
||||
DividerItemDecoration.VERTICAL
|
||||
)
|
||||
divider
|
||||
)
|
||||
|
||||
viewBinding.recyclerView.layoutManager = LinearLayoutManager(requireContext())
|
||||
|
@ -55,10 +57,12 @@ class TemplateCommunityFragment : BaseFragment<FragmentTemplateCommunityBinding>
|
|||
val adapter = WebTemplateAdapter(requireContext(), t.data!!)
|
||||
adapter.setItemEvent { i, itemWebTemplateBinding, viewHolder, data ->
|
||||
itemWebTemplateBinding.root.setOnClickListener {
|
||||
val intent = Intent(requireContext(),
|
||||
NetworkTemplatePackageDetailsActivity::class.java)
|
||||
intent.putExtra("id",data.id)
|
||||
intent.putExtra("createDirectory",data.id)
|
||||
val intent = Intent(
|
||||
requireContext(),
|
||||
NetworkTemplatePackageDetailsActivity::class.java
|
||||
)
|
||||
intent.putExtra("id", data.id)
|
||||
intent.putExtra("createDirectory", data.id)
|
||||
startActivity(intent)
|
||||
}
|
||||
itemWebTemplateBinding.button.setOnClickListener {
|
||||
|
|
|
@ -42,9 +42,6 @@ class WebModDetailsFragment(val modId: String,val modNameLiveData: MutableLiveDa
|
|||
return link
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取此模组是否对外开放
|
||||
* @return Boolean
|
||||
|
|
|
@ -38,7 +38,7 @@ object AppSettings {
|
|||
}
|
||||
|
||||
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.ExperiencePlan] = mApplication.getString(R.string.setting_experience_the_plan)
|
||||
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.AppID] = "AppId"
|
||||
|
|
|
@ -5,6 +5,7 @@ import android.content.ClipData
|
|||
import android.content.ClipboardManager
|
||||
import android.content.Context
|
||||
import android.content.res.ColorStateList
|
||||
import android.content.res.Resources
|
||||
import android.graphics.Bitmap
|
||||
import android.graphics.Color
|
||||
import android.graphics.Paint
|
||||
|
@ -16,8 +17,6 @@ import android.widget.TextView
|
|||
import android.widget.Toast
|
||||
import androidx.core.graphics.drawable.DrawableCompat
|
||||
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.request.RequestOptions
|
||||
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.flask.colorpicker.ColorPickerView
|
||||
import com.flask.colorpicker.builder.ColorPickerDialogBuilder
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import com.permissionx.guolindev.PermissionX
|
||||
import jp.wasabeef.glide.transformations.*
|
||||
|
@ -43,6 +43,15 @@ object GlobalMethod {
|
|||
const val DEBUG_SIGN = "963dfd616924b27f9247a35e45bc130a"
|
||||
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 =
|
||||
context.getString(R.string.update_record) + "(" + data.size + ")"
|
||||
MaterialDialog(context, BottomSheet()).show {
|
||||
title(text = title).message(text = stringBuilder.toString())
|
||||
.cancelable(false)
|
||||
.positiveButton(R.string.dialog_ok)
|
||||
}
|
||||
MaterialAlertDialogBuilder(context).setTitle(title)
|
||||
.setMessage(stringBuilder.toString()).setCancelable(false)
|
||||
.setPositiveButton(R.string.dialog_ok) { i, i2 ->
|
||||
}.show()
|
||||
} else {
|
||||
Toast.makeText(context, t.message, Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
|
|
|
@ -17,7 +17,6 @@ import androidx.appcompat.app.AppCompatDelegate
|
|||
import androidx.core.app.ActivityCompat
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.coldmint.rust.core.CompressionManager
|
||||
import com.coldmint.rust.core.DataSet
|
||||
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.UnzipListener
|
||||
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.web.ServerConfiguration
|
||||
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.DatabaseDirectory,
|
||||
context.filesDir.absolutePath + "/database/"
|
||||
context.filesDir.absolutePath + "/databases/"
|
||||
)
|
||||
AppSettings.initSetting(
|
||||
AppSettings.Setting.TemplateDirectory,
|
||||
|
@ -221,6 +221,7 @@ class StartViewModel(application: Application) : BaseAndroidViewModel(applicatio
|
|||
AppSettings.initSetting(AppSettings.Setting.EnglishEditingMode, false)
|
||||
AppSettings.initSetting(AppSettings.Setting.NightModeFollowSystem, true)
|
||||
AppSettings.initSetting(AppSettings.Setting.UseTheCommunityAsTheLaunchPage, true)
|
||||
AppSettings.initSetting(AppSettings.Setting.SimpleDisplayOfAutoCompleteMenu, true)
|
||||
AppSettings.initSetting(
|
||||
AppSettings.Setting.ServerAddress,
|
||||
ServerConfiguration.defaultIp
|
||||
|
@ -265,60 +266,89 @@ class StartViewModel(application: Application) : BaseAndroidViewModel(applicatio
|
|||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 解压数据集
|
||||
* @param resFileName String
|
||||
* @param useDataSet Boolean
|
||||
*/
|
||||
private fun unzipDataSet(resFileName: String, useDataSet: Boolean = false) {
|
||||
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.Setting.DatabaseDirectory,
|
||||
context.filesDir.absolutePath + "/databases/"
|
||||
) + prefixName
|
||||
)
|
||||
val updateDataSet: (File) -> Unit = {
|
||||
CompressionManager.instance.unzip(
|
||||
cacheFile,
|
||||
it,
|
||||
object : UnzipListener {
|
||||
override fun whenUnzipFile(zipEntry: ZipEntry, file: File): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun whenUnzipFolder(zipEntry: ZipEntry, folder: File): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
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)
|
||||
codeDataBase.loadDataSet(
|
||||
DataSet(databaseFolder),
|
||||
CodeDataBase.ReadMode.Copy
|
||||
)
|
||||
} else {
|
||||
DebugHelper.printLog("加载数据集", "无法二次加载" + databaseFolder)
|
||||
}
|
||||
} else {
|
||||
DebugHelper.printLog("加载数据集", "已解压" + databaseFolder + "但不使用。")
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
if (databaseFolder.exists()) {
|
||||
updateDataSet.invoke(cacheFolder)
|
||||
val oldDataSet = DataSet(databaseFolder)
|
||||
val newDataSet = DataSet(cacheFolder)
|
||||
val update = oldDataSet.update(newDataSet)
|
||||
if (update) {
|
||||
dataSetMsgLiveData.value = context.getString(R.string.dataset_update_ok)
|
||||
}
|
||||
} else {
|
||||
updateDataSet.invoke(databaseFolder)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化资源
|
||||
*/
|
||||
private fun initRes() {
|
||||
val defaultDatabase = File(
|
||||
AppSettings.getValue(
|
||||
AppSettings.Setting.DatabaseDirectory,
|
||||
context.filesDir.absolutePath + "/database/"
|
||||
) + "official"
|
||||
)
|
||||
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 = {
|
||||
CompressionManager.instance.unzip(
|
||||
cacheFile,
|
||||
it,
|
||||
object : UnzipListener {
|
||||
override fun whenUnzipFile(zipEntry: ZipEntry, file: File): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun whenUnzipFolder(zipEntry: ZipEntry, folder: File): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun whenUnzipComplete(result: Boolean) {
|
||||
var codeDataBase = CodeDataBase.getInstance(context)
|
||||
|
||||
codeDataBase.loadDataSet(
|
||||
DataSet(defaultDatabase),
|
||||
CodeDataBase.ReadMode.Copy
|
||||
)
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
if (defaultDatabase.exists()) {
|
||||
updateDataSet.invoke(cacheFolder)
|
||||
val oldDataSet = DataSet(defaultDatabase)
|
||||
val newDataSet = DataSet(cacheFolder)
|
||||
val update = oldDataSet.update(newDataSet)
|
||||
if (update) {
|
||||
dataSetMsgLiveData.value = context.getString(R.string.dataset_update_ok)
|
||||
}
|
||||
val language = Locale.getDefault().language
|
||||
DebugHelper.printLog("初始化资源","语言"+language)
|
||||
if (language == "zh") {
|
||||
unzipDataSet("dataBase.rdb", true)
|
||||
unzipDataSet("dataBase_en.rdb")
|
||||
} else {
|
||||
updateDataSet.invoke(defaultDatabase)
|
||||
unzipDataSet("dataBase.rdb")
|
||||
unzipDataSet("dataBase_en.rdb", true)
|
||||
}
|
||||
|
||||
val defaultValues = File(context.filesDir.absolutePath + "/values.json")
|
||||
if (!defaultValues.exists()) {
|
||||
FileOperator.outputResourceFile(
|
||||
|
|
|
@ -26,6 +26,8 @@ class TemplateParserViewModel : BaseViewModel() {
|
|||
private var jsonData: JSONObject? = null
|
||||
private var template: Template? = null
|
||||
private lateinit var arrayList :ArrayList<TemplateParser>
|
||||
//文件输出目录
|
||||
private var outPutPath : String? = null
|
||||
|
||||
|
||||
//创建目录
|
||||
|
@ -111,9 +113,18 @@ class TemplateParserViewModel : BaseViewModel() {
|
|||
Log.e("构建文件", "目标文件${path}已存在。")
|
||||
return false
|
||||
}
|
||||
outPutPath = path.absolutePath
|
||||
return FileOperator.writeFile(path, generatingCode(context))
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取文件输出目录(当构建文件完毕后,返回有效值。否则返回null)
|
||||
* @return String?
|
||||
*/
|
||||
fun getOutputPath():String?{
|
||||
return outPutPath
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成代码
|
||||
* @return String
|
||||
|
|
13
app/src/main/res/drawable/edit_item_background.xml
Normal file
13
app/src/main/res/drawable/edit_item_background.xml
Normal 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>
|
|
@ -8,5 +8,5 @@
|
|||
android:topRightRadius="16dp" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="?attr/textColor" />
|
||||
android:color="?attr/textFillColor" />
|
||||
</shape>
|
13
app/src/main/res/drawable/user_home_background.xml
Normal file
13
app/src/main/res/drawable/user_home_background.xml
Normal 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>
|
|
@ -97,7 +97,9 @@
|
|||
android:id="@+id/action_divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@id/privacyPolicyView" />
|
||||
android:layout_above="@id/privacyPolicyView"
|
||||
android:layout_marginTop="16dp"
|
||||
app:dividerThickness="0.8dp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/serviceAgreementView"
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
android:layout_height="match_parent">
|
||||
|
||||
<RelativeLayout
|
||||
android:fitsSystemWindows="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appBarLayout"
|
||||
|
@ -25,44 +25,145 @@
|
|||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@id/tabLayout"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:contentDescription="@string/action"
|
||||
android:visibility="gone"
|
||||
app:tabMode="scrollable"
|
||||
app:tabTextAppearance="@style/TabLayoutTextStyle" />
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
|
||||
<ProgressBar
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:id="@+id/myProgressBar"
|
||||
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
|
||||
android:id="@+id/codeEditor"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@id/recyclerview"
|
||||
android:layout_below="@id/appBarLayout" />
|
||||
android:layout_above="@id/searchLayout"
|
||||
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
|
||||
android:id="@id/recyclerview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:visibility="invisible" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<!-- <include layout="@layout/edit_end" />-->
|
||||
<!-- <include layout="@layout/edit_end" />-->
|
||||
|
||||
<include layout="@layout/edit_start" />
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
|
|
|
@ -3,19 +3,18 @@
|
|||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/drawerlayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:animateLayoutChanges="true"
|
||||
android:fitsSystemWindows="false">
|
||||
android:fitsSystemWindows="false"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:id="@+id/rootLayout"
|
||||
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
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
|
@ -43,6 +42,7 @@
|
|||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
|
||||
<fragment
|
||||
android:id="@+id/baseFragment"
|
||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||
|
@ -51,6 +51,7 @@
|
|||
app:defaultNavHost="true"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" />
|
||||
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/mainButton"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -59,16 +60,20 @@
|
|||
android:layout_margin="16dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:fitsSystemWindows="true"
|
||||
android:src="@drawable/add" />
|
||||
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
<com.google.android.material.navigation.NavigationView
|
||||
android:id="@+id/navaiagtion"
|
||||
android:fitsSystemWindows="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
app:elevation="2dp"
|
||||
app:menu="@menu/menu_drawer_left" />
|
||||
|
||||
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
|
@ -67,7 +67,9 @@
|
|||
<com.google.android.material.divider.MaterialDivider
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp" />
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
app:dividerThickness="0.8dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="80dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
|
@ -46,30 +47,40 @@
|
|||
android:layout_marginTop="8dp"
|
||||
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_marginTop="8dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/pay_type" />
|
||||
<ImageView
|
||||
android:scaleType="centerCrop"
|
||||
android:id="@+id/baseImageView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="450dp"
|
||||
android:src="@drawable/image" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/typeSpinner"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:entries="@array/pay_type_entries" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/baseImageView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="450dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:src="@drawable/image" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/payMoneyView"
|
||||
|
|
|
@ -180,12 +180,14 @@
|
|||
|
||||
</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_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:visibility="gone" />
|
||||
android:visibility="gone"
|
||||
app:singleLine="false" />
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
|
@ -354,6 +356,6 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|right"
|
||||
android:layout_margin="16dp"
|
||||
android:src="@drawable/ic_outline_send_24" />
|
||||
android:src="@drawable/ic_outline_send_24" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
@ -2,6 +2,7 @@
|
|||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
|
@ -16,7 +15,6 @@
|
|||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fitsSystemWindows="true"
|
||||
app:contentScrim="?android:windowBackground"
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap"
|
||||
app:titleCollapseMode="scale"
|
||||
|
@ -31,15 +29,17 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="150dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginBottom="-32dp"
|
||||
android:scaleType="matrix"
|
||||
android:transitionName="@string/transition_cover" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/baseInfoView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="100dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/coverView"
|
||||
android:layout_alignParentBottom="true">
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@drawable/user_home_background">
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
@ -50,7 +50,7 @@
|
|||
android:layout_height="100dp"
|
||||
android:layout_alignTop="@id/baseInfoView"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginTop="-8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:src="@drawable/head_icon"
|
||||
android:theme="@style/Theme.rust.Concept" />
|
||||
|
||||
|
@ -135,6 +135,7 @@
|
|||
|
||||
<LinearLayout
|
||||
android:id="@+id/numberLayout"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="46dp">
|
||||
|
||||
|
|
|
@ -56,7 +56,6 @@
|
|||
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
app:tint="@color/white"
|
||||
android:id="@+id/fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
@ -2,34 +2,38 @@
|
|||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/titleView"
|
||||
style="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="名称"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
android:textSize="16dp" />
|
||||
android:textColor="?android:colorPrimary" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/subTitleView"
|
||||
style="@style/TextAppearance.Material3.BodyMedium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/titleView"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="副标题"
|
||||
android:textColor="?attr/colorSecondary" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/descriptionView"
|
||||
android:layout_width="match_parent"
|
||||
style="@style/TextAppearance.Material3.BodyMedium"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/subTitleView"
|
||||
android:layout_marginTop="5dp"
|
||||
android:text="描述" />
|
||||
|
||||
<TextView
|
||||
style="@style/TextAppearance.Material3.BodySmall"
|
||||
android:id="@+id/valueTypeView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -46,12 +50,15 @@
|
|||
android:layout_toRightOf="@id/valueTypeView"
|
||||
android:text="版本信息" />
|
||||
|
||||
<com.kongzue.stacklabelview.StackLabel
|
||||
android:id="@+id/belongStackLabelView"
|
||||
android:layout_width="wrap_content"
|
||||
<com.google.android.material.chip.ChipGroup
|
||||
android:id="@+id/chipGroup"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:singleLine="false"
|
||||
android:layout_below="@id/valueTypeView"
|
||||
android:layout_marginTop="5dp" />
|
||||
android:layout_marginTop="8dp">
|
||||
|
||||
</com.google.android.material.chip.ChipGroup>
|
||||
|
||||
|
||||
</RelativeLayout>
|
|
@ -2,14 +2,14 @@
|
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:padding="8dp">
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
<Button
|
||||
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton.Dialog"
|
||||
android:id="@+id/codeTextItemView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="15dp"
|
||||
android:text="项目"/>
|
||||
|
||||
</LinearLayout>
|
|
@ -41,6 +41,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="top"
|
||||
android:maxLines="5"
|
||||
android:maxLength="255"
|
||||
android:minLines="3" />
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:animateLayoutChanges="true"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
android:padding="24dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/unitNameInputLayout"
|
||||
|
|
|
@ -23,13 +23,18 @@
|
|||
android:textSize="16dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/unitList"
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/swipeRefreshLayout"
|
||||
android:layout_width="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">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/unitList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
|
@ -27,9 +27,6 @@
|
|||
android:id="@+id/unitList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
</LinearLayout>
|
|
@ -68,9 +68,10 @@
|
|||
|
||||
<com.google.android.material.divider.MaterialDivider
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_marginTop="16dp"
|
||||
app:dividerThickness="0.8dp" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
|
|
|
@ -8,11 +8,19 @@
|
|||
android:orientation="horizontal"
|
||||
android:padding="8dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iconView"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:src="@drawable/image" />
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="@style/Widget.Material3.CardView.Filled"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iconView"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:src="@drawable/image" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -21,23 +29,23 @@
|
|||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:id="@+id/unitNameView"
|
||||
style="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="单位名称" />
|
||||
|
||||
<TextView
|
||||
style="@style/TextAppearance.Material3.BodyMedium"
|
||||
android:id="@+id/unitDescribeView"
|
||||
style="@style/TextAppearance.Material3.BodyMedium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="单位描述" />
|
||||
|
||||
<TextView
|
||||
style="@style/TextAppearance.Material3.BodySmall"
|
||||
android:id="@+id/unitTimeView"
|
||||
style="@style/TextAppearance.Material3.BodySmall"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
<ImageView
|
||||
android:id="@+id/mod_icon"
|
||||
android:layout_width="56dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:layout_height="56dp"
|
||||
android:src="@drawable/image" />
|
||||
|
||||
|
|
|
@ -12,16 +12,20 @@
|
|||
<string name="select_directents">Select Directory</string>
|
||||
<string name="select_file">Select File</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="change_image">Change Image</string>
|
||||
<string name="del_image">Remove Image</string>
|
||||
<string name="remove">remove</string>
|
||||
<string name="remove_image_item">Remove image at \\"%1$s\\"\?</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="create_unit_complete">unit created</string>
|
||||
<string name="create_unit_failed">Unit creation failed</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="activation_app">Activate Rust Helper</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_no">no, no</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="no_longer_prompt">Do not remind again</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="delete_title">delete</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="file_importer">Import into Rust Helper</string>
|
||||
<string name="file_manager">file manager</string>
|
||||
|
@ -80,13 +85,14 @@
|
|||
<string name="describe">describe</string>
|
||||
<string name="mod_tags">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_describe">Create a new mod.</string>
|
||||
<string name="filter">filter</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_tip">Please enter the activation verification code:</string>
|
||||
<string name="verification_code">Verification code</string>
|
||||
<string name="search">search</string>
|
||||
<string name="find">find</string>
|
||||
<string name="create">create</string>
|
||||
|
@ -95,6 +101,7 @@
|
|||
<string name="enter_file_path">Please enter a file path.</string>
|
||||
<string name="create_bookmark">Create bookmarks</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="database_null">This dataset could not be loaded, error: %1$s.</string>
|
||||
<string name="describe_error">Please enter a description.</string>
|
||||
|
@ -113,6 +120,7 @@
|
|||
<string name="mod_action1">Editing unit</string>
|
||||
<string name="mod_action2">Edit information</string>
|
||||
<string name="mod_action8">decompress</string>
|
||||
<string name="rename">rename</string>
|
||||
<string name="mod_action10">Repair information file</string>
|
||||
<string name="open_action1">Edit text</string>
|
||||
|
||||
|
@ -141,14 +149,14 @@
|
|||
<string name="loading_bookmarks">Loading bookmarks...</string>
|
||||
<string name="calculating">Calculating...</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="use_database">use</string>
|
||||
<string name="unuse_dataabse">Has been used</string>
|
||||
<string name="create_unit">Create a unit</string>
|
||||
<string name="unit_path">Create path :%1$s</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="change_path">To change the</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_path">Copy file path</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="operation">operation</string>
|
||||
<string name="copy_file_absolutely_path">Copy the absolute path (starting with ROOT)</string>
|
||||
|
@ -175,8 +183,8 @@
|
|||
<string name="create_folder">Creating a folder</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="unit_and_downloadnum">Unit number: % 1 $d | downloads | version name: % 2 $d % 3 $s</string>
|
||||
<string name="unit_num">Unit number: % 1 $d</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="system_file_manager">file manager</string>
|
||||
<string name="reload_files">The refresh</string>
|
||||
<string name="convert_template">To make the template</string>
|
||||
|
@ -199,6 +207,9 @@
|
|||
<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_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_error">Could not be created because the template already exists.</string>
|
||||
<string name="consent">agree</string>
|
||||
|
@ -210,6 +221,7 @@
|
|||
<string name="update_link">Update the link</string>
|
||||
<string name="template_version_name">Version of</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="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>
|
||||
|
@ -223,13 +235,15 @@
|
|||
<!--编译错误-->
|
||||
|
||||
<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="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="unknown_type">Unknown type \\"%1$s\\".</string>
|
||||
<string name="create_section">Create % 1 $s</string>
|
||||
<string name="create_key">Create % 1 $s</string>
|
||||
<string name="type_information">Explain the %1$s</string>
|
||||
<string name="unknown_type">Unknown type "%1$s".</string>
|
||||
<string name="create_section">Create %1$s</string>
|
||||
<string name="create_key">Create %1$s</string>
|
||||
<string name="symbol9">formatting</string>
|
||||
<string name="symbol10">undo</string>
|
||||
<string name="symbol11">color</string>
|
||||
|
@ -237,16 +251,16 @@
|
|||
<string name="import_error1">Error extracting file.</string>
|
||||
<string name="import_effor7">An unrecognized path.</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="import_name">The import</string>
|
||||
<string name="import_complete">%1$s import succeeded.</string>
|
||||
<string name="import_complete">%1$s import succeeded.</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="import_failed2">Unable to read message file.</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_tip2">Import this mod (%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="empty_file">Empty file</string>
|
||||
<string name="empty_folder">An empty folder</string>
|
||||
|
@ -260,7 +274,7 @@
|
|||
<string name="set_failed">Setup failed</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="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="load_optimized_item">Load optimization projects...</string>
|
||||
<string name="optimizationing">In the optimization...</string>
|
||||
|
@ -277,9 +291,12 @@
|
|||
<string name="mod_title">Mods</string>
|
||||
<string name="edit_title">The code editor</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="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 -->
|
||||
|
@ -321,7 +338,7 @@
|
|||
<string name="add_extra_maps">Add additional maps for paths</string>
|
||||
<string name="disabled">disable</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="dialog_close_tip2">It has been switched to background repair.</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="clean_up_code_cache_complete">Code cache cleanup complete.</string>
|
||||
<string name="clean">empty</string>
|
||||
<string name="details">details</string>
|
||||
<string name="show_details">Check the details</string>
|
||||
<string name="goto_line">Jump to wrong location</string>
|
||||
<string name="code_navigation">Code navigation</string>
|
||||
|
@ -344,6 +360,9 @@
|
|||
<string name="code_language_on">English</string>
|
||||
<string name="code_language_off">Chinese</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="rule">The rules</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="load_system_application">Display system application</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="select_the_game_pack">Choose a game pack</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">Keep source files</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">Create a separate folder</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_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="recoverying_prompt">Moving \\"%1$s\\"...</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="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="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="no_app_installed">%1$s is not installed.</string>
|
||||
<string name="restore_all">All reduction</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="all_saves_are_completed">%1$d files saved.</string>
|
||||
<string name="about">About</string>
|
||||
<string name="libs">Open source license</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="packing">In the packaging...</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="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="recovery_file">reduction</string>
|
||||
<string name="pack_directory">Package directory</string>
|
||||
<string name="info">information</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="jump_a_bookmark">Jump a 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="bookmark_jump_failed">The file the bookmark points to does not exist.</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="report_mod">Report mod</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="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_describe">Assistant built-in font, highly recommended.</string>
|
||||
<string name="directory_does_not_exist">The directory does not exist.</string>
|
||||
<string name="special_thanks_to">Special thanks to</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="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="network_error">Network error.</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_describe">Only available in Release, Beta, forced update.</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="remove_empty_lines">Remove empty lines</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="share_log">Sharing error Reports</string>
|
||||
<string name="restart">Restart the program</string>
|
||||
|
@ -513,8 +519,8 @@
|
|||
<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="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_path_could_not_be_resolved">Path \\"%1$s\\" could not be recognized.</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="uri_null">Uri errors.</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>
|
||||
|
@ -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="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="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_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="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>
|
||||
|
@ -535,29 +541,33 @@
|
|||
<string name="expiration_time_tip">Due time :%1$s</string>
|
||||
<string name="community">community</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="my">My</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_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="screenshot">Screenshots:</string>
|
||||
<string name="required">mandatory</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="from_url">From the url to add</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="id_tip">Used to identify your mod and cannot be modified after publication.</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_send2">Mod \@mod{%1$s}, %2$s Update log \n:%3$s</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="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="installation">The installation</string>
|
||||
<string name="installation_ing">In the installation...</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="audit">This mod is hidden from the outside and only visible to you and your administrator.</string>
|
||||
<string name="follow">Follow</string>
|
||||
|
@ -565,8 +575,8 @@
|
|||
<string name="transition_cover">cover</string>
|
||||
<string name="fans">fans</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="praise_number">Won the praise</string>
|
||||
<string name="fans_information">Fans: %1$s| attention:%2$s | praise:%3$s</string>
|
||||
<string name="praise_number">praise</string>
|
||||
<string name="no_content">No content</string>
|
||||
<string name="homepage">The home page</string>
|
||||
<string name="dynamic">dynamic</string>
|
||||
|
@ -582,7 +592,7 @@
|
|||
<string name="each_other_follow">We are fans of each other</string>
|
||||
<string name="followed">Has been focused on</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="signature">Individuality signature</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_download_ok">File download completed</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_num">Comment (% 1 $d)</string>
|
||||
<string name="discussion_num">Comment (%1$d)</string>
|
||||
<string name="send_discussion">Post a comment</string>
|
||||
<string name="latest_work">The latest work</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="game_configured">The game is configured</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="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="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="warehouse">warehouse</string>
|
||||
<string name="not_find_map">No map found</string>
|
||||
|
@ -665,7 +675,7 @@
|
|||
<string name="forever_time">Permanent activation</string>
|
||||
<string name="can_t_activate">You are permanently activated.</string>
|
||||
<string name="report">To report</string>
|
||||
<string name="report_t">Report - % 1 $s</string>
|
||||
<string name="report_t">Report - %1$s</string>
|
||||
<string name="why">The reason:</string>
|
||||
<string name="picture_of_infringement">Stealing material from other mods</string>
|
||||
<string name="erotic_elements">Contains pornographic content</string>
|
||||
|
@ -686,7 +696,7 @@
|
|||
<string name="refused">Refused to</string>
|
||||
<string name="remove_fans">Remove the fan</string>
|
||||
<string name="coupon">coupons</string>
|
||||
<string name="coupon_num">Coupons (% 1 $d)</string>
|
||||
<string name="coupon_num">Coupons (%1$d)</string>
|
||||
<string name="coupon_not_use">No coupons were used.</string>
|
||||
<string name="time_limit">Valid until :%1$s can be used %2$s times</string>
|
||||
<string name="payment_reminders">We will charge your order to your account within 24 hours after receiving it, please wait patiently. If your order is not processed within 24 hours, please submit your order number to us for processing.</string>
|
||||
|
@ -704,7 +714,7 @@
|
|||
<string name="ban_fans">Add the user to the blacklist</string>
|
||||
<string name="reject_follow">Refuse to focus on</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="delete_source_file_check">Deleting source Files</string>
|
||||
<string name="init_all_units">Initialize the unit list...</string>
|
||||
|
@ -728,6 +738,7 @@
|
|||
<string name="undo">undo</string>
|
||||
<string name="redo">redo</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="game_data_and_synchronization">Game data and synchronization</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="recent_update">Last updated :%1$s</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="data_set_read_mode">Read mode</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_identifier_error">Value identifiers 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="substitution_is_same">The new content is the same as the original content.</string>
|
||||
<string name="figure_out">Processing is complete</string>
|
||||
|
@ -808,6 +819,7 @@
|
|||
<string name="turret_design">Turret design</string>
|
||||
<string name="experience_the_plan">User Experience Plan</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="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>
|
||||
|
@ -824,13 +836,53 @@
|
|||
<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_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="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_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>
|
|
@ -12,16 +12,20 @@
|
|||
<string name="select_directents">目次を選択する</string>
|
||||
<string name="select_file">ファイルを選択する</string>
|
||||
<string name="select_file_ok">已選\\"%1$s\\"</string>
|
||||
<string name="root_path">ルートディレクトリ</string>
|
||||
<string name="select_image">画像を選択する</string>
|
||||
<string name="change_image">画像を入れ替える</string>
|
||||
<string name="del_image">画像を除去する</string>
|
||||
<string name="remove">除去</string>
|
||||
<string name="remove_image_item">\\"%1$s\\"に位置する画像を除去する\?</string>
|
||||
<string name="open">开き</string>
|
||||
<string name="open_public">公開</string>
|
||||
<string name="open_private">私有</string>
|
||||
<string name="open_nottiled">NoTiledをつける</string>
|
||||
<string name="create_unit_complete">単位の創設が完了した</string>
|
||||
<string name="create_unit_failed">組織の創設に失敗する</string>
|
||||
<string name="create_uniting">ユニットを構筑中…</string>
|
||||
<string name="build_unit">単位を構築する</string>
|
||||
<string name="dialog_ok">確定</string>
|
||||
<string name="activation_app">サビ助手を活性化させる</string>
|
||||
<string name="activation_app_tip">起動時間が過ぎましたので、サビヘルパーを起動してください。</string>
|
||||
|
@ -31,6 +35,8 @@
|
|||
<string name="always_allow">あくまでも許可する</string>
|
||||
<string name="pay_yes">はい,確かに受け取りました</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="no_longer_prompt">もう提示しない</string>
|
||||
<string name="navigation_tip">全%1$d項目でクイックナビゲーションに対応。</string>
|
||||
|
@ -86,6 +92,7 @@
|
|||
<string name="activate_the_account">アカウントをアクティブにする</string>
|
||||
<string name="activate_the_account_ok">起動できましたので、再ログインしてください。</string>
|
||||
<string name="activate_the_account_tip">アクティブ認証コードを入力してください:</string>
|
||||
<string name="verification_code">captcha</string>
|
||||
<string name="search">検索</string>
|
||||
<string name="find">検索</string>
|
||||
<string name="create">創建</string>
|
||||
|
@ -94,6 +101,7 @@
|
|||
<string name="enter_file_path">ファイルパスを入力してください。</string>
|
||||
<string name="create_bookmark">しおりを作る</string>
|
||||
<string name="name_error">モジュール名を入力してください。</string>
|
||||
<string name="file_name_error">ファイル名を入力してください。</string>
|
||||
<string name="action_name_error">キャンペーン名を入力してください。</string>
|
||||
<string name="database_null">このデータセットはロードできません、エラー原因:%1$s。</string>
|
||||
<string name="describe_error">記述を入力してください。</string>
|
||||
|
@ -112,6 +120,7 @@
|
|||
<string name="mod_action1">編集単位</string>
|
||||
<string name="mod_action2">情報を編集する</string>
|
||||
<string name="mod_action8">だしぬけ</string>
|
||||
<string name="rename">命名を改める</string>
|
||||
<string name="mod_action10">リペア情報ファイル</string>
|
||||
<string name="open_action1">テキストを編集する</string>
|
||||
|
||||
|
@ -198,6 +207,9 @@
|
|||
<string name="template_update_error">更新リンクを入力してください。</string>
|
||||
<string name="template_version_num_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_error">作成できません。このテンプレートはすでに存在します。</string>
|
||||
<string name="consent">同意</string>
|
||||
|
@ -209,6 +221,7 @@
|
|||
<string name="update_link">リンクを更新する</string>
|
||||
<string name="template_version_name">バージョン名</string>
|
||||
<string name="template_version_num">バージョン番号</string>
|
||||
<string name="open_state">公開状態</string>
|
||||
<string name="code_table">符号表</string>
|
||||
<string name="upgrade_database">使用しているデータセットは古くなっていますが、最新バージョンにアップグレードされていますか\?</string>
|
||||
<string name="upgrade">アップグレード</string>
|
||||
|
@ -222,8 +235,10 @@
|
|||
<!--编译错误-->
|
||||
|
||||
<string name="not_save_exit">保存せずにログアウト</string>
|
||||
<string name="save_settings">構成情報の更新をチェックしたら、変更を保存しますか\?</string>
|
||||
<string name="saveing">保存中%1$s…</string>
|
||||
<string name="save_complete">%1$s保存完了。</string>
|
||||
<string name="save_complete2">保存完了。</string>
|
||||
|
||||
<string name="type_information">%1$sを説明する</string>
|
||||
<string name="unknown_type">未知のタイプ\\"%1$s\\"。</string>
|
||||
|
@ -236,7 +251,7 @@
|
|||
<string name="import_error1">ファイルを伸張するときにエラーが発生します。</string>
|
||||
<string name="import_effor7">識別できない経路です</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="import_name">导入</string>
|
||||
|
@ -276,8 +291,11 @@
|
|||
<string name="mod_title">同じ組の</string>
|
||||
<string name="edit_title">コード編集</string>
|
||||
<string name="template_title">テンプレートパッケージ</string>
|
||||
<string name="template_list">テンプレート一覧</string>
|
||||
<string name="close">閉鎖</string>
|
||||
<string name="qq_group">qq群</string>
|
||||
<string name="details">详细</string>
|
||||
<string name="insert_coins">コイン式</string>
|
||||
<string name="del_completed">\\"%1$s\\"を削除しました。</string>
|
||||
|
||||
|
||||
|
@ -333,7 +351,6 @@
|
|||
<string name="update_num">%1$sの記録を更新しました。</string>
|
||||
<string name="clean_up_code_cache_complete">コードキャッシュのクリーンアップ完了。</string>
|
||||
<string name="clean">空</string>
|
||||
<string name="details">详细</string>
|
||||
<string name="show_details">詳細を調べる</string>
|
||||
<string name="goto_line">誤った位置にジャンプする</string>
|
||||
<string name="code_navigation">コードナビゲーション</string>
|
||||
|
@ -343,6 +360,9 @@
|
|||
<string name="code_language_on">英文</string>
|
||||
<string name="code_language_off">中文</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="rule">ルール</string>
|
||||
<string name="search_rule">ルール探し</string>
|
||||
|
@ -356,6 +376,7 @@
|
|||
<string name="collapse_info">クラッシュ・メッセージ</string>
|
||||
<string name="load_system_application">表示システムアプリケーション</string>
|
||||
<string name="choose_color">色を選ぶ</string>
|
||||
<string name="profile_picture_box_color">アイコンの枠の色</string>
|
||||
<string name="game_pack">ゲームパック</string>
|
||||
<string name="select_the_game_pack">ゲームパックを選ぶ</string>
|
||||
<string name="enable_the_recovery_station">モジュールごみ箱</string>
|
||||
|
@ -371,22 +392,6 @@
|
|||
<string name="keep_rwmod_file_description">モジュールを伸張する際、ソースファイルを保持する。</string>
|
||||
<string name="keep_rwmod_file">ソースファイルを保存する</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">独立フォルダを作成する</string>
|
||||
<string name="unable_rename">ファイルを使用しているフォルダの名前を変更することはできません。</string>
|
||||
|
@ -405,7 +410,6 @@
|
|||
<string name="no_app_installed">%1$sはインストールされていません。</string>
|
||||
<string name="restore_all">全部還元する</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="libs">オープンソース・ライセンス</string>
|
||||
<string name="additional_selection">付加項</string>
|
||||
|
@ -414,15 +418,14 @@
|
|||
<string name="open_tip">直ちに%1$.2f元で開通する</string>
|
||||
<string name="packing">お持ち帰り中…</string>
|
||||
<string name="share_mod">分かち合い</string>
|
||||
<string name="setting_pack_directory" translatable="false">PackDirectory</string>
|
||||
<string name="clear_code_cache">コードキャッシュのクリーンアップ</string>
|
||||
<string name="custom_symbol">カスタム記号バー</string>
|
||||
<string name="setting_identifiers_prompt_number" translatable="false">IdentifiersPromptNumber</string>
|
||||
<string name="identifiers_prompt_number">識別子が数を示す</string>
|
||||
<string name="recovery_file">还元</string>
|
||||
<string name="pack_directory">カタログを梱包する</string>
|
||||
<string name="info">情報</string>
|
||||
<string name="cut_board_operation">せん断板操作</string>
|
||||
<string name="mine_bookmarks">私のしおり</string>
|
||||
<string name="bookmark_manager">ブックマークマネージャ</string>
|
||||
<string name="jump_a_bookmark">飛びしおり</string>
|
||||
<string name="remove_bookmark">しおりを取り除く</string>
|
||||
|
@ -433,25 +436,29 @@
|
|||
<string name="add_bookmark_fail">しおりを付けるのに失敗します。</string>
|
||||
<string name="bookmark_jump_failed">しおりが指し示す書類は存在しない。</string>
|
||||
<string name="unit_directory">単位目録。</string>
|
||||
<string name="setting_user_name" translatable="false">UserName</string>
|
||||
<string name="user_name">ユーザー名</string>
|
||||
<string name="report_mod">通報モジュール</string>
|
||||
<string name="report_user">ユーザーを通報する</string>
|
||||
<string name="view_the_report_object">(%1$s)を見る</string>
|
||||
<string name="bookmark_already_exists">サインがありますので、パスを変更してください。</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_describe">アシスタントに内蔵されているフォントは、強くお勧めします。</string>
|
||||
<string name="directory_does_not_exist">目次は存在しない。</string>
|
||||
<string name="special_thanks_to">特にお礼を言う</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="registration_success_message">アカウントのアクティベーションコードをメールアドレスに送信しました。受信していない場合、メールボックスは迷惑メールと見なされる可能性があります。ごみ箱をチェックしてください。</string>
|
||||
<string name="please_login_first">まず登録してください。</string>
|
||||
<string name="network_error">ネットワークエラー。</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_describe">Releaseバージョンでのみ有効となり、ベータバージョンでは、強制アップデートが采用されます。</string>
|
||||
<string name="loading_values">数値を載せる…</string>
|
||||
|
@ -534,6 +541,9 @@
|
|||
<string name="expiration_time_tip">期限:%1$s</string>
|
||||
<string name="community">コミュニティ</string>
|
||||
<string name="recommended">推薦</string>
|
||||
<string name="local">地元</string>
|
||||
<string name="network">インターネット</string>
|
||||
<string name="template_maker">テンプレート・プロデューサ</string>
|
||||
<string name="ranking">ランキング</string>
|
||||
<string name="my">私の</string>
|
||||
<string name="latest_release">最新リリース</string>
|
||||
|
@ -557,6 +567,7 @@
|
|||
<string name="installation">インストール</string>
|
||||
<string name="installation_ing">インストール中…</string>
|
||||
<string name="installated">インストール済み</string>
|
||||
<string name="template_community">テンプレート・コミュニティー</string>
|
||||
<string name="work_of_home_page">作品を調べる</string>
|
||||
<string name="audit">このモジュールは外部には隠されていて、あなたと管理人にしか見えません。</string>
|
||||
<string name="follow">注目</string>
|
||||
|
@ -727,6 +738,7 @@
|
|||
<string name="undo">撤回</string>
|
||||
<string name="redo">重を</string>
|
||||
<string name="del_mod">削除</string>
|
||||
<string name="delete_error">削除に失敗します。</string>
|
||||
<string name="need_save">[未保存]%1$s</string>
|
||||
<string name="game_data_and_synchronization">ゲームデータと同期</string>
|
||||
<string name="game_data_and_synchronization_describe">同期されたゲームデータを管理する。</string>
|
||||
|
@ -807,6 +819,7 @@
|
|||
<string name="turret_design">砲塔の設計</string>
|
||||
<string name="experience_the_plan">ユーザー体験プログラム</string>
|
||||
<string name="experience_the_plan_describe">匿名送信ソフト奔砕情報。</string>
|
||||
<string name="anonymous_send_completed">匿名送信済みエラー</string>
|
||||
<string name="update_and_iteration">アップデートとユーザー体験プログラム</string>
|
||||
<string name="is_paid">お支払いはされましたか\?未払いの注文は期限が切れ、支払いができなくなります。</string>
|
||||
<string name="paid_yes">はい、支払いました</string>
|
||||
|
@ -823,5 +836,53 @@
|
|||
<string name="dynamic_color">ダイナミックカラー</string>
|
||||
<string name="dynamic_color_tip">壁紙に合わせてテーマカラーを変更します。</string>
|
||||
<string name="dynamic_color_disabled">この装置は動的色をサポートしない。</string>
|
||||
<string name="an_unsupported_file_type">サポートされていないファイルフォーマット%1$s。</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>
|
|
@ -11,17 +11,20 @@
|
|||
<string name="parse_file_exception">Файл анализирует аномалию</string>
|
||||
<string name="select_directents">Выбирать каталог</string>
|
||||
<string name="select_file">Выбери файл.</string>
|
||||
<string name="select_file_ok">/ % \</string>
|
||||
<string name="root_path">Корневой каталог</string>
|
||||
<string name="select_image">Выбери образ.</string>
|
||||
<string name="change_image">Смени изображение.</string>
|
||||
<string name="del_image">Удалите изображение.</string>
|
||||
<string name="remove">удал</string>
|
||||
<string name="remove_image_item">Удаление изображения, расположенного в \ % $\ \\?</string>
|
||||
<string name="open">откр</string>
|
||||
<string name="open_public">публичн</string>
|
||||
<string name="open_private">частн</string>
|
||||
<string name="open_nottiled">откройте</string>
|
||||
<string name="create_unit_complete">Создание единицы завершено</string>
|
||||
<string name="create_unit_failed">Ошибка создания единицы</string>
|
||||
<string name="create_uniting">Создаем единицу...</string>
|
||||
<string name="build_unit">Строительная единица</string>
|
||||
<string name="dialog_ok">увер</string>
|
||||
<string name="activation_app">Активировать помощника ржавчины</string>
|
||||
<string name="activation_app_tip">Время активации прошло. Пожалуйста, активируйте ржавчину.</string>
|
||||
|
@ -31,6 +34,8 @@
|
|||
<string name="always_allow">Всегда.</string>
|
||||
<string name="pay_yes">Да, получил</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="no_longer_prompt">Никаких подсказок.</string>
|
||||
<string name="navigation_tip">В общей сложности 1 % проектов поддерживают быструю навигацию.</string>
|
||||
|
@ -86,6 +91,7 @@
|
|||
<string name="activate_the_account">Активировать счета.</string>
|
||||
<string name="activate_the_account_ok">Активация завершена.</string>
|
||||
<string name="activate_the_account_tip">Введите код активации:</string>
|
||||
<string name="verification_code">Код подтверждения.</string>
|
||||
<string name="search">поиск</string>
|
||||
<string name="find">поиск</string>
|
||||
<string name="create">созда</string>
|
||||
|
@ -94,6 +100,7 @@
|
|||
<string name="enter_file_path">Введите, пожалуйста, маршрут файла.</string>
|
||||
<string name="create_bookmark">Создавать закладку</string>
|
||||
<string name="name_error">Пожалуйста, введите имя модуля.</string>
|
||||
<string name="file_name_error">Введите имя файла.</string>
|
||||
<string name="action_name_error">Введите имя мероприятия.</string>
|
||||
<string name="database_null">Этот набор данных не может быть загружен по ложной причине :% $.</string>
|
||||
<string name="describe_error">Введите описание, пожалуйста.</string>
|
||||
|
@ -112,6 +119,7 @@
|
|||
<string name="mod_action1">Монтажная единица</string>
|
||||
<string name="mod_action2">Редактирование.</string>
|
||||
<string name="mod_action8">декомпресс</string>
|
||||
<string name="rename">Переименовать.</string>
|
||||
<string name="mod_action10">Восстанавливать файл информации</string>
|
||||
<string name="open_action1">Редактировать текст</string>
|
||||
|
||||
|
@ -198,6 +206,9 @@
|
|||
<string name="template_update_error">Введите обновленную ссылку.</string>
|
||||
<string name="template_version_num_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_error">Невозможно создать шаблон, который уже существует.</string>
|
||||
<string name="consent">соглас</string>
|
||||
|
@ -209,6 +220,7 @@
|
|||
<string name="update_link">Обновить связь</string>
|
||||
<string name="template_version_name">Название версии</string>
|
||||
<string name="template_version_num">Номер версии.</string>
|
||||
<string name="open_state">Открытый режим</string>
|
||||
<string name="code_table">Таблица кодов.</string>
|
||||
<string name="upgrade_database">Набор данных, который вы используете, устарел и был обновлен до последней версии\?</string>
|
||||
<string name="upgrade">эскалац</string>
|
||||
|
@ -222,8 +234,10 @@
|
|||
<!--编译错误-->
|
||||
|
||||
<string name="not_save_exit">Выход без сохранения</string>
|
||||
<string name="save_settings">Ты хочешь сохранить изменения\?</string>
|
||||
<string name="saveing">Сохраняю 10%...</string>
|
||||
<string name="save_complete">10 процентов на сохранение завершено.</string>
|
||||
<string name="save_complete2">Сохранность завершена.</string>
|
||||
|
||||
<string name="type_information">объясняю</string>
|
||||
<string name="unknown_type">Неизвестные типы. \"% \ $\</string>
|
||||
|
@ -236,7 +250,7 @@
|
|||
<string name="import_error1">Произошла ошибка при разгерметизации файла.</string>
|
||||
<string name="import_effor7">Неидентифицированный путь.</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="import_name">импортирова</string>
|
||||
|
@ -276,8 +290,11 @@
|
|||
<string name="mod_title">модул</string>
|
||||
<string name="edit_title">Редактирование кода</string>
|
||||
<string name="template_title">Шаблон.</string>
|
||||
<string name="template_list">Список шаблонов</string>
|
||||
<string name="close">закр</string>
|
||||
<string name="qq_group">Qq групп</string>
|
||||
<string name="details">подробн</string>
|
||||
<string name="insert_coins">автомат</string>
|
||||
<string name="del_completed">Удалена \ % \ \ \</string>
|
||||
|
||||
|
||||
|
@ -333,7 +350,6 @@
|
|||
<string name="update_num">Обновляется запись на $1 %.</string>
|
||||
<string name="clean_up_code_cache_complete">Очистка кэша кода завершена.</string>
|
||||
<string name="clean">очист</string>
|
||||
<string name="details">подробн</string>
|
||||
<string name="show_details">Проверьте детали.</string>
|
||||
<string name="goto_line">Прыжок в неправильную позицию</string>
|
||||
<string name="code_navigation">Навигация по коду</string>
|
||||
|
@ -343,6 +359,9 @@
|
|||
<string name="code_language_on">английск</string>
|
||||
<string name="code_language_off">китайск</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="rule">прав</string>
|
||||
<string name="search_rule">Ищите правила.</string>
|
||||
|
@ -356,6 +375,7 @@
|
|||
<string name="collapse_info">Информация о крушении</string>
|
||||
<string name="load_system_application">Приложение для отображения системы</string>
|
||||
<string name="choose_color">Выбери цвет.</string>
|
||||
<string name="profile_picture_box_color">Цвет головы в раме</string>
|
||||
<string name="game_pack">Сумка.</string>
|
||||
<string name="select_the_game_pack">Выбери сумку.</string>
|
||||
<string name="enable_the_recovery_station">Мусорная станция</string>
|
||||
|
@ -371,22 +391,6 @@
|
|||
<string name="keep_rwmod_file_description">Когда распакуете модуль, сохраните исходный файл.</string>
|
||||
<string name="keep_rwmod_file">Сохранять исходный файл</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">Создание независимой папки</string>
|
||||
<string name="unable_rename">Эту папку нельзя переименовать, в ней используются файлы.</string>
|
||||
|
@ -405,7 +409,6 @@
|
|||
<string name="no_app_installed">Не было установлено никаких $%.</string>
|
||||
<string name="restore_all">Полное восстановление.</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="libs">Открытый исходный код</string>
|
||||
<string name="additional_selection">Дополнительный член</string>
|
||||
|
@ -414,15 +417,14 @@
|
|||
<string name="open_tip">Немедленное открытие на сумму $1.2f</string>
|
||||
<string name="packing">В упаковке...</string>
|
||||
<string name="share_mod">подел</string>
|
||||
<string name="setting_pack_directory" translatable="false">PackDirectory</string>
|
||||
<string name="clear_code_cache">Очистить кэш кода</string>
|
||||
<string name="custom_symbol">Самоопределение колонки символов</string>
|
||||
<string name="setting_identifiers_prompt_number" translatable="false">IdentifiersPromptNumber</string>
|
||||
<string name="identifiers_prompt_number">Идентификатор указывает на количество</string>
|
||||
<string name="recovery_file">восстановлен</string>
|
||||
<string name="pack_directory">Паковать каталог</string>
|
||||
<string name="info">информац</string>
|
||||
<string name="cut_board_operation">Операция по монтажу</string>
|
||||
<string name="mine_bookmarks">Моя закладка</string>
|
||||
<string name="bookmark_manager">Менеджер закладок</string>
|
||||
<string name="jump_a_bookmark">закладка</string>
|
||||
<string name="remove_bookmark">Убрать закладку</string>
|
||||
|
@ -433,25 +435,29 @@
|
|||
<string name="add_bookmark_fail">Закладка не удалась.</string>
|
||||
<string name="bookmark_jump_failed">Бумаги, на которые указывает закладка, не существуют.</string>
|
||||
<string name="unit_directory">Единичный каталог</string>
|
||||
<string name="setting_user_name" translatable="false">UserName</string>
|
||||
<string name="user_name">Имя пользователя.</string>
|
||||
<string name="report_mod">Группа доноров</string>
|
||||
<string name="report_user">Сообщать о потребителе</string>
|
||||
<string name="view_the_report_object">Смотрите.</string>
|
||||
<string name="bookmark_already_exists">Подписание книги уже существует.</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_describe">Шрифт, встроенный в ассистентку, настоятельно рекомендуется использовать.</string>
|
||||
<string name="directory_does_not_exist">Каталога не существует.</string>
|
||||
<string name="special_thanks_to">Особая благодарность.</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="registration_success_message">Код активации аккаунта был отправлен на ваш почтовый ящик. Если письмо не было получено, почтовый ящик можно рассматривать как спам. Пожалуйста, проверьте мусорные баки.</string>
|
||||
<string name="please_login_first">Заходите, пожалуйста.</string>
|
||||
<string name="network_error">Интернет-ошибка.</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_describe">Введена в действие только в версии Release, бета-версии, с обязательным обновлением.</string>
|
||||
<string name="loading_values">Количество загрузки...</string>
|
||||
|
@ -534,6 +540,9 @@
|
|||
<string name="expiration_time_tip">Срок действия: 1 %</string>
|
||||
<string name="community">сообществ</string>
|
||||
<string name="recommended">рекомендова</string>
|
||||
<string name="local">местн</string>
|
||||
<string name="network">сет</string>
|
||||
<string name="template_maker">Сборщик шаблонов</string>
|
||||
<string name="ranking">сем</string>
|
||||
<string name="my">мо</string>
|
||||
<string name="latest_release">Последний выпуск.</string>
|
||||
|
@ -557,6 +566,7 @@
|
|||
<string name="installation">установк</string>
|
||||
<string name="installation_ing">Установка...</string>
|
||||
<string name="installated">Установлено.</string>
|
||||
<string name="template_community">Сообщество шаблонов</string>
|
||||
<string name="work_of_home_page">Смотри.</string>
|
||||
<string name="audit">Этот модуль скрыт снаружи, видимый только вами и администратором.</string>
|
||||
<string name="follow">вниман</string>
|
||||
|
@ -727,6 +737,7 @@
|
|||
<string name="undo">снят</string>
|
||||
<string name="redo">передела</string>
|
||||
<string name="del_mod">удал</string>
|
||||
<string name="delete_error">Удаление не удалось.</string>
|
||||
<string name="need_save">[несохраненные</string>
|
||||
<string name="game_data_and_synchronization">Данные игры синхронизированы</string>
|
||||
<string name="game_data_and_synchronization_describe">Управление синхронизированными данными игры.</string>
|
||||
|
@ -807,6 +818,7 @@
|
|||
<string name="turret_design">Проектирование башни</string>
|
||||
<string name="experience_the_plan">Программа пользовательского опыта</string>
|
||||
<string name="experience_the_plan_describe">Анонимная отправка программного обеспечения для уничтожения информации.</string>
|
||||
<string name="anonymous_send_completed">Анонимная ошибка отправлена</string>
|
||||
<string name="update_and_iteration">Обновление версии с программой пользовательского опыта</string>
|
||||
<string name="is_paid">Вы заплатили\? (неоплаченный заказ будет просрочен и не сможет больше платить за него).</string>
|
||||
<string name="paid_yes">Да, я заплатил за него</string>
|
||||
|
@ -823,5 +835,54 @@
|
|||
<string name="dynamic_color">Динамический цвет</string>
|
||||
<string name="dynamic_color_tip">Следуйте за обоями устройства для замены тематического цвета.</string>
|
||||
<string name="dynamic_color_disabled">Это устройство не поддерживает динамические цвета.</string>
|
||||
<string name="an_unsupported_file_type">Неподдерживаемый формат файла составляет 1 %.</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>
|
|
@ -53,6 +53,7 @@
|
|||
<item>@string/wechat_pay</item>
|
||||
<item>@string/alipay</item>
|
||||
<item>@string/qq_pay</item>
|
||||
<!-- <item>@string/paypal</item>-->
|
||||
</string-array>
|
||||
|
||||
<string-array name="gender_entries">
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
<string name="navigation_tip">共%1$d个项目支持快速导航。</string>
|
||||
<string name="qq_pay">QQ钱包</string>
|
||||
<string name="wechat_pay">微信支付</string>
|
||||
<string name="paypal">PayPal</string>
|
||||
<string name="alipay">支付宝</string>
|
||||
<string name="dialog_title2">解压</string>
|
||||
<string name="dialog_title3">修复</string>
|
||||
|
@ -729,9 +730,12 @@
|
|||
<string name="time_limit">有效期至:%1$s 可使用%2$s次</string>
|
||||
<string name="payment_reminders">我们会在收到您的订单后24小时内充值进您的账户,请耐心等待。若您的订单未在24小时内处理,请向我们提交您的订单号申请处理.</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="sava_code_and_copy_id">保存收款码,并复制备注</string>
|
||||
<string name="paypal_payment">使用PayPal支付</string>
|
||||
<string name="pay_tip2">我们已将二维码图像存放到了您的设备上。是否现在跳转至%1$s付款?</string>
|
||||
<string name="qq">QQ</string>
|
||||
<string name="wechat">微信</string>
|
||||
|
@ -871,6 +875,7 @@
|
|||
<string name="setting_dynamic_color" translatable="false">DynamicColor</string>
|
||||
<string name="dynamic_color_tip">跟随设备壁纸更换主题色。</string>
|
||||
<string name="dynamic_color_disabled">此设备不支持动态颜色。</string>
|
||||
<string name="an_unsupported_file_type">不支持的文件格式%1$s。</string>
|
||||
<string name="title">标题</string>
|
||||
<string name="search_type_mod">模组</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="file_sort_type">文件排序方式</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="customize_edit_text">定制编辑框</string>
|
||||
<string name="subscription">订阅</string>
|
||||
|
@ -923,5 +929,8 @@
|
|||
<string name="search_suggestions_null">无搜索建议。</string>
|
||||
<string name="search_suggestions_loading">获取搜索建议...</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>
|
|
@ -94,6 +94,12 @@
|
|||
app:title="@string/custom_symbol"
|
||||
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
|
||||
android:max="160"
|
||||
app:key="@string/setting_identifiers_prompt_number"
|
||||
|
|
|
@ -19,25 +19,14 @@ class ListParser(val context: Context, val data: ListParserDataBean) : TemplateP
|
|||
private val itemList: List<String> = data.itemList.split(",")
|
||||
private val dataList: List<String>? = data.dataList?.split(",")
|
||||
override fun getInput(): String {
|
||||
val index = parserListBinding.spacer.selectedItemPosition
|
||||
return if (dataList != null && dataList.size == itemList.size) {
|
||||
dataList[index]
|
||||
} else {
|
||||
itemList[index]
|
||||
}
|
||||
return parserListBinding.inputEditText.text.toString()
|
||||
}
|
||||
|
||||
|
||||
override val contextView: View
|
||||
get() {
|
||||
val adapter =
|
||||
ArrayAdapter<String>(
|
||||
context,
|
||||
android.R.layout.simple_spinner_dropdown_item,
|
||||
itemList
|
||||
)
|
||||
parserListBinding.spacer.adapter = adapter
|
||||
parserListBinding.nameView.text = data.name
|
||||
parserListBinding.inputEditText.setSimpleItems(itemList.toTypedArray())
|
||||
parserListBinding.inputLayout.hint = data.name
|
||||
return parserListBinding.root
|
||||
}
|
||||
|
||||
|
|
|
@ -4,15 +4,19 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:padding="8dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/nameView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="提示" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spacer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
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"/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
Loading…
Reference in New Issue
Block a user