def currentVersionCode = getVersionCode()
def currentVersionName = releaseTime()
- def buildVersionType = 1
+ def buildVersionType = 2
compileSdkVersion 29
buildToolsVersion "29.0.2"
versionName "${currentVersionName}"
}
+ lintOptions {
+ checkReleaseBuilds false
+ // Or, if you prefer, you can continue to check for errors in release builds,
+ // but continue the build even when errors are found:
+ abortOnError false
+ }
+
dataBinding {
enabled = true
}
// optional - ReactiveStreams support for LiveData
implementation "androidx.lifecycle:lifecycle-reactivestreams:2.2.0"
- //recyclerview
- implementation "androidx.recyclerview:recyclerview:1.1.0"
- implementation 'androidx.dynamicanimation:dynamicanimation:1.0.0'
-
//1.2.0-alpha05
- implementation "com.google.android.material:material:1.2.0-alpha05"
+ implementation "com.google.android.material:material:1.3.0-alpha01"
implementation 'com.google.zxing:core:3.4.0'
implementation "androidx.viewpager2:viewpager2:1.0.0"
implementation 'com.jakewharton.threetenabp:threetenabp:1.2.2'
+
+ implementation 'com.jakewharton:butterknife:10.2.1'
+ annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.1'
+
+ implementation 'org.greenrobot:eventbus:3.2.0'
}
package="com.ic.launcher"
android:sharedUserId="android.uid.system">
+ <uses-permission android:name="android.permission.CHANGE_CONFIGURATION"/>
<uses-permission android:name="android.permission.SHUTDOWN" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
+ <activity android:name=".AnimalHeatActivity"/>
<activity android:name=".SelectDialActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
-
<activity android:name=".QrCodeActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
-
- <activity android:name=".MainActivity"
- android:configChanges="keyboardHidden|orientation|screenSize|locale|screenLayout|mcc|mnc">
+ <activity
+ android:name=".MainActivity"
+ android:configChanges="keyboardHidden|orientation|screenSize|locale|screenLayout|mcc|mnc|layoutDirection">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.VIEW" />
--- /dev/null
+package com.ic.launcher;
+
+import androidx.annotation.NonNull;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.core.view.GestureDetectorCompat;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.Message;
+import android.text.TextUtils;
+import android.view.KeyEvent;
+import android.view.MotionEvent;
+import android.widget.TextView;
+
+import com.ic.launcher.listener.MainClockGestureDetectorImpl;
+import com.ic.launcher.util.IcLog;
+
+import java.lang.ref.WeakReference;
+import java.text.DecimalFormat;
+
+public class AnimalHeatActivity extends AppCompatActivity implements
+ MainClockGestureDetectorImpl.OnClockGestureFlingListener{
+
+ private static final String GET_TEMPERATURE_ACTION = "com.ic.action.GET_TEMPERATURE";
+ private static final String TEMPERATURE_KEY = "TEMPERATURE_KEY";
+ private static final String TEMPERATURE_FINISH_ACTION = "com.ic.action.TEMPERATURE_FINISH";
+
+ private GestureDetectorCompat gesture;
+
+ private TextView temperatureView;
+
+ private HeatHandler heatHandler;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_animal_heat);
+ temperatureView = findViewById(R.id.temperature_value);
+ heatHandler = new HeatHandler(this);
+ gesture = new GestureDetectorCompat(this, new MainClockGestureDetectorImpl(this));
+ registerBroadcast();
+ sendTemperatureBroadcast();
+ }
+ @Override
+ protected void onDestroy() {
+ super.onDestroy();
+ heatHandler.removeMessages(1);
+ heatHandler=null;
+ unregisterReceiver(mIntentReceiver);
+ }
+
+ @Override
+ public void onDirection(int flag) {
+ if (flag == 2) {
+ finish();
+ }
+ }
+
+ @Override
+ public void onDouble() {
+
+ }
+
+ @Override
+ public boolean onTouchEvent(MotionEvent event) {
+ if (gesture.onTouchEvent(event)) {
+ return true;
+ }
+ return true;
+ }
+
+ @Override
+ public boolean onKeyDown(int keyCode, KeyEvent event) {
+ if (keyCode == KeyEvent.KEYCODE_BACK) {
+ // 禁用 KEYCODE_BACK 退出功能
+ finish();
+ }
+ return true;
+ }
+
+ public void registerBroadcast() {
+ IntentFilter filter = new IntentFilter();
+ filter.addAction(TEMPERATURE_FINISH_ACTION);
+ filter.addAction(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
+ registerReceiver(mIntentReceiver, filter);
+ }
+
+ private void sendTemperatureBroadcast() {
+ Intent pedIntent = new Intent();
+ pedIntent.setAction(GET_TEMPERATURE_ACTION);
+ sendBroadcast(pedIntent);
+ }
+
+ private BroadcastReceiver mIntentReceiver = new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ if (intent != null) {
+ String acyion = intent.getAction();
+ if (TextUtils.isEmpty(acyion)) {
+ return;
+ }
+ switch (acyion) {
+ case TEMPERATURE_FINISH_ACTION:
+ double temperature = intent.getDoubleExtra(TEMPERATURE_KEY,0);
+ DecimalFormat df = new DecimalFormat("#.0");
+ temperatureView.setText(df.format(temperature));
+ if(heatHandler != null){
+ heatHandler.sendEmptyMessageDelayed(1,800);
+ }
+ break;
+ case Intent.ACTION_CLOSE_SYSTEM_DIALOGS:
+ String reason = intent.getStringExtra("reason");
+ if ("homekey".equals(reason)) {
+ // 按下HOME健
+ finish();
+ }
+ break;
+ }
+ }
+ }
+ };
+
+ private static class HeatHandler extends Handler{
+ private WeakReference<AnimalHeatActivity> weakRf;
+
+ public HeatHandler(AnimalHeatActivity activity){
+ weakRf = new WeakReference<>(activity);
+ }
+
+ @Override
+ public void dispatchMessage(@NonNull Message msg) {
+ super.dispatchMessage(msg);
+ switch (msg.what){
+ case 1:
+ IcLog.i("TSEEE","DDDDDDDDDD");
+ weakRf.get().sendTemperatureBroadcast();
+ break;
+ }
+ }
+ }
+
+
+}
\ No newline at end of file
package com.ic.launcher;
import android.app.Application;
+import android.content.res.Configuration;
+
+import androidx.annotation.NonNull;
import com.ic.launcher.presenter.AppListPresenter;
import com.ic.launcher.presenter.BatteryPresenter;
public PhoneStatePresenter getPhonePresenter() {
return phonePresenter;
}
+
+ @Override
+ public void onConfigurationChanged(@NonNull Configuration newConfig) {
+ super.onConfigurationChanged(newConfig);
+ }
}
package com.ic.launcher;
+import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
+import androidx.fragment.app.DialogFragment;
import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentTransaction;
import androidx.lifecycle.ViewModelProvider;
import android.app.Application;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
+import android.content.res.Configuration;
import android.os.Bundle;
-import android.text.TextUtils;
import android.view.KeyEvent;
+import com.ic.launcher.fragment.dialog.ImageTipsFragment;
import com.ic.launcher.fragment.LowPowerModeFragment;
+import com.ic.launcher.fragment.dialog.SlipTipsFragment;
import com.ic.launcher.listener.IChangeMainFragmentListener;
import com.ic.launcher.listener.MainClockGestureDetectorImpl;
import com.ic.launcher.mode.LowPowerModel;
+import com.ic.launcher.presenter.BatteryPresenter;
import com.ic.launcher.util.IcLog;
import com.ic.launcher.util.ServiceUtil;
import com.ic.launcher.util.SystemUtils;
private static final String TAG = "MainActivity";
private static final String SERVICE_PKG_NAME = "com.enqualcomm.support";
+
private boolean isLowPower = false;
private FragmentManage ftManage;
private boolean isChangeClock = false;
private String lowBatteryValue;
+
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
return super.onKeyDown(keyCode, event);
}
+ @Override
+ public void onConfigurationChanged(@NonNull Configuration newConfig) {
+ super.onConfigurationChanged(newConfig);
+ ((IcLauncherApplication) getApplication()).getTimeDatePresenter().analysisDataTimeValue(null);
+ ((IcLauncherApplication) getApplication()).getAppListPresenter().updateLanguageSystemApp();
+ }
private void startTestProtocol() {
try {
lowBatteryValue = value;
}
+ private static final String TXT_ACTION ="action.ic.srvPushTxt";
+ private static final String TYPE_KEY ="msgType";
+ private static final String MSG_KEY ="txtMsg";
+
+ private static final String STRIP_ACTION ="com.ic.ACTION_STRIP";
+ private static final String EVENT_KEY ="eventID";
+
private void registerChangeClockReceiver() {
IntentFilter filter = new IntentFilter();
filter.addAction("com.ic.action.CHANGE_CLOCK");
+ filter.addAction(TXT_ACTION);
+ filter.addAction(STRIP_ACTION);
registerReceiver(mIntentReceiver, filter);
}
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
- if ("com.ic.action.CHANGE_CLOCK".equals(action)) {
- isChangeClock = true;
+ switch (action){
+ case TXT_ACTION:
+ int type = intent.getIntExtra(TYPE_KEY,-1);
+ String message = intent.getStringExtra(MSG_KEY);
+ if(type == 0 || type == 1){
+ IcLauncherApplication app = (IcLauncherApplication)getApplication();
+ BatteryPresenter batteryPresenter = app.getBatteryPresenter();
+ switch (message){
+ case "socializing":
+ batteryPresenter.playSoundIndex(5);
+ break;
+ case "high body temperature":
+ batteryPresenter.playSoundIndex(4);
+ break;
+ case "restricted area":
+ batteryPresenter.playSoundIndex(3);
+ break;
+ }
+
+ showImageTipsDialog(message);
+ }
+ break;
+ case STRIP_ACTION:
+ int event = intent.getIntExtra(EVENT_KEY,-1);
+ switch (event) {
+ case 1:
+ showSlipTipsDialog();
+ break;
+ case 0:
+ dismissSlipTipsDialog();
+ break;
+ }
+ break;
+ case "com.ic.action.CHANGE_CLOCK":
+ isChangeClock = true;
+ break;
}
}
};
+ private void showImageTipsDialog(String message) {
+ FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
+ Fragment prev = getSupportFragmentManager().findFragmentByTag("ImageTips");
+ if (prev != null) {
+ ft.remove(prev);
+ }
+ ft.addToBackStack(null);
+
+ // Create and show the dialog.
+ DialogFragment newFragment = ImageTipsFragment.newInstance(message);
+ newFragment.show(ft, "ImageTips");
+ }
+
+ private void showSlipTipsDialog() {
+ FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
+ Fragment prev = getSupportFragmentManager().findFragmentByTag("SlipTips");
+ if (prev != null) {
+ ft.remove(prev);
+ }
+ ft.addToBackStack(null);
+
+ // Create and show the dialog.
+ DialogFragment newFragment = SlipTipsFragment.newInstance();
+ newFragment.show(ft, "SlipTips");
+ }
+
+ private void dismissSlipTipsDialog() {
+ Fragment prev = getSupportFragmentManager().findFragmentByTag("SlipTips");
+ if (prev != null) {
+ DialogFragment df = (DialogFragment) prev;
+ df.dismiss();
+ }
+ }
+
+ private void testMessageBroadcast() {
+ Intent intent = new Intent("action.ic.srvPushTxt");
+ intent.putExtra("msgType", 1); //0 代表 server下发消息,1代表 SMS消息
+ intent.putExtra("txtMsg", "high body temperature");
+ sendBroadcast(intent);
+ }
+
}
import android.view.ViewGroup;
import androidx.annotation.NonNull;
+import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.RecyclerView;
+import com.ic.launcher.R;
import com.ic.launcher.databinding.ItemAppLayoutBinding;
import com.ic.launcher.entity.AppInfoEntity;
import com.ic.launcher.listener.ICheckAppItemListener;
}
binding.setClick(listener);
binding.setPos(pos);
+ binding.appTitleTv.setTextSize(context.getResources().getDimension(R.dimen.app_list_name_text_size));
binding.appIconIv.setImageResource(entity.getAppIconResId());
binding.setAppTitle(context.getString(entity.getAppTitleResId()));
binding.executePendingBindings();
return mL02DefaultAppList;
case 1:
return mL02EnAppList;
+ case 2:
+ return mH88AppList;
default:
return mL02DefaultAppList;
}
"com.eqc.settings", "com.eqc.settings.MainActivity"));
}
};
+
+ private static final List<AppInfoEntity> mH88AppList = new ArrayList<AppInfoEntity>() {
+ {
+
+ add(new AppInfoEntity(BACK_COLOUR, R.mipmap.icon_qr_code_h88, R.string.app_h88_qrcode,
+ "com.ic.launcher", "com.ic.launcher.QrCodeActivity"));
+
+ add(new AppInfoEntity(BACK_COLOUR, R.mipmap.icon_temperature_h88, R.string.app_h88_temperature,
+ "com.ic.launcher", "com.ic.launcher.AnimalHeatActivity"));
+ //联系人
+ add(new AppInfoEntity(BACK_COLOUR, R.mipmap.icon_contacts_l02, R.string.app_ContactName,
+ "com.enqualcomm.imessage", "com.enqualcomm.imessage.ui.PhoneDirectoryActivity"));
+ //拨号
+ add(new AppInfoEntity(BACK_COLOUR, R.mipmap.icon_dialer_l02, R.string.app_dialer,
+ "com.ic.dial", "com.ic.dial.MainActivity"));
+ //运动
+ add(new AppInfoEntity(BACK_COLOUR, R.mipmap.icon_pedometer_l02, R.string.app_Sport,
+ "com.ic.hardware", "com.ic.hardware.PedometerActivity"));
+ //短信
+ add(new AppInfoEntity(BACK_COLOUR, R.mipmap.icon_sms_l02, R.string.app_Sms,
+ "com.zmapp.sms", "com.zmapp.sms.MainActivity"));
+
+ add(new AppInfoEntity(BACK_COLOUR, R.mipmap.icon_language_h88, R.string.app_h88_language,
+ "com.eqc.eqcguide", "com.eqc.eqcguide.MainActivity"));
+ //设置
+ add(new AppInfoEntity(BACK_COLOUR, R.mipmap.icon_settings_l02, R.string.main_manu_settings,
+ "com.eqc.settings", "com.eqc.settings.MainActivity"));
+ }
+ };
}
package com.ic.launcher.entity;
-public class AppInfoEntity {
+import android.os.Parcel;
+import android.os.Parcelable;
+
+public class AppInfoEntity implements Parcelable {
private int bgColor;
private int appIconResId;
private int appTitleResId;
this.activityName = activityName;
}
+ public AppInfoEntity(Parcel p) {
+ this.bgColor = p.readInt();
+ this.appIconResId = p.readInt();
+ this.appTitleResId = p.readInt();
+ this.packageName = p.readString();
+ this.activityName = p.readString();
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeInt(bgColor);
+ dest.writeInt(appIconResId);
+ dest.writeInt(appTitleResId);
+ dest.writeString(packageName);
+ dest.writeString(activityName);
+ }
+
+ public static final Parcelable.Creator<AppInfoEntity> CREATOR
+ = new Parcelable.Creator<AppInfoEntity>() {
+ public AppInfoEntity createFromParcel(Parcel in) {
+ return new AppInfoEntity(in);
+ }
+
+ public AppInfoEntity[] newArray(int size) {
+ return new AppInfoEntity[size];
+ }
+ };
+
+
public int getAppIconResId() {
return appIconResId;
}
import com.ic.launcher.databinding.FragmentL02MainBinding;
import com.ic.launcher.mode.BaseModel;
import com.ic.launcher.mode.L02MainModel;
+import com.ic.launcher.util.IcLog;
import com.ic.launcher.util.SPUtils;
}
private void updateTimeValue(int[] value){
+ IcLog.i("TEST","updateTimeValue");
mainBinding.setHourTen(value[0]);
mainBinding.setHourBit(value[1]);
mainBinding.setMinuteTen(value[2]);
--- /dev/null
+package com.ic.launcher.fragment.dialog;
+
+import android.app.Dialog;
+import android.os.Bundle;
+import android.util.DisplayMetrics;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import androidx.fragment.app.DialogFragment;
+
+import com.ic.launcher.R;
+
+
+public class ImageTipsFragment extends DialogFragment {
+
+ private static final String ARG_PARAM1 = "param1";
+ private String value;
+
+ public static ImageTipsFragment newInstance(String param1) {
+ ImageTipsFragment fragment = new ImageTipsFragment();
+ Bundle args = new Bundle();
+ args.putString(ARG_PARAM1, param1);
+ fragment.setArguments(args);
+ return fragment;
+ }
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setStyle(DialogFragment.STYLE_NORMAL, R.style.TipsDialog);
+ if (getArguments() != null) {
+ value = getArguments().getString(ARG_PARAM1);
+ }
+ }
+
+ @Override
+ public void onStart() {
+ super.onStart();
+ Dialog dialog = getDialog();
+ if (dialog != null) {
+ DisplayMetrics dm = new DisplayMetrics();
+ getActivity().getWindowManager().getDefaultDisplay().getMetrics(dm);
+ dialog.getWindow().setLayout((int) (dm.widthPixels*0.85),180);
+ dialog.setCancelable(false);
+ }
+ }
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ View view = inflater.inflate(R.layout.fragment_image_tips, container, false);
+ TextView textView = view.findViewById(R.id.image_tips_tv);
+ textView.setText(value);
+ ImageView image = view.findViewById(R.id.image_bt_close);
+ image.setOnClickListener(v ->{
+ dismiss();
+ });
+ return view;
+ }
+}
--- /dev/null
+package com.ic.launcher.fragment.dialog;
+
+import android.app.Dialog;
+import android.os.Bundle;
+import android.util.DisplayMetrics;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+
+import androidx.fragment.app.DialogFragment;
+
+import com.ic.launcher.R;
+
+
+public class SlipTipsFragment extends DialogFragment {
+
+ private static final String ARG_PARAM1 = "param1";
+ private int type;
+
+ public static SlipTipsFragment newInstance() {
+ SlipTipsFragment fragment = new SlipTipsFragment();
+ Bundle args = new Bundle();
+ fragment.setArguments(args);
+ return fragment;
+ }
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setStyle(DialogFragment.STYLE_NORMAL, R.style.TipsDialog);
+ if (getArguments() != null) {
+ type = getArguments().getInt(ARG_PARAM1);
+ }
+ }
+
+ @Override
+ public void onStart() {
+ super.onStart();
+ Dialog dialog = getDialog();
+ if (dialog != null) {
+ DisplayMetrics dm = new DisplayMetrics();
+ getActivity().getWindowManager().getDefaultDisplay().getMetrics(dm);
+ dialog.getWindow().setLayout((int) (dm.widthPixels*0.85),180);
+ dialog.setCancelable(false);
+ }
+ }
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ View view = inflater.inflate(R.layout.fragment_image_slip, container, false);
+ ImageView btClose = view.findViewById(R.id.slip_bt_close);
+ btClose.setOnClickListener(v ->{
+ dismiss();
+ });
+ return view;
+ }
+}
return mObsAppState;
}
+ public void updateLanguageSystemApp(){
+ mObsAppInfoList.setValue(L02AppInfo.getAppList());
+ }
+
public void updateSystemApp() {
mObsAppInfoList.setValue(L02AppInfo.getAppList());
boolean[] state = new boolean[L02AppInfo.getAppList().size()];
arrayList.add("mobile.miki");
return arrayList.contains((((ActivityManager) paramContext.getSystemService(Context.ACTIVITY_SERVICE)).getRunningTasks(1).get(0)).topActivity.getPackageName());
}
+
+ public void playSoundIndex(int index){
+ playUtils.playKeyboardSound(mContext, index);
+ }
}
private static final String TAG = "TimeDatePresenter";
private static final DateTimeFormatter MMDD = DateTimeFormatter.ofPattern("MM-dd");
- private static final String[] WEEK_SRT = new String[7];
private MediatorLiveData<int[]> mObsTime;
private MediatorLiveData<String> mObsYear;
IcLog.i(TAG, "TimeDatePresenter");
mContext = context;
- WEEK_SRT[0] = context.getString(R.string.monday);
- WEEK_SRT[1] = context.getString(R.string.tuesday);
- WEEK_SRT[2] = context.getString(R.string.wednesday);
- WEEK_SRT[3] = context.getString(R.string.thursday);
- WEEK_SRT[4] = context.getString(R.string.friday);
- WEEK_SRT[5] = context.getString(R.string.saturday);
- WEEK_SRT[6] = context.getString(R.string.sunday);
mObsTime = new MediatorLiveData<>();
mObsYear = new MediatorLiveData<>();
}
};
- private void analysisDataTimeValue(String z) {
+ public void analysisDataTimeValue(String z) {
LocalDateTime currDateTime;
}
private void computeMainClockTime(LocalDateTime localDateTime) {
-
mObsYear.setValue(localDateTime.format(MMDD));
switch (localDateTime.getDayOfWeek()){
case MONDAY:
- mObsWeek.setValue(WEEK_SRT[0]);
+ mObsWeek.setValue(mContext.getString(R.string.monday));
break;
case TUESDAY:
- mObsWeek.setValue(WEEK_SRT[1]);
+ mObsWeek.setValue(mContext.getString(R.string.tuesday));
break;
case WEDNESDAY:
- mObsWeek.setValue(WEEK_SRT[2]);
+ mObsWeek.setValue(mContext.getString(R.string.wednesday));
break;
case THURSDAY:
- mObsWeek.setValue(WEEK_SRT[3]);
+ mObsWeek.setValue(mContext.getString(R.string.thursday));
break;
case FRIDAY:
- mObsWeek.setValue(WEEK_SRT[4]);
+ mObsWeek.setValue(mContext.getString(R.string.friday));
break;
case SATURDAY:
- mObsWeek.setValue(WEEK_SRT[5]);
+ mObsWeek.setValue(mContext.getString(R.string.saturday));
break;
case SUNDAY:
- mObsWeek.setValue(WEEK_SRT[6]);
+ mObsWeek.setValue(mContext.getString(R.string.sunday));
break;
}
private SoundPool.OnLoadCompleteListener SoundLoadListener;
private SparseArray soundID;
- private static final int[] NUM_RAW= new int[]{
+ private static final int[] NUM_RAW = new int[]{
R.raw.chrg_connect,
R.raw.chrg_remove,
- R.raw.chrg_complete};
+ R.raw.chrg_complete,
+ R.raw.do_not_enter,
+ R.raw.goto_see_doctor,
+ R.raw.please_go_back_home};
public void init() {
mSoundPlayer = null;
}
- public void playKeyboardSound(Context context,int key) {
+ public void playKeyboardSound(Context context, int key) {
nowSoundNum = key;
if (soundID.get(key) == null) {
SoundLoadListener = (soundPool, sampleId, status) -> SaveSoundIDandPlay(sampleId);
mSoundPlayer.setOnLoadCompleteListener(SoundLoadListener);
}
- mSoundPlayer.load(context,NUM_RAW[key],1);
+ mSoundPlayer.load(context, NUM_RAW[key], 1);
} else {
mSoundPlayer.play((Integer) soundID.get(key), 1, 1, 0, 0, 1);
--- /dev/null
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="120dp"
+ android:height="120dp"
+ android:viewportWidth="1024"
+ android:viewportHeight="1024">
+ <path
+ android:pathData="M508.4,322.05c-124.4,0 -225.26,100.83 -225.26,225.24v276.75h453.72L736.86,547.28c0,-124.4 -100.83,-225.24 -225.24,-225.24h-3.23zM246.9,456.95c4,-19.86 -8.89,-39.2 -28.75,-43.2l-106.22,-21.32c-19.86,-3.98 -39.22,8.91 -43.2,28.77a37.06,37.06 0,0 0,-0.32 12.75c2.25,14.82 13.52,27.32 29.07,30.45l106.22,21.32c19.88,3.98 39.22,-8.89 43.2,-28.77zM222.56,210.85l67.66,84.61c12.66,15.82 35.75,18.39 51.59,5.73 15.82,-12.66 18.39,-35.75 5.73,-51.59l-67.68,-84.59c-12.64,-15.82 -35.72,-18.39 -51.56,-5.75 -10.64,8.5 -15.27,21.68 -13.36,34.22a36.31,36.31 0,0 0,7.64 17.36zM514.61,242.85c20.27,0.48 37.07,-15.57 37.54,-35.82l-0.25,-108.31c0.48,-20.25 -15.57,-37.07 -35.81,-37.54 -20.27,-0.48 -37.09,15.57 -37.57,35.82l0.25,108.31c-0.05,2.18 0.09,4.34 0.41,6.43 2.64,17.27 17.36,30.7 35.43,31.11zM684.48,309.25c15.2,13.39 38.41,11.91 51.79,-3.3l71.56,-81.33c13.39,-15.23 11.91,-38.41 -3.3,-51.79 -15.23,-13.39 -38.41,-11.91 -51.79,3.3l-71.58,81.34c-7.45,8.48 -10.3,19.43 -8.73,29.79 1.25,8.23 5.32,16.07 12.04,22zM951.6,441.97c-3.05,-20.05 -21.77,-33.82 -41.79,-30.75l-107.11,16.3c-20.05,3.05 -33.82,21.75 -30.77,41.79 3.05,20.04 21.77,33.81 41.82,30.77l107.08,-16.32c20.04,-3.05 33.81,-21.75 30.77,-41.79zM816.99,908.01c0,28.88 -23.41,52.27 -52.29,52.27L243.81,960.28c-28.89,0 -52.29,-23.39 -52.29,-52.27 0,-28.88 23.41,-52.27 52.29,-52.27h520.9c28.89,0 52.29,23.39 52.29,52.27z"
+ android:fillColor="#d81e06"/>
+</vector>
--- /dev/null
+<vector android:height="56dp" android:tint="#FFFFFF"
+ android:viewportHeight="24" android:viewportWidth="24"
+ android:width="56dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="#FFFFFF" android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
+</vector>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@mipmap/qs_background"
+ tools:context=".AnimalHeatActivity">
+
+ <TextView
+ android:id="@+id/temperature_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textColor="#FFFFFF"
+ android:textSize="62px"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ android:background="@android:color/transparent"/>
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="℃"
+ android:textColor="#FFFFFF"
+ android:textSize="32dp"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintHorizontal_bias="0.00"
+ app:layout_constraintStart_toEndOf="@+id/temperature_value"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintVertical_bias="0.548"
+ android:background="@android:color/transparent"/>
+
+</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <ImageView
+ android:id="@+id/image_tips_image"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@mipmap/ic_band_off"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintVertical_bias="0.73" />
+
+ <ImageView
+ android:id="@+id/slip_bt_close"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/ic_close_24"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintVertical_bias="0.05"
+ app:layout_constraintHorizontal_bias="0.95"/>
+
+</androidx.constraintlayout.widget.ConstraintLayout>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <ImageView
+ android:id="@+id/image_tips_image"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/ic_alarm"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintVertical_bias="0.13" />
+
+ <TextView
+ android:id="@+id/image_tips_tv"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="center_horizontal"
+ android:textColor="#FFFFFF"
+ android:textSize="36dp"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/image_tips_image"
+ app:layout_constraintVertical_bias="0.15" />
+
+ <ImageView
+ android:id="@+id/image_bt_close"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/ic_close_24"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintVertical_bias="0.05"
+ app:layout_constraintHorizontal_bias="0.95"/>
+
+</androidx.constraintlayout.widget.ConstraintLayout>
android:layout_below="@id/app_icon_iv"
android:layout_centerHorizontal="true"
android:text="@{appTitle}"
- android:textColor="#FFFFFF"
- android:textSize="@dimen/app_list_name_text_size"/>
+ android:textColor="#FFFFFF"/>
</RelativeLayout>
</layout>
<dimen name="app_next_item_visible">26dp</dimen>
<dimen name="app_current_item_horizontal_margin">42dp</dimen>
- <dimen name="app_list_name_text_size">52sp</dimen>
+ <dimen name="app_list_name_text_size">62sp</dimen>
</resources>
\ No newline at end of file
<string name="app_name_heart">Health</string>
<string name="error_start_activity">failed to run Application !</string>
+ <string name="app_h88_qrcode">QR Code</string>
+ <string name="app_h88_temperature">TEMP</string>
+ <string name="app_h88_language">language</string>
<string name="main_manu_settings">Settings</string>
<string name="main_manu_family">My Family</string>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+ <dimen name="status_bar_height_dm">48dp</dimen>
+
+ <dimen name="viewpager_next_item_visible">26dp</dimen>
+ <dimen name="viewpager_current_item_horizontal_margin">42dp</dimen>
+
+ <dimen name="app_next_item_visible">26dp</dimen>
+ <dimen name="app_current_item_horizontal_margin">42dp</dimen>
+
+ <dimen name="app_list_name_text_size">42sp</dimen>
+</resources>
\ No newline at end of file
<string name="select_clock_theme">ธีมนาฬิกา</string>\r
<string name="select_main_menu_background">ธีม</string>\r
\r
+ <string name="app_h88_qrcode">รหัสสองมิติ</string>\r
+ <string name="app_h88_temperature">อุณหภูมิ</string>\r
+ <string name="app_h88_language">ภาษา</string>\r
\r
- <string name="app_dialer">Dialer</string>\r
+ <string name="app_dialer">โทร</string>\r
<string name="app_ContactName">รายชื่อ</string>\r
<string name="app_TelePhone">โทร</string>\r
<string name="app_VoLTE">โทรผ่าน VoLTE</string>\r
<string name="main_menu_style_single_icon">Single icon</string>\r
<string name="program_abnormal">Sorry, the program is abnormal and will quit!</string>\r
<string name="please_wait">Please wait...</string>\r
- <string name="monday">Mon</string>\r
- <string name="tuesday">Tue</string>\r
- <string name="wednesday">Wed</string>\r
- <string name="thursday">Thu</string>\r
- <string name="friday">Fri</string>\r
- <string name="saturday">Sat</string>\r
- <string name="sunday">Sun</string>\r
+ <string name="monday">จันทร์</string>\r
+ <string name="tuesday">อังคาร</string>\r
+ <string name="wednesday">พุธ</string>\r
+ <string name="thursday">วันพฤหัสบดี</string>\r
+ <string name="friday">ศุกร์</string>\r
+ <string name="saturday">วันเสาร์</string>\r
+ <string name="sunday">อาทิตย์</string>\r
</resources>\r
<string name="select_clock_theme">时钟主题</string>
<string name="select_main_menu_background">菜单背景</string>
+ <string name="app_h88_qrcode">二维码</string>
+ <string name="app_h88_temperature">体温</string>
+ <string name="app_h88_language">语言</string>
+
<string name="app_dialer">拨号</string>
<string name="app_ContactName">联系人</string>
<string name="app_TelePhone">电话</string>
<string name="select_clock_theme">时钟主题</string>
<string name="select_main_menu_background">菜单背景</string>
+ <string name="app_h88_qrcode">二维码</string>
+ <string name="app_h88_temperature">体温</string>
+ <string name="app_h88_language">语言</string>
+
<string name="app_dialer">拨号</string>
<string name="app_ContactName" translatable="false">联系人</string>
<string name="app_TelePhone">电话</string>
<item name="android:textColor">#FFFFFF</item>
<item name="android:includeFontPadding">false</item>
</style>
+
+ <style name="TipsDialog" parent="android:Theme.Holo.Light.Dialog">
+ <item name="android:windowBackground">#000000</item>
+ <item name="android:windowFrame">@null</item>
+ <item name="android:backgroundDimEnabled">true</item>
+ <item name="android:windowIsTranslucent">true</item>
+ <item name="android:windowNoTitle">true</item>
+ <item name="android:windowFullscreen">true</item>
+ <item name="android:windowContentOverlay">@null</item>
+ </style>
</resources>
-#Tue Jun 23 15:04:37 CST 2020
-VERSION_CODE=55
+#Sun Jun 28 13:11:14 CST 2020
+VERSION_CODE=99