version:1.4.2
fix: update:优化dock栏,优化图标显示
This commit is contained in:
@@ -15,10 +15,6 @@ android {
|
||||
buildTypes {
|
||||
M50T60Debug {}
|
||||
M50T60Release {}
|
||||
U807Debug {}
|
||||
U807Release {}
|
||||
iPlay50SEDebug {}
|
||||
iPlay50SERelease {}
|
||||
debug {}
|
||||
release {}
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@ android {
|
||||
applicationId "com.xxpatx.os"
|
||||
minSdkVersion 24
|
||||
targetSdkVersion 29
|
||||
versionCode 1040
|
||||
versionName "1.4.0"
|
||||
versionCode 1042
|
||||
versionName "1.4.2"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
@@ -83,7 +83,7 @@ android {
|
||||
manifestPlaceholders = [
|
||||
AMAP_KEY: "aa85f12a2b0060a687c1755e08161875"
|
||||
]
|
||||
buildConfigField "String", "platform", '"TD606"'
|
||||
buildConfigField "String", "platform", '"M50"'
|
||||
versionNameSuffix "-debug"
|
||||
debuggable true
|
||||
signingConfig signingConfigs.M50T60
|
||||
@@ -94,7 +94,7 @@ android {
|
||||
manifestPlaceholders = [
|
||||
AMAP_KEY: "aa85f12a2b0060a687c1755e08161875"
|
||||
]
|
||||
buildConfigField "String", "platform", '"TD606"'
|
||||
buildConfigField "String", "platform", '"M50"'
|
||||
signingConfig signingConfigs.M50T60
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@ dependencies {
|
||||
implementation 'com.github.hackware1993:MagicIndicator:1.7.0' // for androidx
|
||||
implementation 'com.king.view:circleprogressview:1.1.2'
|
||||
//工具类
|
||||
implementation 'com.blankj:utilcodex:1.31.0'
|
||||
implementation 'com.blankj:utilcodex:1.31.1'
|
||||
//aria
|
||||
implementation 'com.arialyy.aria:core:3.8.15'
|
||||
annotationProcessor 'com.arialyy.aria:compiler:3.8.15'
|
||||
|
||||
BIN
app/keystore/xueshibaoos.cer
Normal file
BIN
app/keystore/xueshibaoos.cer
Normal file
Binary file not shown.
27
app/keystore/xueshibaoos.pem
Normal file
27
app/keystore/xueshibaoos.pem
Normal file
@@ -0,0 +1,27 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIEqDCCA5CgAwIBAgIJALOZgIbQVs/6MA0GCSqGSIb3DQEBBAUAMIGUMQswCQYD
|
||||
VQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4g
|
||||
VmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UE
|
||||
AxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAe
|
||||
Fw0wODA0MTUyMjQwNTBaFw0zNTA5MDEyMjQwNTBaMIGUMQswCQYDVQQGEwJVUzET
|
||||
MBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4G
|
||||
A1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9p
|
||||
ZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTCCASAwDQYJKoZI
|
||||
hvcNAQEBBQADggENADCCAQgCggEBAJx4BZKsDV04HN6qZezIpgBuNkgMbXIHsSAR
|
||||
vlCGOqvitV0Amt9xRtbyICKAx81Ne9smJDuKgGwms0sTdSOkkmgiSQTcAUk+fArP
|
||||
GgXIdPabA3tgMJ2QdNJCgOFrrSqHNDYZUer3KkgtCbIEsYdeEqyYwap3PWgAuer9
|
||||
5W1Yvtjo2hb5o2AJnDeoNKbf7be2tEoEngeiafzPLFSW8s821k35CjuNjzSjuqtM
|
||||
9TNxqydxmzulh1StDFP8FOHbRdUeI0+76TybpO35zlQmE1DsU1YHv2mi/0qgfbX3
|
||||
6iANCabBtJ4hQC+J7RGQiTqrWpGA8VLoL4WkV1PPX8GQccXuyCcCAQOjgfwwgfkw
|
||||
HQYDVR0OBBYEFE/koLPdnLop9x1yh8Tnw48ghsKZMIHJBgNVHSMEgcEwgb6AFE/k
|
||||
oLPdnLop9x1yh8Tnw48ghsKZoYGapIGXMIGUMQswCQYDVQQGEwJVUzETMBEGA1UE
|
||||
CBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMH
|
||||
QW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAG
|
||||
CSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbYIJALOZgIbQVs/6MAwGA1Ud
|
||||
EwQFMAMBAf8wDQYJKoZIhvcNAQEEBQADggEBAFclUbjZOh9z3g9tRp+G2tZwFAAp
|
||||
PIigzXzXeLc9r8wZf6t25iEuVsHHYc/EL9cz3lLFCuCIFM78CjtaGkNGBU2Cnx2C
|
||||
tCsgSL+ItdFJKe+F9g7dEtctVWV+IuPoXQTIMdYT0Zk4u4mCJH+jISVroS0dao+S
|
||||
6h2xw3Mxe6DAN/DRr/ZFrvIkl5+6bnoUvAJccbmBOM7z3fwFlhfPJIRc97QNY4L3
|
||||
J17XOElatuWTG5QhdlxJG3L7aOCA29tYwgKdNHyLMozkPvaosVUz7fvpib1qSN1L
|
||||
IC7alMarjdW4OZID2q4u1EYjLk/pvZYTlMYwDlE448/Shebk5INTjLixs1c=
|
||||
-----END CERTIFICATE-----
|
||||
@@ -9,6 +9,7 @@ import android.provider.ContactsContract;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.lifecycle.Observer;
|
||||
@@ -25,6 +26,7 @@ import com.luck.picture.lib.entity.LocalMedia;
|
||||
import com.luck.picture.lib.interfaces.OnResultCallbackListener;
|
||||
import com.tencent.mmkv.MMKV;
|
||||
import com.xiasuhuei321.loadingdialog.view.LoadingDialog;
|
||||
import com.xxpatx.os.BuildConfig;
|
||||
import com.xxpatx.os.R;
|
||||
import com.xxpatx.os.base.mvvm.BaseMvvmActivity;
|
||||
import com.xxpatx.os.bean.Contact;
|
||||
@@ -35,6 +37,7 @@ import com.xxpatx.os.db.ContactCacheUtils;
|
||||
import com.xxpatx.os.utils.ContactsUtils;
|
||||
import com.xxpatx.os.utils.LocalContactUtils;
|
||||
import com.xxpatx.os.utils.ScreenUtil;
|
||||
import com.zackratos.ultimatebarx.ultimatebarx.UltimateBarXKt;
|
||||
import com.zackratos.ultimatebarx.ultimatebarx.java.UltimateBarX;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
@@ -52,8 +55,12 @@ public class AddContactActivity extends BaseMvvmActivity<AddContactViewModel, Ac
|
||||
|
||||
@Override
|
||||
public boolean setNightMode() {
|
||||
if ("TD606".equals(BuildConfig.platform)) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
@@ -70,8 +77,14 @@ public class AddContactActivity extends BaseMvvmActivity<AddContactViewModel, Ac
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
if ("TD606".equals(BuildConfig.platform)) {
|
||||
Log.e(TAG, "initView: BarUtils");
|
||||
ViewGroup.LayoutParams layoutParams = mViewDataBinding.clBottom.getLayoutParams();
|
||||
layoutParams.height = UltimateBarXKt.getStatusBarHeight();
|
||||
} else {
|
||||
UltimateBarX.addStatusBarTopPadding(mViewDataBinding.clExit);
|
||||
UltimateBarX.addNavigationBarBottomPadding(mViewDataBinding.clBottom);
|
||||
}
|
||||
mLoadingDialog = new LoadingDialog(this);
|
||||
mLoadingDialog.setLoadingText("正在上传")
|
||||
.setSuccessText("添加成功")
|
||||
|
||||
@@ -32,17 +32,6 @@ public class DockActivity extends BaseMvvmActivity<DockViewModel, ActivityDockBi
|
||||
|
||||
private DockAppSelectedAdapter mDockAppSelectedAdapter;
|
||||
|
||||
public static final List<DockApp> DEFAULT_DOCK_APP = new ArrayList<DockApp>() {
|
||||
private static final long serialVersionUID = -7406071324804131303L;
|
||||
|
||||
{
|
||||
this.add(new DockApp("xxpatx.os.dialer"));
|
||||
this.add(new DockApp("com.tencent.mm"));
|
||||
this.add(new DockApp("com.ss.android.ugc.aweme"));
|
||||
this.add(new DockApp("com.mediatek.camera"));
|
||||
}
|
||||
};
|
||||
|
||||
public static final List<String> INCLUDE_SYSTEM_APP =new ArrayList<String>(){{
|
||||
this.add("com.android.mms");//信息
|
||||
this.add("com.mediatek.camera");
|
||||
|
||||
@@ -25,9 +25,11 @@ import android.speech.tts.TextToSpeech;
|
||||
import android.telephony.PhoneStateListener;
|
||||
import android.telephony.TelephonyManager;
|
||||
import android.text.TextUtils;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -40,6 +42,7 @@ import androidx.lifecycle.Observer;
|
||||
|
||||
import com.arialyy.aria.core.Aria;
|
||||
import com.arialyy.aria.core.download.DownloadEntity;
|
||||
import com.blankj.utilcode.util.BarUtils;
|
||||
import com.blankj.utilcode.util.NetworkUtils;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
@@ -69,6 +72,7 @@ import com.xxpatx.os.fragment.contact.ContactFragment;
|
||||
import com.xxpatx.os.fragment.home.HomeFragment;
|
||||
import com.xxpatx.os.fragment.settings.SettingsFragment;
|
||||
import com.xxpatx.os.manager.AmapManager;
|
||||
import com.xxpatx.os.manager.DesktopIconManager;
|
||||
import com.xxpatx.os.service.NotificationService;
|
||||
import com.xxpatx.os.utils.ApkUtils;
|
||||
import com.xxpatx.os.utils.AppUsedTimeUtils;
|
||||
@@ -77,6 +81,7 @@ import com.xxpatx.os.utils.DayUtils;
|
||||
import com.xxpatx.os.utils.TimeUtils;
|
||||
import com.xxpatx.os.utils.Utils;
|
||||
import com.xxpatx.os.view.ScaleCircleNavigator;
|
||||
import com.zackratos.ultimatebarx.ultimatebarx.UltimateBarXKt;
|
||||
import com.zackratos.ultimatebarx.ultimatebarx.java.UltimateBarX;
|
||||
|
||||
import net.lucode.hackware.magicindicator.ViewPagerHelper;
|
||||
@@ -143,7 +148,11 @@ public class MainActivity extends BaseMvvmActivity<MainViewModel, ActivityMainBi
|
||||
|
||||
@Override
|
||||
public boolean setfitWindow() {
|
||||
if ("TD606".equals(BuildConfig.platform)) {
|
||||
return false;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -173,15 +182,48 @@ public class MainActivity extends BaseMvvmActivity<MainViewModel, ActivityMainBi
|
||||
// ContactsUtils.getContacts(MainActivity.this);
|
||||
// ContactsUtils.getLocalContacts(MainActivity.this);
|
||||
|
||||
|
||||
if ("TD606".equals(BuildConfig.platform)) {
|
||||
Log.e(TAG, "initView: BarUtils");
|
||||
ViewGroup.LayoutParams layoutParams = mViewDataBinding.clBottom.getLayoutParams();
|
||||
layoutParams.height = UltimateBarXKt.getStatusBarHeight();
|
||||
Log.e(TAG, "initView: BarUtils " + BarUtils.getStatusBarHeight());
|
||||
Log.e(TAG, "initView: UltimateBarXKt " + UltimateBarXKt.getStatusBarHeight());
|
||||
// Log.e(TAG, "initView: ScreenUtils " + ScreenUtils.getStatusBarHeight());
|
||||
Log.e(TAG, "initView: getNavigationBarHeight " + getNavigationBarHeight());
|
||||
} else {
|
||||
// UltimateBarX.addStatusBarTopPadding(mViewDataBinding.root);
|
||||
UltimateBarX.addNavigationBarBottomPadding(mViewDataBinding.clBottom);
|
||||
}
|
||||
|
||||
toggleNotificationListenerService(this);
|
||||
|
||||
if (BuildConfig.DEBUG) {
|
||||
// SystemClock.setCurrentTimeMillis(1662123600000L);//09-02
|
||||
// SystemClock.setCurrentTimeMillis(1662210000000L);//09-03
|
||||
Utils.getAndroiodScreenProperty(this);
|
||||
DisplayMetrics metrics = getResources().getDisplayMetrics();
|
||||
switch (metrics.densityDpi) {
|
||||
case DisplayMetrics.DENSITY_LOW:
|
||||
Log.e(TAG, "densityDpi: ldpi");
|
||||
break;
|
||||
case DisplayMetrics.DENSITY_MEDIUM:
|
||||
Log.e(TAG, "densityDpi: mdpi");
|
||||
break;
|
||||
case DisplayMetrics.DENSITY_HIGH:
|
||||
Log.e(TAG, "densityDpi: hdpi");
|
||||
break;
|
||||
case DisplayMetrics.DENSITY_XHIGH:
|
||||
Log.e(TAG, "densityDpi: xhdpi");
|
||||
break;
|
||||
case DisplayMetrics.DENSITY_XXHIGH:
|
||||
Log.e(TAG, "densityDpi: xxhdpi");
|
||||
break;
|
||||
case DisplayMetrics.DENSITY_XXXHIGH:
|
||||
Log.e(TAG, "densityDpi: xxxhdpi");
|
||||
break;
|
||||
default:
|
||||
Log.e(TAG, "densityDpi: default");
|
||||
}
|
||||
}
|
||||
|
||||
// if (!isNotificationListenersEnabled()) {
|
||||
@@ -277,7 +319,7 @@ public class MainActivity extends BaseMvvmActivity<MainViewModel, ActivityMainBi
|
||||
});
|
||||
|
||||
mViewDataBinding.viewPager.setAdapter(mBaseFragmentPagerAdapter);
|
||||
mViewDataBinding.viewPager.setOffscreenPageLimit(3);
|
||||
mViewDataBinding.viewPager.setOffscreenPageLimit(4);
|
||||
mViewDataBinding.magicIndicator.setNavigator(scaleCircleNavigator);
|
||||
ViewPagerHelper.bind(mViewDataBinding.magicIndicator, mViewDataBinding.viewPager);
|
||||
if (mFragments.size() > 1) {
|
||||
@@ -293,8 +335,34 @@ public class MainActivity extends BaseMvvmActivity<MainViewModel, ActivityMainBi
|
||||
// hideNavigationBar();
|
||||
ApkUtils.uninstall(MainActivity.this, "cn.etouch.ecalendar");
|
||||
ApkUtils.disableApp(MainActivity.this, "cn.etouch.ecalendar");
|
||||
ApkUtils.isTablet();
|
||||
ApkUtils.isTablet(MainActivity.this);
|
||||
}
|
||||
|
||||
public int getNavigationBarHeight() {
|
||||
int result = 0;
|
||||
int resourceId = getResources().getIdentifier("navigation_bar_height", "dimen", "android");
|
||||
if (resourceId > 0) {
|
||||
result = getResources().getDimensionPixelSize(resourceId);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 设置页面最外层布局 FitsSystemWindows 属性
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
public void setFitsSystemWindows(boolean value) {
|
||||
ViewGroup contentFrameLayout = findViewById(android.R.id.content);
|
||||
View parentView = contentFrameLayout.getChildAt(0);
|
||||
if (parentView != null && Build.VERSION.SDK_INT >= 14) {
|
||||
parentView.setFitsSystemWindows(value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private View.OnSystemUiVisibilityChangeListener mOnSystemUiVisibilityChangeListener =
|
||||
new View.OnSystemUiVisibilityChangeListener() {
|
||||
@Override
|
||||
@@ -773,20 +841,20 @@ public class MainActivity extends BaseMvvmActivity<MainViewModel, ActivityMainBi
|
||||
mDockAppGridAdapter.setDockApps(dockApps);
|
||||
} else {
|
||||
// mDockAppAdapter.setDockApps(DockActivity.DEFAULT_DOCK_APP);
|
||||
mViewDataBinding.gridView.setNumColumns(DockActivity.DEFAULT_DOCK_APP.size());
|
||||
mDockAppGridAdapter.setDockApps(DockActivity.DEFAULT_DOCK_APP);
|
||||
mViewDataBinding.gridView.setNumColumns(DesktopIconManager.getInstance().getDefaultDockApp().size());
|
||||
mDockAppGridAdapter.setDockApps(DesktopIconManager.getInstance().getDefaultDockApp());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "initView: " + e.getMessage());
|
||||
mMMKV.encode(DockActivity.DOCK_APP_KEY, "");
|
||||
// mDockAppAdapter.setDockApps(DockActivity.DEFAULT_DOCK_APP);
|
||||
mViewDataBinding.gridView.setNumColumns(DockActivity.DEFAULT_DOCK_APP.size());
|
||||
mDockAppGridAdapter.setDockApps(DockActivity.DEFAULT_DOCK_APP);
|
||||
mViewDataBinding.gridView.setNumColumns(DesktopIconManager.getInstance().getDefaultDockApp().size());
|
||||
mDockAppGridAdapter.setDockApps(DesktopIconManager.getInstance().getDefaultDockApp());
|
||||
}
|
||||
} else {
|
||||
// mDockAppAdapter.setDockApps(DockActivity.DEFAULT_DOCK_APP);
|
||||
mViewDataBinding.gridView.setNumColumns(DockActivity.DEFAULT_DOCK_APP.size());
|
||||
mDockAppGridAdapter.setDockApps(DockActivity.DEFAULT_DOCK_APP);
|
||||
mViewDataBinding.gridView.setNumColumns(DesktopIconManager.getInstance().getDefaultDockApp().size());
|
||||
mDockAppGridAdapter.setDockApps(DesktopIconManager.getInstance().getDefaultDockApp());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,6 +47,11 @@ public class NoticeInfoActivity extends BaseMvvmActivity<NoticeInfoViewModel, Ac
|
||||
private PowerManager.WakeLock mWakeLock;
|
||||
private AudioManager mAudioManager;
|
||||
|
||||
@Override
|
||||
public boolean setfitWindow() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_notice_info;
|
||||
|
||||
@@ -27,6 +27,7 @@ import com.xxpatx.os.activity.tts.TtsActivity;
|
||||
import com.xxpatx.os.activity.update.UpdateActivity;
|
||||
import com.xxpatx.os.base.mvvm.BaseMvvmActivity;
|
||||
import com.xxpatx.os.bean.AppInfo;
|
||||
import com.xxpatx.os.bean.SystemSettings;
|
||||
import com.xxpatx.os.config.CommonConfig;
|
||||
import com.xxpatx.os.databinding.ActivitySettingBinding;
|
||||
import com.xxpatx.os.service.WeAccessibilityService;
|
||||
@@ -92,12 +93,20 @@ public class SettingActivity extends BaseMvvmActivity<SettingViewModel, Activity
|
||||
}
|
||||
}
|
||||
});
|
||||
mViewModel.mSystemSettingsData.observe(this, new Observer<SystemSettings>() {
|
||||
@Override
|
||||
public void onChanged(SystemSettings systemSettings) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
setStatus();
|
||||
mViewModel.getSystemSettings();
|
||||
}
|
||||
|
||||
private void setStatus() {
|
||||
@@ -121,6 +130,10 @@ public class SettingActivity extends BaseMvvmActivity<SettingViewModel, Activity
|
||||
boolean statusBar = code == 1;
|
||||
Log.e(TAG, "setStatusBar: statusBar = " + statusBar);
|
||||
mViewDataBinding.setStatusBar(statusBar);
|
||||
|
||||
boolean hourly_time = mMMKV.decodeBool(CommonConfig.HOURLY_TIME_SIGNAL_KEY, false);
|
||||
Log.e(TAG, "setHourlyTimeSignal: hourly_time = " + hourly_time);
|
||||
mViewDataBinding.setHourlyTime(hourly_time);
|
||||
}
|
||||
|
||||
private static final int REQUEST_CODE_DRAW_OVER_OTHER_APPS_PERMISSION = 200;
|
||||
@@ -285,6 +298,13 @@ public class SettingActivity extends BaseMvvmActivity<SettingViewModel, Activity
|
||||
mMMKV.encode(CommonConfig.DISABLE_DIAL_TONE_MODIFY, !dialTone);
|
||||
}
|
||||
|
||||
public void setHourlyTimeSignal(View view) {
|
||||
boolean hourly_time = mMMKV.decodeBool(CommonConfig.HOURLY_TIME_SIGNAL_KEY, false);
|
||||
Log.e(TAG, "setHourlyTimeSignal: hourly_time = " + hourly_time);
|
||||
mMMKV.encode(CommonConfig.HOURLY_TIME_SIGNAL_KEY, !hourly_time);
|
||||
mViewDataBinding.setHourlyTime(!hourly_time);
|
||||
}
|
||||
|
||||
public void setStatusBar(View view) {
|
||||
int code = Settings.System.getInt(getContentResolver(), CommonConfig.ACTION_STATUS_BAR_STATE, 0);
|
||||
boolean statusBar = code == 1;
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.trello.rxlifecycle4.android.ActivityEvent;
|
||||
import com.xxpatx.os.base.mvvm.BaseViewModel;
|
||||
import com.xxpatx.os.bean.AppInfo;
|
||||
import com.xxpatx.os.bean.BaseResponse;
|
||||
import com.xxpatx.os.bean.SystemSettings;
|
||||
import com.xxpatx.os.databinding.ActivitySettingBinding;
|
||||
import com.xxpatx.os.network.NetInterfaceManager;
|
||||
|
||||
@@ -59,4 +60,36 @@ public class SettingViewModel extends BaseViewModel<ActivitySettingBinding, Acti
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public MutableLiveData<SystemSettings> mSystemSettingsData = new MutableLiveData<>();
|
||||
|
||||
public void getSystemSettings() {
|
||||
NetInterfaceManager.getInstance().getSettingControl()
|
||||
.compose(RxLifecycle.bindUntilEvent(getLifecycle(), ActivityEvent.DESTROY))
|
||||
.subscribe(new Observer<BaseResponse<SystemSettings>>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
Log.e("getSystemSettings", "onSubscribe: ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull BaseResponse<SystemSettings> systemSettingsBaseResponse) {
|
||||
Log.e("getSystemSettings", "onNext: " + systemSettingsBaseResponse);
|
||||
if (systemSettingsBaseResponse.code == 200) {
|
||||
SystemSettings systemSettings = systemSettingsBaseResponse.data;
|
||||
mSystemSettingsData.setValue(systemSettings);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
Log.e("getSystemSettings", "onError: " + e.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e("getSystemSettings", "onComplete: ");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ import com.xxpatx.os.manager.AmapManager;
|
||||
import com.xxpatx.os.manager.AppManager;
|
||||
import com.xxpatx.os.manager.AppStatusManager;
|
||||
import com.xxpatx.os.manager.ConnectManager;
|
||||
import com.xxpatx.os.manager.DesktopIconManager;
|
||||
import com.xxpatx.os.network.NetInterfaceManager;
|
||||
import com.xxpatx.os.push.PushManager;
|
||||
import com.xxpatx.os.service.main.MainService;
|
||||
@@ -80,6 +81,7 @@ public class BaseApplication extends Application {
|
||||
}
|
||||
WechatContactManager.init(this);
|
||||
ContactCacheUtils.init(this);
|
||||
DesktopIconManager.init(this);
|
||||
}
|
||||
|
||||
private void aliyunPushInit() {
|
||||
|
||||
@@ -102,6 +102,8 @@ public class DesktopIcon implements Serializable, Parcelable {
|
||||
return context.getDrawable(R.drawable.icon_wechat_service);
|
||||
case AppManager.CONTACT_PACKAGE:
|
||||
return context.getDrawable(R.drawable.com_android_contacts);
|
||||
case AppManager.EXIT_DESKTOP:
|
||||
return context.getDrawable(R.drawable.exit_icon);
|
||||
case "aios.daily.app":
|
||||
return context.getDrawable(R.drawable.icon_daily_app);
|
||||
case "aios.appstore":
|
||||
|
||||
@@ -6,8 +6,16 @@ public class CommonConfig {
|
||||
/*保存的应用版本号*/
|
||||
public final static String APP_VERSION_CODE = "APP_VERSION_CODE";
|
||||
|
||||
|
||||
/*桌面图标列数*/
|
||||
public static final String DESKTOP_LAYOUT_COLUMNS = "desktop_layout_columns";
|
||||
public static final int DESKTOP_LAYOUT_COLUMNS_SIZE = 2;
|
||||
/*桌面图标行数*/
|
||||
public static final String DESKTOP_LAYOUT_ROWS = "desktop_layout_rows";
|
||||
public static final int DESKTOP_LAYOUT_ROWS_SIZE = 3;
|
||||
|
||||
/*桌面图标个数*/
|
||||
public final static int DESKTOP_LIST_SIZE = 3 * 3;
|
||||
public final static int DESKTOP_LIST_SIZE = DESKTOP_LAYOUT_COLUMNS_SIZE * DESKTOP_LAYOUT_ROWS_SIZE;
|
||||
|
||||
public static final String HIDE_CALENDAR_KEY = "hide_desktop_calendar";
|
||||
|
||||
@@ -106,7 +114,8 @@ public class CommonConfig {
|
||||
public static final String DISABLE_CLOCK_MODIFY = "disable_clock_modify_key";
|
||||
/*联系人首屏*/
|
||||
public static final String CONTACT_HOME_KEY = "contact_home_control";
|
||||
|
||||
/*整点报时*/
|
||||
public static final String HOURLY_TIME_SIGNAL_KEY = "Hourly_Time_Signal";
|
||||
|
||||
/*后台设置的*/
|
||||
/*主页按钮开关*/
|
||||
|
||||
@@ -46,6 +46,7 @@ import com.xxpatx.os.shortcut.ShortcutUtils;
|
||||
import com.xxpatx.os.utils.ApkUtils;
|
||||
import com.xxpatx.os.utils.AppUsedTimeUtils;
|
||||
import com.xxpatx.os.utils.IconUtils;
|
||||
import com.xxpatx.os.utils.Utils;
|
||||
import com.xxpatx.os.view.MyGridLayout;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -135,7 +136,7 @@ public class AppListFragment extends BaseFragment {
|
||||
// if (mContext.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
// gridLayout.set(3, 3);
|
||||
// } else {
|
||||
gridLayout.set(2, 3);
|
||||
gridLayout.set(CommonConfig.DESKTOP_LAYOUT_COLUMNS_SIZE, CommonConfig.DESKTOP_LAYOUT_ROWS_SIZE);
|
||||
// }
|
||||
|
||||
gridLayout.setGridAdapter(new MyGridLayout.GridAdatper() {
|
||||
@@ -298,6 +299,9 @@ public class AppListFragment extends BaseFragment {
|
||||
AppUsedTimeUtils.getInstance().setStartTime(System.currentTimeMillis());
|
||||
// SendRunningApp(mContext);
|
||||
break;
|
||||
case AppManager.EXIT_DESKTOP:
|
||||
Utils.openLauncher3(mContext);
|
||||
break;
|
||||
default:
|
||||
int setting_other_appInstaller = Settings.Global.getInt(mContext.getContentResolver(), CommonConfig.SETTING_OTHER_APPINSTALLER_KEY, 1);
|
||||
if (setting_other_appInstaller == 0
|
||||
@@ -329,6 +333,7 @@ public class AppListFragment extends BaseFragment {
|
||||
case "com.xxpatx.sn":
|
||||
case "aios.daily.app":
|
||||
case "aios.appstore":
|
||||
case AppManager.EXIT_DESKTOP:
|
||||
break;
|
||||
default:
|
||||
showHideDialog(desktopIcon);
|
||||
@@ -433,7 +438,7 @@ public class AppListFragment extends BaseFragment {
|
||||
dailyAppDialog.show();
|
||||
}
|
||||
|
||||
private void SendRunningApp(Context context) {
|
||||
private void sendRunningApp(Context context) {
|
||||
String packageName = AppUsedTimeUtils.getInstance().getAppPackageName();
|
||||
long time = AppUsedTimeUtils.getInstance().getStartTime();
|
||||
JsonObject jsonObject = new JsonObject();
|
||||
@@ -441,29 +446,29 @@ public class AppListFragment extends BaseFragment {
|
||||
jsonObject.addProperty("version_name", ApkUtils.getAPPVersionName(context, packageName));
|
||||
jsonObject.addProperty("start_time", time / 1000);
|
||||
String jsonString = jsonObject.toString();
|
||||
Log.e(TAG, "SendRunningApp: " + jsonString);
|
||||
Log.e(TAG, "sendRunningApp: " + jsonString);
|
||||
NetInterfaceManager.getInstance()
|
||||
.getRunningAppObservable(jsonString)
|
||||
.subscribe(new Observer<BaseResponse>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
Log.e("SendRunningApp", "onSubscribe: ");
|
||||
Log.e("sendRunningApp", "onSubscribe: ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(BaseResponse baseResponse) {
|
||||
Log.e("SendRunningApp", "onSubscribe: " + baseResponse);
|
||||
Log.e("sendRunningApp", "onSubscribe: " + baseResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
Log.e("SendRunningApp", "onError: " + e.getMessage());
|
||||
Log.e("sendRunningApp", "onError: " + e.getMessage());
|
||||
onComplete();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e("SendRunningApp", "onComplete: ");
|
||||
Log.e("sendRunningApp", "onComplete: ");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -55,6 +55,7 @@ public class ContactViewModel extends BaseViewModel<FragmentContactHomeBinding,
|
||||
if (contacts != null) {
|
||||
contacts.addAll(ContactCacheUtils.getInstance().getDatabaseContact());
|
||||
mContactListData.setValue(contacts);
|
||||
|
||||
}
|
||||
}
|
||||
getContact();
|
||||
|
||||
@@ -18,12 +18,16 @@ import androidx.lifecycle.Observer;
|
||||
import com.blankj.utilcode.util.NetworkUtils;
|
||||
import com.hjq.toast.Toaster;
|
||||
import com.jeremyliao.liveeventbus.LiveEventBus;
|
||||
import com.qweather.sdk.bean.weather.WeatherDailyBean;
|
||||
import com.qweather.sdk.bean.weather.WeatherHourlyBean;
|
||||
import com.qweather.sdk.bean.weather.WeatherNowBean;
|
||||
import com.tencent.mmkv.MMKV;
|
||||
import com.xxpatx.os.R;
|
||||
import com.xxpatx.os.activity.alarm.list.AlarmListActivity;
|
||||
import com.xxpatx.os.activity.dailyapp.DailyAppActivity;
|
||||
import com.xxpatx.os.activity.emergency.EmergencyActivity;
|
||||
import com.xxpatx.os.activity.setting.SettingActivity;
|
||||
import com.xxpatx.os.activity.weather.WeatherActivity;
|
||||
import com.xxpatx.os.base.mvvm.fragment.BaseMvvmFragment;
|
||||
import com.xxpatx.os.bean.MapBean;
|
||||
import com.xxpatx.os.bean.SystemSettings;
|
||||
@@ -31,6 +35,8 @@ import com.xxpatx.os.config.CommonConfig;
|
||||
import com.xxpatx.os.databinding.FragmentSettingsBinding;
|
||||
import com.xxpatx.os.manager.AmapManager;
|
||||
import com.xxpatx.os.utils.ApkUtils;
|
||||
import com.xxpatx.os.utils.DayUtils;
|
||||
import com.xxpatx.os.utils.TimeUtils;
|
||||
|
||||
import static com.xxpatx.os.config.CommonConfig.UIUIAIOS_DESKTOP_LOCATION_STATUS;
|
||||
|
||||
@@ -103,11 +109,94 @@ public class SettingsFragment extends BaseMvvmFragment<SettingsViewModel, Fragme
|
||||
mViewDataBinding.clLocation.setVisibility(View.INVISIBLE);
|
||||
mViewDataBinding.tvLocationTips.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
setTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData(Bundle savedInstanceState) {
|
||||
LiveEventBus
|
||||
.get("getWeatherNowKey", WeatherNowBean.NowBaseBean.class)
|
||||
.observe(this, new Observer<WeatherNowBean.NowBaseBean>() {
|
||||
@Override
|
||||
public void onChanged(@Nullable WeatherNowBean.NowBaseBean nowBaseBean) {
|
||||
mViewDataBinding.tvTemp.setText(nowBaseBean.getTemp() + "℃");
|
||||
if (DayUtils.isNight()) {
|
||||
// mViewDataBinding.clWeather.setBackground(mContext.getDrawable(R.drawable.custom_bg_weather_night));
|
||||
} else {
|
||||
switch (nowBaseBean.getIcon()) {
|
||||
default:
|
||||
case "100":
|
||||
case "150":
|
||||
//晴
|
||||
// mViewDataBinding.clWeather.setBackground(mContext.getDrawable(R.drawable.custom_bg_weather));
|
||||
break;
|
||||
case "102":
|
||||
case "152":
|
||||
//少云
|
||||
// mViewDataBinding.clWeather.setBackground(mContext.getDrawable(R.drawable.custom_bg_weather_rain));
|
||||
break;
|
||||
}
|
||||
}
|
||||
// mViewDataBinding.tvWeather.setText(nowBaseBean.getText());
|
||||
}
|
||||
});
|
||||
|
||||
LiveEventBus
|
||||
.get("getWeather24HourlyKey", WeatherHourlyBean.HourlyBean.class)
|
||||
.observe(this, new Observer<WeatherHourlyBean.HourlyBean>() {
|
||||
@Override
|
||||
public void onChanged(@Nullable WeatherHourlyBean.HourlyBean hourlyBean) {
|
||||
String imageName = "he" + hourlyBean.getIcon();
|
||||
Log.e(TAG, "onSuccess: " + imageName);
|
||||
if (isAdded()) {
|
||||
int resId = getResources().getIdentifier(imageName, "drawable", mContext.getPackageName());
|
||||
// Log.e(TAG, "onSuccess: " + resId);
|
||||
// if (resId == 0) {
|
||||
// mViewDataBinding.ivPic.setImageDrawable(mContext.getDrawable(R.drawable.he100));
|
||||
// } else {
|
||||
// mViewDataBinding.ivPic.setImageDrawable(mContext.getDrawable(resId));
|
||||
// }
|
||||
mViewDataBinding.tvTemp.setText(hourlyBean.getTemp() + "℃");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
LiveEventBus
|
||||
.get("getWeather7DKey", WeatherDailyBean.DailyBean.class)
|
||||
.observe(this, new Observer<WeatherDailyBean.DailyBean>() {
|
||||
@Override
|
||||
public void onChanged(@Nullable WeatherDailyBean.DailyBean dailyBean) {
|
||||
mViewDataBinding.tvWeather.setText(dailyBean.getTempMin() + "℃ - " + dailyBean.getTempMax() + "℃");
|
||||
}
|
||||
});
|
||||
|
||||
LiveEventBus
|
||||
.get("time", String.class)
|
||||
.observe(this, new Observer<String>() {
|
||||
@Override
|
||||
public void onChanged(@Nullable String s) {
|
||||
mViewDataBinding.tvTime.setText(s);
|
||||
}
|
||||
});
|
||||
|
||||
LiveEventBus
|
||||
.get("date", String.class)
|
||||
.observe(this, new Observer<String>() {
|
||||
@Override
|
||||
public void onChanged(@Nullable String s) {
|
||||
mViewDataBinding.tvData.setText(s);
|
||||
}
|
||||
});
|
||||
|
||||
LiveEventBus
|
||||
.get("week", String.class)
|
||||
.observe(this, new Observer<String>() {
|
||||
@Override
|
||||
public void onChanged(@Nullable String s) {
|
||||
mViewDataBinding.tvWeek.setText(s);
|
||||
}
|
||||
});
|
||||
|
||||
LiveEventBus.get(CommonConfig.AMAP_LOCATION_MAP_BEAN, MapBean.class)
|
||||
.observe(this, new Observer<MapBean>() {
|
||||
@Override
|
||||
@@ -126,6 +215,12 @@ public class SettingsFragment extends BaseMvvmFragment<SettingsViewModel, Fragme
|
||||
mViewModel.getSetting();
|
||||
}
|
||||
|
||||
private void setTime() {
|
||||
mViewDataBinding.tvTime.setText(TimeUtils.getNowTime(mContext));
|
||||
mViewDataBinding.tvData.setText(TimeUtils.getDateWeek());
|
||||
mViewDataBinding.tvWeek.setText(DayUtils.getWeek());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
@@ -147,13 +242,7 @@ public class SettingsFragment extends BaseMvvmFragment<SettingsViewModel, Fragme
|
||||
}
|
||||
|
||||
private void registerReceivers() {
|
||||
if (mDesktopLocationReceiver == null) {
|
||||
mDesktopLocationReceiver = new DesktopLocationReceiver();
|
||||
}
|
||||
IntentFilter filter = new IntentFilter();
|
||||
filter.setPriority(IntentFilter.SYSTEM_HIGH_PRIORITY);
|
||||
filter.addAction(CommonConfig.UIUIAIOS_UPDATE_DESKTOP_LOCATION);
|
||||
mContext.registerReceiver(mDesktopLocationReceiver, filter);
|
||||
registerDesktopLocationReceiver();
|
||||
}
|
||||
|
||||
private void unregisterReceivers() {
|
||||
@@ -162,6 +251,15 @@ public class SettingsFragment extends BaseMvvmFragment<SettingsViewModel, Fragme
|
||||
}
|
||||
}
|
||||
|
||||
private void registerDesktopLocationReceiver() {
|
||||
if (mDesktopLocationReceiver == null) {
|
||||
mDesktopLocationReceiver = new DesktopLocationReceiver();
|
||||
}
|
||||
IntentFilter filter = new IntentFilter();
|
||||
filter.setPriority(IntentFilter.SYSTEM_HIGH_PRIORITY);
|
||||
filter.addAction(CommonConfig.UIUIAIOS_UPDATE_DESKTOP_LOCATION);
|
||||
mContext.registerReceiver(mDesktopLocationReceiver, filter);
|
||||
}
|
||||
private DesktopLocationReceiver mDesktopLocationReceiver;
|
||||
|
||||
class DesktopLocationReceiver extends BroadcastReceiver {
|
||||
@@ -184,7 +282,15 @@ public class SettingsFragment extends BaseMvvmFragment<SettingsViewModel, Fragme
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class BtnClick {
|
||||
public void openCalendar(View view) {
|
||||
ApkUtils.openApp(mContext, "com.honghui.huangli");
|
||||
}
|
||||
|
||||
public void toWeather(View view) {
|
||||
startActivity(new Intent(mContext, WeatherActivity.class));
|
||||
}
|
||||
|
||||
public void openSettings(View view) {
|
||||
startActivity(new Intent(mContext, SettingActivity.class));
|
||||
|
||||
@@ -36,6 +36,8 @@ public class AppManager {
|
||||
public static final String SERVICE_PACKAGE = "xxpatx.os.service";
|
||||
/*联系人 自定义包名*/
|
||||
public static final String CONTACT_PACKAGE = "xxpatx.os.contact";
|
||||
/*退出 自定义包名*/
|
||||
public static final String EXIT_DESKTOP = "xxpatx.os.exit";
|
||||
|
||||
@SuppressLint("StaticFieldLeak")
|
||||
private static AppManager sInstance;
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.xxpatx.os.manager;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ResolveInfo;
|
||||
import android.provider.MediaStore;
|
||||
import android.util.Log;
|
||||
|
||||
import com.tencent.mmkv.MMKV;
|
||||
import com.xxpatx.os.bean.DockApp;
|
||||
import com.xxpatx.os.config.CommonConfig;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class DesktopIconManager {
|
||||
private static final String TAG = "DesktopIconManager";
|
||||
|
||||
@SuppressLint("StaticFieldLeak")
|
||||
private static DesktopIconManager sInstance;
|
||||
|
||||
|
||||
private Context mContext;
|
||||
private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
|
||||
|
||||
|
||||
private DesktopIconManager(Context context) {
|
||||
if (context == null) {
|
||||
throw new RuntimeException("Context is NULL");
|
||||
}
|
||||
this.mContext = context.getApplicationContext();
|
||||
}
|
||||
|
||||
public static void init(Context context) {
|
||||
if (sInstance == null) {
|
||||
Log.e(TAG, "init: ");
|
||||
sInstance = new DesktopIconManager(context);
|
||||
}
|
||||
}
|
||||
|
||||
public static DesktopIconManager getInstance() {
|
||||
if (sInstance == null) {
|
||||
throw new IllegalStateException("You must be init DesktopIconManager first");
|
||||
}
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
public List<DockApp> getDefaultDockApp() {
|
||||
List<DockApp> dockApps = new ArrayList<>();
|
||||
dockApps.add(new DockApp("xxpatx.os.dialer"));
|
||||
dockApps.add(new DockApp("com.tencent.mm"));
|
||||
dockApps.add(new DockApp("com.ss.android.ugc.aweme"));
|
||||
dockApps.add(new DockApp(getDefaultCameraPackageName()));
|
||||
return dockApps;
|
||||
}
|
||||
|
||||
public String getDefaultCameraPackageName() {
|
||||
Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
List<ResolveInfo> cameras = mContext.getPackageManager().queryIntentActivities(cameraIntent, 0);
|
||||
// 默认情况下,第一个返回的应用就是默认相机
|
||||
if (!cameras.isEmpty()) {
|
||||
return cameras.get(0).activityInfo.packageName;
|
||||
}
|
||||
return "com.android.camera2"; // 没有找到相机应用
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1115,32 +1115,32 @@ public class NetInterfaceManager {
|
||||
void onComplete();
|
||||
}
|
||||
|
||||
public void getSystemSettings(boolean refresh, BehaviorSubject<ActivityEvent> lifecycle, ContactCallback callback) {
|
||||
ConnectMode connectMode = ConnectMode.ONE_MINUTE;
|
||||
if (refresh) {
|
||||
connectMode = ConnectMode.DEFAULT;
|
||||
}
|
||||
if (ConnectManager.getInstance().isNeedConnect(UrlAddress.GET_SETTINGS, connectMode)) {
|
||||
getSystemSettings(lifecycle, callback);
|
||||
} else {
|
||||
String jsonString = mCacheHelper.getAsString(UrlAddress.GET_SETTINGS);
|
||||
//为 "" 是已经请求成功的
|
||||
if (jsonString == null) {
|
||||
getSystemSettings(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 getSystemSettings(boolean refresh, BehaviorSubject<ActivityEvent> lifecycle, ContactCallback callback) {
|
||||
// ConnectMode connectMode = ConnectMode.ONE_MINUTE;
|
||||
// if (refresh) {
|
||||
// connectMode = ConnectMode.DEFAULT;
|
||||
// }
|
||||
// if (ConnectManager.getInstance().isNeedConnect(UrlAddress.GET_SETTINGS, connectMode)) {
|
||||
// getSystemSettings(lifecycle, callback);
|
||||
// } else {
|
||||
// String jsonString = mCacheHelper.getAsString(UrlAddress.GET_SETTINGS);
|
||||
// //为 "" 是已经请求成功的
|
||||
// if (jsonString == null) {
|
||||
// getSystemSettings(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 getSystemSettings(BehaviorSubject<ActivityEvent> lifecycle, ContactCallback callback) {
|
||||
getSettingControl()
|
||||
|
||||
@@ -6,6 +6,8 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.graphics.PixelFormat;
|
||||
import android.media.AudioAttributes;
|
||||
import android.media.SoundPool;
|
||||
import android.os.Build;
|
||||
import android.os.IBinder;
|
||||
import android.os.PowerManager;
|
||||
@@ -73,6 +75,9 @@ public class MainService extends BaseRxService implements MainSContact.MainSView
|
||||
private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
|
||||
public MainSPresenter mPresenter;
|
||||
|
||||
private SoundPool mSoundPool;
|
||||
private HashMap<Integer, Integer> soundMap = new HashMap<>();
|
||||
|
||||
private boolean mFloatWindowEnable;
|
||||
private WindowManager mWindowManager;
|
||||
private View mBallView;
|
||||
@@ -155,6 +160,38 @@ public class MainService extends BaseRxService implements MainSContact.MainSView
|
||||
// ApkUtils.UninstallAPP(this, "com.joytv.live");
|
||||
// ApkUtils.UninstallAPP(this, "com.tencent.android.qqdownloader");
|
||||
|
||||
AudioAttributes attr = new AudioAttributes.Builder().setUsage(AudioAttributes.USAGE_ALARM) // 设置音效使用场景
|
||||
.setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION).build(); // 设置音效的类型
|
||||
mSoundPool = new SoundPool.Builder().setAudioAttributes(attr) // 设置音效池的属性
|
||||
.setMaxStreams(12) // 设置最多可容纳10个音频流
|
||||
.build(); // ①
|
||||
// load方法加载指定音频文件,并返回所加载的音效ID
|
||||
// 此处使用HashMap来管理这些音频流
|
||||
soundMap.put(0, mSoundPool.load(MainService.this, R.raw.time_am12, 1));
|
||||
soundMap.put(1, mSoundPool.load(MainService.this, R.raw.time_am1, 1));
|
||||
soundMap.put(2, mSoundPool.load(MainService.this, R.raw.time_am2, 1));
|
||||
soundMap.put(3, mSoundPool.load(MainService.this, R.raw.time_am3, 1));
|
||||
soundMap.put(4, mSoundPool.load(MainService.this, R.raw.time_am4, 1));
|
||||
soundMap.put(5, mSoundPool.load(MainService.this, R.raw.time_am5, 1));
|
||||
soundMap.put(6, mSoundPool.load(MainService.this, R.raw.time_am6, 1));
|
||||
soundMap.put(7, mSoundPool.load(MainService.this, R.raw.time_am7, 1));
|
||||
soundMap.put(8, mSoundPool.load(MainService.this, R.raw.time_am8, 1));
|
||||
soundMap.put(9, mSoundPool.load(MainService.this, R.raw.time_am9, 1));
|
||||
soundMap.put(10, mSoundPool.load(MainService.this, R.raw.time_am10, 1));
|
||||
soundMap.put(11, mSoundPool.load(MainService.this, R.raw.time_am11, 1));
|
||||
soundMap.put(12, mSoundPool.load(MainService.this, R.raw.time_pm12, 1));
|
||||
soundMap.put(13, mSoundPool.load(MainService.this, R.raw.time_pm1, 1));
|
||||
soundMap.put(14, mSoundPool.load(MainService.this, R.raw.time_pm2, 1));
|
||||
soundMap.put(15, mSoundPool.load(MainService.this, R.raw.time_pm3, 1));
|
||||
soundMap.put(16, mSoundPool.load(MainService.this, R.raw.time_pm4, 1));
|
||||
soundMap.put(17, mSoundPool.load(MainService.this, R.raw.time_pm5, 1));
|
||||
soundMap.put(18, mSoundPool.load(MainService.this, R.raw.time_pm6, 1));
|
||||
soundMap.put(19, mSoundPool.load(MainService.this, R.raw.time_pm7, 1));
|
||||
soundMap.put(20, mSoundPool.load(MainService.this, R.raw.time_pm8, 1));
|
||||
soundMap.put(21, mSoundPool.load(MainService.this, R.raw.time_pm9, 1));
|
||||
soundMap.put(22, mSoundPool.load(MainService.this, R.raw.time_pm10, 1));
|
||||
soundMap.put(23, mSoundPool.load(MainService.this, R.raw.time_pm11, 1));
|
||||
|
||||
mFloatWindowEnable = Settings.Global.getInt(getContentResolver(), CommonConfig.HOVER_HOME, CommonConfig.HOVER_HOME_STATUS) == 1;
|
||||
mWindowManager = (WindowManager) getSystemService(Context.WINDOW_SERVICE);
|
||||
showPopupWindow();
|
||||
@@ -180,6 +217,7 @@ public class MainService extends BaseRxService implements MainSContact.MainSView
|
||||
|
||||
registerAlarmReceiver();
|
||||
registerTimeReceiver();
|
||||
registFastCallReceive();
|
||||
registerLockScreenReceiver();
|
||||
registerOperateAlarmClockReceiver();
|
||||
registerScreenLockReceiver();
|
||||
@@ -228,6 +266,9 @@ public class MainService extends BaseRxService implements MainSContact.MainSView
|
||||
if (mTimeChangedReceiver != null) {
|
||||
unregisterReceiver(mTimeChangedReceiver);
|
||||
}
|
||||
if (mTimeSignalReceiver != null) {
|
||||
unregisterReceiver(mTimeSignalReceiver);
|
||||
}
|
||||
if (lockScreenReceiver != null) {
|
||||
unregisterReceiver(lockScreenReceiver);
|
||||
}
|
||||
@@ -341,6 +382,51 @@ public class MainService extends BaseRxService implements MainSContact.MainSView
|
||||
Log.e(TAG, "TimeChangedReceiver:" + "timezone changed");
|
||||
} else if (Intent.ACTION_TIME_TICK.equals(intent.getAction())) {
|
||||
Log.e(TAG, "TimeChangedReceiver:" + "time tick");
|
||||
hourlyTimeSignal();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void hourlyTimeSignal() {
|
||||
boolean hourly_time = mMMKV.decodeBool(CommonConfig.HOURLY_TIME_SIGNAL_KEY, false);
|
||||
if (hourly_time) {
|
||||
Calendar cal = Calendar.getInstance();
|
||||
int hour = cal.get(Calendar.HOUR_OF_DAY);
|
||||
Log.e(TAG, "hourlyTimeSignal: hour = " + hour);
|
||||
int min = cal.get(Calendar.MINUTE);
|
||||
Log.e(TAG, "hourlyTimeSignal: min = " + min);
|
||||
if (min == 0) {
|
||||
mSoundPool.play(soundMap.get(hour), 1, 1, 0, 0, 1);
|
||||
}
|
||||
} else {
|
||||
Log.e(TAG, "hourlyTimeSignal: not enable hourly time signal");
|
||||
}
|
||||
}
|
||||
|
||||
private void registFastCallReceive() {
|
||||
if (null == mTimeSignalReceiver) {
|
||||
mTimeSignalReceiver = new TimeSignalReceiver();
|
||||
}
|
||||
IntentFilter filter = new IntentFilter();
|
||||
filter.addAction(HOURLY_TIME_SIGNAL_KEY);
|
||||
registerReceiver(mTimeSignalReceiver, filter);
|
||||
}
|
||||
|
||||
private TimeSignalReceiver mTimeSignalReceiver;
|
||||
|
||||
private static final String HOURLY_TIME_SIGNAL_KEY = "hourly_time_signal";
|
||||
|
||||
private class TimeSignalReceiver extends BroadcastReceiver {
|
||||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
String action = intent.getAction();
|
||||
Log.e("TimeSignalReceiver", "onReceive: " + action);
|
||||
if (HOURLY_TIME_SIGNAL_KEY.equals(action)) {
|
||||
int hour_notify = intent.getIntExtra("hour_notify", 0);
|
||||
Log.e("TimeSignalReceiver", "onReceive: hour_notify = " + hour_notify);
|
||||
mMMKV.encode(CommonConfig.HOURLY_TIME_SIGNAL_KEY, hour_notify == 1);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,9 +10,11 @@ import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageInstaller;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.ResolveInfo;
|
||||
import android.content.res.Configuration;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Binder;
|
||||
import android.os.Build;
|
||||
import android.os.SystemProperties;
|
||||
import android.provider.Settings;
|
||||
import android.text.TextUtils;
|
||||
import android.util.ArraySet;
|
||||
@@ -447,6 +449,14 @@ public class ApkUtils {
|
||||
desktopIcons.add(contactIcon);
|
||||
}
|
||||
|
||||
if (isTablet()) {
|
||||
DesktopIcon exitIcon = new DesktopIcon();
|
||||
// exitIcon.setIcon(context.getDrawable(R.drawable.exit_icon));
|
||||
exitIcon.setTitle("退出桌面");
|
||||
exitIcon.setPackage(AppManager.EXIT_DESKTOP);
|
||||
desktopIcons.add(exitIcon);
|
||||
}
|
||||
|
||||
List<ShortcutPkgInfo> shortcutPkgInfos = ShortcutUtils.getInstance().getShortcutList();
|
||||
desktopIcons.addAll(shortcutPkgInfos);
|
||||
|
||||
@@ -454,6 +464,21 @@ public class ApkUtils {
|
||||
return desktopIcons;
|
||||
}
|
||||
|
||||
/*https://dev.mi.com/console/doc/detail?pId=2768*/
|
||||
public static boolean isTablet() {
|
||||
Log.e(TAG, "isTablet: " + SystemProperties.get("ro.build.characteristics"));
|
||||
Log.e(TAG, "isTablet: " + Utils.getProperty("ro.build.characteristics", "unknow"));
|
||||
/**应用需反射调用*/
|
||||
return SystemProperties.get("ro.build.characteristics").contains("tablet");
|
||||
}
|
||||
|
||||
public static boolean isTablet(Context context) {
|
||||
boolean isTablet = (context.getResources().getConfiguration().screenLayout
|
||||
& Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_LARGE;
|
||||
Log.e(TAG, "isTablet: " + isTablet);
|
||||
return isTablet;
|
||||
}
|
||||
|
||||
public static boolean isSystemApp(Context context, String pkg) {
|
||||
PackageManager pm = context.getPackageManager();
|
||||
ApplicationInfo applicationInfo = null;
|
||||
|
||||
344
app/src/main/java/com/xxpatx/os/utils/StatusBarUtil.java
Normal file
344
app/src/main/java/com/xxpatx/os/utils/StatusBarUtil.java
Normal file
@@ -0,0 +1,344 @@
|
||||
package com.xxpatx.os.utils;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Color;
|
||||
import android.os.Build;
|
||||
import android.os.Environment;
|
||||
import android.text.TextUtils;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.Display;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Properties;
|
||||
|
||||
public class StatusBarUtil {
|
||||
public static int screenWidth;
|
||||
public static int screenHeight;
|
||||
public static int navigationHeight = 0;
|
||||
|
||||
private static DisplayMetrics mMetrics;
|
||||
public static final String HOME_CURRENT_TAB_POSITION = "HOME_CURRENT_TAB_POSITION";
|
||||
|
||||
public static final String SYS_EMUI = "sys_emui";
|
||||
public static final String SYS_MIUI = "sys_miui";
|
||||
public static final String SYS_FLYME = "sys_flyme";
|
||||
private static final String KEY_MIUI_VERSION_CODE = "ro.miui.ui.version.code";
|
||||
private static final String KEY_MIUI_VERSION_NAME = "ro.miui.ui.version.name";
|
||||
private static final String KEY_MIUI_INTERNAL_STORAGE = "ro.miui.internal.storage";
|
||||
private static final String KEY_EMUI_API_LEVEL = "ro.build.hw_emui_api_level";
|
||||
private static final String KEY_EMUI_VERSION = "ro.build.version.emui";
|
||||
private static final String KEY_EMUI_CONFIG_HW_SYS_VERSION = "ro.confg.hw_systemversion";
|
||||
|
||||
public static void init(Activity activity) {
|
||||
ViewGroup contentLayout = activity.getWindow().getDecorView().findViewById(Window.ID_ANDROID_CONTENT);
|
||||
StatusBarUtil.setStatusBar(activity, false, true);
|
||||
StatusBarUtil.setStatusTextColor(true, activity);
|
||||
StatusBarUtil.setStatusBarPadding(activity, contentLayout);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
activity.getWindow().setStatusBarColor(activity.getResources().getColor(android.R.color.transparent));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过反射的方式获取状态栏高度
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static int getStatusBarHeight(Context context) {
|
||||
try {
|
||||
Class<?> c = Class.forName("com.android.internal.R$dimen");
|
||||
Object obj = c.newInstance();
|
||||
Field field = c.getField("status_bar_height");
|
||||
int x = Integer.parseInt(field.get(obj).toString());
|
||||
return context.getResources().getDimensionPixelSize(x);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取底部导航栏高度
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static int getNavigationBarHeight(Context context) {
|
||||
Resources resources = context.getResources();
|
||||
int resourceId = resources.getIdentifier("navigation_bar_height", "dimen", "android");
|
||||
//获取NavigationBar的高度
|
||||
navigationHeight = resources.getDimensionPixelSize(resourceId);
|
||||
return navigationHeight;
|
||||
}
|
||||
|
||||
//获取是否存在NavigationBar
|
||||
public static boolean checkDeviceHasNavigationBar(Context context) {
|
||||
boolean hasNavigationBar = false;
|
||||
Resources rs = context.getResources();
|
||||
int id = rs.getIdentifier("config_showNavigationBar", "bool", "android");
|
||||
if (id > 0) {
|
||||
hasNavigationBar = rs.getBoolean(id);
|
||||
}
|
||||
try {
|
||||
Class systemPropertiesClass = Class.forName("android.os.SystemProperties");
|
||||
Method m = systemPropertiesClass.getMethod("get", String.class);
|
||||
String navBarOverride = (String) m.invoke(systemPropertiesClass, "qemu.hw.mainkeys");
|
||||
if ("1".equals(navBarOverride)) {
|
||||
hasNavigationBar = false;
|
||||
} else if ("0".equals(navBarOverride)) {
|
||||
hasNavigationBar = true;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
return hasNavigationBar;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param activity
|
||||
* @param useThemestatusBarColor 是否要状态栏的颜色,不设置则为透明色
|
||||
* @param withoutUseStatusBarColor 是否不需要使用状态栏为暗色调
|
||||
*/
|
||||
public static void setStatusBar(Activity activity, boolean useThemestatusBarColor, boolean withoutUseStatusBarColor) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {//5.0及以上
|
||||
View decorView = activity.getWindow().getDecorView();
|
||||
int option = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
||||
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE;
|
||||
decorView.setSystemUiVisibility(option);
|
||||
if (useThemestatusBarColor) {
|
||||
activity.getWindow().setStatusBarColor(activity.getResources().getColor(android.R.color.white));
|
||||
} else {
|
||||
activity.getWindow().setStatusBarColor(Color.TRANSPARENT);
|
||||
}
|
||||
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {//4.4到5.0
|
||||
WindowManager.LayoutParams localLayoutParams = activity.getWindow().getAttributes();
|
||||
localLayoutParams.flags = (WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS | localLayoutParams.flags);
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && !withoutUseStatusBarColor) {
|
||||
activity.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
|
||||
}
|
||||
}
|
||||
|
||||
public static void reMeasure(Activity activity) {
|
||||
Display display = activity.getWindowManager().getDefaultDisplay();
|
||||
mMetrics = new DisplayMetrics();
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 17) {
|
||||
display.getRealMetrics(mMetrics);
|
||||
} else {
|
||||
display.getMetrics(mMetrics);
|
||||
}
|
||||
|
||||
screenWidth = mMetrics.widthPixels;
|
||||
screenHeight = mMetrics.heightPixels;
|
||||
}
|
||||
|
||||
/**
|
||||
* 改变魅族的状态栏字体为黑色,要求FlyMe4以上
|
||||
*/
|
||||
private static void processFlyMe(boolean isLightStatusBar, Activity activity) {
|
||||
WindowManager.LayoutParams lp = activity.getWindow().getAttributes();
|
||||
try {
|
||||
Class<?> instance = Class.forName("android.view.WindowManager$LayoutParams");
|
||||
int value = instance.getDeclaredField("MEIZU_FLAG_DARK_STATUS_BAR_ICON").getInt(lp);
|
||||
Field field = instance.getDeclaredField("meizuFlags");
|
||||
field.setAccessible(true);
|
||||
int origin = field.getInt(lp);
|
||||
if (isLightStatusBar) {
|
||||
field.set(lp, origin | value);
|
||||
} else {
|
||||
field.set(lp, (~value) & origin);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 改变小米的状态栏字体颜色为黑色, 要求MIUI6以上 lightStatusBar为真时表示黑色字体
|
||||
*/
|
||||
private static void processMIUI(boolean lightStatusBar, Activity activity) {
|
||||
Class<? extends Window> clazz = activity.getWindow().getClass();
|
||||
try {
|
||||
int darkModeFlag;
|
||||
Class<?> layoutParams = Class.forName("android.view.MiuiWindowManager$LayoutParams");
|
||||
Field field = layoutParams.getField("EXTRA_FLAG_STATUS_BAR_DARK_MODE");
|
||||
darkModeFlag = field.getInt(layoutParams);
|
||||
Method extraFlagField = clazz.getMethod("setExtraFlags", int.class, int.class);
|
||||
extraFlagField.invoke(activity.getWindow(), lightStatusBar ? darkModeFlag : 0, darkModeFlag);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置OPPO手机状态栏字体为黑色(colorOS3.0,6.0以下部分手机)
|
||||
*
|
||||
* @param lightStatusBar
|
||||
* @param activity
|
||||
*/
|
||||
private static final int SYSTEM_UI_FLAG_OP_STATUS_BAR_TINT = 0x00000010;
|
||||
|
||||
private static void setOPPOStatusTextColor(boolean lightStatusBar, Activity activity) {
|
||||
Window window = activity.getWindow();
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
|
||||
int vis = window.getDecorView().getSystemUiVisibility();
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
if (lightStatusBar) {
|
||||
vis |= View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
|
||||
} else {
|
||||
vis &= ~View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
|
||||
}
|
||||
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
if (lightStatusBar) {
|
||||
vis |= SYSTEM_UI_FLAG_OP_STATUS_BAR_TINT;
|
||||
} else {
|
||||
vis &= ~SYSTEM_UI_FLAG_OP_STATUS_BAR_TINT;
|
||||
}
|
||||
}
|
||||
window.getDecorView().setSystemUiVisibility(vis);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 判断手机是否是小米
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static boolean isMIUI() {
|
||||
return SYS_MIUI.equals(getSystem());
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断手机是否是魅族
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static boolean isFlyme() {
|
||||
try {
|
||||
// Invoke Build.hasSmartBar()
|
||||
final Method method = Build.class.getMethod("hasSmartBar");
|
||||
return method != null;
|
||||
} catch (final Exception e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置状态栏文字色值为深色调
|
||||
*
|
||||
* @param useDart 是否使用深色调
|
||||
* @param activity
|
||||
*/
|
||||
public static void setStatusTextColor(boolean useDart, Activity activity) {
|
||||
if (isFlyme()) {
|
||||
processFlyMe(useDart, activity);
|
||||
} else if (isMIUI()) {
|
||||
processMIUI(useDart, activity);
|
||||
} else if (Build.MANUFACTURER.equalsIgnoreCase("OPPO")) {
|
||||
//OPPO
|
||||
setOPPOStatusTextColor(useDart, activity);
|
||||
} else {
|
||||
if (useDart) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
activity.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
|
||||
}
|
||||
} else {
|
||||
activity.getWindow().getDecorView().setSystemUiVisibility(
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
|
||||
}
|
||||
activity.getWindow().getDecorView().findViewById(android.R.id.content).setPadding(0, 0, 0, navigationHeight);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 作者:Loyea
|
||||
* 链接:https://www.jianshu.com/p/abd021c22728
|
||||
* 來源:简书
|
||||
* 简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。
|
||||
*/
|
||||
public static void setAndroidNativeLightStatusBar(Activity activity, boolean dark) {
|
||||
View decor = activity.getWindow().getDecorView();
|
||||
if (dark) {
|
||||
decor.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
|
||||
} else {
|
||||
// We want to change tint color to white again.
|
||||
// You can also record the flags in advance so that you can turn UI back completely if
|
||||
// you have set other flags before, such as translucent or full screen.
|
||||
decor.setSystemUiVisibility(0);
|
||||
}
|
||||
}
|
||||
|
||||
public static String getSystem() {
|
||||
String SYS = "";
|
||||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.N_MR1) {
|
||||
if (!TextUtils.isEmpty(getSystemProperty(KEY_MIUI_VERSION_CODE, ""))
|
||||
|| !TextUtils.isEmpty(getSystemProperty(KEY_MIUI_VERSION_NAME, ""))
|
||||
|| !TextUtils.isEmpty(getSystemProperty(KEY_MIUI_INTERNAL_STORAGE, ""))) {
|
||||
SYS = SYS_MIUI;//小米
|
||||
} else if (!TextUtils.isEmpty(getSystemProperty(KEY_EMUI_API_LEVEL, ""))
|
||||
|| !TextUtils.isEmpty(getSystemProperty(KEY_EMUI_VERSION, ""))
|
||||
|| !TextUtils.isEmpty(getSystemProperty(KEY_EMUI_CONFIG_HW_SYS_VERSION, ""))) {
|
||||
SYS = SYS_EMUI;//华为
|
||||
} else if (getMeizuFlymeOSFlag().toLowerCase().contains("flyme")) {
|
||||
SYS = SYS_FLYME;//魅族
|
||||
}
|
||||
return SYS;
|
||||
} else {
|
||||
try {
|
||||
Properties prop = new Properties();
|
||||
prop.load(new FileInputStream(new File(Environment.getRootDirectory(), "build.prop")));
|
||||
if (prop.getProperty(KEY_MIUI_VERSION_CODE, null) != null
|
||||
|| prop.getProperty(KEY_MIUI_VERSION_NAME, null) != null
|
||||
|| prop.getProperty(KEY_MIUI_INTERNAL_STORAGE, null) != null) {
|
||||
SYS = SYS_MIUI;//小米
|
||||
} else if (prop.getProperty(KEY_EMUI_API_LEVEL, null) != null
|
||||
|| prop.getProperty(KEY_EMUI_VERSION, null) != null
|
||||
|| prop.getProperty(KEY_EMUI_CONFIG_HW_SYS_VERSION, null) != null) {
|
||||
SYS = SYS_EMUI;//华为
|
||||
} else if (getMeizuFlymeOSFlag().toLowerCase().contains("flyme")) {
|
||||
SYS = SYS_FLYME;//魅族
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return SYS;
|
||||
} finally {
|
||||
return SYS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static String getSystemProperty(String key, String defaultValue) {
|
||||
try {
|
||||
Class<?> clz = Class.forName("android.os.SystemProperties");
|
||||
Method get = clz.getMethod("get", String.class, String.class);
|
||||
return (String) get.invoke(clz, key, defaultValue);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
public static String getMeizuFlymeOSFlag() {
|
||||
return getSystemProperty("ro.build.display.id", "");
|
||||
}
|
||||
|
||||
/**
|
||||
* 全屏模式下 针对刘海屏向下移动view
|
||||
*
|
||||
* @param context
|
||||
* @param view 需要设置padding的view
|
||||
*/
|
||||
public static void setStatusBarPadding(Context context, View view) {
|
||||
if (view != null) {
|
||||
view.setPadding(0, getStatusBarHeight(context), 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
404
app/src/main/res/layout-sw700dp/activity_add_contact.xml
Normal file
404
app/src/main/res/layout-sw700dp/activity_add_contact.xml
Normal file
@@ -0,0 +1,404 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".activity.contact.AddContactActivity">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="click"
|
||||
type="com.xxpatx.os.activity.contact.AddContactActivity.BtnClick" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#FAF8F8">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_exit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:background="@drawable/general_setting_bg"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_cancel"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:onClick="@{click::exit}"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/add_contact_back"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="新建联系人"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp"
|
||||
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:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/cl_bottom"
|
||||
app:layout_constraintTop_toBottomOf="@+id/cl_exit">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toTopOf="@+id/constraintLayout27"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.shehuan.niv.NiceImageView
|
||||
android:id="@+id/nv_avatar"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:onClick="@{click::selectPic}"
|
||||
android:src="@drawable/default_avatar"
|
||||
app:is_circle="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:layout_margin="8dp"
|
||||
android:background="@drawable/add_wechat_contact_background">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView7"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/icon_avatar"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView18"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:background="@null"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="姓名"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@null"
|
||||
android:ellipsize="end"
|
||||
android:hint="请输入微信昵称"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/ok_button"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/textView18"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:layout_margin="8dp"
|
||||
android:background="@drawable/add_wechat_contact_background">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView9"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/icon_phone"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView19"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:background="@null"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="号码"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_phone"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@null"
|
||||
android:ellipsize="end"
|
||||
android:hint="请输入手机号码"
|
||||
android:inputType="phone"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/ok_button"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/textView19"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:layout_margin="8dp"
|
||||
android:background="@drawable/add_wechat_contact_background">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView11"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/icon_avatar"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView30"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:background="@null"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="微信"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_tag"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@null"
|
||||
android:ellipsize="end"
|
||||
android:hint="请输入微信标签"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/ok_button"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/textView30"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:layout_margin="8dp"
|
||||
android:background="@drawable/add_wechat_contact_background">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:text="设为紧急联系人"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.xxpatx.os.view.ToggleButton
|
||||
android:id="@+id/toggleButton"
|
||||
android:layout_width="37dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_margin="8dp"
|
||||
android:background="@drawable/add_wechat_contact_background"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:text="保存到SIM卡"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.xxpatx.os.view.ToggleButton
|
||||
android:id="@+id/tb_sim"
|
||||
android:layout_width="37dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_margin="8dp"
|
||||
android:background="@drawable/add_wechat_contact_background"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView8"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/icon_phone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_wechat_id"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@null"
|
||||
android:ellipsize="end"
|
||||
android:hint="微信号码(可空)"
|
||||
android:inputType="phone"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/white"
|
||||
android:textColorHint="@color/gray"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/imageView8"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout27"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:layout_margin="8dp"
|
||||
android:background="@drawable/add_contact_confirm_background"
|
||||
android:onClick="@{click::addContact}"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@null"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="保存"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
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_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
285
app/src/main/res/layout-sw700dp/activity_main.xml
Normal file
285
app/src/main/res/layout-sw700dp/activity_main.xml
Normal file
@@ -0,0 +1,285 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".activity.main.MainActivity">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="click"
|
||||
type="com.xxpatx.os.activity.main.MainActivity.BtnClick" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/main_background" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/cl_docker"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/viewPager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/magicIndicator"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<net.lucode.hackware.magicindicator.MagicIndicator
|
||||
android:id="@+id/magicIndicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="16dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_docker"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="72dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/cl_bottom"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<GridView
|
||||
android:id="@+id/gridView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:numColumns="auto_fit"
|
||||
android:orientation="horizontal"
|
||||
android:stretchMode="columnWidth"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout7"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_0"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:onClick="@{click::dialer}">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_icon0"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/home_icon_dialer"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.3" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/bg0"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="56dp"
|
||||
android:layout_marginBottom="56dp"
|
||||
android:background="@drawable/badge_bg"
|
||||
android:gravity="center"
|
||||
android:minWidth="24dp"
|
||||
android:text="9"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv_icon0"
|
||||
app:layout_constraintStart_toStartOf="@+id/iv_icon0" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_appname10"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="拨号"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="@+id/iv_icon0"
|
||||
app:layout_constraintStart_toStartOf="@+id/iv_icon0"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_icon0" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:onClick="@{click::wechat}"
|
||||
android:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_icon1"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/home_icon_wechat"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.3" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/bg1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="56dp"
|
||||
android:layout_marginBottom="56dp"
|
||||
android:background="@drawable/badge_bg"
|
||||
android:gravity="center"
|
||||
android:minWidth="24dp"
|
||||
android:text="9"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv_icon1"
|
||||
app:layout_constraintStart_toStartOf="@+id/iv_icon1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_appname1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="微信"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="@+id/iv_icon1"
|
||||
app:layout_constraintStart_toStartOf="@+id/iv_icon1"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_icon1" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:onClick="@{click::toTiktok}"
|
||||
android:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_icon2"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/home_icon_tiktok"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.3" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/bg2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="56dp"
|
||||
android:layout_marginBottom="56dp"
|
||||
android:background="@drawable/badge_bg"
|
||||
android:gravity="center"
|
||||
android:minWidth="24dp"
|
||||
android:text="9"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv_icon2"
|
||||
app:layout_constraintStart_toStartOf="@+id/iv_icon2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_appname2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="抖音"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="@+id/iv_icon2"
|
||||
app:layout_constraintStart_toStartOf="@+id/iv_icon2"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_icon2" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:onClick="@{click::toCamera}"
|
||||
android:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_icon3"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/com_android_camera"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.3" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_appname3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="相机"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="@+id/iv_icon3"
|
||||
app:layout_constraintStart_toStartOf="@+id/iv_icon3"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_icon3" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
646
app/src/main/res/layout-sw700dp/activity_setting.xml
Normal file
646
app/src/main/res/layout-sw700dp/activity_setting.xml
Normal file
@@ -0,0 +1,646 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".activity.setting.SettingActivity">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="click"
|
||||
type="com.xxpatx.os.activity.setting.SettingActivity.BtnClick" />
|
||||
|
||||
<variable
|
||||
name="float_window_enable"
|
||||
type="Boolean" />
|
||||
|
||||
<variable
|
||||
name="voice_broadcast"
|
||||
type="Boolean" />
|
||||
|
||||
<variable
|
||||
name="auto_accept"
|
||||
type="Boolean" />
|
||||
|
||||
<variable
|
||||
name="dial_tone"
|
||||
type="Boolean" />
|
||||
|
||||
<variable
|
||||
name="status_bar"
|
||||
type="Boolean" />
|
||||
|
||||
<variable
|
||||
name="versionName"
|
||||
type="String" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:background="@drawable/general_setting_bg"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="通用设置"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="23sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_confirm"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/icon_confirm"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/constraintLayout3">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:onClick="@{click::openFloat}">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:maxLines="1"
|
||||
android:text="悬浮按钮"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="22sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:maxLines="1"
|
||||
android:text='@{float_window_enable?"已开启":"未开启"}'
|
||||
android:textColor="@{float_window_enable?@color/setting_enable_color:@color/setting_disable_color}"
|
||||
android:textSize="22sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="已开启"
|
||||
tools:textColor="@color/setting_enable_color" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/lightGray"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:onClick="@{click::voiceBroadcast}">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:maxLines="1"
|
||||
android:text="短信语音播报"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="22sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:maxLines="1"
|
||||
android:text='@{voice_broadcast?"已开启":"未开启"}'
|
||||
android:textColor="@{voice_broadcast?@color/setting_enable_color:@color/setting_disable_color}"
|
||||
android:textSize="22sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="未开启" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/lightGray"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:onClick="@{click::autoAccept}">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:maxLines="1"
|
||||
android:text="微信自动接听"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="22sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:maxLines="1"
|
||||
android:text='@{auto_accept?"已开启":"未开启"}'
|
||||
android:textColor="@{auto_accept?@color/setting_enable_color:@color/setting_disable_color}"
|
||||
android:textSize="22sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="未开启" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/lightGray"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:onClick="@{click::setDialTone}">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:maxLines="1"
|
||||
android:text="拨号提示音"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="22sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:maxLines="1"
|
||||
android:text='@{dial_tone?"已开启":"未开启"}'
|
||||
android:textColor="@{dial_tone?@color/setting_enable_color:@color/setting_disable_color}"
|
||||
android:textSize="22sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="未开启" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/lightGray"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:onClick="@{click::setStatusBar}">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:maxLines="1"
|
||||
android:text="通知栏开关"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="22sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:maxLines="1"
|
||||
android:text='@{status_bar?"已开启":"未开启"}'
|
||||
android:textColor="@{status_bar?@color/setting_enable_color:@color/setting_disable_color}"
|
||||
android:textSize="22sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="未开启" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/lightGray"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:onClick="@{click::setSimCard}">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:maxLines="1"
|
||||
android:text="拨号设置"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="22sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:maxLines="1"
|
||||
android:text="未开启"
|
||||
android:textColor="@color/setting_disable_color"
|
||||
android:textSize="22sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/icon_more"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/lightGray"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:onClick="@{click::toInternet}">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:maxLines="1"
|
||||
android:text="网络设置"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="22sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:maxLines="1"
|
||||
android:text="未开启"
|
||||
android:textColor="@color/setting_disable_color"
|
||||
android:textSize="22sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/icon_more"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/lightGray"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:onClick="@{click::toFont}">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:maxLines="1"
|
||||
android:text="亮度字体设置"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="22sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:maxLines="1"
|
||||
android:text="未开启"
|
||||
android:textColor="@color/setting_disable_color"
|
||||
android:textSize="22sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/icon_more"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/lightGray"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:onClick="@{click::toTouch}">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:maxLines="1"
|
||||
android:text="防误触设置"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="22sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:maxLines="1"
|
||||
android:text="未开启"
|
||||
android:textColor="@color/setting_disable_color"
|
||||
android:textSize="22sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/icon_more"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/lightGray"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:onClick="@{click::toDockSetting}">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:maxLines="1"
|
||||
android:text="快捷图标设置"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="22sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:maxLines="1"
|
||||
android:text="未开启"
|
||||
android:textColor="@color/setting_disable_color"
|
||||
android:textSize="22sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/icon_more"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/lightGray"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:onClick="@{click::toSettings}">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:maxLines="1"
|
||||
android:text="系统其他设置"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="22sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:maxLines="1"
|
||||
android:text="未开启"
|
||||
android:textColor="@color/setting_disable_color"
|
||||
android:textSize="22sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/icon_more"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/lightGray"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:onClick="@{click::checkupdate}">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:maxLines="1"
|
||||
android:text="检测更新"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="22sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:text="@{versionName}"
|
||||
android:textColor="@color/setting_disable_color"
|
||||
android:textSize="23sp"
|
||||
android:layout_marginEnd="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/imageView13"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView13"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/icon_more"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/lightGray"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
78
app/src/main/res/layout-sw700dp/activity_sim_card.xml
Normal file
78
app/src/main/res/layout-sw700dp/activity_sim_card.xml
Normal file
@@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:context=".activity.sim.SimCardActivity">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="click"
|
||||
type="com.xxpatx.os.activity.sim.SimCardActivity.BtnClick" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:background="@drawable/general_setting_bg"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_cancel"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:onClick="@{click::exit}"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/add_contact_back"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="默认拨号设置"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="23sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_confirm"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/icon_confirm"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:background="@color/white"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/constraintLayout3" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
244
app/src/main/res/layout-sw700dp/activity_touch.xml
Normal file
244
app/src/main/res/layout-sw700dp/activity_touch.xml
Normal file
@@ -0,0 +1,244 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".activity.setting.TouchActivity">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="click"
|
||||
type="com.xxpatx.os.activity.setting.TouchActivity.BtnClick" />
|
||||
|
||||
<variable
|
||||
name="disable_key"
|
||||
type="Boolean" />
|
||||
|
||||
<variable
|
||||
name="disable_contact"
|
||||
type="Boolean" />
|
||||
|
||||
<variable
|
||||
name="disable_clock"
|
||||
type="Boolean" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:background="@drawable/general_setting_bg"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="防止误触设置"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="23sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_confirm"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/icon_confirm"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/constraintLayout3">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:onClick="@{click::disableVolumeKey}">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:maxLines="1"
|
||||
android:text="音量键禁用"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="22sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:maxLines="1"
|
||||
android:text='@{disable_key?"已开启":"未开启"}'
|
||||
android:textColor="@{disable_key?@color/setting_enable_color:@color/setting_disable_color}"
|
||||
android:textSize="22sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="未开启" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/lightGray"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:onClick="@{click::disableContactModify}">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:maxLines="1"
|
||||
android:text="修改联系人禁用"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="22sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:maxLines="1"
|
||||
android:text='@{disable_contact?"已开启":"未开启"}'
|
||||
android:textColor="@{disable_contact?@color/setting_enable_color:@color/setting_disable_color}"
|
||||
android:textSize="22sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="未开启" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/lightGray"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="80dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:maxLines="1"
|
||||
android:text="设置访问禁用"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="22sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:maxLines="1"
|
||||
android:text="未开启"
|
||||
android:textColor="@color/setting_disable_color"
|
||||
android:textSize="22sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/lightGray"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:onClick="@{click::disableClockModify}">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:maxLines="1"
|
||||
android:text="闹钟设置禁用"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="22sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:maxLines="1"
|
||||
android:text='@{disable_clock?"已开启":"未开启"}'
|
||||
android:textColor="@{disable_clock?@color/setting_enable_color:@color/setting_disable_color}"
|
||||
android:textSize="22sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="未开启" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/lightGray"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
71
app/src/main/res/layout-sw700dp/fragment_applist.xml
Normal file
71
app/src/main/res/layout-sw700dp/fragment_applist.xml
Normal file
@@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".fragment.app.AppListFragment">
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="330dp"
|
||||
android:layout_height="400dp"
|
||||
android:layout_marginTop="20dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.xxpatx.os.view.MyGridLayout
|
||||
android:id="@+id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="2px"
|
||||
android:layout_marginTop="2px"
|
||||
android:layout_marginEnd="2px"
|
||||
android:layout_marginBottom="2px"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:layout_width="2px"-->
|
||||
<!-- android:layout_height="0dp"-->
|
||||
<!-- android:background="@color/line_color"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:layout_width="2px"-->
|
||||
<!-- android:layout_height="0dp"-->
|
||||
<!-- android:background="@color/line_color"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="2px"-->
|
||||
<!-- android:background="@color/line_color"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="2px"-->
|
||||
<!-- android:background="@color/line_color"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent" />-->
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
208
app/src/main/res/layout-sw700dp/fragment_contact_home.xml
Normal file
208
app/src/main/res/layout-sw700dp/fragment_contact_home.xml
Normal file
@@ -0,0 +1,208 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".fragment.contact.ContactFragment">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="click"
|
||||
type="com.xxpatx.os.fragment.contact.ContactFragment.BtnClick" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="330dp"
|
||||
android:layout_height="400dp"
|
||||
android:layout_marginTop="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
|
||||
android:id="@+id/cl_weather"
|
||||
android:layout_width="330dp"
|
||||
android:layout_height="165dp"
|
||||
android:onClick="@{click::toWeather}"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="44sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="00:00" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_data"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_time"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_time"
|
||||
tools:text="20230621" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_week"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_data"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_data"
|
||||
tools:text="20230621" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout26"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_temp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:text="--℃"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="40sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="0℃" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_weather"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="--"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_temp"
|
||||
tools:text="天气" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_weather">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView11"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/home_icon_location"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_location"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="--"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/imageView11"
|
||||
app:layout_constraintStart_toEndOf="@+id/imageView11"
|
||||
app:layout_constraintTop_toTopOf="@+id/imageView11"
|
||||
tools:text="位置" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_contact"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/cl_weather" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_nodata"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/cl_weather">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_no_contact"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:gravity="center"
|
||||
android:text="暂无联系人"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tv_add"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_add"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:background="@drawable/fragment_add_contact_background"
|
||||
android:gravity="center"
|
||||
android:onClick="@{click::toAdd}"
|
||||
android:text="添加联系人"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
403
app/src/main/res/layout-sw700dp/fragment_home.xml
Normal file
403
app/src/main/res/layout-sw700dp/fragment_home.xml
Normal file
@@ -0,0 +1,403 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".fragment.home.HomeFragment">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="click"
|
||||
type="com.xxpatx.os.fragment.home.HomeFragment.BtnClick" />
|
||||
|
||||
<variable
|
||||
name="flashing"
|
||||
type="Boolean" />
|
||||
</data>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="330dp"
|
||||
android:layout_height="400dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_weather"
|
||||
android:layout_width="330dp"
|
||||
android:layout_height="165dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="@{click::openCalendar}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="44sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="00:00" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_data"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_time"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_time"
|
||||
tools:text="20230621" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_week"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_data"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_data"
|
||||
tools:text="20230621" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout26"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:onClick="@{click::toWeather}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_temp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:text="--℃"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="40sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="0℃" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_weather"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="--"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_temp"
|
||||
tools:text="天气" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_weather">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView11"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/home_icon_location"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_location"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="--"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/imageView11"
|
||||
app:layout_constraintStart_toEndOf="@+id/imageView11"
|
||||
app:layout_constraintTop_toTopOf="@+id/imageView11"
|
||||
tools:text="位置" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="89dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:background="@drawable/card_bindsn_background"
|
||||
android:onClick="@{click::toSn}"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/home_icon_accessibility"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@+id/textView19"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView19"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="辅助功能"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="17sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="89dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:background="@drawable/card_add_contact_background"
|
||||
android:onClick="@{click::addContact}"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/home_icon_family_space"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@+id/textView10"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView10"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="家庭空间"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="17sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="89dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:background="@drawable/card_wifi_background"
|
||||
android:onClick="@{click::openWifi}"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@{flashing?@drawable/home_icon_light_on:@drawable/home_icon_light_off}"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@+id/textView18"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView18"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="手电筒"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="17sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="89dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:background="@drawable/card_flashlight_background"
|
||||
android:onClick="@{click::openFlash}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/cl_contact">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView31"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="应用市场"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="17sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/home_icon_appstore"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@+id/textView31"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="89dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:background="@drawable/card_calendar_background"
|
||||
android:onClick="@{click::openCalendar}"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_app"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="更多应用"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="17sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/home_icon_app"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tv_app"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="89dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:background="@drawable/card_network_background"
|
||||
android:onClick="@{click::openNetwork}"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintStart_toEndOf="@+id/cl_space"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/home_icon_clock"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@+id/textView3"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="闹钟"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="17sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</FrameLayout>
|
||||
</layout>
|
||||
482
app/src/main/res/layout-sw700dp/fragment_settings.xml
Normal file
482
app/src/main/res/layout-sw700dp/fragment_settings.xml
Normal file
@@ -0,0 +1,482 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".fragment.settings.SettingsFragment">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="click"
|
||||
type="com.xxpatx.os.fragment.settings.SettingsFragment.BtnClick" />
|
||||
|
||||
<variable
|
||||
name="systemSettings"
|
||||
type="com.xxpatx.os.bean.SystemSettings" />
|
||||
|
||||
<import type="android.view.View" />
|
||||
</data>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="330dp"
|
||||
android:layout_height="400dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_weather"
|
||||
android:layout_width="330dp"
|
||||
android:layout_height="165dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="@{click::openCalendar}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="44sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="00:00" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_data"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_time"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_time"
|
||||
tools:text="20230621" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_week"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_data"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_data"
|
||||
tools:text="20230621" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout26"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:onClick="@{click::toWeather}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_temp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:text="--℃"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="40sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="0℃" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_weather"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="--"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_temp"
|
||||
tools:text="天气" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_weather">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView11"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/home_icon_location"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_location"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="--"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/imageView11"
|
||||
app:layout_constraintStart_toEndOf="@+id/imageView11"
|
||||
app:layout_constraintTop_toTopOf="@+id/imageView11"
|
||||
tools:text="位置" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="89dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:background="@drawable/card_accessibility_background"
|
||||
android:onClick="@{click::openSettings}"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/setting_icon_bind"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@+id/textView21"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView21"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="设备绑定"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="17sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="89dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:background="@drawable/card_family_background"
|
||||
android:onClick="@{click::toVideoplayer}"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/setting_icon_add_contact"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@+id/textView22"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView22"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="新建联系人"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="17sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="89dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:background="@drawable/card_alarm_clock_bakground"
|
||||
android:onClick="@{click::openAlarmClock}"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/setting_icon_bind"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@+id/textView19"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView19"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="设备绑定"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="17sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="visible">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="89dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:background="@drawable/card_sos_background"
|
||||
android:onClick="@{click::openEmergency}"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/setting_icon_add_contact"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@+id/textView20"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView20"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="新建联系人"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="17sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="89dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:background="@drawable/card_appstore_background"
|
||||
android:onClick="@{click::toAppstore}"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/setting_icon_wifi"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@+id/textView18"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView18"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="WiFi设置"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="17sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="89dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:background="@drawable/card_more_app_background"
|
||||
android:onClick="@{click::dailyApp}"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintStart_toEndOf="@+id/cl_space"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/setting_icon_network"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@+id/textView3"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="流量设置"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="17sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="330dp"
|
||||
android:layout_height="89dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:background="@drawable/card_location_background"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/cl_contact">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/clLocation"
|
||||
android:layout_width="match_parent"
|
||||
tools:visibility="visible"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:layout_height="match_parent"
|
||||
android:onClick="@{click::getAddress}"
|
||||
android:visibility="@{systemSettings.desktop_location==1?View.VISIBLE:View.INVISIBLE}">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView14"
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:onClick="@{click::getAddress}"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/icon_location_refresh"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_location2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:gravity="center"
|
||||
android:maxLines="3"
|
||||
android:text="我的位置"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="19sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/imageView14"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_location_tips"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:text="定位功能未开放"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="19sp"
|
||||
tools:visibility="gone"
|
||||
android:visibility="@{systemSettings.desktop_location==1?View.GONE:View.VISIBLE}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</FrameLayout>
|
||||
</layout>
|
||||
106
app/src/main/res/layout-sw700dp/item_actions.xml
Normal file
106
app/src/main/res/layout-sw700dp/item_actions.xml
Normal file
@@ -0,0 +1,106 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/btn_booktag"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/actions_item_selector"
|
||||
android:clickable="true"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:layout_width="2px"-->
|
||||
<!-- android:layout_height="0dp"-->
|
||||
<!-- android:background="@color/line_color"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:layout_width="2px"-->
|
||||
<!-- android:layout_height="0dp"-->
|
||||
<!-- android:background="@color/line_color"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="2px"-->
|
||||
<!-- android:background="@color/line_color"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="2px"-->
|
||||
<!-- android:background="@color/line_color"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent" />-->
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_app"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="28dp"
|
||||
android:layout_marginTop="28dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@+id/iv"
|
||||
app:layout_constraintTop_toTopOf="@+id/iv" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/bg"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="52dp"
|
||||
android:layout_marginBottom="52dp"
|
||||
android:background="@drawable/badge_bg"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:minWidth="24dp"
|
||||
android:minHeight="24dp"
|
||||
android:text="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv"
|
||||
app:layout_constraintStart_toStartOf="@+id/iv" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:maxLines="2"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="@+id/iv"
|
||||
app:layout_constraintStart_toStartOf="@+id/iv"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
92
app/src/main/res/layout-sw700dp/item_contact_wechat.xml
Normal file
92
app/src/main/res/layout-sw700dp/item_contact_wechat.xml
Normal file
@@ -0,0 +1,92 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="128dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/contact_card_backround1" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_contact"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.shehuan.niv.NiceImageView
|
||||
android:id="@+id/iv_head"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/default_avatar"
|
||||
app:is_circle="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.126" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginTop="4dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@+id/iv_head"
|
||||
app:layout_constraintStart_toStartOf="@+id/iv_head"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_head">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="姓名" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_phone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_name"
|
||||
tools:text="phone" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
69
app/src/main/res/layout-sw700dp/item_dock_app.xml
Normal file
69
app/src/main/res/layout-sw700dp/item_dock_app.xml
Normal file
@@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="72dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_icon"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/home_icon_dialer"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/bg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginStart="44dp"
|
||||
android:layout_marginBottom="44dp"
|
||||
android:background="@drawable/badge_bg"
|
||||
android:gravity="center"
|
||||
android:minWidth="20dp"
|
||||
android:text="9"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv_icon"
|
||||
app:layout_constraintStart_toStartOf="@+id/iv_icon" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="拨号"
|
||||
android:visibility="gone"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="@+id/iv_icon"
|
||||
app:layout_constraintStart_toStartOf="@+id/iv_icon"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_icon" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -56,8 +56,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/cl_bottom"
|
||||
app:layout_constraintTop_toBottomOf="@+id/cl_exit"
|
||||
tools:layout_editor_absoluteX="16dp">
|
||||
app:layout_constraintTop_toBottomOf="@+id/cl_exit">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
@@ -292,8 +291,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_margin="8dp"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/add_wechat_contact_background">
|
||||
android:background="@drawable/add_wechat_contact_background"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -371,8 +370,7 @@
|
||||
android:layout_margin="8dp"
|
||||
android:background="@drawable/add_contact_confirm_background"
|
||||
android:onClick="@{click::addContact}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
tools:layout_editor_absoluteX="14dp">
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
|
||||
@@ -107,7 +107,6 @@
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/constraintLayout7"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView4"
|
||||
tools:layout_editor_absoluteX="32dp"
|
||||
tools:listitem="@layout/item_emergency_contact" />
|
||||
|
||||
<ImageView
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/control_background"
|
||||
tools:context=".activity.main.deprecated.OldMainActivity">
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/viewPager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/magicIndicator"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<net.lucode.hackware.magicindicator.MagicIndicator
|
||||
android:id="@+id/magicIndicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="16dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -18,8 +18,7 @@
|
||||
android:layout_height="52dp"
|
||||
android:layout_margin="8dp"
|
||||
android:background="@drawable/bt_alarm_bg"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:layout_editor_absoluteX="8dp">
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:context=".activity.screenlock.ScreenLockActivity"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".activity.screenlock.ScreenLockActivity">
|
||||
|
||||
<data>
|
||||
|
||||
@@ -44,8 +44,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toTopOf="@+id/ll_keyboard"
|
||||
app:layout_constraintTop_toBottomOf="@+id/imageView5"
|
||||
app:layout_constraintVertical_bias="0.347"
|
||||
tools:layout_editor_absoluteX="0dp">
|
||||
app:layout_constraintVertical_bias="0.347">
|
||||
|
||||
<com.tuo.customview.VerificationCodeView
|
||||
android:id="@+id/code_view"
|
||||
|
||||
@@ -33,6 +33,10 @@
|
||||
<variable
|
||||
name="versionName"
|
||||
type="String" />
|
||||
|
||||
<variable
|
||||
name="hourly_time"
|
||||
type="Boolean" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
@@ -288,6 +292,46 @@
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="80dp"
|
||||
android:onClick="@{click::setHourlyTimeSignal}">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:maxLines="1"
|
||||
android:text="整点报时"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="25sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:maxLines="1"
|
||||
android:text='@{hourly_time?"已开启":"未开启"}'
|
||||
android:textColor="@{hourly_time?@color/setting_enable_color:@color/setting_disable_color}"
|
||||
android:textSize="25sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="未开启" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/lightGray"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="80dp"
|
||||
|
||||
@@ -34,6 +34,130 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_weather"
|
||||
android:layout_width="330dp"
|
||||
android:layout_height="165dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="@{click::openCalendar}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="44sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="00:00" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_data"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_time"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_time"
|
||||
tools:text="20230621" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_week"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_data"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_data"
|
||||
tools:text="20230621" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout26"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:onClick="@{click::toWeather}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_temp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:text="--℃"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="40sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="0℃" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_weather"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="--"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_temp"
|
||||
tools:text="天气" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_weather">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView11"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/home_icon_location"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_location"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="--"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/imageView11"
|
||||
app:layout_constraintStart_toEndOf="@+id/imageView11"
|
||||
app:layout_constraintTop_toTopOf="@+id/imageView11"
|
||||
tools:text="位置" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -297,10 +421,10 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/clLocation"
|
||||
android:layout_width="match_parent"
|
||||
tools:visibility="visible"
|
||||
android:layout_height="match_parent"
|
||||
android:onClick="@{click::getAddress}"
|
||||
android:visibility="@{systemSettings.desktop_location==1?View.VISIBLE:View.INVISIBLE}">
|
||||
android:visibility="@{systemSettings.desktop_location==1?View.VISIBLE:View.INVISIBLE}"
|
||||
tools:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView14"
|
||||
@@ -342,12 +466,12 @@
|
||||
android:text="定位功能未开放"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="19sp"
|
||||
tools:visibility="gone"
|
||||
android:visibility="@{systemSettings.desktop_location==1?View.GONE:View.VISIBLE}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="gone" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
BIN
app/src/main/res/raw/time_am1.mp3
Normal file
BIN
app/src/main/res/raw/time_am1.mp3
Normal file
Binary file not shown.
BIN
app/src/main/res/raw/time_am10.mp3
Normal file
BIN
app/src/main/res/raw/time_am10.mp3
Normal file
Binary file not shown.
BIN
app/src/main/res/raw/time_am11.mp3
Normal file
BIN
app/src/main/res/raw/time_am11.mp3
Normal file
Binary file not shown.
BIN
app/src/main/res/raw/time_am12.mp3
Normal file
BIN
app/src/main/res/raw/time_am12.mp3
Normal file
Binary file not shown.
BIN
app/src/main/res/raw/time_am2.mp3
Normal file
BIN
app/src/main/res/raw/time_am2.mp3
Normal file
Binary file not shown.
BIN
app/src/main/res/raw/time_am3.mp3
Normal file
BIN
app/src/main/res/raw/time_am3.mp3
Normal file
Binary file not shown.
BIN
app/src/main/res/raw/time_am4.mp3
Normal file
BIN
app/src/main/res/raw/time_am4.mp3
Normal file
Binary file not shown.
BIN
app/src/main/res/raw/time_am5.mp3
Normal file
BIN
app/src/main/res/raw/time_am5.mp3
Normal file
Binary file not shown.
BIN
app/src/main/res/raw/time_am6.mp3
Normal file
BIN
app/src/main/res/raw/time_am6.mp3
Normal file
Binary file not shown.
BIN
app/src/main/res/raw/time_am7.mp3
Normal file
BIN
app/src/main/res/raw/time_am7.mp3
Normal file
Binary file not shown.
BIN
app/src/main/res/raw/time_am8.mp3
Normal file
BIN
app/src/main/res/raw/time_am8.mp3
Normal file
Binary file not shown.
BIN
app/src/main/res/raw/time_am9.mp3
Normal file
BIN
app/src/main/res/raw/time_am9.mp3
Normal file
Binary file not shown.
BIN
app/src/main/res/raw/time_pm1.mp3
Normal file
BIN
app/src/main/res/raw/time_pm1.mp3
Normal file
Binary file not shown.
BIN
app/src/main/res/raw/time_pm10.mp3
Normal file
BIN
app/src/main/res/raw/time_pm10.mp3
Normal file
Binary file not shown.
BIN
app/src/main/res/raw/time_pm11.mp3
Normal file
BIN
app/src/main/res/raw/time_pm11.mp3
Normal file
Binary file not shown.
BIN
app/src/main/res/raw/time_pm12.mp3
Normal file
BIN
app/src/main/res/raw/time_pm12.mp3
Normal file
Binary file not shown.
BIN
app/src/main/res/raw/time_pm2.mp3
Normal file
BIN
app/src/main/res/raw/time_pm2.mp3
Normal file
Binary file not shown.
BIN
app/src/main/res/raw/time_pm3.mp3
Normal file
BIN
app/src/main/res/raw/time_pm3.mp3
Normal file
Binary file not shown.
BIN
app/src/main/res/raw/time_pm4.mp3
Normal file
BIN
app/src/main/res/raw/time_pm4.mp3
Normal file
Binary file not shown.
BIN
app/src/main/res/raw/time_pm5.mp3
Normal file
BIN
app/src/main/res/raw/time_pm5.mp3
Normal file
Binary file not shown.
BIN
app/src/main/res/raw/time_pm6.mp3
Normal file
BIN
app/src/main/res/raw/time_pm6.mp3
Normal file
Binary file not shown.
BIN
app/src/main/res/raw/time_pm7.mp3
Normal file
BIN
app/src/main/res/raw/time_pm7.mp3
Normal file
Binary file not shown.
BIN
app/src/main/res/raw/time_pm8.mp3
Normal file
BIN
app/src/main/res/raw/time_pm8.mp3
Normal file
Binary file not shown.
BIN
app/src/main/res/raw/time_pm9.mp3
Normal file
BIN
app/src/main/res/raw/time_pm9.mp3
Normal file
Binary file not shown.
Reference in New Issue
Block a user