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
c537a287
Commit
c537a287
authored
Mar 26, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
白包添加
parent
0b6ea2c2
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
201 additions
and
2 deletions
+201
-2
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+11
-0
KoInternalkoActivity.kt
...ilemanagerpro/kokoInternalstorage/KoInternalkoActivity.kt
+17
-1
KoHomekoFragment.kt
.../com/zxhy/fastfilemanagerpro/kokohome/KoHomekoFragment.kt
+4
-0
SS.kt
app/src/main/java/com/zxhy/fastfilemanagerpro/widget/SS.kt
+114
-0
fragment_ko_homeko.xml
app/src/main/res/layout/fragment_ko_homeko.xml
+7
-1
d_897895.png
app/src/main/res/mipmap-hdpi/d_897895.png
+0
-0
d_897895.png
app/src/main/res/mipmap-mdpi/d_897895.png
+0
-0
d_897895.png
app/src/main/res/mipmap-xhdpi/d_897895.png
+0
-0
d_897895.png
app/src/main/res/mipmap-xxhdpi/d_897895.png
+0
-0
d_897895.png
app/src/main/res/mipmap-xxxhdpi/d_897895.png
+0
-0
colors.xml
app/src/main/res/values/colors.xml
+4
-0
dimens.xml
app/src/main/res/values/dimens.xml
+14
-0
provider_paths.xml
app/src/main/res/xml/provider_paths.xml
+30
-0
No files found.
app/src/main/AndroidManifest.xml
View file @
c537a287
...
@@ -56,6 +56,17 @@
...
@@ -56,6 +56,17 @@
android:exported=
"true"
android:exported=
"true"
android:screenOrientation=
"portrait"
android:screenOrientation=
"portrait"
tools:ignore=
"DiscouragedApi,LockedOrientationActivity"
/>
tools:ignore=
"DiscouragedApi,LockedOrientationActivity"
/>
<provider
android:name=
"androidx.core.content.FileProvider"
android:authorities=
"${applicationId}.provider"
android:exported=
"false"
android:grantUriPermissions=
"true"
tools:replace=
"android:authorities"
>
<meta-data
android:name=
"android.support.FILE_PROVIDER_PATHS"
android:resource=
"@xml/provider_paths"
/>
</provider>
</application>
</application>
</manifest>
</manifest>
\ No newline at end of file
app/src/main/java/com/zxhy/fastfilemanagerpro/kokoInternalstorage/KoInternalkoActivity.kt
View file @
c537a287
...
@@ -2,6 +2,8 @@ package com.zxhy.fastfilemanagerpro.kokoInternalstorage
...
@@ -2,6 +2,8 @@ package com.zxhy.fastfilemanagerpro.kokoInternalstorage
import
android.annotation.SuppressLint
import
android.annotation.SuppressLint
import
android.content.Context
import
android.content.Context
import
android.content.Intent
import
android.net.Uri
import
android.os.Bundle
import
android.os.Bundle
import
android.os.Environment
import
android.os.Environment
import
android.view.KeyEvent
import
android.view.KeyEvent
...
@@ -10,6 +12,7 @@ import androidx.activity.enableEdgeToEdge
...
@@ -10,6 +12,7 @@ import androidx.activity.enableEdgeToEdge
import
androidx.activity.viewModels
import
androidx.activity.viewModels
import
androidx.appcompat.app.AppCompatActivity
import
androidx.appcompat.app.AppCompatActivity
import
androidx.core.content.ContextCompat
import
androidx.core.content.ContextCompat
import
androidx.core.content.FileProvider
import
androidx.core.view.ViewCompat
import
androidx.core.view.ViewCompat
import
androidx.core.view.WindowInsetsCompat
import
androidx.core.view.WindowInsetsCompat
import
androidx.lifecycle.lifecycleScope
import
androidx.lifecycle.lifecycleScope
...
@@ -112,7 +115,20 @@ class KoInternalkoActivity : AppCompatActivity() {
...
@@ -112,7 +115,20 @@ class KoInternalkoActivity : AppCompatActivity() {
adapter
.
showSelectMode
(
true
)
adapter
.
showSelectMode
(
true
)
enableOperationItem
()
enableOperationItem
()
binding
.
llShare
.
setOnClickListener
{
binding
.
llShare
.
setOnClickListener
{
val
list
=
adapter
.
getSelectData
()
val
arrayList
=
ArrayList
<
Uri
>()
list
.
forEach
{
val
uri
=
FileProvider
.
getUriForFile
(
context
,
"$packageName.provider"
,
File
(
it
.
path
))
arrayList
.
add
(
uri
)
}
val
intent
=
Intent
().
apply
{
action
=
"android.intent.action.SEND_MULTIPLE"
type
=
"image/*"
putExtra
(
"android.intent.extra.STREAM"
,
arrayList
)
flags
=
Intent
.
FLAG_GRANT_READ_URI_PERMISSION
}
startActivity
(
Intent
.
createChooser
(
intent
,
null
))
}
}
binding
.
llRename
.
setOnClickListener
{
binding
.
llRename
.
setOnClickListener
{
val
list
=
adapter
.
getSelectData
()
val
list
=
adapter
.
getSelectData
()
...
...
app/src/main/java/com/zxhy/fastfilemanagerpro/kokohome/KoHomekoFragment.kt
View file @
c537a287
...
@@ -41,6 +41,10 @@ class KoHomekoFragment : Fragment() {
...
@@ -41,6 +41,10 @@ class KoHomekoFragment : Fragment() {
binding
.
tvFree
.
text
=
disk
.
getFreeContent
(
context
)
binding
.
tvFree
.
text
=
disk
.
getFreeContent
(
context
)
binding
.
tvUsed
.
text
=
disk
.
getUsedContent
(
context
)
binding
.
tvUsed
.
text
=
disk
.
getUsedContent
(
context
)
val
outPercent
=
disk
.
free
.
toFloat
()
/
disk
.
total
.
toFloat
()
val
inPercent
=
1
-
outPercent
binding
.
ss
.
setPercent
(
outPercent
,
inPercent
)
binding
.
tvScanEmpty
.
setOnClickListener
{
binding
.
tvScanEmpty
.
setOnClickListener
{
val
bundle
=
Bundle
().
apply
{
val
bundle
=
Bundle
().
apply
{
putString
(
"Tittle"
,
EMPTY_FILE
)
putString
(
"Tittle"
,
EMPTY_FILE
)
...
...
app/src/main/java/com/zxhy/fastfilemanagerpro/widget/SS.kt
0 → 100644
View file @
c537a287
package
com.zxhy.fastfilemanagerpro.widget
import
android.content.Context
import
android.graphics.Bitmap
import
android.graphics.BitmapFactory
import
android.graphics.Canvas
import
android.graphics.Paint
import
android.util.AttributeSet
import
android.view.View
import
androidx.core.content.ContextCompat
import
com.zxhy.fastfilemanagerpro.R
class
SS
:
View
{
private
var
widthSize
=
0f
private
var
heightSize
=
0f
private
var
outCircleRadius
=
0f
private
var
circlePaint
:
Paint
=
Paint
()
private
val
bitmapPaint
=
Paint
()
private
val
pointPaint
=
Paint
()
private
var
pointRadius
=
0f
private
var
bitmapRadius
=
0f
private
var
margin
=
10f
private
lateinit
var
bitmap
:
Bitmap
private
var
outArcMargin
=
0f
private
var
outArcRadius
=
0f
private
val
outArcPaint
=
Paint
()
private
var
outArcPercent
=
0f
private
var
inArcMargin
=
0f
private
var
inArcRadius
=
0f
private
val
inArcPaint
=
Paint
()
private
var
inArcPercent
=
0f
constructor
(
context
:
Context
?)
:
super
(
context
)
constructor
(
context
:
Context
,
attrs
:
AttributeSet
?)
:
super
(
context
,
attrs
)
{
circlePaint
.
color
=
ContextCompat
.
getColor
(
context
,
R
.
color
.
color_ece8d9
)
pointPaint
.
color
=
ContextCompat
.
getColor
(
context
,
R
.
color
.
color_fffdf6
)
bitmap
=
BitmapFactory
.
decodeResource
(
resources
,
R
.
mipmap
.
d_897895
)
bitmapRadius
=
(
bitmap
.
width
/
2
).
toFloat
()
pointRadius
=
resources
.
getDimension
(
R
.
dimen
.
dp_6
)
outArcMargin
=
resources
.
getDimension
(
R
.
dimen
.
dp_20
)
outArcRadius
=
resources
.
getDimension
(
R
.
dimen
.
dp_64
)
outArcPaint
.
color
=
ContextCompat
.
getColor
(
context
,
R
.
color
.
color_494949
)
outArcPaint
.
style
=
Paint
.
Style
.
STROKE
outArcPaint
.
strokeCap
=
Paint
.
Cap
.
ROUND
outArcPaint
.
strokeWidth
=
resources
.
getDimension
(
R
.
dimen
.
dp_7
)
inArcMargin
=
resources
.
getDimension
(
R
.
dimen
.
dp_55
)
inArcRadius
=
resources
.
getDimension
(
R
.
dimen
.
dp_29
)
inArcPaint
.
color
=
ContextCompat
.
getColor
(
context
,
R
.
color
.
color_faf6e9
)
inArcPaint
.
style
=
Paint
.
Style
.
STROKE
inArcPaint
.
strokeCap
=
Paint
.
Cap
.
ROUND
inArcPaint
.
strokeWidth
=
resources
.
getDimension
(
R
.
dimen
.
dp_7
)
}
constructor
(
context
:
Context
?,
attrs
:
AttributeSet
?,
defStyleAttr
:
Int
)
:
super
(
context
,
attrs
,
defStyleAttr
)
override
fun
onMeasure
(
widthMeasureSpec
:
Int
,
heightMeasureSpec
:
Int
)
{
super
.
onMeasure
(
widthMeasureSpec
,
heightMeasureSpec
)
// val widthMode = MeasureSpec.getMode(widthMeasureSpec) //获取宽的模式
widthSize
=
MeasureSpec
.
getSize
(
widthMeasureSpec
).
toFloat
()
//获取宽的尺寸
// val heightMode = MeasureSpec.getMode(heightMeasureSpec) //获取高的模式
heightSize
=
MeasureSpec
.
getSize
(
heightMeasureSpec
).
toFloat
()
//获取高的尺寸
outCircleRadius
=
widthSize
/
2
-
margin
}
override
fun
onDraw
(
canvas
:
Canvas
)
{
super
.
onDraw
(
canvas
)
canvas
.
drawCircle
(
widthSize
/
2
,
heightSize
/
2
,
outCircleRadius
,
circlePaint
)
canvas
.
drawBitmap
(
bitmap
,
(
outCircleRadius
-
bitmapRadius
)
+
margin
,
(
outCircleRadius
-
bitmapRadius
)
+
margin
,
bitmapPaint
)
canvas
.
drawCircle
(
widthSize
/
2
,
heightSize
/
2
,
pointRadius
,
pointPaint
)
val
left1
=
outArcMargin
val
top1
=
outArcMargin
val
right1
=
left1
+
outArcRadius
*
2
val
bottom1
=
top1
+
outArcRadius
*
2
canvas
.
drawArc
(
left1
,
top1
,
right1
,
bottom1
,
-
90f
,
-(
360
*
outArcPercent
),
false
,
outArcPaint
)
val
left2
=
inArcMargin
val
top2
=
inArcMargin
val
right2
=
left2
+
inArcRadius
*
2
val
bottom2
=
top2
+
inArcRadius
*
2
canvas
.
drawArc
(
left2
,
top2
,
right2
,
bottom2
,
-
90f
,
(
360
*
inArcPercent
),
false
,
inArcPaint
)
}
fun
setPercent
(
outArcPercent
:
Float
,
inArcPercent
:
Float
)
{
this
.
outArcPercent
=
outArcPercent
this
.
inArcPercent
=
inArcPercent
invalidate
()
}
}
\ No newline at end of file
app/src/main/res/layout/fragment_ko_homeko.xml
View file @
c537a287
...
@@ -46,7 +46,13 @@
...
@@ -46,7 +46,13 @@
android:layout_marginTop=
"20dp"
android:layout_marginTop=
"20dp"
app:layout_constraintStart_toStartOf=
"@id/tv_Storage"
app:layout_constraintStart_toStartOf=
"@id/tv_Storage"
app:layout_constraintTop_toBottomOf=
"@id/tv_Storage"
app:layout_constraintTop_toBottomOf=
"@id/tv_Storage"
tools:ignore=
"ContentDescription,UselessLeaf"
/>
tools:ignore=
"ContentDescription,UselessLeaf"
>
<com.zxhy.fastfilemanagerpro.widget.SS
android:id=
"@+id/ss"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
</FrameLayout>
<FrameLayout
<FrameLayout
android:id=
"@+id/fl_storage_free"
android:id=
"@+id/fl_storage_free"
...
...
app/src/main/res/mipmap-hdpi/d_897895.png
0 → 100644
View file @
c537a287
22.1 KB
app/src/main/res/mipmap-mdpi/d_897895.png
0 → 100644
View file @
c537a287
10.4 KB
app/src/main/res/mipmap-xhdpi/d_897895.png
0 → 100644
View file @
c537a287
33.1 KB
app/src/main/res/mipmap-xxhdpi/d_897895.png
0 → 100644
View file @
c537a287
77.8 KB
app/src/main/res/mipmap-xxxhdpi/d_897895.png
0 → 100644
View file @
c537a287
122 KB
app/src/main/res/values/colors.xml
View file @
c537a287
...
@@ -7,4 +7,8 @@
...
@@ -7,4 +7,8 @@
<color
name=
"color_ffffff"
>
#FFFFFF
</color>
<color
name=
"color_ffffff"
>
#FFFFFF
</color>
<color
name=
"color_606060"
>
#606060
</color>
<color
name=
"color_606060"
>
#606060
</color>
<color
name=
"color_b3000000"
>
#B3000000
</color>
<color
name=
"color_b3000000"
>
#B3000000
</color>
<color
name=
"color_ece8d9"
>
#ECE8D9
</color>
<color
name=
"color_fffdf6"
>
#FFFDF6
</color>
<color
name=
"color_494949"
>
#494949
</color>
<color
name=
"color_faf6e9"
>
#FAF6E9
</color>
</resources>
</resources>
\ No newline at end of file
app/src/main/res/values/dimens.xml
View file @
c537a287
...
@@ -5,4 +5,18 @@
...
@@ -5,4 +5,18 @@
<dimen
name=
"dp_180"
>
180dp
</dimen>
<dimen
name=
"dp_180"
>
180dp
</dimen>
<dimen
name=
"dp_260"
>
260dp
</dimen>
<dimen
name=
"dp_260"
>
260dp
</dimen>
<dimen
name=
"dp_190"
>
190dp
</dimen>
<dimen
name=
"dp_190"
>
190dp
</dimen>
<dimen
name=
"dp_6"
>
6dp
</dimen>
<dimen
name=
"dp_15"
>
15dp
</dimen>
<dimen
name=
"dp_69"
>
69dp
</dimen>
<dimen
name=
"dp_10"
>
10dp
</dimen>
<dimen
name=
"dp_75"
>
75dp
</dimen>
<dimen
name=
"dp_65"
>
65dp
</dimen>
<dimen
name=
"dp_20"
>
20dp
</dimen>
<dimen
name=
"dp_64"
>
64dp
</dimen>
<dimen
name=
"dp_45"
>
45dp
</dimen>
<dimen
name=
"dp_39"
>
39dp
</dimen>
<dimen
name=
"dp_55"
>
55dp
</dimen>
<dimen
name=
"dp_29"
>
29dp
</dimen>
<dimen
name=
"dp_8"
>
8dp
</dimen>
<dimen
name=
"dp_7"
>
7dp
</dimen>
</resources>
</resources>
\ No newline at end of file
app/src/main/res/xml/provider_paths.xml
0 → 100644
View file @
c537a287
<?xml version="1.0" encoding="utf-8"?>
<paths>
<!--内置SD卡 Environment.getExternalStorageDirectory() .表示共享所有的目录,也可以指定共享的目录-->
<external-path
name=
"external-path"
path=
"."
/>
<!--内置SD卡 Context.getExternalCacheDir() .表示共享所有的目录,也可以指定共享的目录-->
<external-cache-path
name=
"external-cache-path"
path=
"."
/>
<!--内置SD卡 Context.getExternalFilesDir(null) .表示共享所有的目录,也可以指定共享的目录-->
<external-files-path
name=
"external-files-path"
path=
"."
/>
<!--data目录下 Context.getFilesDir() .表示共享所有的目录,也可以指定共享的目录-->
<files-path
name=
"files_path"
path=
"."
/>
<!--data缓存目录 Context.getCacheDir() .表示共享所有的目录,也可以指定共享的目录-->
<cache-path
name=
"cache-path"
path=
"."
/>
<!--这个标签Android官方文档中是没有提及,Android设备的根目录,该目录下包含着手机内部存储器,外置SD卡等所有文件的目录-->
<root-path
name=
"name"
path=
"."
/>
<external-path
name=
"external_storage_root"
path=
"."
/>
</paths>
\ 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