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
8241b53d
Commit
8241b53d
authored
Sep 27, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
15b3536e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
13 deletions
+14
-13
PdfActivity.kt
...base/pdfviewerscannerwhite/ui/document/pdf/PdfActivity.kt
+10
-12
VerticalSeekBar.kt
...com/base/pdfviewerscannerwhite/ui/view/VerticalSeekBar.kt
+4
-1
No files found.
app/src/main/java/com/base/pdfviewerscannerwhite/ui/document/pdf/PdfActivity.kt
View file @
8241b53d
...
...
@@ -35,6 +35,8 @@ import com.base.pdfviewerscannerwhite.utils.LogEx
import
com.base.pdfviewerscannerwhite.utils.SpStringUtils
import
com.base.pdfviewerscannerwhite.utils.SpStringUtils.LAST_VIEW_KEY
import
com.base.pdfviewerscannerwhite.utils.ToastUtils.toast
import
com.cherry.lib.doc.office.constant.EventConstant
import
com.cherry.lib.doc.office.wp.control.WPControl
import
java.io.File
...
...
@@ -111,18 +113,7 @@ class PdfActivity : BaseActivity<ActivityPdfBinding>(), PdfView {
private
fun
iniSetVerticalSeekbar
(
max
:
Int
)
{
binding
.
verticalSeekbar
.
visibility
=
View
.
VISIBLE
binding
.
verticalSeekbar
.
showThumb
=
true
binding
.
verticalSeekbar
.
barBackgroundStartColor
=
Color
.
TRANSPARENT
// binding.verticalSeekbar.barProgressEndColor = Color.TRANSPARENT
// binding.verticalSeekbar.barProgressStartColor = Color.TRANSPARENT
// binding.verticalSeekbar.barProgressDrawable = ContextCompat.getDrawable(this, R.drawable.bg_transparent)
// binding.verticalSeekbar.barBackgroundStartColor = Color.TRANSPARENT
// binding.verticalSeekbar.barBackgroundStartColor = Color.TRANSPARENT
// binding.verticalSeekbar.barBackgroundEndColor = Color.TRANSPARENT
// binding.verticalSeekbar.setBackgroundColor(Color.TRANSPARENT)
// binding.verticalSeekbar.background = ContextCompat.getDrawable(this, R.drawable.bg_transparent)
// binding.verticalSeekbar.barBackgroundDrawable = ContextCompat.getDrawable(this, R.drawable.bg_transparent)
binding
.
verticalSeekbar
.
barBackgroundStartColor
=
Color
.
TRANSPARENT
binding
.
verticalSeekbar
.
thumbContainerColor
=
Color
.
TRANSPARENT
binding
.
verticalSeekbar
.
thumbPlaceholderDrawable
=
ContextCompat
.
getDrawable
(
this
,
R
.
mipmap
.
fanye
)
...
...
@@ -247,6 +238,13 @@ class PdfActivity : BaseActivity<ActivityPdfBinding>(), PdfView {
binding
.
ivXuanzhuan
.
setOnClickListener
{
switchOrientation
()
}
binding
.
verticalSeekbar
.
setOnReleaseListener
{
progress
->
LogEx
.
logDebug
(
TAG
,
"progress=$progress"
)
val
total
=
muPDFCore
?.
countPages
()
?:
0
val
pageIndex
=
total
-
1
-
progress
binding
.
mupdfReaderView
.
displayedViewIndex
=
pageIndex
}
}
/**
...
...
app/src/main/java/com/base/pdfviewerscannerwhite/ui/view/VerticalSeekBar.kt
View file @
8241b53d
...
...
@@ -23,6 +23,9 @@ import kotlin.math.roundToInt
/**
* A nicer, redesigned and vertical SeekBar
* copy from:
* https://github.com/lukelorusso/VerticalSeekBar
*
*/
class
VerticalSeekBar
:
FrameLayout
{
private
val
TAG
=
"VerticalSeekBar"
...
...
@@ -267,7 +270,7 @@ class VerticalSeekBar : FrameLayout {
R
.
styleable
.
VerticalSeekBar_android_layout_height
,
minLayoutHeight
).
also
{
container
.
layoutParams
.
height
=
container
.
layoutParams
.
height
=
if
(
it
!=
-
1
&&
it
<
minLayoutHeight
)
minLayoutHeight
// wrap_content
else
it
}
...
...
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