Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
P
PDF Viewer Scanner 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
PDF Viewer Scanner White
Commits
8dbbc1f0
Commit
8dbbc1f0
authored
Oct 11, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
ab608d8a
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
222 additions
and
3 deletions
+222
-3
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+3
-1
PermissionActivity.kt
...pdfviewerscannerwhite/ui/permission/PermissionActivity.kt
+54
-0
SplashActivity.kt
...om/base/pdfviewerscannerwhite/ui/splash/SplashActivity.kt
+2
-1
bg_00b8de_tl15_tr15.xml
app/src/main/res/drawable/bg_00b8de_tl15_tr15.xml
+6
-0
bg_ffffff_10.xml
app/src/main/res/drawable/bg_ffffff_10.xml
+5
-0
activity_main2.xml
app/src/main/res/layout/activity_main2.xml
+65
-0
activity_permission.xml
app/src/main/res/layout/activity_permission.xml
+77
-0
yindaotu_scan.png
app/src/main/res/mipmap-xxhdpi/yindaotu_scan.png
+0
-0
permissions_xin.json
app/src/main/res/raw/permissions_xin.json
+1
-1
permissionsxinde.json
app/src/main/res/raw/permissionsxinde.json
+1
-0
colors.xml
app/src/main/res/values/colors.xml
+1
-0
strings.xml
app/src/main/res/values/strings.xml
+7
-0
No files found.
app/src/main/AndroidManifest.xml
View file @
8dbbc1f0
...
...
@@ -20,7 +20,9 @@
android:theme=
"@style/Theme.PDFViewerScannerWhite"
android:usesCleartextTraffic=
"true"
tools:targetApi=
"34"
>
<activity
android:name=
".ui.permission.PermissionActivity"
android:exported=
"false"
/>
<meta-data
android:name=
"com.google.android.gms.version"
...
...
app/src/main/java/com/base/pdfviewerscannerwhite/ui/permission/PermissionActivity.kt
0 → 100644
View file @
8dbbc1f0
package
com.base.pdfviewerscannerwhite.ui.permission
import
android.annotation.SuppressLint
import
android.graphics.Color
import
android.text.SpannableString
import
android.text.SpannableStringBuilder
import
android.text.style.ForegroundColorSpan
import
androidx.core.content.ContextCompat
import
androidx.core.view.updatePadding
import
com.base.pdfviewerscannerwhite.R
import
com.base.pdfviewerscannerwhite.databinding.ActivityPermissionBinding
import
com.base.pdfviewerscannerwhite.helper.BaseActivity
import
com.base.pdfviewerscannerwhite.utils.BarUtils
class
PermissionActivity
:
BaseActivity
<
ActivityPermissionBinding
>()
{
override
val
binding
:
ActivityPermissionBinding
by
lazy
{
ActivityPermissionBinding
.
inflate
(
layoutInflater
)
}
@SuppressLint
(
"SetTextI18n"
)
override
fun
initView
()
{
BarUtils
.
setStatusBarLightMode
(
this
,
true
)
BarUtils
.
setStatusBarColor
(
this
,
Color
.
parseColor
(
"#F4F5FA"
))
binding
.
root
.
updatePadding
(
top
=
BarUtils
.
getStatusBarHeight
())
val
tipString
=
getString
(
R
.
string
.
permission_tip_1
)
val
redString
=
getString
(
R
.
string
.
permission_tip_2
)
val
spannableString
=
SpannableString
(
redString
)
spannableString
.
setSpan
(
ForegroundColorSpan
(
ContextCompat
.
getColor
(
this
,
R
.
color
.
color_f92b39
)),
0
,
redString
.
length
,
SpannableString
.
SPAN_EXCLUSIVE_EXCLUSIVE
)
val
spannableStringBuilder
=
SpannableStringBuilder
(
tipString
)
spannableStringBuilder
.
append
(
spannableString
)
binding
.
tvTip
.
text
=
spannableStringBuilder
}
override
fun
initListener
()
{
super
.
initListener
()
binding
.
tvLater
.
setOnClickListener
{
}
binding
.
tvAllow
.
setOnClickListener
{
}
}
}
\ No newline at end of file
app/src/main/java/com/base/pdfviewerscannerwhite/ui/splash/SplashActivity.kt
View file @
8dbbc1f0
...
...
@@ -21,6 +21,7 @@ import com.base.pdfviewerscannerwhite.helper.MyApplication
import
com.base.pdfviewerscannerwhite.helper.MyApplication.Companion.umpCanAd
import
com.base.pdfviewerscannerwhite.service.StayNotificationService.Companion.startStayNotification
import
com.base.pdfviewerscannerwhite.ui.main.MainActivity
import
com.base.pdfviewerscannerwhite.ui.permission.PermissionActivity
import
com.base.pdfviewerscannerwhite.ui.set.SetLanguageActivity
import
com.base.pdfviewerscannerwhite.utils.BarUtils
import
com.base.pdfviewerscannerwhite.utils.LogEx
...
...
@@ -101,7 +102,7 @@ class SplashActivity : BaseActivity<ActivitySplash2Binding>(), SplashView {
val
isHotLaunch
=
intent
.
extras
?.
getBoolean
(
"isHotLaunch"
)
?:
false
if
(
BuildConfig
.
DEBUG
)
{
toast
(
"isHotLaunch=$isHotLaunch"
)
//
toast("isHotLaunch=$isHotLaunch")
}
ifAgreePrivacy
=
true
if
(
ifAgreePrivacy
)
{
...
...
app/src/main/res/drawable/bg_00b8de_tl15_tr15.xml
0 → 100644
View file @
8dbbc1f0
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"#00B8DE"
/>
<corners
android:topLeftRadius=
"15dp"
android:topRightRadius=
"15dp"
/>
</shape>
\ No newline at end of file
app/src/main/res/drawable/bg_ffffff_10.xml
0 → 100644
View file @
8dbbc1f0
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"@color/white"
/>
<corners
android:radius=
"10dp"
/>
</shape>
\ No newline at end of file
app/src/main/res/layout/activity_main2.xml
View file @
8dbbc1f0
...
...
@@ -14,6 +14,7 @@
app:layout_constraintBottom_toTopOf=
"@id/ll_bottom"
app:layout_constraintTop_toTopOf=
"parent"
/>
<ImageView
android:id=
"@+id/iv_scan"
android:layout_width=
"wrap_content"
...
...
@@ -25,6 +26,70 @@
app:layout_constraintEnd_toEndOf=
"parent"
tools:ignore=
"ContentDescription"
/>
<FrameLayout
android:id=
"@+id/cl_scan_guide"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
app:layout_constraintBottom_toTopOf=
"@id/ll_bottom"
app:layout_constraintTop_toTopOf=
"parent"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"250dp"
android:layout_gravity=
"bottom"
android:background=
"@drawable/bg_00b8de_tl15_tr15"
app:layout_constraintBottom_toBottomOf=
"parent"
>
<TextView
android:id=
"@+id/tv_scan"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"24dp"
android:layout_marginTop=
"54dp"
android:text=
"Scan to PDF"
android:textColor=
"@color/white"
android:textSize=
"20sp"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
tools:ignore=
"HardcodedText"
/>
<TextView
android:id=
"@+id/tv_scan_tip"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"32dp"
android:text=
"@string/click_this_button_to_use_the_scanning_feature"
android:textColor=
"@color/white"
android:textSize=
"15sp"
app:layout_constraintStart_toStartOf=
"@id/tv_scan"
app:layout_constraintTop_toBottomOf=
"@id/tv_scan"
/>
<TextView
android:layout_width=
"160dp"
android:layout_height=
"48dp"
android:background=
"@drawable/bg_ffffff_10"
android:gravity=
"center"
android:text=
"@string/try_using_it"
android:textColor=
"#00B8DE"
android:textSize=
"18sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"@id/tv_scan"
app:layout_constraintTop_toBottomOf=
"@id/tv_scan_tip"
/>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"18dp"
android:src=
"@mipmap/yindaotu_scan"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
tools:ignore=
"ContentDescription"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/ll_bottom"
...
...
app/src/main/res/layout/activity_permission.xml
0 → 100644
View file @
8dbbc1f0
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
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=
"#F4F5FA"
tools:context=
".ui.permission.PermissionActivity"
>
<TextView
android:id=
"@+id/tv_later"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"28dp"
android:layout_marginEnd=
"22dp"
android:text=
"@string/later"
android:textColor=
"#999999"
android:textSize=
"16sp"
android:textStyle=
"bold"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/tv_tittle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"84dp"
android:text=
"@string/required_permissions"
android:textColor=
"@color/black"
android:textSize=
"28sp"
android:textStyle=
"bold"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
tools:ignore=
"HardcodedText"
/>
<com.base.pdfviewerscannerwhite.ui.view.XmlLottieAnimationView
android:id=
"@+id/lottie"
android:layout_width=
"280dp"
android:layout_height=
"340dp"
android:layout_marginTop=
"65dp"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tv_tittle"
app:lottie_autoPlay=
"true"
app:lottie_loop=
"true"
app:lottie_rawRes=
"@raw/permissions_xin"
/>
<TextView
android:id=
"@+id/tv_tip"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginHorizontal=
"30dp"
android:layout_marginTop=
"50dp"
android:textSize=
"14sp"
android:textStyle=
"bold"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/lottie"
/>
<TextView
android:id=
"@+id/tv_allow"
android:layout_width=
"338dp"
android:layout_height=
"48dp"
android:layout_marginBottom=
"30dp"
android:background=
"@drawable/bg_00b8de_10"
android:gravity=
"center"
android:text=
"@string/allow"
android:textColor=
"@color/white"
android:textSize=
"18sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/mipmap-xxhdpi/yindaotu_scan.png
0 → 100644
View file @
8dbbc1f0
10.4 KB
app/src/main/res/raw/permissions_xin.json
View file @
8dbbc1f0
This source diff could not be displayed because it is too large. You can
view the blob
instead.
app/src/main/res/raw/permissionsxinde.json
0 → 100644
View file @
8dbbc1f0
This source diff could not be displayed because it is too large. You can
view the blob
instead.
app/src/main/res/values/colors.xml
View file @
8dbbc1f0
...
...
@@ -6,4 +6,5 @@
<color
name=
"color_0592ee"
>
#0592EE
</color>
<color
name=
"color_149b55"
>
#149B55
</color>
<color
name=
"color_ffa127"
>
#FFA127
</color>
<color
name=
"color_f92b39"
>
#F92B39
</color>
</resources>
\ No newline at end of file
app/src/main/res/values/strings.xml
View file @
8dbbc1f0
...
...
@@ -75,5 +75,12 @@
<string
name=
"authorization_request"
>
Authorization request
</string>
<string
name=
"to_read_and_edit_pdf_files_we_need_your_permission_to_obtain_file_management_privileges"
>
To read and edit PDF files, we need your\npermission to obtain file management privileges
</string>
<string
name=
"_continue"
>
Continue
</string>
<string
name=
"required_permissions"
>
Required permissions
</string>
<string
name=
"later"
>
Later
</string>
<string
name=
"allow"
>
Allow
</string>
<string
name=
"permission_tip_1"
>
For your convenience, please allow the APP to access all your files. The document information we organize
</string>
<string
name=
"permission_tip_2"
>
will only be used on the current device.
</string>
<string
name=
"click_this_button_to_use_the_scanning_feature"
>
Click this button to use the\nscanning feature
</string>
<string
name=
"try_using_it"
>
Try using it
</string>
</resources>
\ No newline at end of file
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