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