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
1eb1f4cd
Commit
1eb1f4cd
authored
Sep 25, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
90f75617
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
31 deletions
+50
-31
DocumentAdapter.kt
.../base/pdfviewerscannerwhite/ui/adapter/DocumentAdapter.kt
+0
-2
DocumentFragment.kt
...om/base/pdfviewerscannerwhite/ui/main/DocumentFragment.kt
+9
-4
MainActivity.kt
...va/com/base/pdfviewerscannerwhite/ui/main/MainActivity.kt
+41
-25
No files found.
app/src/main/java/com/base/pdfviewerscannerwhite/ui/adapter/DocumentAdapter.kt
View file @
1eb1f4cd
...
@@ -140,8 +140,6 @@ class DocumentAdapter : BaseQuickAdapter<DocumentBean, DocumentAdapter.DocumentV
...
@@ -140,8 +140,6 @@ class DocumentAdapter : BaseQuickAdapter<DocumentBean, DocumentAdapter.DocumentV
}
}
}
}
}
}
}
}
private
fun
checkPwd
(
item
:
DocumentBean
,
iv
:
ImageView
)
{
private
fun
checkPwd
(
item
:
DocumentBean
,
iv
:
ImageView
)
{
...
...
app/src/main/java/com/base/pdfviewerscannerwhite/ui/main/DocumentFragment.kt
View file @
1eb1f4cd
...
@@ -76,7 +76,6 @@ class DocumentFragment() : BaseFragment<FragmentDocumentBinding>(), DocumentView
...
@@ -76,7 +76,6 @@ class DocumentFragment() : BaseFragment<FragmentDocumentBinding>(), DocumentView
})
})
})
})
}
}
}
}
if
(
type
==
TYPE_WORD
)
{
if
(
type
==
TYPE_WORD
)
{
startActivity
(
Intent
(
requireContext
(),
WordActivity
::
class
.
java
).
apply
{
startActivity
(
Intent
(
requireContext
(),
WordActivity
::
class
.
java
).
apply
{
...
@@ -89,7 +88,6 @@ class DocumentFragment() : BaseFragment<FragmentDocumentBinding>(), DocumentView
...
@@ -89,7 +88,6 @@ class DocumentFragment() : BaseFragment<FragmentDocumentBinding>(), DocumentView
if
(
type
==
TYPE_PPT
)
{
if
(
type
==
TYPE_PPT
)
{
PptActivity
.
launchDocViewer
(
requireActivity
(),
3
,
item
.
path
,
-
1
,
100
)
PptActivity
.
launchDocViewer
(
requireActivity
(),
3
,
item
.
path
,
-
1
,
100
)
}
}
}
}
adapter
.
moreAction
=
{
item
->
adapter
.
moreAction
=
{
item
->
if
(
item
.
type
==
TYPE_PDF
)
{
if
(
item
.
type
==
TYPE_PDF
)
{
...
@@ -157,8 +155,15 @@ class DocumentFragment() : BaseFragment<FragmentDocumentBinding>(), DocumentView
...
@@ -157,8 +155,15 @@ class DocumentFragment() : BaseFragment<FragmentDocumentBinding>(), DocumentView
}
}
@SuppressLint
(
"NotifyDataSetChanged"
)
@SuppressLint
(
"NotifyDataSetChanged"
)
fun
changeSelectUi
()
{
fun
changeSelectUi
(
select
:
Boolean
)
{
adapter
.
items
.
forEach
{
it
.
uiType
=
1
}
adapter
.
items
.
forEach
{
if
(
select
)
{
it
.
uiType
=
1
}
else
{
it
.
isSelect
=
false
it
.
uiType
=
0
}
}
adapter
.
notifyDataSetChanged
()
adapter
.
notifyDataSetChanged
()
}
}
...
...
app/src/main/java/com/base/pdfviewerscannerwhite/ui/main/MainActivity.kt
View file @
1eb1f4cd
...
@@ -214,7 +214,6 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), MainView {
...
@@ -214,7 +214,6 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), MainView {
}
}
}
}
private
fun
changeTabSelect
(
selectView
:
View
)
{
private
fun
changeTabSelect
(
selectView
:
View
)
{
binding
.
llDocument
.
isSelected
=
selectView
==
binding
.
llDocument
binding
.
llDocument
.
isSelected
=
selectView
==
binding
.
llDocument
...
@@ -271,23 +270,47 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), MainView {
...
@@ -271,23 +270,47 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), MainView {
private
var
uiMode
=
HOME_UI_MODE_DOCUMENT
private
var
uiMode
=
HOME_UI_MODE_DOCUMENT
fun
changeDocumentUI
()
{
private
fun
cancelSelectUI
()
{
LogEx
.
logDebug
(
TAG
,
"changeDocumentUI"
)
uiMode
=
HOME_UI_MODE_DOCUMENT
callback
.
isEnabled
=
false
binding
.
viewPager2
.
isUserInputEnabled
=
true
binding
.
viewPager2
.
isUserInputEnabled
=
true
callback
.
isEnabled
=
false
binding
.
tvTittle
.
text
=
"Document"
binding
.
clTabLayout
.
visibility
=
View
.
VISIBLE
if
(
latViewPagerIndex
!=
-
1
)
{
if
(
latViewPagerIndex
!=
-
1
)
{
binding
.
viewPager2
.
setCurrentItem
(
latViewPagerIndex
,
false
)
binding
.
viewPager2
.
setCurrentItem
(
latViewPagerIndex
,
false
)
latViewPagerIndex
=
-
1
latViewPagerIndex
=
-
1
}
}
changeTabSelect
(
binding
.
llDocument
)
binding
.
ivScan
.
visibility
=
View
.
VISIBLE
binding
.
vTabLayoutPlace
.
visibility
=
View
.
GONE
binding
.
flFanhui
.
visibility
=
View
.
GONE
binding
.
llDelete
.
visibility
=
View
.
GONE
binding
.
llShare
.
visibility
=
View
.
GONE
binding
.
tvTittle
.
visibility
=
View
.
VISIBLE
binding
.
llDocument
.
visibility
=
View
.
VISIBLE
binding
.
llRecent
.
visibility
=
View
.
VISIBLE
binding
.
llBookmark
.
visibility
=
View
.
VISIBLE
binding
.
llTool
.
visibility
=
View
.
VISIBLE
binding
.
ivXuanze
.
visibility
=
View
.
VISIBLE
if
(
currentFragment
is
DocumentFragment
)
{
(
currentFragment
as
DocumentFragment
).
changeSelectUi
(
false
)
}
}
fun
changeDocumentUI
()
{
LogEx
.
logDebug
(
TAG
,
"changeDocumentUI"
)
uiMode
=
HOME_UI_MODE_DOCUMENT
binding
.
tvTittle
.
text
=
"Document"
cancelSelectUI
()
binding
.
clAction
.
visibility
=
View
.
VISIBLE
binding
.
clAction
.
visibility
=
View
.
VISIBLE
binding
.
ivXuanze
.
visibility
=
View
.
VISIBLE
binding
.
ivScan
.
visibility
=
View
.
VISIBLE
binding
.
ivPaixu
.
visibility
=
View
.
VISIBLE
binding
.
ivPaixu
.
visibility
=
View
.
VISIBLE
binding
.
ivScan
.
visibility
=
View
.
VISIBLE
binding
.
ivScan
.
visibility
=
View
.
VISIBLE
changeTabSelect
(
binding
.
llDocument
)
if
(
currentFragment
is
DocumentFragment
)
{
if
(
currentFragment
is
DocumentFragment
)
{
(
currentFragment
as
DocumentFragment
).
setAllList
()
(
currentFragment
as
DocumentFragment
).
setAllList
()
}
}
...
@@ -296,20 +319,18 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), MainView {
...
@@ -296,20 +319,18 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), MainView {
fun
changeRecentUI
()
{
fun
changeRecentUI
()
{
LogEx
.
logDebug
(
TAG
,
"changeRecentUI"
)
LogEx
.
logDebug
(
TAG
,
"changeRecentUI"
)
uiMode
=
HOME_UI_MODE_RECENT
uiMode
=
HOME_UI_MODE_RECENT
callback
.
isEnabled
=
false
binding
.
tvTittle
.
text
=
"Recent"
binding
.
viewPager2
.
isUserInputEnabled
=
true
cancelSelectUI
()
binding
.
tvTittle
.
text
=
"Document"
binding
.
clTabLayout
.
visibility
=
View
.
VISIBLE
binding
.
clTabLayout
.
visibility
=
View
.
VISIBLE
if
(
latViewPagerIndex
!=
-
1
)
{
binding
.
viewPager2
.
setCurrentItem
(
latViewPagerIndex
,
false
)
latViewPagerIndex
=
-
1
}
binding
.
ivPaixu
.
visibility
=
View
.
VISIBLE
binding
.
ivPaixu
.
visibility
=
View
.
VISIBLE
binding
.
ivScan
.
visibility
=
View
.
VISIBLE
binding
.
ivScan
.
visibility
=
View
.
VISIBLE
binding
.
clAction
.
visibility
=
View
.
VISIBLE
binding
.
clAction
.
visibility
=
View
.
VISIBLE
binding
.
ivScan
.
visibility
=
View
.
VISIBLE
binding
.
ivScan
.
visibility
=
View
.
VISIBLE
changeTabSelect
(
binding
.
llRecent
)
changeTabSelect
(
binding
.
llRecent
)
if
(
currentFragment
is
DocumentFragment
)
{
if
(
currentFragment
is
DocumentFragment
)
{
(
currentFragment
as
DocumentFragment
).
setRecentList
()
(
currentFragment
as
DocumentFragment
).
setRecentList
()
}
}
...
@@ -318,17 +339,12 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), MainView {
...
@@ -318,17 +339,12 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), MainView {
fun
changeBookmarkUI
()
{
fun
changeBookmarkUI
()
{
LogEx
.
logDebug
(
TAG
,
"changeBookmarkUI"
)
LogEx
.
logDebug
(
TAG
,
"changeBookmarkUI"
)
uiMode
=
HOME_UI_MODE_BOOKMARK
uiMode
=
HOME_UI_MODE_BOOKMARK
callback
.
isEnabled
=
false
binding
.
viewPager2
.
isUserInputEnabled
=
true
binding
.
tvTittle
.
text
=
"Document"
cancelSelectUI
()
binding
.
tvTittle
.
text
=
"Bookmark"
binding
.
clTabLayout
.
visibility
=
View
.
VISIBLE
binding
.
clTabLayout
.
visibility
=
View
.
VISIBLE
binding
.
ivScan
.
visibility
=
View
.
VISIBLE
binding
.
ivScan
.
visibility
=
View
.
VISIBLE
if
(
latViewPagerIndex
!=
-
1
)
{
binding
.
viewPager2
.
setCurrentItem
(
latViewPagerIndex
,
false
)
latViewPagerIndex
=
-
1
}
binding
.
ivScan
.
visibility
=
View
.
VISIBLE
binding
.
ivScan
.
visibility
=
View
.
VISIBLE
binding
.
clAction
.
visibility
=
View
.
VISIBLE
binding
.
clAction
.
visibility
=
View
.
VISIBLE
changeTabSelect
(
binding
.
llBookmark
)
changeTabSelect
(
binding
.
llBookmark
)
...
@@ -378,7 +394,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), MainView {
...
@@ -378,7 +394,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), MainView {
binding
.
vTabLayoutPlace
.
visibility
=
View
.
VISIBLE
binding
.
vTabLayoutPlace
.
visibility
=
View
.
VISIBLE
if
(
currentFragment
is
DocumentFragment
)
{
if
(
currentFragment
is
DocumentFragment
)
{
(
currentFragment
as
DocumentFragment
).
changeSelectUi
()
(
currentFragment
as
DocumentFragment
).
changeSelectUi
(
true
)
}
}
}
}
...
...
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