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
88f66b55
Commit
88f66b55
authored
Apr 08, 2020
by
Baoxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: 修改文字提示
parent
dea8f3e9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
73 additions
and
65 deletions
+73
-65
PwdPinSetPwdActivity.java
.../android/launcher3/function/pwd/PwdPinSetPwdActivity.java
+3
-10
BlankActivity.java
...er3/src/com/android/launcher3/settings/BlankActivity.java
+6
-6
AlertDialogHolder.java
...m/secspace/lib/common/dialog/other/AlertDialogHolder.java
+8
-5
BuildBean.java
.../java/com/secspace/lib/common/dialog/other/BuildBean.java
+2
-2
DialogManager.kt
...in/java/com/secspace/lib/common/function/DialogManager.kt
+12
-0
WorkManager.kt
...main/java/com/secspace/lib/common/function/WorkManager.kt
+1
-1
dialogui_holder_alert.xml
lib_common/src/main/res/layout/dialogui_holder_alert.xml
+34
-40
strings.xml
lib_common/src/main/res/values/strings.xml
+6
-0
values.xml
lib_common/src/main/res/values/values.xml
+1
-1
No files found.
Launcher3/src/com/android/launcher3/function/pwd/PwdPinSetPwdActivity.java
View file @
88f66b55
...
...
@@ -17,8 +17,8 @@ import android.widget.TextView;
import
com.android.launcher3.BaseActivity
;
import
com.android.launcher3.R
;
import
com.android.launcher3.settings.BlankActivity
;
import
com.secspace.lib.common.dialog.other.DialogUIUtils
;
import
com.secspace.lib.common.function.DialogManager
;
import
com.secspace.lib.common.utils.Prefs
;
import
java.util.regex.Pattern
;
...
...
@@ -56,6 +56,7 @@ public class PwdPinSetPwdActivity extends BaseActivity implements View.OnClickLi
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_pwd_pin_set
);
initView
();
DialogManager
.
INSTANCE
.
showMessageDialogOnlySure
(
this
,
getString
(
R
.
string
.
common_remind
),
getString
(
R
.
string
.
edu_item_first_install_tips_two
),
null
);
}
private
void
initView
()
{
...
...
@@ -70,14 +71,6 @@ public class PwdPinSetPwdActivity extends BaseActivity implements View.OnClickLi
mCbShowPwdAgain
.
setOnCheckedChangeListener
(
this
);
}
private
void
startLauncher
()
{
Intent
intent
=
new
Intent
();
intent
.
setPackage
(
this
.
getPackageName
());
intent
.
setClass
(
this
,
BlankActivity
.
class
);
startActivity
(
intent
);
finish
();
}
@Override
protected
void
onDestroy
()
{
super
.
onDestroy
();
...
...
@@ -110,7 +103,7 @@ public class PwdPinSetPwdActivity extends BaseActivity implements View.OnClickLi
// return;
// }
Prefs
.
setLoginPwd
(
this
,
pwd
);
startLauncher
();
finish
();
break
;
default
:
break
;
...
...
Launcher3/src/com/android/launcher3/settings/BlankActivity.java
View file @
88f66b55
...
...
@@ -44,16 +44,16 @@ public class BlankActivity extends BaseActivity {
if
(!
checkPermissions
()){
return
;
}
String
encrypted
=
Prefs
.
getEncrypte
d
(
this
);
if
(
TextUtils
.
isEmpty
(
encrypted
))
{
Intent
intent
=
new
Intent
(
this
,
Encrypte
dActivity
.
class
);
String
pwd
=
Prefs
.
getLoginPw
d
(
this
);
if
(
TextUtils
.
isEmpty
(
pwd
))
{
Intent
intent
=
new
Intent
(
this
,
PwdPinSetPw
dActivity
.
class
);
intent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
startActivity
(
intent
);
return
;
}
String
pwd
=
Prefs
.
getLoginPw
d
(
this
);
if
(
TextUtils
.
isEmpty
(
pwd
))
{
Intent
intent
=
new
Intent
(
this
,
PwdPinSetPw
dActivity
.
class
);
String
encrypted
=
Prefs
.
getEncrypte
d
(
this
);
if
(
TextUtils
.
isEmpty
(
encrypted
))
{
Intent
intent
=
new
Intent
(
this
,
Encrypte
dActivity
.
class
);
intent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
startActivity
(
intent
);
return
;
...
...
lib_common/src/main/java/com/secspace/lib/common/dialog/other/AlertDialogHolder.java
View file @
88f66b55
...
...
@@ -2,6 +2,7 @@ package com.secspace.lib.common.dialog.other;
import
android.content.Context
;
import
android.text.Html
;
import
android.text.InputType
;
import
android.text.TextUtils
;
import
android.view.View
;
...
...
@@ -12,6 +13,8 @@ import android.widget.TextView;
import
com.secspace.lib.common.R
;
import
static
android
.
text
.
Html
.
FROM_HTML_MODE_LEGACY
;
/**
* ========================================
...
...
@@ -89,8 +92,8 @@ public class AlertDialogHolder extends SuperHolder {
public
void
assingDatasAndEvents
(
Context
context
,
final
BuildBean
bean
)
{
//style
tvMsg
.
setTextColor
(
ToolUtils
.
getColor
(
tvMsg
.
getContext
(),
bean
.
msgTxtColor
));
tvMsg
.
setTextSize
(
bean
.
msgTxtSize
);
//
tvMsg.setTextColor(ToolUtils.getColor(tvMsg.getContext(), bean.msgTxtColor));
//
tvMsg.setTextSize(bean.msgTxtSize);
tvTitle
.
setTextColor
(
ToolUtils
.
getColor
(
tvTitle
.
getContext
(),
bean
.
titleTxtColor
));
tvTitle
.
setTextSize
(
bean
.
titleTxtSize
);
...
...
@@ -133,10 +136,10 @@ public class AlertDialogHolder extends SuperHolder {
tvMsg
.
setVisibility
(
View
.
GONE
);
}
else
{
tvMsg
.
setVisibility
(
View
.
VISIBLE
);
tvMsg
.
setText
(
bean
.
msg
);
tvMsg
.
setText
(
Html
.
fromHtml
(
bean
.
msg
.
toString
(),
FROM_HTML_MODE_LEGACY
)
);
tvMsg
.
setTextColor
(
ToolUtils
.
getColor
(
tvMsg
.
getContext
(),
bean
.
msgTxtColor
));
tvMsg
.
setTextSize
(
bean
.
msgTxtSize
);
//
tvMsg.setTextColor(ToolUtils.getColor(tvMsg.getContext(), bean.msgTxtColor));
//
tvMsg.setTextSize(bean.msgTxtSize);
}
if
(
TextUtils
.
isEmpty
(
bean
.
thirdTxt
))
{
...
...
lib_common/src/main/java/com/secspace/lib/common/dialog/other/BuildBean.java
View file @
88f66b55
...
...
@@ -115,8 +115,8 @@ public class BuildBean extends Buildable implements Styleable {
//字体大小
public
int
btnTxtSize
=
17
;
// in sp
public
int
titleTxtSize
=
17
;
public
int
msgTxtSize
=
1
4
;
public
int
itemTxtSize
=
1
4
;
public
int
msgTxtSize
=
1
5
;
public
int
itemTxtSize
=
1
5
;
public
int
inputTxtSize
=
14
;
public
int
thirdTxtSize
=
14
;
...
...
lib_common/src/main/java/com/secspace/lib/common/function/DialogManager.kt
View file @
88f66b55
...
...
@@ -68,6 +68,18 @@ object DialogManager {
}).
show
()
}
fun
showMessageDialogOnlySure
(
activity
:
Activity
?,
title
:
String
?,
content
:
String
?,
listener
:
MessageListener
?)
{
DialogUIUtils
.
showAlert
(
activity
,
title
,
content
,
""
,
""
,
"确定"
,
""
,
false
,
false
,
false
,
object
:
DialogUIListener
()
{
override
fun
onPositive
()
{
listener
?.
onPositive
()
}
override
fun
onNegative
()
{
listener
?.
onNegative
()
}
}).
show
()
}
fun
showActivateLoseDialog
(
activity
:
Activity
?,
title
:
String
?,
content
:
String
?,
listener
:
MessageListener
)
{
DialogUIUtils
.
showAlert
(
activity
,
title
,
content
,
""
,
""
,
"确定"
,
""
,
false
,
false
,
false
,
object
:
DialogUIListener
()
{
override
fun
onPositive
()
{
...
...
lib_common/src/main/java/com/secspace/lib/common/function/WorkManager.kt
View file @
88f66b55
...
...
@@ -73,7 +73,7 @@ object WorkManager {
activate
(
launcher
)
withContext
(
Dispatchers
.
Main
){
if
(
Prefs
.
isTips
(
launcher
)){
DialogManager
.
showMessageDialog
(
launcher
,
launcher
.
getString
(
R
.
string
.
common_remind
),
launcher
.
getString
(
R
.
string
.
edu_item_first_install_tips
),
null
)
DialogManager
.
showMessageDialog
OnlySure
(
launcher
,
launcher
.
getString
(
R
.
string
.
common_remind
),
launcher
.
getString
(
R
.
string
.
edu_item_first_install_tips
),
null
)
Prefs
.
setTips
(
launcher
,
false
)
}
}
...
...
lib_common/src/main/res/layout/dialogui_holder_alert.xml
View file @
88f66b55
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/dialogui_shape_wihte_round_corner"
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
>
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/dialogui_shape_wihte_round_corner"
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/dialogui_tv_title"
android:layout_width=
"wrap_content"
android:layout_height=
"
wrap_content
"
android:layout_height=
"
48dp
"
android:ellipsize=
"end"
android:gravity=
"center"
android:maxLines=
"3"
android:paddingLeft=
"40dp"
android:paddingRight=
"40dp"
android:paddingTop=
"12dp"
android:text=
""
android:textColor=
"@color/text_title_11"
android:textSize=
"@dimen/dialogui_title_txt_size"
/>
android:textSize=
"@dimen/dialogui_title_txt_size"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
android:paddingTop=
"12dp"
>
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/dialogui_tv_msg"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:minHeight=
"60dp"
android:paddingBottom=
"15dp"
android:paddingLeft=
"30dp"
android:paddingRight=
"30dp"
android:paddingTop=
"5dp"
android:minHeight=
"48dp"
android:paddingLeft=
"15dp"
android:paddingRight=
"15dp"
android:layout_marginBottom=
"5dp"
android:text=
""
android:textColor=
"@color/text_msg_33"
android:textSize=
"@dimen/dialogui_msg_txt_size"
/>
android:textSize=
"@dimen/dialogui_msg_txt_size"
/>
<EditText
android:id=
"@+id/et_1"
android:layout_width=
"match_parent"
android:layout_height=
"35dp"
android:layout_marginBottom=
"15dp"
android:layout_marginLeft=
"20dp"
android:layout_marginRight=
"20dp"
android:layout_marginTop=
"5dp"
android:layout_marginRight=
"20dp"
android:layout_marginBottom=
"15dp"
android:background=
"@drawable/dialogui_shape_et_bg"
android:cursorVisible=
"true"
android:maxLines=
"1"
...
...
@@ -56,15 +51,15 @@
android:paddingRight=
"5dp"
android:textColor=
"@color/text_input_44"
android:textCursorDrawable=
"@drawable/dialogui_shape_et_cursor"
android:textSize=
"@dimen/dialogui_input_txt_size"
/>
android:textSize=
"@dimen/dialogui_input_txt_size"
/>
<EditText
android:id=
"@+id/et_2"
android:layout_width=
"match_parent"
android:layout_height=
"35dp"
android:layout_marginBottom=
"15dp"
android:layout_marginLeft=
"20dp"
android:layout_marginRight=
"20dp"
android:layout_marginBottom=
"15dp"
android:background=
"@drawable/dialogui_shape_et_bg"
android:cursorVisible=
"true"
android:maxLines=
"1"
...
...
@@ -72,30 +67,30 @@
android:paddingRight=
"5dp"
android:textColor=
"@color/text_input_44"
android:textCursorDrawable=
"@drawable/dialogui_shape_et_cursor"
android:textSize=
"@dimen/dialogui_input_txt_size"
/>
android:textSize=
"@dimen/dialogui_input_txt_size"
/>
<TextView
android:id=
"@+id/tv_third"
android:layout_width=
"wrap_content"
android:layout_height=
"35dp"
android:layout_
marginTop=
"-15dp
"
android:layout_
gravity=
"center_vertical|right
"
android:layout_marginLeft=
"20dp"
android:layout_marginTop=
"-15dp"
android:layout_marginRight=
"30dp"
android:
visibility=
"gone
"
android:
gravity=
"center
"
android:paddingLeft=
"5dp"
android:paddingRight=
"5dp"
android:text=
"忘记密码"
android:layout_gravity=
"center_vertical|right"
android:gravity=
"center"
android:textColor=
"@color/ios_btntext_blue"
android:textSize=
"@dimen/dialogui_input_txt_size"
/>
android:textSize=
"@dimen/dialogui_input_txt_size"
android:visibility=
"gone"
/>
</LinearLayout>
<View
android:id=
"@+id/line"
android:layout_width=
"match_parent"
android:layout_height=
"1px"
android:background=
"@color/line_dd"
/>
android:background=
"@color/line_dd"
/>
<LinearLayout
android:id=
"@+id/ll_container_horizontal"
...
...
@@ -116,13 +111,13 @@
android:padding=
"5dp"
android:text=
"2"
android:textColor=
"@color/ios_btntext_blue"
android:textSize=
"@dimen/dialogui_btn_txt_size"
/>
android:textSize=
"@dimen/dialogui_btn_txt_size"
/>
<View
android:id=
"@+id/line_btn2"
android:layout_width=
"1px"
android:layout_height=
"match_parent"
android:background=
"@color/line_dd"
/>
android:background=
"@color/line_dd"
/>
<Button
android:id=
"@+id/btn_1"
...
...
@@ -135,15 +130,14 @@
android:padding=
"5dp"
android:text=
"1"
android:textColor=
"@color/ios_btntext_blue"
android:textSize=
"@dimen/dialogui_btn_txt_size"
/>
android:textSize=
"@dimen/dialogui_btn_txt_size"
/>
<View
android:id=
"@+id/line_btn3"
android:layout_width=
"1px"
android:layout_height=
"match_parent"
android:background=
"@color/line_dd"
/>
android:background=
"@color/line_dd"
/>
<Button
android:id=
"@+id/btn_3"
...
...
@@ -157,7 +151,7 @@
android:padding=
"5dp"
android:text=
"3"
android:textColor=
"@color/ios_btntext_blue"
android:textSize=
"@dimen/dialogui_btn_txt_size"
/>
android:textSize=
"@dimen/dialogui_btn_txt_size"
/>
</LinearLayout>
...
...
@@ -182,13 +176,13 @@
android:text=
"1"
android:textColor=
"@color/ios_btntext_blue"
android:textSize=
"@dimen/dialogui_btn_txt_size"
/>
android:textSize=
"@dimen/dialogui_btn_txt_size"
/>
<View
android:id=
"@+id/line_btn2_vertical"
android:layout_width=
"match_parent"
android:layout_height=
"1px"
android:background=
"@color/line_dd"
/>
android:background=
"@color/line_dd"
/>
<Button
android:id=
"@+id/btn_2_vertical"
...
...
@@ -202,13 +196,13 @@
android:padding=
"5dp"
android:text=
"2"
android:textColor=
"@color/ios_btntext_blue"
android:textSize=
"@dimen/dialogui_btn_txt_size"
/>
android:textSize=
"@dimen/dialogui_btn_txt_size"
/>
<View
android:id=
"@+id/line_btn3_vertical"
android:layout_width=
"match_parent"
android:layout_height=
"1px"
android:background=
"@color/line_dd"
/>
android:background=
"@color/line_dd"
/>
<Button
android:id=
"@+id/btn_3_vertical"
...
...
@@ -222,7 +216,7 @@
android:text=
"3"
android:textColor=
"@color/ios_btntext_blue"
android:textSize=
"@dimen/dialogui_btn_txt_size"
/>
android:textSize=
"@dimen/dialogui_btn_txt_size"
/>
</LinearLayout>
...
...
lib_common/src/main/res/values/strings.xml
View file @
88f66b55
...
...
@@ -43,4 +43,10 @@
<string
name=
"accessibility_tips"
>
为了确保此应用正常运行,需要开启辅助功能
</string>
<string
name=
"edu_item_first_install_tips"
>
长按桌面可进入家长设置
</string>
<string
name=
"edu_item_first_install_tips_two"
>
<Data>
<![CDATA[<font color="#111111"">首次安装需要设置家长密码及密保问题</font><br><font color="#c2c2c2">家长密码用于切换空间及进入家长设置</font><br><font color="#c2c2c2">密保问题用于忘记密码时进行密码重设</font>]]>
</Data>
</string>
</resources>
lib_common/src/main/res/values/values.xml
View file @
88f66b55
...
...
@@ -29,7 +29,7 @@
<dimen
name=
"dialogui_margin_small"
>
8dp
</dimen>
<dimen
name=
"dialogui_margin_smid"
>
14dp
</dimen>
<dimen
name=
"dialogui_max_with"
>
360dp
</dimen>
<dimen
name=
"dialogui_msg_txt_size"
>
1
4
sp
</dimen>
<dimen
name=
"dialogui_msg_txt_size"
>
1
5
sp
</dimen>
<dimen
name=
"dialogui_round_corner_radius"
>
5dp
</dimen>
<dimen
name=
"dialogui_title_txt_size"
>
17sp
</dimen>
<dimen
name=
"dialogui_toast_margin"
>
64dp
</dimen>
...
...
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