Commit 751b11ff authored by wanglei's avatar wanglei

...ui

parent ab5efca0
package com.base.datarecovery.fragment package com.base.datarecovery.fragment
import android.content.ComponentCallbacks
import android.content.Intent import android.content.Intent
import android.view.View import android.view.View
import android.widget.Toast import android.widget.Toast
...@@ -75,10 +76,11 @@ class PrivacyPageFragment( ...@@ -75,10 +76,11 @@ class PrivacyPageFragment(
} }
binding.swipeRefreshLayout.setOnRefreshListener { binding.swipeRefreshLayout.setOnRefreshListener {
binding.swipeRefreshLayout.isRefreshing = true binding.swipeRefreshLayout.isRefreshing = true
initData() initData {
binding.root.postDelayed({ binding.root.postDelayed({
binding.swipeRefreshLayout.isRefreshing = false binding.swipeRefreshLayout.isRefreshing = false
}, Random.nextLong(2500)) }, Random.nextLong(1500))
}
} }
binding.tvManager.setOnClickListener { binding.tvManager.setOnClickListener {
startActivity(Intent(requireContext(), PrivacyManageActivity::class.java).apply { startActivity(Intent(requireContext(), PrivacyManageActivity::class.java).apply {
...@@ -89,7 +91,7 @@ class PrivacyPageFragment( ...@@ -89,7 +91,7 @@ class PrivacyPageFragment(
} }
private fun initData() { private fun initData(callback: (() -> Unit)? = null) {
val dir = if (mediaType == "Photos") { val dir = if (mediaType == "Photos") {
File(requireContext().filesDir, "photos") File(requireContext().filesDir, "photos")
} else { } else {
...@@ -112,9 +114,9 @@ class PrivacyPageFragment( ...@@ -112,9 +114,9 @@ class PrivacyPageFragment(
binding.rv.visibility = View.VISIBLE binding.rv.visibility = View.VISIBLE
binding.ivAdd.visibility = View.VISIBLE binding.ivAdd.visibility = View.VISIBLE
binding.tvManager.visibility = View.VISIBLE binding.tvManager.visibility = View.VISIBLE
adapter.setData(list)
} }
adapter.setData(list)
callback?.invoke()
}) })
} }
} }
\ No newline at end of file
...@@ -5,7 +5,7 @@ import com.base.datarecovery.activity.SplashActivity ...@@ -5,7 +5,7 @@ import com.base.datarecovery.activity.SplashActivity
object ConfigHelper { object ConfigHelper {
const val privacyPolicy = "" const val privacyPolicy = "https://sites.google.com/view/file-recovery-po/file-recovery"
// 域名 // 域名
const val eventUrl = "https://rp.easyfilemanager.xyz" const val eventUrl = "https://rp.easyfilemanager.xyz"
......
<resources> <resources>
<string name="app_name">File Recovery</string> <string name="app_name">File Recovery &amp; Photo Recovery</string>
<!-- TODO: Remove or change this placeholder text --> <!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string> <string name="hello_blank_fragment">Hello blank fragment</string>
<string name="facebook_app_id">11</string> <string name="facebook_app_id">1141667540450666</string>
</resources> </resources>
\ No newline at end of file
...@@ -24,5 +24,5 @@ dependencyResolutionManagement { ...@@ -24,5 +24,5 @@ dependencyResolutionManagement {
} }
} }
rootProject.name = "Data Recovery" rootProject.name = "File Recovery"
include ':app' include ':app'
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