Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
MobileManager
Project
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Wang Xu
MobileManager
Commits
1e2fb9b0
Commit
1e2fb9b0
authored
Mar 31, 2020
by
Baoxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 应用使用情况初步完成界面
parent
087cd240
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
12 deletions
+11
-12
activity_use_app.xml
Launcher3/res/layout/activity_use_app.xml
+8
-7
AppUseActivity.kt
.../com/android/launcher3/function/setting/AppUseActivity.kt
+1
-0
TimeProgress.java
...a/com/secspace/lib/common/function/view/TimeProgress.java
+2
-5
No files found.
Launcher3/res/layout/activity_use_app.xml
View file @
1e2fb9b0
...
@@ -21,16 +21,11 @@
...
@@ -21,16 +21,11 @@
android:textColor=
"#363636"
android:textColor=
"#363636"
android:textSize=
"16sp"
/>
android:textSize=
"16sp"
/>
<View
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:background=
"#DDDFE1"
/>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"48dp"
android:layout_height=
"48dp"
android:gravity=
"center_vertical"
android:background=
"@color/bg_white"
android:background=
"@color/bg_white"
android:gravity=
"center_vertical"
android:onClick=
"more"
android:onClick=
"more"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
...
@@ -49,7 +44,7 @@
...
@@ -49,7 +44,7 @@
<com.qmuiteam.qmui.widget.QMUIEmptyView
<com.qmuiteam.qmui.widget.QMUIEmptyView
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
/>
android:layout_weight=
"1"
/>
<TextView
<TextView
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
...
@@ -61,4 +56,10 @@
...
@@ -61,4 +56,10 @@
android:textSize=
"15sp"
/>
android:textSize=
"15sp"
/>
</LinearLayout>
</LinearLayout>
<com.secspace.lib.common.function.view.TimeProgress
android:id=
"@+id/time_progress"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/bg_white"
android:padding=
"10dp"
/>
</LinearLayout>
</LinearLayout>
Launcher3/src/com/android/launcher3/function/setting/AppUseActivity.kt
View file @
1e2fb9b0
...
@@ -30,6 +30,7 @@ class AppUseActivity : BaseActivity() {
...
@@ -30,6 +30,7 @@ class AppUseActivity : BaseActivity() {
tv_setting_title
.
setText
(
R
.
string
.
edu_item_app_use_title
)
tv_setting_title
.
setText
(
R
.
string
.
edu_item_app_use_title
)
tv_app_use_time
.
text
=
String
.
format
(
getString
(
R
.
string
.
edu_item_app_use_last_day
),
"50"
)
tv_app_use_time
.
text
=
String
.
format
(
getString
(
R
.
string
.
edu_item_app_use_last_day
),
"50"
)
time_progress
.
initAnimation
()
}
}
fun
close
(
view
:
View
?)
{
fun
close
(
view
:
View
?)
{
...
...
lib_common/src/main/java/com/secspace/lib/common/function/view/TimeProgress.java
View file @
1e2fb9b0
...
@@ -176,7 +176,7 @@ public class TimeProgress extends View {
...
@@ -176,7 +176,7 @@ public class TimeProgress extends View {
int
heightMode
=
MeasureSpec
.
getMode
(
heightMeasureSpec
);
int
heightMode
=
MeasureSpec
.
getMode
(
heightMeasureSpec
);
int
height
=
MeasureSpec
.
getSize
(
heightMeasureSpec
);
int
height
=
MeasureSpec
.
getSize
(
heightMeasureSpec
);
parameterAssignment
();
setMeasuredDimension
(
measureWidth
(
widthMode
,
width
),
measureHeight
(
heightMode
,
height
));
setMeasuredDimension
(
measureWidth
(
widthMode
,
width
),
measureHeight
(
heightMode
,
height
));
}
}
...
@@ -251,10 +251,7 @@ public class TimeProgress extends View {
...
@@ -251,10 +251,7 @@ public class TimeProgress extends View {
x
=
x
+
paddingLeft
;
x
=
x
+
paddingLeft
;
}
}
y
=
textHeight
+
tipsMargin
+
progressHeight
;
y
=
textHeight
+
tipsMargin
+
progressHeight
+
paddingLeft
;
if
(
i
==
times
.
size
()
-
1
)
{
y
=
y
-
paddingBottom
;
}
canvas
.
drawRect
(
x
-
textWidth
,
y
-
textHeight
+
indicatorMargin
,
x
-
textWidth
+
textHeight
,
y
+
indicatorMargin
,
bgPaint
);
canvas
.
drawRect
(
x
-
textWidth
,
y
-
textHeight
+
indicatorMargin
,
x
-
textWidth
+
textHeight
,
y
+
indicatorMargin
,
bgPaint
);
canvas
.
drawText
(
text
,
x
,
y
,
textPaint
);
canvas
.
drawText
(
text
,
x
,
y
,
textPaint
);
canvas
.
drawText
(
text
,
x
,
y
+
textHeight
+
tipsMargin
/
3
,
textPaint
);
canvas
.
drawText
(
text
,
x
,
y
+
textHeight
+
tipsMargin
/
3
,
textPaint
);
...
...
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