Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
F
Fast File Manager Pro
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
Fast File Manager Pro
Commits
ab4de150
Commit
ab4de150
authored
Mar 27, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善代码
parent
0f0e2911
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
13 deletions
+16
-13
KoInternalkoActivity.kt
...ilemanagerpro/kokoInternalstorage/KoInternalkoActivity.kt
+16
-4
KoListFilekoViewModel.kt
.../fastfilemanagerpro/kokolistfile/KoListFilekoViewModel.kt
+0
-9
No files found.
app/src/main/java/com/zxhy/fastfilemanagerpro/kokoInternalstorage/KoInternalkoActivity.kt
View file @
ab4de150
...
@@ -37,6 +37,7 @@ class KoInternalkoActivity : AppCompatActivity() {
...
@@ -37,6 +37,7 @@ class KoInternalkoActivity : AppCompatActivity() {
private
lateinit
var
activityLauncher
:
ActivityLauncher
private
lateinit
var
activityLauncher
:
ActivityLauncher
private
lateinit
var
context
:
Context
private
lateinit
var
context
:
Context
private
var
currentMode
=
BROWSER_MODE
private
var
currentMode
=
BROWSER_MODE
private
var
showEmpty
:
Boolean
=
false
@SuppressLint
(
"SetTextI18n"
)
@SuppressLint
(
"SetTextI18n"
)
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
...
@@ -58,6 +59,9 @@ class KoInternalkoActivity : AppCompatActivity() {
...
@@ -58,6 +59,9 @@ class KoInternalkoActivity : AppCompatActivity() {
},
},
pageCount
=
{
pageCount
=
{
binding
.
tvItems
.
text
=
"total:$it items"
binding
.
tvItems
.
text
=
"total:$it items"
if
(
it
==
0
)
{
showEmptyList
(
true
)
}
}
}
)
)
binding
.
rv
.
adapter
=
adapter
binding
.
rv
.
adapter
=
adapter
...
@@ -91,11 +95,11 @@ class KoInternalkoActivity : AppCompatActivity() {
...
@@ -91,11 +95,11 @@ class KoInternalkoActivity : AppCompatActivity() {
binding
.
tvEdit
.
visibility
=
View
.
VISIBLE
binding
.
tvEdit
.
visibility
=
View
.
VISIBLE
binding
.
ivAllSelector
.
visibility
=
View
.
GONE
binding
.
ivAllSelector
.
visibility
=
View
.
GONE
binding
.
tvAll
.
visibility
=
View
.
GONE
binding
.
tvAll
.
visibility
=
View
.
GONE
binding
.
clOperation
.
visibility
=
View
.
GONE
binding
.
clOperation
.
visibility
=
View
.
GONE
binding
.
tvEdit
.
setOnClickListener
{
binding
.
tvEdit
.
setOnClickListener
{
operationMode
()
operationMode
()
}
}
binding
.
ivAllSelector
.
isSelected
=
false
adapter
.
showSelectMode
(
false
)
adapter
.
showSelectMode
(
false
)
}
}
...
@@ -222,6 +226,11 @@ class KoInternalkoActivity : AppCompatActivity() {
...
@@ -222,6 +226,11 @@ class KoInternalkoActivity : AppCompatActivity() {
override
fun
dispatchKeyEvent
(
event
:
KeyEvent
):
Boolean
{
override
fun
dispatchKeyEvent
(
event
:
KeyEvent
):
Boolean
{
if
(
event
.
keyCode
==
KeyEvent
.
KEYCODE_BACK
&&
event
.
action
==
KeyEvent
.
ACTION_UP
)
{
if
(
event
.
keyCode
==
KeyEvent
.
KEYCODE_BACK
&&
event
.
action
==
KeyEvent
.
ACTION_UP
)
{
if
(
showEmpty
)
{
showEmptyList
(
false
)
}
when
(
currentMode
)
{
when
(
currentMode
)
{
BROWSER_MODE
->
{
BROWSER_MODE
->
{
if
(
adapter
.
pageBefore
())
super
.
dispatchKeyEvent
(
event
)
else
return
false
if
(
adapter
.
pageBefore
())
super
.
dispatchKeyEvent
(
event
)
else
return
false
...
@@ -270,15 +279,18 @@ class KoInternalkoActivity : AppCompatActivity() {
...
@@ -270,15 +279,18 @@ class KoInternalkoActivity : AppCompatActivity() {
binding
.
llResult
.
visibility
=
View
.
GONE
binding
.
llResult
.
visibility
=
View
.
GONE
}
}
private
fun
showEmptyList
()
{
private
fun
showEmptyList
(
show
:
Boolean
)
{
if
(
adapter
.
itemCount
==
0
)
{
showEmpty
=
show
if
(
show
)
{
binding
.
clEmpty
.
visibility
=
View
.
VISIBLE
binding
.
clEmpty
.
visibility
=
View
.
VISIBLE
binding
.
clShowContent
.
visibility
=
View
.
GONE
binding
.
clShowContent
.
visibility
=
View
.
GONE
binding
.
llEditSelect
.
visibility
=
View
.
GONE
binding
.
llEditSelect
.
visibility
=
View
.
GONE
}
else
{
}
else
{
binding
.
clEmpty
.
visibility
=
View
.
GONE
binding
.
clEmpty
.
visibility
=
View
.
GONE
binding
.
clShowContent
.
visibility
=
View
.
VISIBLE
binding
.
clShowContent
.
visibility
=
View
.
VISIBLE
binding
.
llEditSelect
.
visibility
=
View
.
VISIBLE
if
(
currentMode
==
BROWSER_MODE
)
{
binding
.
llEditSelect
.
visibility
=
View
.
VISIBLE
}
}
}
}
}
...
...
app/src/main/java/com/zxhy/fastfilemanagerpro/kokolistfile/KoListFilekoView
Holder
.kt
→
app/src/main/java/com/zxhy/fastfilemanagerpro/kokolistfile/KoListFilekoView
Model
.kt
View file @
ab4de150
package
com.zxhy.fastfilemanagerpro.kokolistfile
package
com.zxhy.fastfilemanagerpro.kokolistfile
import
android.content.Context
import
android.content.Context
import
android.os.Environment
import
androidx.lifecycle.ViewModel
import
androidx.lifecycle.viewModelScope
import
com.zxhy.fastfilemanagerpro.CommonViewModel
import
com.zxhy.fastfilemanagerpro.CommonViewModel
import
com.zxhy.fastfilemanagerpro.kokodata.KoFileDatako
import
com.zxhy.fastfilemanagerpro.kokodata.KoFileDatako
import
com.zxhy.fastfilemanagerpro.kokodata.KoFileDatako.Companion.koFileDatako
import
com.zxhy.fastfilemanagerpro.kokotools.HelperTraverse.linkedLisTraverseFolder
import
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.Job
import
kotlinx.coroutines.launch
import
java.io.File
import
java.io.File
import
kotlin.reflect.KFunction1
class
KoListFilekoViewModel
:
CommonViewModel
()
{
class
KoListFilekoViewModel
:
CommonViewModel
()
{
...
...
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