item = View.inflate(container.getContext(), R.layout.msg_item_layout, null);
//设置数据
TextView msgView = (TextView) item.findViewById(R.id.msg_text_tv);
- item.findViewById(R.id.next_btn).setOnClickListener(v -> {
- if (mListener != null) {
- mListener.onNextClick();
- }
- });
+ //如果只有一条消息,就显示为关闭,否则显示下一条
+ TextView btn = (TextView) item.findViewById(R.id.next_btn);
+ if (msgData.size() == 1) {
+ //修改文字
+ btn.setText(R.string.close_text);
+ btn.setOnClickListener(v -> {
+ //结束
+ //清空数据
+ if (mListener != null) {
+ msgData.clear();
+ mListener.onEndClick();
+ }
+ });
+ } else {
+ btn.setOnClickListener(v -> {
+ if (mListener != null) {
+ mListener.onNextClick();
+ }
+ });
+ }
msgView.setText(msgData.get(position));
}
container.addView(item);
WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams();
layoutParams.type = WindowManager.LayoutParams.TYPE_SYSTEM_ALERT;
//这个是针对S123的屏幕,如果要适配其他,可以动态获取屏幕宽度,高度,再以百分比的形式计算即可。
- layoutParams.height = 180;
- layoutParams.width = 180;
+ layoutParams.height = 200;
+ layoutParams.width = 200;
layoutParams.packageName = context.getPackageName();
layoutParams.gravity = Gravity.CENTER;
//加载布局
<string name="sedentary_name">久坐提醒</string>
<string name="sedentary_msg">久坐提醒</string>
-
+ <string name="close_text">シャットダウン</string>
<string name="en">English</string>
<string name="ja">日本語</string>
<string name="next_msg_tips_text">次の</string>
<string name="read_end_tips_text">完了</string>
- <string name="oxygen_exception_tips_text">血氧异常(</string>
- <string name="heart_rate_exception_tips_text">心率异常(BPM</string>
- <string name="blood_presure_exception_tips_text">è¡\80å\8e\8bå¼\82常(</string>
- <string name="body_temperature_exception_tips_text">体温异常(</string>
- <string name="web_sms_title_text">Web短信提醒</string>
- <string name="close_tips_text">关闭</string>
+ <string name="oxygen_exception_tips_text">SpO2レベル異常(</string>
+ <string name="heart_rate_exception_tips_text">心拍異常(BPM</string>
+ <string name="blood_presure_exception_tips_text">è¡\80å\9c§ç\95°常(</string>
+ <string name="body_temperature_exception_tips_text">体温異常(</string>
+ <string name="web_sms_title_text">SMS通知</string>
+ <string name="close_tips_text">シャットダウン</string>
</resources>
<string name="sedentary_msg">久坐提醒</string>
-
<string name="en">English</string>
<string name="ja">日本語</string>
<string name="th">ภาษาไทย</string>
<string name="body_temperature_exception_tips_text">体温异常(</string>
<string name="web_sms_title_text">Web短信提醒</string>
<string name="close_tips_text">关闭</string>
+
+
+ <string name="untitled_apn">未命名</string>
+ <!-- APN error dialog title -->
+ <string name="error_title"></string>
+ <!-- APN error dialog messages: -->
+ <string name="error_name_empty">The Name field can\'t be empty.</string>
+ <!-- APN error dialog messages: -->
+ <string name="error_apn_empty">The APN can\'t be empty.</string>
+ <!-- APN error dialog messages: -->
+ <string name="error_mcc_not3">MCC field must be 3 digits.</string>
+ <!-- APN error dialog messages: -->
+ <string name="error_mnc_not23">MNC field must be 2 or 3 digits.</string>
+ <!-- The message of dialog indicated restoring default APN settings in progress -->
+ <string name="restore_default_apn">Restoring default APN settings.</string>
+ <!-- APNs screen menu option to reset default APN settings -->
+ <string name="menu_restore">Reset to default</string>
+ <!-- APNs screen toast message to inform reset default APN settings is completed -->
+ <string name="restore_default_apn_completed">Reset default APN settings completed.</string>
+ <string name="apn_type_setting">"Setting apn type"</string>
+ <string name="user_could_input_apn_type">"User could input apn type"</string>
+ <string name="could_not_input_the_same_apn_type">"Could not input the same apn type"</string>
+ <string name="apn_type_message">"There does not contain a default type in your new APN, will not be able to select the APN."</string>
+ <string name="error_apn_type_message">"APN type cannot be empty"</string>
+ <string name="error_apn_type">"Apn type you entered is not supported, please re-enter!"</string>
+ <string name="same_apn_type">"You have entered the same type of APN, please re-enter!"</string>
+ <string name="empty_apn_type">"You did not entered or select any type of APN, please re-enter!"</string>
+ <string name="sport_target_achieve">提示:</string>
+ <string name="close_text">关闭</string>
+ <string name="commit_text">确定</string>
+ <string name="sport_aim_achieve_tips_text">运动达标!</string>
</resources>