version:4.6
fix: update:增加负二屏等开关
This commit is contained in:
@@ -28,6 +28,8 @@ import com.uiui.aios.utils.ToastUtil;
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
@@ -64,13 +66,13 @@ public class EmergencyActivity extends AppCompatActivity {
|
||||
sendBroadcast(bootIntent);
|
||||
|
||||
Intent intent = getIntent();
|
||||
// String setting_sos = intent.getStringExtra("setting_sos");
|
||||
// if (TextUtils.isEmpty(setting_sos)) {
|
||||
// String contactList = intent.getStringExtra("contactList");
|
||||
// if (TextUtils.isEmpty(contactList)) {
|
||||
// finish();
|
||||
// return;
|
||||
// }
|
||||
|
||||
String jsonString = mCacheHelper.getAsString(URLAddress.GET_SETTINGS);
|
||||
String jsonString = mCacheHelper.getAsString(URLAddress.GET_MAIL_LIST);
|
||||
//为 "" 是已经请求成功的
|
||||
if (jsonString == null) {
|
||||
return;
|
||||
@@ -78,11 +80,11 @@ public class EmergencyActivity extends AppCompatActivity {
|
||||
Gson gson = new Gson();
|
||||
Type type = new TypeToken<List<Contact>>() {
|
||||
}.getType();
|
||||
List<Contact> setting_sos = gson.fromJson(jsonString, type);
|
||||
if (setting_sos == null || setting_sos.size() == 0) {
|
||||
List<Contact> contactList = gson.fromJson(jsonString, type);
|
||||
if (contactList == null || contactList.size() == 0) {
|
||||
return;
|
||||
}
|
||||
phoneListSet = setting_sos;
|
||||
phoneListSet = contactList.stream().filter(contact -> contact.getIs_urgent() == 1).collect(Collectors.toList());
|
||||
Log.e(TAG, "onCreate: " + phoneListSet);
|
||||
|
||||
final Long time = 3L;
|
||||
|
||||
@@ -66,6 +66,12 @@ public class ContactActivity extends BaseActivity implements ContactContact.Cont
|
||||
mContactPresenter.getContact();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
mContactPresenter.detachView();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setContact(List<Contact> contactList) {
|
||||
if (contactList != null) {
|
||||
|
||||
@@ -74,6 +74,9 @@ public class MainActivity extends BaseActivity implements MainContact.MainView {
|
||||
private List<Fragment> mFragments;
|
||||
private CustomFragment mCustomFragment;
|
||||
private SecondFragment mSecondFragment;
|
||||
private boolean is_twoscreen = false;
|
||||
private int appListIndex = 1;
|
||||
private int defaultCurrent = 0;
|
||||
|
||||
@Override
|
||||
public int getLayoutId() {
|
||||
@@ -99,14 +102,20 @@ public class MainActivity extends BaseActivity implements MainContact.MainView {
|
||||
mBaseFragmentPagerAdapter = new BaseFragmentPagerAdapter(mFragmentManager, mFragments);
|
||||
// fragmentTransaction.add(R.id.viewPager, appListFragment);
|
||||
// fragmentTransaction.commit();
|
||||
mSecondFragment = new SecondFragment();
|
||||
mFragments.add(mSecondFragment);
|
||||
|
||||
is_twoscreen = Settings.Global.getInt(getContentResolver(), "is_twoscreen", 0) == 1;
|
||||
if (is_twoscreen) {
|
||||
appListIndex = 2;
|
||||
defaultCurrent = 1;
|
||||
mSecondFragment = new SecondFragment();
|
||||
mFragments.add(mSecondFragment);
|
||||
}
|
||||
mCustomFragment = new CustomFragment();
|
||||
mFragments.add(mCustomFragment);
|
||||
|
||||
mMainPresenter.getSystemSettings();
|
||||
ArrayList<DesktopIcon> desktopIcons = ApkUtils.queryFilterAppInfo(this);
|
||||
|
||||
ArrayList<DesktopIcon> desktopIcons = ApkUtils.queryFilterAppInfo(this);
|
||||
int x = 0;
|
||||
for (int i = 0; i <= desktopIcons.size(); i++) {
|
||||
if (i != 0 && i % APP_LIST_SIZE == 0) {
|
||||
@@ -133,11 +142,11 @@ public class MainActivity extends BaseActivity implements MainContact.MainView {
|
||||
});
|
||||
|
||||
mViewPager.setAdapter(mBaseFragmentPagerAdapter);
|
||||
mViewPager.setOffscreenPageLimit(3);
|
||||
mViewPager.setOffscreenPageLimit(2);
|
||||
mMagicIndicator.setNavigator(scaleCircleNavigator);
|
||||
ViewPagerHelper.bind(mMagicIndicator, mViewPager);
|
||||
if (mFragments.size() > 1) {
|
||||
mViewPager.setCurrentItem(1);
|
||||
mViewPager.setCurrentItem(defaultCurrent);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -230,8 +239,8 @@ public class MainActivity extends BaseActivity implements MainContact.MainView {
|
||||
}
|
||||
//从第三个开始改
|
||||
for (int i = 0; i < fragmentList.size(); i++) {
|
||||
if (i + 2 < mFragments.size()) {
|
||||
mBaseFragmentPagerAdapter.replaceFragment(i + 2, fragmentList.get(i));
|
||||
if (i + appListIndex < mFragments.size()) {
|
||||
mBaseFragmentPagerAdapter.replaceFragment(i + appListIndex, fragmentList.get(i));
|
||||
// mFragments.remove(i + 2);
|
||||
// mFragments.add(i + 2, fragmentList.get(i));
|
||||
} else {
|
||||
@@ -240,7 +249,7 @@ public class MainActivity extends BaseActivity implements MainContact.MainView {
|
||||
mBaseFragmentPagerAdapter.addFragment(fragmentList.get(i));
|
||||
}
|
||||
}
|
||||
for (int i = mFragments.size(); i > fragmentList.size() + 2; i--) {
|
||||
for (int i = mFragments.size(); i > fragmentList.size() + appListIndex; i--) {
|
||||
mFragments.remove(i - 1);
|
||||
}
|
||||
scaleCircleNavigator.setCircleCount(mFragments.size());
|
||||
@@ -249,7 +258,6 @@ public class MainActivity extends BaseActivity implements MainContact.MainView {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
if (keyCode == KeyEvent.KEYCODE_BACK && event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
@@ -270,7 +278,7 @@ public class MainActivity extends BaseActivity implements MainContact.MainView {
|
||||
default:
|
||||
break;
|
||||
case Intent.ACTION_MAIN:
|
||||
mViewPager.setCurrentItem(1);
|
||||
mViewPager.setCurrentItem(defaultCurrent);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -291,12 +299,14 @@ public class MainActivity extends BaseActivity implements MainContact.MainView {
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
Log.e(TAG, "onResume: ");
|
||||
if (!isNotificationListenersEnabled()) {
|
||||
ToastUtil.show("请授予\"" + getString(R.string.app_name) + "\"使用通知权");
|
||||
gotoNotificationAccessSetting(this);
|
||||
}
|
||||
addData();
|
||||
mMainPresenter.sendRunningInfo();
|
||||
mMainPresenter.getAdminSnSetting();
|
||||
}
|
||||
|
||||
private static final String ENABLED_NOTIFICATION_LISTENERS = "enabled_notification_listeners";
|
||||
@@ -440,4 +450,9 @@ public class MainActivity extends BaseActivity implements MainContact.MainView {
|
||||
public void sendRunningInfoFinish() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAdminSnSetting() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ public class MainContact {
|
||||
void sendAPPUsage();
|
||||
/*上传后台运行的APP*/
|
||||
void sendRunningInfo();
|
||||
/*获取负二屏开关*/
|
||||
void getAdminSnSetting();
|
||||
}
|
||||
|
||||
public interface MainView extends BaseView {
|
||||
@@ -23,5 +25,7 @@ public class MainContact {
|
||||
void updateDesktopLayoutFinish();
|
||||
void sendAPPUsageFinish();
|
||||
void sendRunningInfoFinish();
|
||||
void setAdminSnSetting();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,9 +10,8 @@ import com.trello.rxlifecycle4.RxLifecycle;
|
||||
import com.trello.rxlifecycle4.android.ActivityEvent;
|
||||
import com.uiui.aios.BuildConfig;
|
||||
import com.uiui.aios.bean.BaseResponse;
|
||||
import com.uiui.aios.bean.EmergencyContact;
|
||||
import com.uiui.aios.bean.NetDesktopIcon;
|
||||
import com.uiui.aios.bean.Contact;
|
||||
import com.uiui.aios.bean.NetDesktopIcon;
|
||||
import com.uiui.aios.network.NetInterfaceManager;
|
||||
import com.uiui.aios.utils.ApkUtils;
|
||||
import com.uiui.aios.utils.AppUsedTimeUtils;
|
||||
@@ -57,14 +56,18 @@ public class MainPresenter implements MainContact.Presenter {
|
||||
|
||||
@Override
|
||||
public void getSystemSettings() {
|
||||
NetInterfaceManager.getInstance().getSystemSettings(true, getLifecycle(), new NetInterfaceManager.SosNumberCallback() {
|
||||
|
||||
NetInterfaceManager.getInstance().getSystemSettings(true, getLifecycle(), new NetInterfaceManager.ContactCallback() {
|
||||
@Override
|
||||
public void setSosNumber(List<EmergencyContact> setting_sos) {
|
||||
public void setContact(List<Contact> contactList) {
|
||||
Intent intent = new Intent("setting_sos");
|
||||
mContext.sendBroadcast(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEmergencyContact(List<Contact> emergencyContact) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEmpty() {
|
||||
|
||||
@@ -192,4 +195,14 @@ public class MainPresenter implements MainContact.Presenter {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getAdminSnSetting() {
|
||||
NetInterfaceManager.getInstance().getAdminSnSetting(true, lifecycle, new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
package com.uiui.aios.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@@ -37,6 +40,19 @@ public class ContactAdapter extends RecyclerView.Adapter<ContactAdapter.ContactH
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull ContactHolder contactHolder, int position) {
|
||||
Contact contact = mContactList.get(position);
|
||||
contactHolder.root.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Intent intent1 = new Intent(Intent.ACTION_CALL);
|
||||
String phone = contact.getMobile();
|
||||
if (!TextUtils.isEmpty(phone)) {
|
||||
Uri data = Uri.parse("tel:" + phone);
|
||||
intent1.setData(data);
|
||||
mContext.startActivity(intent1);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
Glide.with(contactHolder.iv_head).load(contact.getAvatar()).error(R.drawable.default_head).into(contactHolder.iv_head);
|
||||
contactHolder.tv_name.setText(contact.getName());
|
||||
contactHolder.tv_phone.setText(contact.getMobile());
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
package com.uiui.aios.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class EmergencyContact implements Serializable {
|
||||
private static final long serialVersionUID = 3368451934517980000L;
|
||||
|
||||
String avatar;
|
||||
String name;
|
||||
String mobile;
|
||||
int is_urgent;
|
||||
boolean show;
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getMobile() {
|
||||
return mobile;
|
||||
}
|
||||
|
||||
public void setMobile(String mobile) {
|
||||
this.mobile = mobile;
|
||||
}
|
||||
|
||||
public int getIs_urgent() {
|
||||
return is_urgent;
|
||||
}
|
||||
|
||||
public void setIs_urgent(int is_urgent) {
|
||||
this.is_urgent = is_urgent;
|
||||
}
|
||||
|
||||
public boolean isShow() {
|
||||
return show;
|
||||
}
|
||||
|
||||
public void setShow(boolean show) {
|
||||
this.show = show;
|
||||
}
|
||||
}
|
||||
@@ -37,7 +37,7 @@ public class SystemSettings implements Serializable {
|
||||
int qch_restore;
|
||||
int setting_browserInput;
|
||||
int dev_mode;
|
||||
List<EmergencyContact> setting_sos;
|
||||
List<Contact> setting_sos;
|
||||
String setting_volume;
|
||||
String setting_luminance;
|
||||
String setting_typeface;
|
||||
@@ -262,11 +262,11 @@ public class SystemSettings implements Serializable {
|
||||
this.setting_hotspot = setting_hotspot;
|
||||
}
|
||||
|
||||
public List<EmergencyContact> getSetting_sos() {
|
||||
public List<Contact> getSetting_sos() {
|
||||
return setting_sos;
|
||||
}
|
||||
|
||||
public void setSetting_sos(List<EmergencyContact> setting_sos) {
|
||||
public void setSetting_sos(List<Contact> setting_sos) {
|
||||
this.setting_sos = setting_sos;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ import android.net.wifi.WifiManager;
|
||||
import android.os.BatteryManager;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.provider.Settings;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -32,6 +33,7 @@ import com.amap.api.location.AMapLocationListener;
|
||||
import com.blankj.utilcode.util.NetworkUtils;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.king.view.circleprogressview.CircleProgressView;
|
||||
import com.qweather.sdk.bean.base.Code;
|
||||
import com.qweather.sdk.bean.base.Lang;
|
||||
import com.qweather.sdk.bean.base.Unit;
|
||||
@@ -53,7 +55,6 @@ import com.uiui.aios.bean.AlarmClockData;
|
||||
import com.uiui.aios.bean.AlarmItem;
|
||||
import com.uiui.aios.bean.BaseResponse;
|
||||
import com.uiui.aios.bean.Contact;
|
||||
import com.uiui.aios.bean.EmergencyContact;
|
||||
import com.uiui.aios.bean.HealthCode;
|
||||
import com.uiui.aios.bean.SnInfo;
|
||||
import com.uiui.aios.bean.UserAvatarInfo;
|
||||
@@ -105,6 +106,8 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt
|
||||
ConstraintLayout cl_contact;
|
||||
@BindView(R.id.cl_ai)
|
||||
ConstraintLayout cl_ai;
|
||||
@BindView(R.id.cl_appstore)
|
||||
ConstraintLayout cl_appstore;
|
||||
|
||||
// @BindView(R.id.cl_battery)
|
||||
// ConstraintLayout cl_battery;
|
||||
@@ -118,9 +121,9 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt
|
||||
ImageView iv_pic;
|
||||
@BindView(R.id.tv_temp)
|
||||
TextView tv_temp;
|
||||
// @BindView(R.id.cpv)
|
||||
// CircleProgressView cpv;
|
||||
// @BindView(R.id.iv_charging)
|
||||
@BindView(R.id.cpv)
|
||||
CircleProgressView cpv;
|
||||
// @BindView(R.id.iv_charging)
|
||||
// ImageView iv_charging;
|
||||
@BindView(R.id.rv_noti)
|
||||
RecyclerView rv_noti;
|
||||
@@ -134,14 +137,15 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt
|
||||
RecyclerView rv_sos;
|
||||
@BindView(R.id.iv_note_nodata)
|
||||
ImageView iv_note_nodata;
|
||||
@BindView(R.id.iv_head)
|
||||
ImageView iv_head;
|
||||
// @BindView(R.id.iv_head)
|
||||
// ImageView iv_head;
|
||||
@BindView(R.id.tv_name)
|
||||
TextView tv_name;
|
||||
|
||||
private String TAG = CustomFragment.class.getSimpleName();
|
||||
// private int[] mShaderColors = new int[]{0xFFfa3db5, 0xFFF8867E, 0xFFF79F6B, 0xFFF79F6B, 0xFFF79F6B, 0xFFF8867E, 0xFFfa3db5};
|
||||
private int[] mShaderColors = new int[]{0xFF3984f6, 0xFF3984f6, 0xFF3984f6, 0xFF3984f6, 0xFF3984f6, 0xFF3984f6, 0xFF3984f6};
|
||||
private int[] mShaderColorsRed = new int[]{0xFFFF0000, 0xFFFF0000, 0xFFFF0000, 0xFFFF0000, 0xFFFF0000, 0xFFFF0000, 0xFFFF0000};
|
||||
private View rootView;
|
||||
private List<AlarmItem> alarmItemList;
|
||||
private NotificationAdapter notificationAdapter;
|
||||
@@ -339,14 +343,20 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt
|
||||
registerBatteryReceiver();
|
||||
registerAlarmClockReceiver();
|
||||
mContext.registerReceiver(mbatteryReceiver, new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
|
||||
|
||||
if (Settings.Global.getInt(mCRv, "is_aihealth", 0) == 1) {
|
||||
cl_appstore.setVisibility(View.GONE);
|
||||
cl_ai.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
cl_appstore.setVisibility(View.VISIBLE);
|
||||
cl_ai.setVisibility(View.GONE);
|
||||
}
|
||||
// tv_battery.setText(Utils.getBatteryLevel(mContext) + "%");
|
||||
// cpv.setOnClickListener(new View.OnClickListener() {
|
||||
// @Override
|
||||
// public void onClick(View v) {
|
||||
// killBackgroundApp();
|
||||
// }
|
||||
// });
|
||||
cpv.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
killBackgroundApp();
|
||||
}
|
||||
});
|
||||
// cl_alarm.setOnClickListener(new View.OnClickListener() {
|
||||
// @Override
|
||||
// public void onClick(View v) {
|
||||
@@ -397,20 +407,21 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt
|
||||
cl_shared_space.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
SingleDialog dialog = new SingleDialog(mContext);
|
||||
dialog.setTitle("温馨提示")
|
||||
.setMessage("此功能暂未上线")
|
||||
.setPositive("确定")
|
||||
// .setNegtive("拒绝")
|
||||
// .setSingle(true)
|
||||
|
||||
.setOnClickBottomListener(new SingleDialog.OnClickBottomListener() {
|
||||
@Override
|
||||
public void onPositiveClick() {
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
dialog.show();
|
||||
killBackgroundApp();
|
||||
// SingleDialog dialog = new SingleDialog(mContext);
|
||||
// dialog.setTitle("温馨提示")
|
||||
// .setMessage("此功能暂未上线")
|
||||
// .setPositive("确定")
|
||||
//// .setNegtive("拒绝")
|
||||
//// .setSingle(true)
|
||||
//
|
||||
// .setOnClickBottomListener(new SingleDialog.OnClickBottomListener() {
|
||||
// @Override
|
||||
// public void onPositiveClick() {
|
||||
// dialog.dismiss();
|
||||
// }
|
||||
// });
|
||||
// dialog.show();
|
||||
}
|
||||
});
|
||||
cl_health.setOnClickListener(new View.OnClickListener() {
|
||||
@@ -422,7 +433,7 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt
|
||||
cl_contact.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
startActivity(new Intent(getActivity(), ContactActivity.class));
|
||||
checkContact();
|
||||
}
|
||||
});
|
||||
cl_ai.setOnClickListener(new View.OnClickListener() {
|
||||
@@ -431,22 +442,37 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt
|
||||
openScheme(SchemeUtils.SCHEME_HAND);
|
||||
}
|
||||
});
|
||||
cl_appstore.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
ApkUtils.openApp(mContext, "com.uiui.appstore");
|
||||
}
|
||||
});
|
||||
refreshMemory();
|
||||
}
|
||||
|
||||
private void checkSosNumber() {
|
||||
NetInterfaceManager.getInstance().getSystemSettings(new NetInterfaceManager.SosNumberCallback() {
|
||||
NetInterfaceManager.getInstance().getContactList(new NetInterfaceManager.ContactCallback() {
|
||||
@Override
|
||||
public void setSosNumber(List<EmergencyContact> setting_sos) {
|
||||
Intent intent = new Intent(mContext, EmergencyActivity.class);
|
||||
public void setContact(List<Contact> contactList) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEmergencyContact(List<Contact> emergencyContact) {
|
||||
if (emergencyContact == null || emergencyContact.size() == 0) {
|
||||
showNoData("温馨提示", "请在小程序上面设置紧急联系人");
|
||||
} else {
|
||||
Intent intent = new Intent(mContext, EmergencyActivity.class);
|
||||
// intent.putExtra("setting_sos", phone);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
mContext.startActivity(intent);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
mContext.startActivity(intent);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEmpty() {
|
||||
showNoData("温馨提示", "没有设置紧急联系人");
|
||||
showNoData("温馨提示", "请在小程序上面设置紧急联系人");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -454,7 +480,34 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void checkContact() {
|
||||
NetInterfaceManager.getInstance().getContactList(new NetInterfaceManager.ContactCallback() {
|
||||
@Override
|
||||
public void setContact(List<Contact> contactList) {
|
||||
if (contactList == null || contactList.size() == 0) {
|
||||
showNoData("温馨提示", "请在小程序上设置通讯录");
|
||||
} else {
|
||||
startActivity(new Intent(getActivity(), ContactActivity.class));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEmergencyContact(List<Contact> emergencyContact) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEmpty() {
|
||||
showNoData("温馨提示", "请在小程序上设置通讯录");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
@@ -618,7 +671,7 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt
|
||||
|
||||
@Override
|
||||
public void setAlarmClockEmpty() {
|
||||
showNoData("温馨提示", "当前没有数据");
|
||||
showNoData("温馨提示", "请在小程序上设置爱心闹钟");
|
||||
rv_noti.setVisibility(View.GONE);
|
||||
iv_note_nodata.setVisibility(View.VISIBLE);
|
||||
}
|
||||
@@ -686,7 +739,7 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt
|
||||
|
||||
@Override
|
||||
public void noData() {
|
||||
showNoData("温馨提示", "当前没有数据");
|
||||
showNoData("温馨提示", "请在小程序上设置健康码");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -796,8 +849,12 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt
|
||||
long avail = AppUtil.getAvailMemory(mContext);
|
||||
long total = AppUtil.getTotalMemory(mContext);
|
||||
int x = (int) (((total - avail) / (double) total) * 100);
|
||||
// cpv.setProgressColor(mShaderColors);
|
||||
// cpv.showAnimation(0, x, 1000);
|
||||
if (x > 80) {
|
||||
cpv.setProgressColor(mShaderColorsRed);
|
||||
} else {
|
||||
cpv.setProgressColor(mShaderColors);
|
||||
}
|
||||
cpv.showAnimation(0, x, 1000);
|
||||
float x2 = (((total - avail) / (float) total));
|
||||
}
|
||||
|
||||
|
||||
@@ -76,8 +76,11 @@ public class AmapManager {
|
||||
if (aMapLocation.getErrorCode() == 0) {
|
||||
Log.e(TAG, "onLocationChanged: " + "定位成功");
|
||||
Log.e(TAG, "onLocationChanged: " + aMapLocation.getAddress());
|
||||
mMMKV.encode(LONGITUDE_KEY, aMapLocation.getLongitude());
|
||||
mMMKV.encode(LATITUDE_KEY, aMapLocation.getLatitude());
|
||||
Log.e(TAG, "onLocationChanged: getLongitude = " + aMapLocation.getLongitude());
|
||||
mMMKV.encode(LONGITUDE_KEY, String.valueOf(aMapLocation.getLongitude()));
|
||||
Log.e(TAG, "onLocationChanged: getLatitude = " + aMapLocation.getLatitude());
|
||||
mMMKV.encode(LATITUDE_KEY, String.valueOf(aMapLocation.getLatitude()));
|
||||
Log.e(TAG, "onLocationChanged: getAddress = " + aMapLocation.getAddress());
|
||||
mMMKV.encode(ADDRESS_KEY, aMapLocation.getAddress());
|
||||
} else {
|
||||
//定位失败
|
||||
@@ -114,8 +117,8 @@ public class AmapManager {
|
||||
if (aMapLocation.getErrorCode() == 0) {
|
||||
nowAMapLocation = aMapLocation;
|
||||
mMMKV.encode(AMAPLOCATION_JSON_KEY, aMapLocation.toStr());
|
||||
mMMKV.encode(LONGITUDE_KEY, aMapLocation.getLongitude());
|
||||
mMMKV.encode(LATITUDE_KEY, aMapLocation.getLatitude());
|
||||
mMMKV.encode(LONGITUDE_KEY, String.valueOf(aMapLocation.getLongitude()));
|
||||
mMMKV.encode(LATITUDE_KEY, String.valueOf(aMapLocation.getLatitude()));
|
||||
mMMKV.encode(ADDRESS_KEY, aMapLocation.getAddress());
|
||||
} else {
|
||||
mMMKV.encode(AMAPLOCATION_JSON_KEY, "");
|
||||
|
||||
@@ -17,7 +17,6 @@ import com.uiui.aios.bean.ArticleInfo;
|
||||
import com.uiui.aios.bean.BaseResponse;
|
||||
import com.uiui.aios.bean.Contact;
|
||||
import com.uiui.aios.bean.DemandBean;
|
||||
import com.uiui.aios.bean.EmergencyContact;
|
||||
import com.uiui.aios.bean.GoodsInfo;
|
||||
import com.uiui.aios.bean.HealthCode;
|
||||
import com.uiui.aios.bean.NetDesktopIcon;
|
||||
@@ -33,6 +32,7 @@ import com.uiui.aios.network.api.AlarmClockApi;
|
||||
import com.uiui.aios.network.api.AppUsageRecordApi;
|
||||
import com.uiui.aios.network.api.ArticleListApi;
|
||||
import com.uiui.aios.network.api.DemandListApi;
|
||||
import com.uiui.aios.network.api.GetAdminSnSettingApi;
|
||||
import com.uiui.aios.network.api.GetDesktopApi;
|
||||
import com.uiui.aios.network.api.GetMailList;
|
||||
import com.uiui.aios.network.api.GetUserIDApi;
|
||||
@@ -248,6 +248,14 @@ public class NetInterfaceManager {
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse> getAdminSnSettingObservable() {
|
||||
return mRetrofit.create(GetAdminSnSettingApi.class)
|
||||
.getAdminSnSetting(Utils.getSerial())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
|
||||
public interface onCompleteCallback {
|
||||
void onComplete();
|
||||
}
|
||||
@@ -796,15 +804,17 @@ public class NetInterfaceManager {
|
||||
});
|
||||
}
|
||||
|
||||
public interface SosNumberCallback {
|
||||
void setSosNumber(List<EmergencyContact> setting_sos);
|
||||
public interface ContactCallback {
|
||||
void setContact(List<Contact> contactList);
|
||||
|
||||
void setEmergencyContact(List<Contact> emergencyContact);
|
||||
|
||||
void setEmpty();
|
||||
|
||||
void onComplete();
|
||||
}
|
||||
|
||||
public void getSystemSettings(boolean refresh, BehaviorSubject<ActivityEvent> lifecycle, SosNumberCallback callback) {
|
||||
public void getSystemSettings(boolean refresh, BehaviorSubject<ActivityEvent> lifecycle, ContactCallback callback) {
|
||||
ConnectMode connectMode = ConnectMode.ONE_MINUTE;
|
||||
if (refresh) {
|
||||
connectMode = ConnectMode.DEFAULT;
|
||||
@@ -818,26 +828,26 @@ public class NetInterfaceManager {
|
||||
getSystemSettings(lifecycle, callback);
|
||||
} else {
|
||||
Gson gson = new Gson();
|
||||
Type type = new TypeToken<List<EmergencyContact>>() {
|
||||
Type type = new TypeToken<List<Contact>>() {
|
||||
}.getType();
|
||||
List<EmergencyContact> setting_sos = gson.fromJson(jsonString, type);
|
||||
List<Contact> setting_sos = gson.fromJson(jsonString, type);
|
||||
if (setting_sos == null || setting_sos.size() == 0) {
|
||||
if (callback != null) callback.setEmpty();
|
||||
} else {
|
||||
if (callback != null) callback.setSosNumber(setting_sos);
|
||||
if (callback != null) callback.setContact(setting_sos);
|
||||
}
|
||||
if (callback != null) callback.onComplete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void getSystemSettings(BehaviorSubject<ActivityEvent> lifecycle, SosNumberCallback callback) {
|
||||
public void getSystemSettings(BehaviorSubject<ActivityEvent> lifecycle, ContactCallback callback) {
|
||||
getsettingControl()
|
||||
.compose(RxLifecycle.bindUntilEvent(lifecycle, ActivityEvent.DESTROY))
|
||||
.subscribe(getSystemSettingsObserver(callback));
|
||||
}
|
||||
|
||||
public void getSystemSettings(SosNumberCallback callback) {
|
||||
public void getSystemSettings(ContactCallback callback) {
|
||||
getsettingControl()
|
||||
.subscribe(getSystemSettingsObserver(callback));
|
||||
}
|
||||
@@ -847,7 +857,7 @@ public class NetInterfaceManager {
|
||||
.subscribe(getSystemSettingsObserver(null));
|
||||
}
|
||||
|
||||
public Observer<BaseResponse<SystemSettings>> getSystemSettingsObserver(SosNumberCallback callback) {
|
||||
public Observer<BaseResponse<SystemSettings>> getSystemSettingsObserver(ContactCallback callback) {
|
||||
return new Observer<BaseResponse<SystemSettings>>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
@@ -862,14 +872,17 @@ public class NetInterfaceManager {
|
||||
mMMKV.encode("is_health", systemSettings.getIs_health());
|
||||
mMMKV.encode("is_shopping", systemSettings.getIs_shopping());
|
||||
mMMKV.encode("is_info", systemSettings.getIs_info());
|
||||
List<EmergencyContact> setting_sos = systemSettings.getSetting_sos();
|
||||
List<Contact> setting_sos = systemSettings.getSetting_sos();
|
||||
if (setting_sos == null || setting_sos.size() == 0) {
|
||||
mCacheHelper.put(URLAddress.GET_SETTINGS, "");
|
||||
if (callback != null) callback.setEmpty();
|
||||
} else {
|
||||
List<EmergencyContact> contactList = setting_sos.stream().filter(contact -> contact.getIs_urgent() == 1).collect(Collectors.toList());
|
||||
mCacheHelper.put(URLAddress.GET_SETTINGS, GsonUtils.toJsonString(contactList));
|
||||
if (callback != null) callback.setSosNumber(setting_sos);
|
||||
List<Contact> emergencyContact = setting_sos.stream().filter(contact -> contact.getIs_urgent() == 1).collect(Collectors.toList());
|
||||
mCacheHelper.put(URLAddress.GET_SETTINGS, GsonUtils.toJsonString(setting_sos));
|
||||
if (callback != null) {
|
||||
callback.setContact(setting_sos);
|
||||
callback.setEmergencyContact(emergencyContact);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mCacheHelper.put(URLAddress.GET_SETTINGS, "");
|
||||
@@ -886,13 +899,13 @@ public class NetInterfaceManager {
|
||||
if (callback != null) callback.setEmpty();
|
||||
} else {
|
||||
Gson gson = new Gson();
|
||||
Type type = new TypeToken<List<EmergencyContact>>() {
|
||||
Type type = new TypeToken<List<Contact>>() {
|
||||
}.getType();
|
||||
List<EmergencyContact> setting_sos = gson.fromJson(jsonString, type);
|
||||
List<Contact> setting_sos = gson.fromJson(jsonString, type);
|
||||
if (setting_sos == null || setting_sos.size() == 0) {
|
||||
if (callback != null) callback.setEmpty();
|
||||
} else {
|
||||
if (callback != null) callback.setSosNumber(setting_sos);
|
||||
if (callback != null) callback.setContact(setting_sos);
|
||||
}
|
||||
if (callback != null) callback.onComplete();
|
||||
}
|
||||
@@ -907,8 +920,52 @@ public class NetInterfaceManager {
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
public void getContactList(boolean refresh, BehaviorSubject<ActivityEvent> lifecycle, ContactCallback callback) {
|
||||
ConnectMode connectMode = ConnectMode.ONE_MINUTE;
|
||||
if (refresh) {
|
||||
connectMode = ConnectMode.DEFAULT;
|
||||
}
|
||||
if (ConnectManager.getInstance().isNeedConnect(URLAddress.GET_MAIL_LIST, connectMode)) {
|
||||
getContactList(lifecycle, callback);
|
||||
} else {
|
||||
String jsonString = mCacheHelper.getAsString(URLAddress.GET_MAIL_LIST);
|
||||
//为 "" 是已经请求成功的
|
||||
if (jsonString == null) {
|
||||
getContactList(lifecycle, callback);
|
||||
} else {
|
||||
Gson gson = new Gson();
|
||||
Type type = new TypeToken<List<Contact>>() {
|
||||
}.getType();
|
||||
List<Contact> setting_sos = gson.fromJson(jsonString, type);
|
||||
if (setting_sos == null || setting_sos.size() == 0) {
|
||||
if (callback != null) callback.setEmpty();
|
||||
} else {
|
||||
if (callback != null) callback.setContact(setting_sos);
|
||||
}
|
||||
if (callback != null) callback.onComplete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void getContactList(BehaviorSubject<ActivityEvent> lifecycle, ContactCallback callback) {
|
||||
getContactListObservable()
|
||||
.compose(RxLifecycle.bindUntilEvent(lifecycle, ActivityEvent.DESTROY))
|
||||
.subscribe(getContactListObserver(callback));
|
||||
}
|
||||
|
||||
public void getContactList(ContactCallback callback) {
|
||||
getContactListObservable()
|
||||
.subscribe(getContactListObserver(callback));
|
||||
}
|
||||
|
||||
public void getContactList() {
|
||||
getContactListObservable().subscribe(new Observer<BaseResponse<List<Contact>>>() {
|
||||
getContactListObservable()
|
||||
.subscribe(getContactListObserver(null));
|
||||
}
|
||||
|
||||
public Observer<BaseResponse<List<Contact>>> getContactListObserver(ContactCallback callback) {
|
||||
return new Observer<BaseResponse<List<Contact>>>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
Log.e("getContactList", "onSubscribe: ");
|
||||
@@ -917,17 +974,103 @@ public class NetInterfaceManager {
|
||||
@Override
|
||||
public void onNext(@NonNull BaseResponse<List<Contact>> listBaseResponse) {
|
||||
Log.e("getContactList", "onNext: " + listBaseResponse);
|
||||
if (listBaseResponse.code == 200) {
|
||||
List<Contact> contactList = listBaseResponse.data;
|
||||
if (contactList == null || contactList.size() == 0) {
|
||||
mCacheHelper.put(URLAddress.GET_MAIL_LIST, "");
|
||||
if (callback != null) callback.setEmpty();
|
||||
} else {
|
||||
mCacheHelper.put(URLAddress.GET_MAIL_LIST, GsonUtils.toJsonString(contactList));
|
||||
List<Contact> emergencyContact = contactList.stream().filter(contact -> contact.getIs_urgent() == 1).collect(Collectors.toList());
|
||||
if (callback != null) {
|
||||
callback.setContact(contactList);
|
||||
callback.setEmergencyContact(emergencyContact);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mCacheHelper.put(URLAddress.GET_MAIL_LIST, "");
|
||||
if (callback != null) callback.setEmpty();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
Log.e("getContactList", "onError: " + e.getMessage());
|
||||
onComplete();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e("getContactList", "onComplete: ");
|
||||
if (callback != null) callback.onComplete();
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
public void getAdminSnSetting(boolean refresh, BehaviorSubject<ActivityEvent> lifecycle, onCompleteCallback callback) {
|
||||
ConnectMode connectMode = ConnectMode.ONE_MINUTE;
|
||||
if (refresh) {
|
||||
connectMode = ConnectMode.DEFAULT;
|
||||
}
|
||||
if (ConnectManager.getInstance().isNeedConnect(URLAddress.GET_ADMIN_SN_SETTING, connectMode)) {
|
||||
getAdminSnSetting(lifecycle, callback);
|
||||
} else {
|
||||
String jsonString = mCacheHelper.getAsString(URLAddress.GET_ADMIN_SN_SETTING);
|
||||
//为 "" 是已经请求成功的
|
||||
if (jsonString == null) {
|
||||
getAdminSnSetting(lifecycle, callback);
|
||||
} else {
|
||||
Gson gson = new Gson();
|
||||
Type type = new TypeToken<List<Contact>>() {
|
||||
}.getType();
|
||||
List<Contact> setting_sos = gson.fromJson(jsonString, type);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void getAdminSnSetting(BehaviorSubject<ActivityEvent> lifecycle, onCompleteCallback callback) {
|
||||
getAdminSnSettingObservable()
|
||||
.compose(RxLifecycle.bindUntilEvent(lifecycle, ActivityEvent.DESTROY))
|
||||
.subscribe(getAdminSnSettingObserver(callback));
|
||||
}
|
||||
|
||||
public void getAdminSnSetting(onCompleteCallback callback) {
|
||||
getAdminSnSettingObservable()
|
||||
.subscribe(getAdminSnSettingObserver(callback));
|
||||
}
|
||||
|
||||
|
||||
public void getAdminSnSetting() {
|
||||
getAdminSnSettingObservable()
|
||||
.subscribe(getAdminSnSettingObserver(null));
|
||||
}
|
||||
|
||||
public Observer<BaseResponse> getAdminSnSettingObserver(onCompleteCallback callback) {
|
||||
return new Observer<BaseResponse>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
Log.e("getAdminSnSettingObserver", "onSubscribe: ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull BaseResponse baseResponse) {
|
||||
Log.e("getAdminSnSettingObserver", "onNext: " + baseResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
Log.e("getAdminSnSettingObserver", "onError: ");
|
||||
onComplete();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e("getAdminSnSettingObserver", "onComplete: ");
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -40,6 +40,9 @@ public class URLAddress {
|
||||
public static final String GET_HEALTH_CODE = "getHealthCode";
|
||||
/*获取联系人*/
|
||||
public static final String GET_MAIL_LIST = "Control/getMailList";
|
||||
/*获取负二屏开关*/
|
||||
public static final String GET_ADMIN_SN_SETTING = "getAdminSnSetting";
|
||||
|
||||
|
||||
|
||||
public static final String GET_USER_ID = "getUserId";
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.uiui.aios.network.api;
|
||||
|
||||
import com.uiui.aios.bean.BaseResponse;
|
||||
import com.uiui.aios.network.URLAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface GetAdminSnSettingApi {
|
||||
@GET(URLAddress.GET_ADMIN_SN_SETTING)
|
||||
Observable<BaseResponse> getAdminSnSetting(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -78,7 +78,7 @@ public class MainService extends BaseService implements MainSContact.MainSView,
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
Log.e(TAG, "onCreate: ");
|
||||
ApkUtils.UninstallAPP(this, "com.joytv.live");
|
||||
// ApkUtils.UninstallAPP(this, "com.joytv.live");
|
||||
// ApkUtils.UninstallAPP(this, "com.tencent.android.qqdownloader");
|
||||
|
||||
Aria.init(this);
|
||||
|
||||
@@ -11,6 +11,7 @@ import android.content.pm.PackageManager;
|
||||
import android.content.pm.ResolveInfo;
|
||||
import android.os.Binder;
|
||||
import android.os.Build;
|
||||
import android.provider.Settings;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
@@ -31,6 +32,7 @@ import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Set;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
@@ -52,6 +54,8 @@ public class ApkUtils {
|
||||
this.add("com.android.uiuios");
|
||||
this.add("com.uiui.os");
|
||||
this.add("com.uiui.health");
|
||||
this.add("com.tencent.android.qqdownloader");
|
||||
this.add("com.uiui.appstore");
|
||||
}};
|
||||
private static HashSet<String> showPackageName = new HashSet<String>() {{
|
||||
this.add("com.android.dialer");
|
||||
@@ -62,6 +66,7 @@ public class ApkUtils {
|
||||
this.add("com.mediatek.camera");
|
||||
this.add("com.android.mms");
|
||||
this.add("com.uiui.city");
|
||||
this.add("com.alldocube.store");
|
||||
}};
|
||||
private static HashSet<String> allHintPackage = new HashSet<String>() {{
|
||||
this.add("com.android.uiuios");
|
||||
@@ -163,6 +168,10 @@ public class ApkUtils {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Settings.Global.getInt(context.getContentResolver(), "is_activity", 0) == 0) {
|
||||
applicationInfos.removeIf(applicationInfo -> "com.uiui.city".equals(applicationInfo.packageName));
|
||||
}
|
||||
|
||||
applicationInfos.sort(new Comparator<ApplicationInfo>() {
|
||||
@Override
|
||||
public int compare(ApplicationInfo o1, ApplicationInfo o2) {
|
||||
|
||||
BIN
app/src/main/res/drawable-hdpi/appstore_icon.png
Normal file
BIN
app/src/main/res/drawable-hdpi/appstore_icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.4 KiB |
@@ -3,7 +3,7 @@
|
||||
<!-- 内部颜色 -->
|
||||
<solid android:color="@color/default_background_color" />
|
||||
<!-- 圆角的幅度 -->
|
||||
<corners android:radius="@dimen/dp_16" />
|
||||
<corners android:radius="@dimen/dp_8" />
|
||||
|
||||
<padding
|
||||
android:bottom="0dp"
|
||||
|
||||
@@ -96,26 +96,40 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="共享空间"
|
||||
android:text="一键加速"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_head"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/gallery_icon"
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/iv_head"-->
|
||||
<!-- android:layout_width="100dp"-->
|
||||
<!-- android:layout_height="100dp"-->
|
||||
<!-- android:adjustViewBounds="true"-->
|
||||
<!-- android:scaleType="fitCenter"-->
|
||||
<!-- android:src="@drawable/gallery_icon"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<com.king.view.circleprogressview.CircleProgressView
|
||||
android:id="@+id/cpv"
|
||||
android:layout_width="144dp"
|
||||
android:layout_height="144dp"
|
||||
app:cpvDuration="1000"
|
||||
app:cpvLabelTextSize="26sp"
|
||||
app:cpvNormalColor="#D8D6D7"
|
||||
app:cpvShowTick="false"
|
||||
app:cpvStrokeWidth="20dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_sos"
|
||||
@@ -236,7 +250,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="爱心守护"
|
||||
android:text="爱心提醒"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
@@ -303,12 +317,12 @@
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:textStyle="bold"
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:textColor="@color/black"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="@+id/iv_health"
|
||||
app:layout_constraintStart_toStartOf="@+id/iv_health"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_health" />
|
||||
@@ -351,6 +365,42 @@
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_appstore"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/custom_background"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="应用市场"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/appstore_icon"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_ai"
|
||||
android:layout_width="0dp"
|
||||
@@ -384,8 +434,8 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</com.uiui.aios.view.CustomContent>
|
||||
@@ -91,7 +91,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="爱心守护"
|
||||
android:text="爱心提醒"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
|
||||
@@ -103,20 +103,34 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="共享空间"
|
||||
android:text="一键加速"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_head"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/gallery_icon"
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/iv_head"-->
|
||||
<!-- android:layout_width="100dp"-->
|
||||
<!-- android:layout_height="100dp"-->
|
||||
<!-- android:adjustViewBounds="true"-->
|
||||
<!-- android:scaleType="fitCenter"-->
|
||||
<!-- android:src="@drawable/gallery_icon"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<com.king.view.circleprogressview.CircleProgressView
|
||||
android:id="@+id/cpv"
|
||||
android:layout_width="144dp"
|
||||
android:layout_height="144dp"
|
||||
app:cpvDuration="1000"
|
||||
app:cpvLabelTextSize="26sp"
|
||||
app:cpvNormalColor="#D8D6D7"
|
||||
app:cpvShowTick="false"
|
||||
app:cpvStrokeWidth="20dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -242,7 +256,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="爱心守护"
|
||||
android:text="爱心提醒"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
@@ -364,6 +378,43 @@
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_appstore"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/custom_background"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="应用市场"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/appstore_icon"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_ai"
|
||||
android:layout_width="0dp"
|
||||
@@ -399,6 +450,7 @@
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</com.uiui.aios.view.CustomContent>
|
||||
@@ -84,7 +84,7 @@
|
||||
<TextView
|
||||
android:id="@+id/positive"
|
||||
android:layout_width="@dimen/dp_64"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:layout_height="@dimen/dp_28"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/join_background"
|
||||
android:gravity="center"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<resources>
|
||||
<string name="app_name">老人OS系统</string>
|
||||
<string name="app_name">关怀系统OS</string>
|
||||
|
||||
<!-- TODO: Remove or change this placeholder text -->
|
||||
<string name="hello_blank_fragment">Hello blank fragment</string>
|
||||
|
||||
Reference in New Issue
Block a user