Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
D
Data Recovery White
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanglei
Data Recovery White
Commits
22d9e001
Commit
22d9e001
authored
Jul 11, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
b164a487
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
35 additions
and
10 deletions
+35
-10
RepeatActivity.kt
...ain/java/com/base/datarecovery/activity/RepeatActivity.kt
+5
-0
ScreenShotActivity.kt
...java/com/base/datarecovery/activity/ScreenShotActivity.kt
+5
-0
FileScanActivity.kt
...m/base/datarecovery/activity/recovery/FileScanActivity.kt
+3
-3
ConfigHelper.kt
app/src/main/java/com/base/datarecovery/help/ConfigHelper.kt
+3
-0
FileScanDialog.kt
...rc/main/java/com/base/datarecovery/view/FileScanDialog.kt
+5
-3
activity_repeat.xml
app/src/main/res/layout/activity_repeat.xml
+4
-0
activity_screen_shot.xml
app/src/main/res/layout/activity_screen_shot.xml
+5
-0
dialog_file_scan.xml
app/src/main/res/layout/dialog_file_scan.xml
+5
-4
No files found.
app/src/main/java/com/base/datarecovery/activity/RepeatActivity.kt
View file @
22d9e001
...
@@ -9,10 +9,12 @@ import androidx.lifecycle.lifecycleScope
...
@@ -9,10 +9,12 @@ import androidx.lifecycle.lifecycleScope
import
com.base.datarecovery.adapter.MediaAdapter
import
com.base.datarecovery.adapter.MediaAdapter
import
com.base.datarecovery.adapter.MediaSubAdapter
import
com.base.datarecovery.adapter.MediaSubAdapter
import
com.base.datarecovery.ads.AdmobInterstitialUtils
import
com.base.datarecovery.ads.AdmobInterstitialUtils
import
com.base.datarecovery.ads.AdmobNativeUtils
import
com.base.datarecovery.bean.MediaBean
import
com.base.datarecovery.bean.MediaBean
import
com.base.datarecovery.bean.MediaTimeBean
import
com.base.datarecovery.bean.MediaTimeBean
import
com.base.datarecovery.databinding.ActivityRepeatBinding
import
com.base.datarecovery.databinding.ActivityRepeatBinding
import
com.base.datarecovery.help.BaseActivity
import
com.base.datarecovery.help.BaseActivity
import
com.base.datarecovery.help.ConfigHelper
import
com.base.datarecovery.help.KotlinExt.toFormatSize
import
com.base.datarecovery.help.KotlinExt.toFormatSize
import
com.base.datarecovery.help.KotlinExt.toFormatTime
import
com.base.datarecovery.help.KotlinExt.toFormatTime
import
com.base.datarecovery.help.MediaStoreHelp.getImageMedia
import
com.base.datarecovery.help.MediaStoreHelp.getImageMedia
...
@@ -119,6 +121,9 @@ class RepeatActivity : BaseActivity<ActivityRepeatBinding>() {
...
@@ -119,6 +121,9 @@ class RepeatActivity : BaseActivity<ActivityRepeatBinding>() {
launch
(
Dispatchers
.
Main
)
{
launch
(
Dispatchers
.
Main
)
{
binding
.
progressBar
.
visibility
=
View
.
GONE
binding
.
progressBar
.
visibility
=
View
.
GONE
mediaAdapter
.
setData
(
beanList
)
mediaAdapter
.
setData
(
beanList
)
if
(
beanList
.
sumOf
{
it
.
beans
.
size
}
>
6
||
ConfigHelper
.
mustShowNativeAd
)
{
AdmobNativeUtils
.
showNativeAd
(
this
@RepeatActivity
,
binding
.
flAd
)
}
}
}
}
}
...
...
app/src/main/java/com/base/datarecovery/activity/ScreenShotActivity.kt
View file @
22d9e001
...
@@ -8,10 +8,12 @@ import androidx.core.view.updatePadding
...
@@ -8,10 +8,12 @@ import androidx.core.view.updatePadding
import
androidx.lifecycle.lifecycleScope
import
androidx.lifecycle.lifecycleScope
import
com.base.datarecovery.adapter.ScreenShotAdapter
import
com.base.datarecovery.adapter.ScreenShotAdapter
import
com.base.datarecovery.ads.AdmobInterstitialUtils
import
com.base.datarecovery.ads.AdmobInterstitialUtils
import
com.base.datarecovery.ads.AdmobNativeUtils
import
com.base.datarecovery.bean.ScreenPhotoBean
import
com.base.datarecovery.bean.ScreenPhotoBean
import
com.base.datarecovery.bean.ScreenshotBean
import
com.base.datarecovery.bean.ScreenshotBean
import
com.base.datarecovery.databinding.ActivityScreenShotBinding
import
com.base.datarecovery.databinding.ActivityScreenShotBinding
import
com.base.datarecovery.help.BaseActivity
import
com.base.datarecovery.help.BaseActivity
import
com.base.datarecovery.help.ConfigHelper
import
com.base.datarecovery.help.FileHelp
import
com.base.datarecovery.help.FileHelp
import
com.base.datarecovery.help.KotlinExt.toFormatSize
import
com.base.datarecovery.help.KotlinExt.toFormatSize
import
com.base.datarecovery.help.PermissionHelp.checkStorePermission
import
com.base.datarecovery.help.PermissionHelp.checkStorePermission
...
@@ -84,6 +86,9 @@ class ScreenShotActivity : BaseActivity<ActivityScreenShotBinding>() {
...
@@ -84,6 +86,9 @@ class ScreenShotActivity : BaseActivity<ActivityScreenShotBinding>() {
val
sizeF
=
size
.
toFormatSize
().
split
(
" "
)
val
sizeF
=
size
.
toFormatSize
().
split
(
" "
)
binding
.
tvSize
.
text
=
sizeF
[
0
]
binding
.
tvSize
.
text
=
sizeF
[
0
]
binding
.
tvUnit
.
text
=
sizeF
[
1
]
binding
.
tvUnit
.
text
=
sizeF
[
1
]
if
(
list
.
sumOf
{
it
.
screenPhotoBean
.
size
}
>
6
||
ConfigHelper
.
mustShowNativeAd
)
{
AdmobNativeUtils
.
showNativeAd
(
this
@ScreenShotActivity
,
binding
.
flAd
)
}
}
}
}
}
...
...
app/src/main/java/com/base/datarecovery/activity/recovery/FileScanActivity.kt
View file @
22d9e001
...
@@ -25,7 +25,6 @@ import com.base.datarecovery.view.DialogViews.showGerPermission
...
@@ -25,7 +25,6 @@ import com.base.datarecovery.view.DialogViews.showGerPermission
import
com.base.datarecovery.view.FileScanDialog
import
com.base.datarecovery.view.FileScanDialog
import
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.channels.BufferOverflow
import
kotlinx.coroutines.channels.BufferOverflow
import
kotlinx.coroutines.delay
import
kotlinx.coroutines.flow.MutableSharedFlow
import
kotlinx.coroutines.flow.MutableSharedFlow
import
kotlinx.coroutines.flow.SharedFlow
import
kotlinx.coroutines.flow.SharedFlow
import
kotlinx.coroutines.launch
import
kotlinx.coroutines.launch
...
@@ -127,8 +126,9 @@ class FileScanActivity : BaseActivity<ActivityFileScanBinding>() {
...
@@ -127,8 +126,9 @@ class FileScanActivity : BaseActivity<ActivityFileScanBinding>() {
pathList
.
add
(
file
.
absolutePath
)
pathList
.
add
(
file
.
absolutePath
)
if
(!
oneShowAd
)
{
if
(!
oneShowAd
)
{
oneShowAd
=
true
oneShowAd
=
true
dialogClass
.
scanShowUI
()
lifecycleScope
.
launch
(
Dispatchers
.
Main
)
{
lifecycleScope
.
launch
(
Dispatchers
.
Main
)
{
AdmobInterstitialUtils
.
showInterstitialAd
(
this
@FileScanActivity
,
true
,
false
)
{
}
AdmobInterstitialUtils
.
showInterstitialAd
(
this
@FileScanActivity
,
true
,
false
)
{
}
}
}
}
}
},
},
...
@@ -136,7 +136,7 @@ class FileScanActivity : BaseActivity<ActivityFileScanBinding>() {
...
@@ -136,7 +136,7 @@ class FileScanActivity : BaseActivity<ActivityFileScanBinding>() {
if
(
pathList
.
isEmpty
())
{
if
(
pathList
.
isEmpty
())
{
scanDialog
.
dismiss
()
scanDialog
.
dismiss
()
binding
.
ivIcon
.
setImageResource
(
R
.
mipmap
.
queshengye
)
binding
.
ivIcon
.
setImageResource
(
R
.
mipmap
.
queshengye
)
binding
.
tvBtn
.
text
=
"Finish"
binding
.
tvBtn
.
text
=
"Finish
ed
"
binding
.
tvBtn
.
setOnClickListener
{
binding
.
tvBtn
.
setOnClickListener
{
onBackPressedDispatcher
.
onBackPressed
()
onBackPressedDispatcher
.
onBackPressed
()
}
}
...
...
app/src/main/java/com/base/datarecovery/help/ConfigHelper.kt
View file @
22d9e001
...
@@ -16,6 +16,9 @@ object ConfigHelper {
...
@@ -16,6 +16,9 @@ object ConfigHelper {
const
val
nativeAdmobId
=
"ca-app-pub-3940256099942544/2247696110"
const
val
nativeAdmobId
=
"ca-app-pub-3940256099942544/2247696110"
const
val
openAdmobId
=
"/6499/example/app-open"
const
val
openAdmobId
=
"/6499/example/app-open"
//一定展示大图广告
var
mustShowNativeAd
:
Boolean
=
false
// 正式包名
// 正式包名
const
val
packageName
=
"com.kuke.photosrecovery.allrecovery.acbcali"
const
val
packageName
=
"com.kuke.photosrecovery.allrecovery.acbcali"
...
...
app/src/main/java/com/base/datarecovery/view/FileScanDialog.kt
View file @
22d9e001
...
@@ -31,8 +31,6 @@ class FileScanDialog(
...
@@ -31,8 +31,6 @@ class FileScanDialog(
sharedFlow
:
SharedFlow
<
String
>,
sharedFlow
:
SharedFlow
<
String
>,
foundFlow
:
SharedFlow
<
Int
>
foundFlow
:
SharedFlow
<
Int
>
):
AlertDialog
{
):
AlertDialog
{
dialog
?.
setView
(
binding
.
root
)
dialog
?.
setView
(
binding
.
root
)
dialog
?.
setCanceledOnTouchOutside
(
false
)
dialog
?.
setCanceledOnTouchOutside
(
false
)
dialog
?.
setCancelable
(
false
)
dialog
?.
setCancelable
(
false
)
...
@@ -80,7 +78,7 @@ class FileScanDialog(
...
@@ -80,7 +78,7 @@ class FileScanDialog(
a1
.
cancel
()
a1
.
cancel
()
binding
.
tvBtn
.
visibility
=
View
.
VISIBLE
binding
.
tvBtn
.
visibility
=
View
.
VISIBLE
binding
.
iv
.
visibility
=
View
.
GONE
binding
.
iv
.
visibility
=
View
.
GONE
binding
.
tvPath
.
visibility
=
View
.
GONE
binding
.
tvPath
.
visibility
=
View
.
GONE
binding
.
tvTitle
.
text
=
"Scan Completed"
binding
.
tvTitle
.
text
=
"Scan Completed"
binding
.
tvBtn
.
setOnClickListener
{
binding
.
tvBtn
.
setOnClickListener
{
activity
.
startActivity
(
Intent
(
activity
,
FileScanResultActivity
::
class
.
java
).
apply
{
activity
.
startActivity
(
Intent
(
activity
,
FileScanResultActivity
::
class
.
java
).
apply
{
...
@@ -90,4 +88,8 @@ class FileScanDialog(
...
@@ -90,4 +88,8 @@ class FileScanDialog(
activity
.
finish
()
activity
.
finish
()
}
}
}
}
fun
scanShowUI
()
{
binding
.
tvPath
.
visibility
=
View
.
VISIBLE
}
}
}
\ No newline at end of file
app/src/main/res/layout/activity_repeat.xml
View file @
22d9e001
...
@@ -115,6 +115,10 @@
...
@@ -115,6 +115,10 @@
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<FrameLayout
android:id=
"@+id/fl_ad"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
<FrameLayout
<FrameLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
...
app/src/main/res/layout/activity_screen_shot.xml
View file @
22d9e001
...
@@ -115,6 +115,11 @@
...
@@ -115,6 +115,11 @@
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<FrameLayout
android:id=
"@+id/fl_ad"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
<androidx.recyclerview.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv"
android:id=
"@+id/rv"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
...
app/src/main/res/layout/dialog_file_scan.xml
View file @
22d9e001
...
@@ -46,22 +46,23 @@
...
@@ -46,22 +46,23 @@
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"5dp"
android:layout_marginVertical=
"5dp"
android:text=
"Found 0 files"
android:textColor=
"#333333"
android:textColor=
"#333333"
android:textSize=
"15sp"
android:textSize=
"15sp"
tools:
text=
"Found 100 files
"
/>
tools:
ignore=
"HardcodedText
"
/>
<TextView
<TextView
android:id=
"@+id/tv_path"
android:id=
"@+id/tv_path"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginHorizontal=
"15dp"
android:layout_marginHorizontal=
"15dp"
android:layout_marginTop=
"5dp"
android:layout_marginBottom=
"25dp"
android:layout_marginBottom=
"25dp"
android:ellipsize=
"middle"
android:ellipsize=
"middle"
android:singleLine=
"true"
android:singleLine=
"true"
android:textColor=
"#666666"
android:textColor=
"#666666"
android:textSize=
"12sp"
/>
android:textSize=
"12sp"
android:visibility=
"gone"
/>
<FrameLayout
<FrameLayout
android:id=
"@+id/fl_ad"
android:id=
"@+id/fl_ad"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment