Commit 7dbb47be authored by wanglei's avatar wanglei

...ui

parent e4ebb741
......@@ -6,6 +6,7 @@ import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import androidx.core.view.updatePadding
import com.base.datarecovery.databinding.ActivityMainBinding
import com.base.datarecovery.help.BaseActivity
import com.base.datarecovery.utils.BarUtils
......@@ -20,6 +21,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
override fun initView() {
BarUtils.setStatusBarLightMode(this, true)
BarUtils.setStatusBarColor(this, Color.TRANSPARENT)
binding.root.updatePadding(top = BarUtils.getStatusBarHeight())
}
}
\ No newline at end of file
......@@ -51,15 +51,18 @@ class RepeatActivity : BaseActivity<ActivityRepeatBinding>() {
if (checkStorePermission()) {
initData()
} else {
showGerPermission(null, deny = { finishToMain() }, allow = {
requestStorePermission(launcher, result = {
if (it) {
initData()
} else {
finishToMain()
}
showGerPermission("Storage Permission Required",
"This feature requires access to your storage to scan your files and clean up repeat photos. We will not transmit your data to any third-party service. Please grant permission so that we can provide you with better service.",
deny = { finishToMain() },
allow = {
requestStorePermission(launcher, result = {
if (it) {
initData()
} else {
finishToMain()
}
})
})
})
}
}
......
......@@ -19,7 +19,7 @@ class AppFunctionAdapter(val click: (name: String) -> Unit) :
RecyclerView.Adapter<AppFunctionAdapter.JJJ>() {
val list = arrayListOf(
Fun(JUNK_CLEANER, R.mipmap.h_cleanjunk, "Clean junk regularly to free up space", "Clean Up"),
Fun(JUNK_CLEANER, R.mipmap.clean, "Clean junk regularly to free up space", "Clean Up"),
Fun(REPEAT_PHOTOS, R.mipmap.repeatedphotos, "Check similar photos to release more space", "Clean Up"),
Fun(SCREENSHOT_CLEANER, R.mipmap.screenshots, "Too many screenshots? Free up your phone storage!", "Clean Up"),
)
......
......@@ -42,17 +42,22 @@ class PrivacyPageFragment(
} else {
val activity = (requireActivity() as PrivacySpaceActivity)
requireContext().showGerPermission(null, deny = {
activity.finishToMain()
}, allow = {
requireContext().requestStorePermission(activity.launcher, result = {
if (it) {
initData()
} else {
activity.finishToMain()
}
requireContext().showGerPermission("Privacy Space Access",
"To help you protect your privacy, our app needs to scan your device for photos and videos. We will use this information to create a secure private space that only you can access. We do not collect any personal information or data. Please click \"Agree\" to grant us permission to scan your device or \"Cancel\" to exit.",
denyText = "Exit",
allowText = "Agree",
deny = {
activity.finishToMain()
},
allow = {
requireContext().requestStorePermission(activity.launcher, result = {
if (it) {
initData()
} else {
activity.finishToMain()
}
})
})
})
}
}
......
......@@ -17,7 +17,7 @@ object ConfigHelper {
const val nativeAdmobId = "ca-app-pub-3940256099942544/2247696110"
// 正式包名
const val packageName = ""
const val packageName = "com.kuke.photosrecovery.allrecovery.acbcali"
val noLoadingActivities = listOf(
"full", // 过滤全屏广告
......
......@@ -46,6 +46,8 @@ object DialogViews {
fun Context.showGerPermission(
tittle: String? = null,
desc: String? = null,
denyText: String? = null,
allowText: String? = null,
deny: ((view: Dialog) -> Unit)? = null,
allow: ((view: Dialog) -> Unit)? = null
): Dialog {
......@@ -61,6 +63,9 @@ object DialogViews {
tittle?.let { binding.tvTitle.text = it }
desc?.let { binding.tvDesc.text = it }
denyText?.let { binding.idDeny.text=it }
allowText?.let { binding.idTvAllow.text=it }
binding.idFullLottie.imageAssetsFolder = "recovery_permission_finger/images/"
binding.idFullLottie.setAnimation("recovery_permission_finger/data.json")
binding.idFullLottie.playAnimation()
......
......@@ -57,7 +57,7 @@
android:id="@+id/tv_pin_tip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Protect your private photos adnd videos by creating PIN"
android:text="Protect your private photos and videos by creating PIN"
tools:ignore="HardcodedText" />
<TextView
......
......@@ -43,7 +43,7 @@
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Screenshot Cleaner"
android:text="Repeat Photos"
android:textSize="19sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
......@@ -104,7 +104,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:layout_marginBottom="30dp"
android:text="Screenshots totally"
android:text="Clean totally"
android:textColor="#666666"
android:textSize="15sp"
app:layout_constraintBottom_toBottomOf="parent"
......
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