Commit 88f66b55 by Baoxy

build: 修改文字提示

parent dea8f3e9
......@@ -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;
......
......@@ -44,16 +44,16 @@ public class BlankActivity extends BaseActivity {
if(!checkPermissions()){
return;
}
String encrypted = Prefs.getEncrypted(this);
if(TextUtils.isEmpty(encrypted)){
Intent intent = new Intent(this, EncryptedActivity.class);
String pwd = Prefs.getLoginPwd(this);
if (TextUtils.isEmpty(pwd)) {
Intent intent = new Intent(this, PwdPinSetPwdActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
return;
}
String pwd = Prefs.getLoginPwd(this);
if (TextUtils.isEmpty(pwd)) {
Intent intent = new Intent(this, PwdPinSetPwdActivity.class);
String encrypted = Prefs.getEncrypted(this);
if(TextUtils.isEmpty(encrypted)){
Intent intent = new Intent(this, EncryptedActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
return;
......
......@@ -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)) {
......
......@@ -115,8 +115,8 @@ public class BuildBean extends Buildable implements Styleable {
//字体大小
public int btnTxtSize = 17;// in sp
public int titleTxtSize = 17;
public int msgTxtSize = 14;
public int itemTxtSize = 14;
public int msgTxtSize = 15;
public int itemTxtSize = 15;
public int inputTxtSize = 14;
public int thirdTxtSize = 14;
......
......@@ -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() {
......
......@@ -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.showMessageDialogOnlySure(launcher, launcher.getString(R.string.common_remind), launcher.getString(R.string.edu_item_first_install_tips), null)
Prefs.setTips(launcher, false)
}
}
......
<?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>
......
......@@ -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>
......@@ -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">14sp</dimen>
<dimen name="dialogui_msg_txt_size">15sp</dimen>
<dimen name="dialogui_round_corner_radius">5dp</dimen>
<dimen name="dialogui_title_txt_size">17sp</dimen>
<dimen name="dialogui_toast_margin">64dp</dimen>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment