Commit ed77af08 authored by wanglei's avatar wanglei

...

parent 3ef65d8b
...@@ -22,6 +22,7 @@ import com.base.pdfreader2.BuildConfig ...@@ -22,6 +22,7 @@ import com.base.pdfreader2.BuildConfig
import com.base.pdfreader2.fcm.FCMManager import com.base.pdfreader2.fcm.FCMManager
import com.base.pdfreader2.fcm.ScreenStatusReceiver import com.base.pdfreader2.fcm.ScreenStatusReceiver
import com.base.pdfreader2.helper.WeatherUtils.requestWeatherData import com.base.pdfreader2.helper.WeatherUtils.requestWeatherData
import com.facebook.FacebookSdk
import com.tom_roush.pdfbox.android.PDFBoxResourceLoader import com.tom_roush.pdfbox.android.PDFBoxResourceLoader
...@@ -72,9 +73,10 @@ class MyApplication : Application() { ...@@ -72,9 +73,10 @@ class MyApplication : Application() {
} }
} }
fun initApp() { private fun initApp() {
//todo
// SolarEngineManager.getInstance().preInit(context, "81a11caa4076cd7c") // SolarEngineManager.getInstance().preInit(context, "81a11caa4076cd7c")
// FacebookSdk.sdkInitialize(applicationContext) FacebookSdk.sdkInitialize(applicationContext)
var topicNumber = System.currentTimeMillis().toFormatMinute() var topicNumber = System.currentTimeMillis().toFormatMinute()
LogEx.logDebug(TAG, "topicNumber=$topicNumber") LogEx.logDebug(TAG, "topicNumber=$topicNumber")
if (topic_number.isNotEmpty()) { if (topic_number.isNotEmpty()) {
......
...@@ -47,7 +47,7 @@ class DocumentAdapter() : BaseQuickAdapter<DocumentBean, DocumentAdapter.Documen ...@@ -47,7 +47,7 @@ class DocumentAdapter() : BaseQuickAdapter<DocumentBean, DocumentAdapter.Documen
binding.tvTime.text = file.lastModified().toFormatTime() binding.tvTime.text = file.lastModified().toFormatTime()
binding.tvSize.text = file.length().toFormatSize() binding.tvSize.text = file.length().toFormatSize()
} }
LogEx.logDebug(TAG, "uiType=${item.uiType}") // LogEx.logDebug(TAG, "uiType=${item.uiType}")
when (item.uiType) { when (item.uiType) {
0 -> {//首页 0 -> {//首页
binding.flSelect.visibility = View.GONE binding.flSelect.visibility = View.GONE
......
...@@ -144,7 +144,7 @@ class DocumentFragment() : BaseFragment<FragmentDocumentBinding>() { ...@@ -144,7 +144,7 @@ class DocumentFragment() : BaseFragment<FragmentDocumentBinding>() {
} }
} }
fun changeRvUI(list: List<DocumentBean>) { private fun changeRvUI(list: List<DocumentBean>) {
if (list.isEmpty()) { if (list.isEmpty()) {
binding.llEmpty.visibility = View.VISIBLE binding.llEmpty.visibility = View.VISIBLE
binding.swipeRefreshLayout.visibility = View.GONE binding.swipeRefreshLayout.visibility = View.GONE
......
...@@ -44,23 +44,11 @@ class DocumentPresenter( ...@@ -44,23 +44,11 @@ class DocumentPresenter(
} }
val list = when (type) { val list = when (type) {
TYPE_PDF -> { TYPE_PDF -> getPdfData()
return getPdfData() TYPE_WORD -> getWordData()
} TYPE_EXCEL -> getExcelData()
TYPE_PPT -> getPptData()
TYPE_WORD -> { else -> listOf()
return getWordData()
}
TYPE_EXCEL -> {
return getExcelData()
}
TYPE_PPT -> {
return getPptData()
}
else -> listOf<DocumentBean>()
} }
if (needSort) { if (needSort) {
return sortByMode(list) return sortByMode(list)
...@@ -246,7 +234,8 @@ class DocumentPresenter( ...@@ -246,7 +234,8 @@ class DocumentPresenter(
return new return new
} }
fun sortByMode(list: List<DocumentBean>): List<DocumentBean> { private fun sortByMode(list: List<DocumentBean>): List<DocumentBean> {
LogEx.logDebug(TAG, "SortMode=${SortMode}")
when (SortMode) { when (SortMode) {
ConstObject.UI_SORT_LAST_MODIFIED -> { ConstObject.UI_SORT_LAST_MODIFIED -> {
return list.sortedByDescending { File(it.path).lastModified() } return list.sortedByDescending { File(it.path).lastModified() }
...@@ -261,6 +250,7 @@ class DocumentPresenter( ...@@ -261,6 +250,7 @@ class DocumentPresenter(
} }
UI_SORT_NAME_Z_A -> { UI_SORT_NAME_Z_A -> {
LogEx.logDebug(TAG, ConstObject.UI_SORT_NAME_Z_A)
return list.sortedByDescending { File(it.path).name } return list.sortedByDescending { File(it.path).name }
} }
......
...@@ -35,6 +35,7 @@ class ResultActivity : BaseActivity<ActivityResultBinding>() { ...@@ -35,6 +35,7 @@ class ResultActivity : BaseActivity<ActivityResultBinding>() {
when (from) { when (from) {
FUNCTION_SCAM_JUNK -> { FUNCTION_SCAM_JUNK -> {
binding.tvFunction.text = getString(R.string.app_process)
binding.ivFunction.setImageResource(R.mipmap.process) binding.ivFunction.setImageResource(R.mipmap.process)
binding.tvFunctionDesc.text = getString(R.string.manage_processes_run_in_the_background) binding.tvFunctionDesc.text = getString(R.string.manage_processes_run_in_the_background)
binding.tvFunctionBtn.text = getString(R.string.scan_now) binding.tvFunctionBtn.text = getString(R.string.scan_now)
...@@ -46,6 +47,7 @@ class ResultActivity : BaseActivity<ActivityResultBinding>() { ...@@ -46,6 +47,7 @@ class ResultActivity : BaseActivity<ActivityResultBinding>() {
} }
FUNCTION_APP_PROCESS -> { FUNCTION_APP_PROCESS -> {
binding.tvFunction.text = resources.getString(R.string.clean_junk)
binding.ivFunction.setImageResource(R.mipmap.clean) binding.ivFunction.setImageResource(R.mipmap.clean)
binding.tvFunctionDesc.text = getString(R.string.clean_up_your_phone_storage) binding.tvFunctionDesc.text = getString(R.string.clean_up_your_phone_storage)
binding.tvFunctionBtn.text = getString(R.string.clean_now) binding.tvFunctionBtn.text = getString(R.string.clean_now)
...@@ -68,6 +70,9 @@ class ResultActivity : BaseActivity<ActivityResultBinding>() { ...@@ -68,6 +70,9 @@ class ResultActivity : BaseActivity<ActivityResultBinding>() {
onBackPressedDispatcher.addCallback { onBackPressedDispatcher.addCallback {
finishToMain() finishToMain()
} }
binding.flFanhui.setOnClickListener {
onBackPressedDispatcher.onBackPressed()
}
} }
......
...@@ -11,9 +11,6 @@ import com.base.pdfreader2.bean.ConstObject.UI_SORT_NAME_A_Z ...@@ -11,9 +11,6 @@ import com.base.pdfreader2.bean.ConstObject.UI_SORT_NAME_A_Z
import com.base.pdfreader2.bean.ConstObject.UI_SORT_NAME_Z_A import com.base.pdfreader2.bean.ConstObject.UI_SORT_NAME_Z_A
import com.base.pdfreader2.databinding.DialogDeleteBinding import com.base.pdfreader2.databinding.DialogDeleteBinding
import com.base.pdfreader2.databinding.DialogSortBinding import com.base.pdfreader2.databinding.DialogSortBinding
import com.base.pdfreader2.databinding.DialogStoragePermissionBinding
import com.base.pdfreader2.utils.ActivityLauncher
import com.base.pdfreader2.utils.PermissionUtils.requestStoragePermission
import com.google.android.material.bottomsheet.BottomSheetBehavior import com.google.android.material.bottomsheet.BottomSheetBehavior
import com.google.android.material.bottomsheet.BottomSheetDialog import com.google.android.material.bottomsheet.BottomSheetDialog
......
...@@ -8,7 +8,7 @@ object LogEx { ...@@ -8,7 +8,7 @@ object LogEx {
val filterTAG = arrayOf( val filterTAG = arrayOf(
"", "",
"MediaStoreUtils", "MediaStoreUtils",
"DocumentFragment", // "DocumentFragment",
"EventUtils", "EventUtils",
"ReportUtils", "ReportUtils",
// "NewComUtils", // "NewComUtils",
......
...@@ -130,4 +130,5 @@ ...@@ -130,4 +130,5 @@
<string name="share_word">Share Word</string> <string name="share_word">Share Word</string>
<string name="share_excel">Share Excel</string> <string name="share_excel">Share Excel</string>
<string name="loading_please_wait">Loading, please wait.</string> <string name="loading_please_wait">Loading, please wait.</string>
<string name="app_process">App Process</string>
</resources> </resources>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment