This commit is contained in:
litingting 2025-09-19 18:30:52 +08:00
parent bdb31debc8
commit 2b8bdcb10c
27 changed files with 591 additions and 167 deletions

View File

@ -21,9 +21,8 @@
android:requestLegacyExternalStorage="true"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.FileRecovery"
tools:targetApi="31">
<!-- android:theme="@style/Theme.FileRecovery"-->
<activity
android:name=".photo.PhotoSortingActivity"
android:exported="false" />

Binary file not shown.

View File

@ -1,36 +0,0 @@
package com.ux.video.file.filerecovery.main
import android.graphics.Color
import android.graphics.drawable.ColorDrawable
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.DialogFragment
import com.ux.video.file.filerecovery.R
class FullScreenDialogFragment : DialogFragment() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setStyle(STYLE_NORMAL, R.style.FullScreenDialog)
}
override fun onStart() {
super.onStart()
dialog?.window?.apply {
setLayout(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT
)
setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT)) // 背景透明叠加
}
}
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
return inflater.inflate(R.layout.dialog_fullscreen, container, false)
}
}

View File

@ -5,6 +5,8 @@ import android.app.Activity
import android.content.Context
import android.content.Intent
import android.content.pm.PackageManager
import android.graphics.LinearGradient
import android.graphics.Shader
import android.os.Build
import android.os.Environment
import android.provider.Settings
@ -15,6 +17,7 @@ import androidx.activity.result.contract.ActivityResultContracts
import androidx.core.content.ContextCompat
import androidx.core.net.toUri
import androidx.core.view.isVisible
import com.ux.video.file.filerecovery.R
import com.ux.video.file.filerecovery.base.BaseActivity
import com.ux.video.file.filerecovery.databinding.ActivityMainBinding
import com.ux.video.file.filerecovery.main.ScanSelectTypeActivity
@ -22,7 +25,7 @@ import com.ux.video.file.filerecovery.utils.ScanManager
class MainActivity : BaseActivity<ActivityMainBinding>() {
private var dialogPermission: PermissionDialogFragment? = null
//是否正确引导用户打开所有文件管理权限
private var isRequestPermission = false
private var currentGoType = ScanSelectTypeActivity.Companion.VALUE_PHOTO
@ -69,19 +72,10 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
override fun initData() {
super.initData()
initTitleColor()
binding.run {
allow.setOnClickListener {
try {
val intent =
Intent(Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION).apply {
data = "package:${packageName}".toUri()
}
startActivity(intent)
} catch (e: Exception) {
val intent = Intent(Settings.ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION)
startActivity(intent)
}
isRequestPermission = true
}
layoutPhoto.setOnClickListener {
currentGoType = ScanSelectTypeActivity.Companion.VALUE_PHOTO
@ -103,7 +97,6 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
binding.btnPermission.setOnClickListener {
binding.layoutPermission.isVisible = true
}
binding.btnScanAllPhoto.setOnClickListener {
@ -141,12 +134,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
// ScanManager.scanAllDocuments(root, results)
// ScanRepository.instance.setResults(results)
startActivity(Intent(this@MainActivity, ScanSelectTypeActivity::class.java).apply {
putExtra(
ScanSelectTypeActivity.Companion.KEY_FILE_TYPE,
ScanSelectTypeActivity.Companion.VALUE_DOCUMENT
)
})
// startActivity(Intent(this@MainActivity,DocumentsScanResultActivity::class.java))
@ -160,19 +148,39 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
}
}
private fun initTitleColor() {
binding.tvTitle.apply {
// 渐变色
val width = paint.measureText(text.toString())
val shader = LinearGradient(
0f, 0f, width, textSize,
intArrayOf(getColor(R.color.color_title_start_color),getColor(R.color.color_title_end_color)),
null,
Shader.TileMode.CLAMP
)
paint.shader = shader
setShadowLayer(2f, 2f, 2f, getColor(R.color.color_title_start_color))
}
}
override fun onResume() {
super.onResume()
if(isRequestPermission&&hasAllFilesAccess(this)){
if (isRequestPermission && hasAllFilesAccess(this)) {
isRequestPermission = false
ScanManager.showLog("--", "-------onResume")
startScan()
binding.layoutPermission.visibility = View.GONE
}
}
private fun intentCheck() {
if (!hasAllFilesAccess(this)) {
requestPermission(this@MainActivity)
requestPermission()
} else {
ScanManager.showLog("--", "-------权限已经授予")
startScan()
@ -198,9 +206,22 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
}
}
private fun requestPermission(activity: Activity) {
private fun requestPermission() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
binding.layoutPermission.visibility = View.VISIBLE
dialogPermission = dialogPermission?: PermissionDialogFragment{
try {
val intent =
Intent(Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION).apply {
data = "package:${packageName}".toUri()
}
startActivity(intent)
} catch (e: Exception) {
val intent = Intent(Settings.ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION)
startActivity(intent)
}
isRequestPermission = true
}
dialogPermission?.show(supportFragmentManager,"")
} else {
requestPermissionLauncher.launch(
arrayOf(

View File

@ -0,0 +1,41 @@
package com.ux.video.file.filerecovery.main
import android.graphics.Color
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.core.graphics.drawable.toDrawable
import androidx.fragment.app.DialogFragment
import com.ux.video.file.filerecovery.databinding.DialogPermissionBinding
class PermissionDialogFragment(val onClickAllow: () -> Unit) : DialogFragment() {
private lateinit var binding: DialogPermissionBinding
override fun onStart() {
super.onStart()
dialog?.window?.apply {
setLayout(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT
)
setBackgroundDrawable(Color.TRANSPARENT.toDrawable())
}
}
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
binding = DialogPermissionBinding.inflate(inflater)
binding.run {
cancel.setOnClickListener { dismiss() }
allow.setOnClickListener {
onClickAllow()
dismiss()
}
}
return binding.root
}
}

View File

@ -32,7 +32,7 @@ class ScanSelectTypeActivity : BaseActivity<ActivityScanSelectTypeBinding>() {
}
override fun initData() {
super.initData()
binding.imageBack.setOnClickListener { finish() }
binding.scanAllFile.setOnClickListener {
startActivity(Intent(this@ScanSelectTypeActivity, ScanningActivity::class.java).apply {

View File

@ -4,8 +4,13 @@ import android.content.Intent
import android.os.Environment
import android.view.LayoutInflater
import androidx.lifecycle.lifecycleScope
import com.ux.video.file.filerecovery.R
import com.ux.video.file.filerecovery.base.BaseActivity
import com.ux.video.file.filerecovery.databinding.ActivityScanningBinding
import com.ux.video.file.filerecovery.main.ScanSelectTypeActivity.Companion.VALUE_AUDIO
import com.ux.video.file.filerecovery.main.ScanSelectTypeActivity.Companion.VALUE_DOCUMENT
import com.ux.video.file.filerecovery.main.ScanSelectTypeActivity.Companion.VALUE_PHOTO
import com.ux.video.file.filerecovery.main.ScanSelectTypeActivity.Companion.VALUE_VIDEO
import com.ux.video.file.filerecovery.utils.ScanManager
import com.ux.video.file.filerecovery.utils.ScanRepository
import com.ux.video.file.filerecovery.utils.ScanState
@ -34,13 +39,64 @@ class ScanningActivity : BaseActivity<ActivityScanningBinding>() {
override fun initData() {
super.initData()
scanType = intent.getIntExtra(KEY_SCAN_TYPE, VALUE_SCAN_TYPE_photo)
setSelectType(scanType)
when (scanType) {
VALUE_SCAN_TYPE_photo, VALUE_SCAN_TYPE_video, VALUE_SCAN_TYPE_audio, VALUE_SCAN_TYPE_documents -> scanAll()
VALUE_SCAN_TYPE_deleted_photo, VALUE_SCAN_TYPE_deleted_video, VALUE_SCAN_TYPE_deleted_audio, VALUE_SCAN_TYPE_deleted_documents -> scanDeleted()
}
binding.scanProgress.setCenterImage(R.drawable.ic_scan_file)
binding.imageViewBack.setOnClickListener { finish() }
}
private fun setSelectType(fileType: Int) {
binding.run {
when (fileType) {
VALUE_SCAN_TYPE_photo -> {
title.text = getString(R.string.photo_title)
tvScanDescribe.text = getString(R.string.describe_photos)
}
VALUE_SCAN_TYPE_deleted_photo -> {
title.text = getString(R.string.photo_title)
tvScanDescribe.text = getString(R.string.describe_delete_photos)
}
VALUE_SCAN_TYPE_video -> {
title.text = getString(R.string.video_title)
tvScanDescribe.text = getString(R.string.describe_videos)
}
VALUE_SCAN_TYPE_deleted_video -> {
title.text = getString(R.string.video_title)
tvScanDescribe.text = getString(R.string.describe_delete_videos)
}
VALUE_SCAN_TYPE_audio -> {
title.text = getString(R.string.audio_title)
tvScanDescribe.text = getString(R.string.describe_audios)
}
VALUE_SCAN_TYPE_deleted_audio -> {
title.text = getString(R.string.audio_title)
tvScanDescribe.text = getString(R.string.describe_delete_audios)
}
VALUE_SCAN_TYPE_documents -> {
title.text = getString(R.string.document_title)
tvScanDescribe.text = getString(R.string.describe_documents)
}
VALUE_SCAN_TYPE_deleted_documents -> {
title.text = getString(R.string.document_title)
tvScanDescribe.text = getString(R.string.describe_delete_documents)
}
}
}
}
private fun scanAll() {
val total = 800
@ -83,12 +139,12 @@ class ScanningActivity : BaseActivity<ActivityScanningBinding>() {
}
private fun updateProgress(scanState: ScanState.Progress){
private fun updateProgress(scanState: ScanState.Progress) {
val total = 1000
scanState.let {
binding.run {
val percent = (it.scannedCount * 100 / total).coerceAtMost(100)
scanProgress.progress = percent
scanProgress.setProgress(percent)
tvScanCurrentFilePath.text = it.filePath
tvScanCurrentCounts.text = it.scannedCount.toString()
ScanManager.showLog("Scan", it.filePath)
@ -100,18 +156,20 @@ class ScanningActivity : BaseActivity<ActivityScanningBinding>() {
}
}
private fun updateComplete(scanState: ScanState.Complete){
binding.scanProgress.progress = 100
private fun updateComplete(scanState: ScanState.Complete) {
binding.scanProgress.setProgress(100)
scanState.let {
// when(scanType){
// VALUE_SCAN_TYPE_photo,VALUE_SCAN_TYPE_deleted_photo->ScanRepository.instance.setPhotoResults(it.result)
// VALUE_SCAN_TYPE_video,VALUE_SCAN_TYPE_deleted_video->ScanRepository.instance.setVideoResults(it.result)
// VALUE_SCAN_TYPE_audio,VALUE_SCAN_TYPE_deleted_audio->ScanRepository.instance.setPhotoResults(it.result)
// VALUE_SCAN_TYPE_documents,VALUE_SCAN_TYPE_deleted_documents->ScanRepository.instance.setPhotoResults(it.result)
// }
startActivity(Intent(this@ScanningActivity,ScanResultDisplayActivity::class.java).apply {
putParcelableArrayListExtra(ScanResultDisplayActivity.KEY_SCAN_RESULT, it.result)
})
startActivity(
Intent(
this@ScanningActivity,
ScanResultDisplayActivity::class.java
).apply {
putParcelableArrayListExtra(
ScanResultDisplayActivity.KEY_SCAN_RESULT,
it.result
)
})
ScanManager.showLog(
"HiddenScan",
"完成: ${it.result.size}"

View File

@ -0,0 +1,100 @@
package com.ux.video.file.filerecovery.utils
import android.annotation.SuppressLint
import android.content.Context
import android.graphics.Bitmap
import android.graphics.BitmapFactory
import android.graphics.Canvas
import android.graphics.Color
import android.graphics.Paint
import android.graphics.RectF
import android.util.AttributeSet
import android.view.View
import com.ux.video.file.filerecovery.R
class CircleImageProgressView @JvmOverloads constructor(
context: Context, attrs: AttributeSet? = null
) : View(context, attrs) {
private val paintBg = Paint(Paint.ANTI_ALIAS_FLAG).apply {
style = Paint.Style.STROKE
strokeWidth = 20f
color = Color.parseColor("#C9DDEF") // 背景浅蓝
}
private val paintProgress = Paint(Paint.ANTI_ALIAS_FLAG).apply {
style = Paint.Style.STROKE
strokeWidth = 20f
color = Color.parseColor("#0014F0")
strokeCap = Paint.Cap.ROUND // 圆角进度条
}
private var progress = 0 // 0 - 100
private var centerBitmap: Bitmap? = null
private var imageScale = 1f
init {
context.theme.obtainStyledAttributes(attrs, R.styleable.CircleImageProgressView, 0, 0).apply {
try {
imageScale = getFloat(R.styleable.CircleImageProgressView_centerImageScale, 0.5f)
} finally {
recycle()
}
}
}
fun setProgress(value: Int) {
progress = value.coerceIn(0, 100)
invalidate()
}
fun setCenterImage(resId: Int) {
centerBitmap = BitmapFactory.decodeResource(resources, resId)
invalidate()
}
@SuppressLint("DrawAllocation")
override fun onDraw(canvas: Canvas) {
super.onDraw(canvas)
val stroke = paintBg.strokeWidth
val rect = RectF(stroke, stroke, width - stroke, height - stroke)
// 背景圆环
canvas.drawArc(rect, 0f, 360f, false, paintBg)
// 中心图片
centerBitmap?.let {
// val left = (width - it.width) / 2f
// val top = (height - it.height) / 2f
// canvas.drawBitmap(it, left, top, null)
// val desiredSize = width * imageScale
// val rectDst = RectF(
// (width - desiredSize) / 2f,
// (height - desiredSize) / 2f,
// (width + desiredSize) / 2f,
// (height + desiredSize) / 2f
// )
// canvas.drawBitmap(it, null, rectDst, null)
val innerRadius = (width / 2f) - stroke // 圆环内半径
val left = (width / 2f) - innerRadius
val top = (height / 2f) - innerRadius
val right = (width / 2f) + innerRadius
val bottom = (height / 2f) + innerRadius
val rectDst = RectF(left, top, right, bottom)
// 缩放图片填满内圆区域
// canvas.drawBitmap(it, null, rectDst, null)
}
// 进度圆弧
val sweepAngle = progress * 360f / 100f
canvas.drawArc(rect, -90f, sweepAngle, false, paintProgress)
}
}

View File

@ -14,7 +14,7 @@ class CustomTextView @JvmOverloads constructor(
companion object {
private var regular: Typeface? = null
private var bold: Typeface? = null
private var italic: Typeface? = null
private var alimama: Typeface? = null
}
init {
@ -22,25 +22,32 @@ class CustomTextView @JvmOverloads constructor(
val typedArray = context.obtainStyledAttributes(it, R.styleable.CustomTextView)
val type = typedArray.getInt(R.styleable.CustomTextView_fontType, 0)
typedArray.recycle()
Typeface.create("sans-serif-light", Typeface.NORMAL) // Roboto Light
Typeface.create("sans-serif-thin", Typeface.ITALIC) // Roboto Thin Italic
Typeface.create("sans-serif-medium", Typeface.BOLD) // Roboto Medium Bold
Typeface.create("sans-serif-condensed", Typeface.NORMAL) // Roboto Condensed
when (type) {
0 -> {
if (regular == null) {
regular = Typeface.createFromAsset(context.assets, "fonts/PingFang Regular_0.ttf")
}
typeface = regular
typeface = Typeface.create(Typeface.DEFAULT, Typeface.NORMAL)
}
1 -> {
if (bold == null) {
bold = Typeface.createFromAsset(context.assets, "fonts/PingFang Bold_0.ttf")
}
typeface = bold
typeface = Typeface.create(Typeface.DEFAULT, Typeface.BOLD)
}
2 -> {
if (italic == null) {
italic = Typeface.createFromAsset(context.assets, "fonts/italic.ttf")
if (alimama == null) {
alimama = Typeface.createFromAsset(context.assets, "fonts/alimama.ttf")
}
typeface = italic
typeface = alimama
}
3 -> {
typeface = Typeface.create("sans-serif-medium", Typeface.NORMAL)
}
else -> typeface = Typeface.DEFAULT
}
}
}

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="8dp"/>
<solid android:color="@color/dialog_btn_stoke"/>
</shape>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="8dp"/>
<stroke android:color="@color/dialog_btn_stoke" android:width="1dp"/>
</shape>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="20dp" />
<solid android:color="@color/white" />
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 667 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 480 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

View File

@ -5,6 +5,7 @@
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg_main"
android:orientation="vertical"
tools:context=".main.MainActivity">
@ -17,7 +18,7 @@
android:text="@string/app_name"
android:textColor="@color/main_title"
android:textSize="24sp"
app:fontType="bold"
app:fontType="alimama"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
@ -49,11 +50,12 @@
android:layout_height="wrap_content"
android:layout_marginStart="18dp"
android:text="@string/main_title_photo"
android:textColor="@color/main_title"
android:textColor="@color/color_title_blue"
android:textSize="16sp"
app:fontType="bold" />
<com.ux.video.file.filerecovery.utils.CustomTextView
android:id="@+id/sub_photo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/tv_photo"
@ -64,6 +66,13 @@
android:textSize="14sp"
app:fontType="regular" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/sub_photo"
android:layout_marginTop="12dp"
android:src="@drawable/image_main_photo" />
</RelativeLayout>
@ -72,9 +81,9 @@
android:layout_width="0dp"
android:layout_height="168dp"
android:layout_marginStart="11dp"
android:layout_marginEnd="16dp"
android:background="@drawable/main_type_bg"
android:paddingTop="18dp"
android:layout_marginEnd="16dp"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintLeft_toRightOf="@id/layout_photo"
app:layout_constraintRight_toRightOf="parent"
@ -86,7 +95,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="18dp"
android:text="@string/main_title_video"
android:textColor="@color/main_title"
android:textColor="@color/color_title_blue"
android:textSize="16sp"
app:fontType="bold" />
@ -147,11 +156,11 @@
android:layout_width="0dp"
android:layout_height="60dp"
android:layout_marginStart="11dp"
android:layout_marginEnd="16dp"
android:background="@drawable/main_type_bg"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingStart="18dp"
android:layout_marginEnd="16dp"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintLeft_toRightOf="@id/layout_audio"
app:layout_constraintRight_toRightOf="parent"
@ -209,11 +218,11 @@
android:layout_width="0dp"
android:layout_height="60dp"
android:layout_marginStart="11dp"
android:layout_marginEnd="16dp"
android:background="@drawable/main_type_bg"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingStart="18dp"
android:layout_marginEnd="16dp"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintLeft_toRightOf="@id/layout_recovery"
app:layout_constraintRight_toRightOf="parent"
@ -282,16 +291,16 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_name"/>
android:text="@string/app_name" />
<Button
android:id="@+id/allow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="50dp"
android:id="@+id/allow"
android:layout_alignParentBottom="true"
android:text="Allow"/>
android:text="Allow" />
</RelativeLayout>

View File

@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:background="@color/white"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
@ -15,16 +16,20 @@
android:gravity="center_vertical">
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@mipmap/ic_launcher" />
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:paddingVertical="14dp"
android:id="@+id/image_back"
android:paddingHorizontal="13dp"
android:src="@drawable/black_return" />
<com.ux.video.file.filerecovery.utils.CustomTextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerInParent="true"
android:text="@string/allow"
android:textColor="@color/main_title"
android:textSize="16sp"
app:fontType="bold" />

View File

@ -1,56 +1,124 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:orientation="vertical"
tools:context=".result.ScanningActivity">
<ImageView
android:id="@+id/image_view_back"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_marginStart="15dp"
android:padding="10dp"
android:src="@drawable/icon_back" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="44dp"
android:background="@color/white"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="45dp"
android:layout_marginStart="15dp"
android:layout_toEndOf="@id/image_view_back"
android:gravity="center"
android:text="@string/app_name" />
<ImageView
android:id="@+id/image_view_back"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:paddingHorizontal="13dp"
android:paddingVertical="14dp"
android:src="@drawable/black_return" />
<ProgressBar
android:id="@+id/scan_progress"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="130dp"
android:layout_height="130dp"
android:layout_centerHorizontal="true"
android:layout_marginTop="260dp"
android:max="100"
android:progress="0"
android:progressDrawable="@drawable/circle_progress_drawable" />
<TextView
android:id="@+id/tv_scan_current_counts"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/scan_progress"
android:layout_centerHorizontal="true"
android:text="10 photos"
android:textColor="@color/black" />
<com.ux.video.file.filerecovery.utils.CustomTextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@color/main_title"
android:textSize="16sp"
app:fontType="bold" />
</RelativeLayout>
<TextView
android:id="@+id/tv_scan_current_file_path"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/tv_scan_current_counts"
android:layout_marginStart="25dp"
android:layout_marginTop="25dp"
android:text="10 photos"
android:textColor="@color/black" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_bg"
android:orientation="vertical">
</RelativeLayout>
<com.ux.video.file.filerecovery.utils.CircleImageProgressView
android:id="@+id/scan_progress"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="130dp"
android:layout_height="130dp"
android:layout_centerHorizontal="true"
android:layout_marginTop="150dp"
android:max="100"
android:progress="10" />
<LinearLayout
android:id="@+id/linear_counts"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/scan_progress"
android:layout_centerHorizontal="true"
android:layout_marginTop="30dp"
android:orientation="horizontal">
<com.ux.video.file.filerecovery.utils.CustomTextView
android:id="@+id/tv_scan_current_counts"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="10"
android:textColor="@color/main_title"
android:textSize="16sp"
app:fontType="bold" />
<com.ux.video.file.filerecovery.utils.CustomTextView
android:id="@+id/tv_scan_describe"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:text="10"
android:textColor="@color/main_title"
android:textSize="16sp"
app:fontType="bold" />
</LinearLayout>
<LinearLayout
android:id="@+id/linear_loading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/linear_counts"
android:layout_marginStart="16dp"
android:layout_marginTop="100dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<ProgressBar
android:id="@+id/loading_pb"
android:layout_width="24dp"
android:layout_height="24dp"
android:indeterminateTint="@color/main_title" />
<com.ux.video.file.filerecovery.utils.CustomTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="2dp"
android:text="@string/scan"
android:textColor="@color/main_title"
android:textSize="20sp"
app:fontType="bold" />
</LinearLayout>
<TextView
android:id="@+id/tv_scan_current_file_path"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/linear_loading"
android:layout_alignStart="@id/linear_loading"
android:layout_marginTop="10dp"
android:layout_marginEnd="16dp"
android:text="path"
android:textColor="@color/main_sub_title"
android:textSize="12sp" />
</RelativeLayout>
</LinearLayout>

View File

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_name"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginBottom="50dp"
android:id="@+id/allow"
android:layout_alignParentBottom="true"
android:text="Allow"/>
</RelativeLayout>

View File

@ -0,0 +1,80 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:background="@drawable/bg_dialog_permission_white_20"
android:orientation="vertical"
android:padding="20dp">
<com.ux.video.file.filerecovery.utils.CustomTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/permission_request"
android:textSize="20sp"
app:fontType="medium" />
<com.ux.video.file.filerecovery.utils.CustomTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:lineSpacingExtra="2dp"
android:text="@string/permission_request_content"
android:textColor="@color/dialog_permission_content"
android:textSize="14sp" />
<com.ux.video.file.filerecovery.utils.CustomTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:lineSpacingExtra="2dp"
android:text="@string/permission_request_promote"
android:textColor="@color/dialog_permission_content"
android:textSize="10sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="36dp"
android:layout_marginTop="12dp"
android:orientation="horizontal">
<com.ux.video.file.filerecovery.utils.CustomTextView
android:id="@+id/cancel"
android:layout_width="match_parent"
android:layout_height="36dp"
android:layout_weight="1"
android:background="@drawable/bg_dialog_btn_cancel_stoke_8"
android:gravity="center"
android:text="@string/cancel"
android:textColor="@color/dialog_btn_stoke"
android:textSize="14sp"
app:fontType="medium" />
<com.ux.video.file.filerecovery.utils.CustomTextView
android:id="@+id/allow"
android:layout_width="match_parent"
android:layout_height="36dp"
android:layout_marginStart="20dp"
android:layout_weight="1"
android:background="@drawable/bg_dialog_btn_allow_solid_8"
android:gravity="center"
android:text="@string/allow"
android:textColor="@color/white"
android:textSize="14sp"
app:fontType="medium" />
</LinearLayout>
</LinearLayout>
</FrameLayout>

View File

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_name"
android:textSize="29sp"
android:fontFamily="sans-serif"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_name"
android:textSize="29sp"
android:textStyle="bold"
android:fontFamily="sans-serif"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_name"
android:textSize="29sp"
android:fontFamily="sans-serif-light"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_name"
android:textSize="29sp"
android:fontFamily="sans-serif-thin"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_name"
android:textSize="29sp"
android:fontFamily="sans-serif-medium"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_name"
android:textSize="29sp"
android:fontFamily="sans-serif-condensed"/>
</LinearLayout>

View File

@ -4,7 +4,13 @@
<attr name="fontType" format="enum">
<enum name="regular" value="0"/>
<enum name="bold" value="1"/>
<enum name="italic" value="2"/>
<enum name="alimama" value="2"/>
<enum name="medium" value="3"/>
</attr>
</declare-styleable>
<declare-styleable name="CircleImageProgressView">
<attr name="centerImageScale" format="float" />
</declare-styleable>
</resources>

View File

@ -8,4 +8,10 @@
<color name="main_title">#000000</color>
<color name="main_sub_title">#9696A2</color>
<color name="color_bg">#F5F5FA</color>
<color name="color_title_blue">#007AEB</color>
<color name="color_title_start_color">#198BF5</color>
<color name="color_title_end_color">#6D00F2</color>
<color name="dialog_permission_content">#9696A2</color>
<color name="dialog_btn_stoke">#0014F0</color>
</resources>

View File

@ -26,4 +26,19 @@
<string name="video_title">Video recovery</string>
<string name="audio_title">Audio recovery</string>
<string name="document_title">Document recovery</string>
<string name="permission_request">Permission is required to access all files</string>
<string name="permission_request_content">File Recovery -All Recovery requires full access to your device storage to search for lost or deleted files.</string>
<string name="permission_request_promote">We will never share, upload, or send your data without your permission.</string>
<string name="cancel">Cancel</string>
<string name="allow">Allow</string>
<string name="scan">Scanning…</string>
<string name="describe_photos">photos</string>
<string name="describe_delete_photos">deleted photos</string>
<string name="describe_videos">videos</string>
<string name="describe_delete_videos">deleted videos</string>
<string name="describe_audios">audios</string>
<string name="describe_delete_audios">deleted audios</string>
<string name="describe_documents">documents</string>
<string name="describe_delete_documents">deleted documents</string>
</resources>