去掉butterknife

This commit is contained in:
2024-08-26 10:37:52 +08:00
parent 6068bd4bb3
commit 84e3fa87fa
63 changed files with 933 additions and 1159 deletions

View File

@@ -147,6 +147,15 @@ android {
v2SigningEnabled true v2SigningEnabled true
} }
G10ZUserDebug {
storeFile file("keystore/G10zUserDebug.keystore")
storePassword "123456"
keyAlias "G10zUserDebug"
keyPassword "123456"
v1SigningEnabled true
v2SigningEnabled true
}
mtk12 { mtk12 {
storeFile file("keystore/mtkAndroid12.keystore") storeFile file("keystore/mtkAndroid12.keystore")
storePassword "123456" storePassword "123456"
@@ -362,19 +371,25 @@ android {
buildConfigField "String", "platform", '"MTK11"' buildConfigField "String", "platform", '"MTK11"'
} }
zhanruiG10ZUserDebug.initWith(debug)
zhanruiG10ZUserDebug {
versionNameSuffix "-debug"
debuggable true
signingConfig signingConfigs.G10ZUserDebug
buildConfigField "String", "platform", '"ZR6016"'
}
zhanruiG10ZDebug.initWith(debug) zhanruiG10ZDebug.initWith(debug)
zhanruiG10ZDebug { zhanruiG10ZDebug {
versionNameSuffix "-debug" versionNameSuffix "-debug"
debuggable true debuggable true
signingConfig signingConfigs.zhanruiG10Z signingConfig signingConfigs.zhanruiG10Z
// signingConfig signingConfigs.zhanRui
buildConfigField "String", "platform", '"ZR6016"' buildConfigField "String", "platform", '"ZR6016"'
} }
zhanruiG10ZRelease.initWith(release) zhanruiG10ZRelease.initWith(release)
zhanruiG10ZRelease { zhanruiG10ZRelease {
signingConfig signingConfigs.zhanruiG10Z signingConfig signingConfigs.zhanruiG10Z
// signingConfig signingConfigs.zhanRui
buildConfigField "String", "platform", '"ZR6016"' buildConfigField "String", "platform", '"ZR6016"'
} }
@@ -502,9 +517,6 @@ dependencies {
testImplementation 'junit:junit:4.13.2' testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
//BindView
implementation 'com.jakewharton:butterknife:10.2.3'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.3'
implementation 'com.squareup.moshi:moshi:1.9.3' implementation 'com.squareup.moshi:moshi:1.9.3'
//OkHttp //OkHttp

Binary file not shown.

View File

@@ -7,9 +7,13 @@ import android.util.Log;
import android.view.View; import android.view.View;
import android.widget.TextView; import android.widget.TextView;
import androidx.databinding.DataBindingUtil;
import com.aoleyun.sn.BuildConfig; import com.aoleyun.sn.BuildConfig;
import com.aoleyun.sn.R; import com.aoleyun.sn.R;
import com.aoleyun.sn.base.BaseDataBindingActivity;
import com.aoleyun.sn.base.mvp.BaseMvpActivity; import com.aoleyun.sn.base.mvp.BaseMvpActivity;
import com.aoleyun.sn.databinding.ActivityCleanupBinding;
import com.aoleyun.sn.utils.ApkUtils; import com.aoleyun.sn.utils.ApkUtils;
import com.aoleyun.sn.utils.AppUtil; import com.aoleyun.sn.utils.AppUtil;
import com.hjq.toast.Toaster; import com.hjq.toast.Toaster;
@@ -18,38 +22,31 @@ import com.king.view.circleprogressview.CircleProgressView;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.util.List; import java.util.List;
import butterknife.BindView; public class CleanupActivity extends BaseDataBindingActivity {
import butterknife.ButterKnife; private static final String TAG = "CleanupActivity";
public class CleanupActivity extends BaseMvpActivity {
private static final String TAG = CleanupActivity.class.getSimpleName();
@BindView(R.id.tv_clean)
TextView tv_clean;
@BindView(R.id.cpv)
CircleProgressView cpv;
private ActivityCleanupBinding mBinding;
/** /**
* 设置布局 * 设置布局
*/ */
@Override
public int getLayoutId() {
return R.layout.activity_cleanup;
}
@Override @Override
public boolean setNightMode() { public boolean setNightMode() {
return true; return true;
} }
@Override
protected void initDataBinding() {
mBinding = DataBindingUtil.setContentView(this,R.layout.activity_cleanup);
}
/** /**
* 初始化视图 * 初始化视图
*/ */
@Override @Override
public void initView() { public void initView() {
ButterKnife.bind(this); mBinding.tvClean.setOnClickListener(new View.OnClickListener() {
tv_clean.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
killBackgroundApp(); killBackgroundApp();
@@ -104,7 +101,7 @@ public class CleanupActivity extends BaseMvpActivity {
// } else { // } else {
// cpv.setProgressColor(mShaderColors); // cpv.setProgressColor(mShaderColors);
// } // }
cpv.showAnimation(0, x, 1000); mBinding.cpv.showAnimation(0, x, 1000);
float x2 = (((total - avail) / (float) total)); float x2 = (((total - avail) / (float) total));
} }

View File

@@ -4,34 +4,19 @@ import android.provider.Settings;
import android.view.View; import android.view.View;
import androidx.constraintlayout.widget.ConstraintLayout; import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.databinding.DataBindingUtil;
import com.aoleyun.sn.R; import com.aoleyun.sn.R;
import com.aoleyun.sn.base.BaseDataBindingActivity;
import com.aoleyun.sn.base.mvp.BaseMvpActivity; import com.aoleyun.sn.base.mvp.BaseMvpActivity;
import com.aoleyun.sn.databinding.ActivityEyeProtectionBinding;
import com.aoleyun.sn.view.ToggleButton; import com.aoleyun.sn.view.ToggleButton;
import com.hjq.toast.Toaster; import com.hjq.toast.Toaster;
import butterknife.BindView; public class EyeProtectionActivity extends BaseDataBindingActivity {
import butterknife.ButterKnife;
public class EyeProtectionActivity extends BaseMvpActivity { private ActivityEyeProtectionBinding mBinding;
@BindView(R.id.cl_exit)
ConstraintLayout cl_exit;
@BindView(R.id.toggleButton1)
ToggleButton toggleButton1;
@BindView(R.id.toggleButton2)
ToggleButton toggleButton2;
@BindView(R.id.toggleButton3)
ToggleButton toggleButton3;
@BindView(R.id.toggleButton4)
ToggleButton toggleButton4;
@BindView(R.id.toggleButton5)
ToggleButton toggleButton5;
@Override
public int getLayoutId() {
return R.layout.activity_eye_protection;
}
@Override @Override
public boolean setNightMode() { public boolean setNightMode() {
@@ -39,45 +24,48 @@ public class EyeProtectionActivity extends BaseMvpActivity {
} }
@Override @Override
public void initView() { protected void initDataBinding() {
ButterKnife.bind(this); mBinding = DataBindingUtil.setContentView(this, R.layout.activity_eye_protection);
}
toggleButton1.setOnToggleChanged(new ToggleButton.OnToggleChanged() { @Override
public void initView() {
mBinding.toggleButton1.setOnToggleChanged(new ToggleButton.OnToggleChanged() {
@Override @Override
public void onToggle(boolean on) { public void onToggle(boolean on) {
Settings.Secure.putInt(getContentResolver(), Settings.Secure.NIGHT_DISPLAY_ACTIVATED, on ? 1 : 0); Settings.Secure.putInt(getContentResolver(), Settings.Secure.NIGHT_DISPLAY_ACTIVATED, on ? 1 : 0);
} }
}); });
toggleButton2.setOnToggleChanged(new ToggleButton.OnToggleChanged() { mBinding.toggleButton2.setOnToggleChanged(new ToggleButton.OnToggleChanged() {
@Override @Override
public void onToggle(boolean on) { public void onToggle(boolean on) {
Settings.Secure.putInt(getContentResolver(), Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED, on ? 1 : 0); Settings.Secure.putInt(getContentResolver(), Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED, on ? 1 : 0);
Settings.Secure.putInt(getContentResolver(), Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER, on ? 0 : 1); Settings.Secure.putInt(getContentResolver(), Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER, on ? 0 : 1);
} }
}); });
toggleButton3.setDisable(true); mBinding.toggleButton3.setDisable(true);
toggleButton3.setOnClickListener(new View.OnClickListener() { mBinding.toggleButton3.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
Toaster.show("此功能暂未开放"); Toaster.show("此功能暂未开放");
} }
}); });
toggleButton4.setDisable(true); mBinding.toggleButton4.setDisable(true);
toggleButton4.setOnClickListener(new View.OnClickListener() { mBinding.toggleButton4.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
Toaster.show("此功能暂未开放"); Toaster.show("此功能暂未开放");
} }
}); });
toggleButton5.setDisable(true); mBinding.toggleButton5.setDisable(true);
toggleButton5.setOnClickListener(new View.OnClickListener() { mBinding.toggleButton5.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
Toaster.show("此功能暂未开放"); Toaster.show("此功能暂未开放");
} }
}); });
cl_exit.setOnClickListener(new View.OnClickListener() { mBinding.clExit.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
finish(); finish();
@@ -95,16 +83,16 @@ public class EyeProtectionActivity extends BaseMvpActivity {
super.onResume(); super.onResume();
int nightDisplay = Settings.Secure.getInt(getContentResolver(), Settings.Secure.NIGHT_DISPLAY_ACTIVATED, 0); int nightDisplay = Settings.Secure.getInt(getContentResolver(), Settings.Secure.NIGHT_DISPLAY_ACTIVATED, 0);
if (nightDisplay == 1) { if (nightDisplay == 1) {
toggleButton1.setToggleOn(); mBinding.toggleButton1.setToggleOn();
} else { } else {
toggleButton1.setToggleOff(); mBinding.toggleButton1.setToggleOff();
} }
int accessibilityDisplay = Settings.Secure.getInt(getContentResolver(), Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED, 0); int accessibilityDisplay = Settings.Secure.getInt(getContentResolver(), Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED, 0);
if (accessibilityDisplay == 1) { if (accessibilityDisplay == 1) {
toggleButton2.setToggleOn(); mBinding.toggleButton2.setToggleOn();
} else { } else {
toggleButton2.setToggleOff(); mBinding.toggleButton2.setToggleOff();
} }
} }
} }

View File

@@ -51,7 +51,7 @@ import java.nio.file.Paths;
public class SplashActivity extends AppCompatActivity { public class SplashActivity extends AppCompatActivity {
private static String TAG = SplashActivity.class.getSimpleName(); private static String TAG = "SplashActivity";
private Button bt_log; private Button bt_log;
private Button bt_stop; private Button bt_stop;

View File

@@ -47,7 +47,7 @@ import com.hjq.toast.Toaster;
import com.tencent.mmkv.MMKV; import com.tencent.mmkv.MMKV;
public class MainActivity extends BaseMvvmActivity<MainViewModel, ActivityMainBinding> implements NetworkUtils.OnNetworkStatusChangedListener { public class MainActivity extends BaseMvvmActivity<MainViewModel, ActivityMainBinding> implements NetworkUtils.OnNetworkStatusChangedListener {
private static final String TAG = MainActivity.class.getSimpleName(); private static final String TAG = "MainActivity";
private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE); private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);

View File

@@ -40,7 +40,7 @@ import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.schedulers.Schedulers; import io.reactivex.rxjava3.schedulers.Schedulers;
public class MainViewModel extends BaseViewModel<ActivityMainBinding, ActivityEvent> { public class MainViewModel extends BaseViewModel<ActivityMainBinding, ActivityEvent> {
private static final String TAG = MainViewModel.class.getSimpleName(); private static final String TAG = "MainViewModel";
@Override @Override
public ActivityMainBinding getVDBinding() { public ActivityMainBinding getVDBinding() {

View File

@@ -1,53 +1,23 @@
package com.aoleyun.sn.activity.requestlog; package com.aoleyun.sn.activity.requestlog;
import android.view.View; import android.view.View;
import android.widget.ImageView;
import androidx.lifecycle.Observer;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.aoleyun.sn.R; import com.aoleyun.sn.R;
import com.aoleyun.sn.base.mvp.BaseMvpActivity; import com.aoleyun.sn.base.mvvm.BaseMvvmActivity;
import com.aoleyun.sn.databinding.ActivityRequestLogBinding;
import com.aoleyun.sn.rlog.LogBean; import com.aoleyun.sn.rlog.LogBean;
import com.aoleyun.sn.rlog.LogDBManager; import com.aoleyun.sn.rlog.LogDBManager;
import java.util.List; import java.util.List;
import butterknife.BindView; public class RequestLogActivity extends BaseMvvmActivity<RequestLogViewModel, ActivityRequestLogBinding> {
import butterknife.ButterKnife; private static final String TAG = "RequestLogActivity";
import butterknife.OnClick;
public class RequestLogActivity extends BaseMvpActivity implements RequestLogContact.MainView {
private static final String TAG = RequestLogActivity.class.getSimpleName();
private RequestLogAdapter mAdapter; private RequestLogAdapter mAdapter;
@BindView(R.id.recyclerview)
RecyclerView mRecyclerView;
@BindView(R.id.iv_delete)
ImageView iv_delete;
@BindView(R.id.iv_refresh)
ImageView iv_refresh;
@BindView(R.id.iv_back)
ImageView back;
@OnClick({R.id.iv_back, R.id.iv_refresh, R.id.iv_delete})
public void onClick(View view) {
switch (view.getId()) {
case R.id.iv_back:
finish();
break;
case R.id.iv_refresh:
mPresenter.getDBList();
break;
case R.id.iv_delete:
LogDBManager.getInstance().saveToFile();
break;
default:
}
}
private RequestLogPresenter mPresenter;
@Override @Override
public int getLayoutId() { public int getLayoutId() {
return R.layout.activity_request_log; return R.layout.activity_request_log;
@@ -58,30 +28,48 @@ public class RequestLogActivity extends BaseMvpActivity implements RequestLogCon
return true; return true;
} }
@Override
protected void initDataBinding() {
mViewModel.setCtx(this);
mViewModel.setLifecycle(getLifecycleSubject());
mViewModel.setVDBinding(mViewDataBinding);
mViewDataBinding.setClick(new BtnClick());
}
@Override @Override
public void initView() { public void initView() {
ButterKnife.bind(this); mViewDataBinding.recyclerview.setLayoutManager(new LinearLayoutManager(this));
mPresenter = new RequestLogPresenter(this);
mPresenter.attachView(this);
mPresenter.setLifecycle(getLifecycleSubject());
mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
mAdapter = new RequestLogAdapter(); mAdapter = new RequestLogAdapter();
mRecyclerView.setAdapter(mAdapter); mViewDataBinding.recyclerview.setAdapter(mAdapter);
} }
@Override @Override
public void initData() { public void initData() {
mPresenter.getDBList(); mViewModel.getLogBeanListData().observe(this, new Observer<List<LogBean>>() {
} @Override
public void onChanged(List<LogBean> logBeans) {
@Override mAdapter.setLogBeans(logBeans);
public void setDBList(List<LogBean> logBeanList) { }
mAdapter.setLogBeans(logBeanList); });
mViewModel.getDBList();
} }
@Override @Override
protected void onDestroy() { protected void onDestroy() {
super.onDestroy(); super.onDestroy();
mPresenter.detachView(); }
public class BtnClick {
public void exit(View view) {
finish();
}
public void refresh(View view) {
mViewModel.getDBList();
}
public void delete(View view) {
LogDBManager.getInstance().saveToFile();
}
} }
} }

View File

@@ -1,17 +0,0 @@
package com.aoleyun.sn.activity.requestlog;
import com.aoleyun.sn.base.mvp.BasePresenter;
import com.aoleyun.sn.base.mvp.BaseView;
import com.aoleyun.sn.rlog.LogBean;
import java.util.List;
public class RequestLogContact {
public interface Presenter extends BasePresenter<MainView> {
void getDBList();
}
public interface MainView extends BaseView {
void setDBList(List<LogBean> logBeanList);
}
}

View File

@@ -1,47 +0,0 @@
package com.aoleyun.sn.activity.requestlog;
import android.content.Context;
import androidx.annotation.NonNull;
import com.aoleyun.sn.rlog.LogDBManager;
import com.trello.rxlifecycle4.android.ActivityEvent;
import io.reactivex.rxjava3.subjects.BehaviorSubject;
public class RequestLogPresenter implements RequestLogContact.Presenter {
private static final String TAG = RequestLogPresenter.class.getSimpleName();
private RequestLogContact.MainView mView;
private Context mContext;
private BehaviorSubject<ActivityEvent> lifecycle;
public void setLifecycle(BehaviorSubject<ActivityEvent> lifecycle) {
this.lifecycle = lifecycle;
}
public BehaviorSubject<ActivityEvent> getLifecycle() {
return lifecycle;
}
public RequestLogPresenter(Context context) {
this.mContext = context;
}
@Override
public void getDBList() {
mView.setDBList(LogDBManager.getInstance().getLogList());
}
@Override
public void attachView(@NonNull RequestLogContact.MainView view) {
this.mView = view;
}
@Override
public void detachView() {
this.mView = null;
}
}

View File

@@ -0,0 +1,34 @@
package com.aoleyun.sn.activity.requestlog;
import androidx.lifecycle.MutableLiveData;
import com.aoleyun.sn.base.mvvm.BaseViewModel;
import com.aoleyun.sn.databinding.ActivityRequestLogBinding;
import com.aoleyun.sn.rlog.LogBean;
import com.aoleyun.sn.rlog.LogDBManager;
import com.trello.rxlifecycle4.android.ActivityEvent;
import java.util.List;
public class RequestLogViewModel extends BaseViewModel<ActivityRequestLogBinding, ActivityEvent> {
@Override
public ActivityRequestLogBinding getVDBinding() {
return binding;
}
@Override
public void onDestroy() {
}
private MutableLiveData<List<LogBean>> mLogBeanListData =new MutableLiveData<>();
public MutableLiveData<List<LogBean>> getLogBeanListData() {
return mLogBeanListData;
}
public void getDBList(){
mLogBeanListData.setValue(LogDBManager.getInstance().getLogList());
}
}

View File

@@ -6,37 +6,21 @@ import android.content.Intent;
import android.content.IntentFilter; import android.content.IntentFilter;
import android.util.Log; import android.util.Log;
import android.view.View; import android.view.View;
import android.widget.ImageView;
import androidx.constraintlayout.widget.ConstraintLayout; import androidx.lifecycle.Observer;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.aoleyun.sn.R; import com.aoleyun.sn.R;
import com.aoleyun.sn.adapter.AppUpdateAdapter; import com.aoleyun.sn.adapter.AppUpdateAdapter;
import com.aoleyun.sn.base.mvp.BaseMvpActivity; import com.aoleyun.sn.base.mvvm.BaseMvvmActivity;
import com.aoleyun.sn.bean.AppUpdateInfo; import com.aoleyun.sn.bean.AppUpdateInfo;
import com.aoleyun.sn.databinding.ActivityUpdateBinding;
import java.util.List; import java.util.List;
import butterknife.BindView; public class UpdateActivity extends BaseMvvmActivity<UpdateViewModel, ActivityUpdateBinding> {
import butterknife.ButterKnife; private static final String TAG = "UpdateActivity";
public class UpdateActivity extends BaseMvpActivity implements UpdateContact.UpdateView {
private static final String TAG = UpdateActivity.class.getSimpleName();
@BindView(R.id.root)
ConstraintLayout root;
@BindView(R.id.main)
ConstraintLayout main;
@BindView(R.id.iv_back)
ImageView iv_back;
@BindView(R.id.cl_nodata)
ConstraintLayout cl_nodata;
@BindView(R.id.recyclerView)
RecyclerView recyclerView;
private UpdatePresenter mPresenter;
private AppUpdateAdapter mAppUpdateAdapter; private AppUpdateAdapter mAppUpdateAdapter;
@Override @Override
@@ -49,63 +33,48 @@ public class UpdateActivity extends BaseMvpActivity implements UpdateContact.Upd
return true; return true;
} }
@Override
protected void initDataBinding() {
mViewModel.setCtx(this);
mViewModel.setLifecycle(getLifecycleSubject());
mViewModel.setVDBinding(mViewDataBinding);
mViewDataBinding.setClick(new BtnClick());
}
@Override @Override
public void initView() { public void initView() {
ButterKnife.bind(this);
mPresenter = new UpdatePresenter(this);
mPresenter.attachView(this);
mPresenter.setLifecycle(getLifecycleSubject());
mAppUpdateAdapter = new AppUpdateAdapter(); mAppUpdateAdapter = new AppUpdateAdapter();
recyclerView.setLayoutManager(new LinearLayoutManager(UpdateActivity.this)); mViewDataBinding.recyclerView.setLayoutManager(new LinearLayoutManager(UpdateActivity.this));
recyclerView.setAdapter(mAppUpdateAdapter); mViewDataBinding.recyclerView.setAdapter(mAppUpdateAdapter);
root.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
finish();
}
});
main.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
}
});
iv_back.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
finish();
}
});
} }
@Override @Override
public void initData() { public void initData() {
mViewModel.getAppUpdateInfoListData().observe(this, new Observer<List<AppUpdateInfo>>() {
@Override
public void onChanged(List<AppUpdateInfo> appUpdateInfos) {
if (appUpdateInfos == null || appUpdateInfos.size() == 0) {
mViewDataBinding.clNodata.setVisibility(View.VISIBLE);
mViewDataBinding.recyclerView.setVisibility(View.GONE);
} else {
mViewDataBinding.clNodata.setVisibility(View.GONE);
mViewDataBinding.recyclerView.setVisibility(View.VISIBLE);
mAppUpdateAdapter.setAppInfoList(appUpdateInfos);
}
}
});
mViewModel.checkAllAppUpdate();
registmNewAppReceiver(); registmNewAppReceiver();
mPresenter.checkAllAppUpdate();
} }
@Override @Override
protected void onDestroy() { protected void onDestroy() {
super.onDestroy(); super.onDestroy();
mPresenter.detachView();
if (mNewAppReceiver != null) { if (mNewAppReceiver != null) {
unregisterReceiver(mNewAppReceiver); unregisterReceiver(mNewAppReceiver);
} }
} }
@Override
public void onAppUpdate(List<AppUpdateInfo> updateApp) {
if (updateApp == null || updateApp.size() == 0) {
cl_nodata.setVisibility(View.VISIBLE);
recyclerView.setVisibility(View.GONE);
} else {
cl_nodata.setVisibility(View.GONE);
recyclerView.setVisibility(View.VISIBLE);
mAppUpdateAdapter.setAppInfoList(updateApp);
}
}
private void registmNewAppReceiver() { private void registmNewAppReceiver() {
mNewAppReceiver = new NewAppReceiver(); mNewAppReceiver = new NewAppReceiver();
IntentFilter filter = new IntentFilter(); IntentFilter filter = new IntentFilter();
@@ -134,4 +103,15 @@ public class UpdateActivity extends BaseMvpActivity implements UpdateContact.Upd
} }
} }
} }
public class BtnClick {
public void exit(View view) {
finish();
}
public void empty(View view) {
}
}
} }

View File

@@ -1,19 +0,0 @@
package com.aoleyun.sn.activity.update;
import com.aoleyun.sn.base.mvp.BasePresenter;
import com.aoleyun.sn.base.mvp.BaseView;
import com.aoleyun.sn.bean.AppUpdateInfo;
import java.util.List;
public class UpdateContact {
interface Presenter extends BasePresenter<UpdateView> {
/*获取所有更新*/
void checkAllAppUpdate();
}
public interface UpdateView extends BaseView {
void onAppUpdate(List<AppUpdateInfo> updateApp);
}
}

View File

@@ -1,52 +0,0 @@
package com.aoleyun.sn.activity.update;
import android.content.Context;
import com.aoleyun.sn.bean.AppUpdateInfo;
import com.aoleyun.sn.network.NetInterfaceManager;
import com.trello.rxlifecycle4.android.ActivityEvent;
import java.util.List;
import io.reactivex.rxjava3.subjects.BehaviorSubject;
public class UpdatePresenter implements UpdateContact.Presenter {
private Context mContext;
UpdatePresenter(Context context) {
this.mContext = context;
}
private UpdateContact.UpdateView mView;
private BehaviorSubject<ActivityEvent> lifecycle;
public void setLifecycle(BehaviorSubject<ActivityEvent> lifecycle) {
this.lifecycle = lifecycle;
}
public BehaviorSubject<ActivityEvent> getLifecycle() {
return lifecycle;
}
@Override
public void attachView(UpdateContact.UpdateView view) {
this.mView = view;
}
@Override
public void detachView() {
this.mView = null;
}
@Override
public void checkAllAppUpdate() {
NetInterfaceManager.getInstance().checkAoleyunUpdate( getLifecycle(), new NetInterfaceManager.UpdateCallback() {
@Override
public void onUpdate(List<AppUpdateInfo> appUpdateInfos) {
mView.onAppUpdate(appUpdateInfos);
}
});
}
}

View File

@@ -0,0 +1,39 @@
package com.aoleyun.sn.activity.update;
import androidx.lifecycle.MutableLiveData;
import com.aoleyun.sn.base.mvvm.BaseViewModel;
import com.aoleyun.sn.bean.AppUpdateInfo;
import com.aoleyun.sn.databinding.ActivityUpdateBinding;
import com.aoleyun.sn.network.NetInterfaceManager;
import com.trello.rxlifecycle4.android.ActivityEvent;
import java.util.List;
public class UpdateViewModel extends BaseViewModel<ActivityUpdateBinding, ActivityEvent> {
@Override
public ActivityUpdateBinding getVDBinding() {
return binding;
}
@Override
public void onDestroy() {
}
private MutableLiveData<List<AppUpdateInfo>> mAppUpdateInfoListData = new MutableLiveData<>();
public MutableLiveData<List<AppUpdateInfo>> getAppUpdateInfoListData() {
return mAppUpdateInfoListData;
}
public void checkAllAppUpdate() {
NetInterfaceManager.getInstance().checkAoleyunUpdate(getLifecycle(), new NetInterfaceManager.UpdateCallback() {
@Override
public void onUpdate(List<AppUpdateInfo> appUpdateInfos) {
mAppUpdateInfoListData.setValue(appUpdateInfos);
}
});
}
}

View File

@@ -32,7 +32,7 @@ import com.hjq.toast.Toaster;
import java.util.List; import java.util.List;
public class AppUpdateAdapter extends RecyclerView.Adapter<AppUpdateAdapter.Holder> { public class AppUpdateAdapter extends RecyclerView.Adapter<AppUpdateAdapter.Holder> {
private static final String TAG = AppUpdateAdapter.class.getSimpleName(); private static final String TAG = "AppUpdateAdapter";
private Context mContext; private Context mContext;
private List<AppUpdateInfo> mAppInfoList; private List<AppUpdateInfo> mAppInfoList;

View File

@@ -36,7 +36,7 @@ import io.reactivex.rxjava3.core.Observer;
import io.reactivex.rxjava3.disposables.Disposable; import io.reactivex.rxjava3.disposables.Disposable;
public class BaseApplication extends MultiDexApplication { public class BaseApplication extends MultiDexApplication {
private static final String TAG = BaseApplication.class.getSimpleName(); private static final String TAG = "BaseApplication";
@Override @Override
public void onCreate() { public void onCreate() {
@@ -89,6 +89,7 @@ public class BaseApplication extends MultiDexApplication {
public void uncaughtException(Thread t, Throwable e) { public void uncaughtException(Thread t, Throwable e) {
Log.e("捕获异常子线程:", Thread.currentThread().getName() + Log.e("捕获异常子线程:", Thread.currentThread().getName() +
"在:" + e.getStackTrace()[0].getClassName()); "在:" + e.getStackTrace()[0].getClassName());
e.printStackTrace();
} }
} }
); );

View File

@@ -15,8 +15,7 @@ import java.lang.reflect.Modifier;
import java.lang.reflect.ParameterizedType; import java.lang.reflect.ParameterizedType;
public abstract class BaseMvvmActivity<VM extends ViewModel, VDB extends ViewDataBinding> extends BaseTransparentActivity { public abstract class BaseMvvmActivity<VM extends ViewModel, VDB extends ViewDataBinding> extends BaseTransparentActivity {
private static final String TAG = "BaseMvvmActivity";
private static final String TAG = BaseMvvmActivity.class.getSimpleName();
protected VM mViewModel; protected VM mViewModel;
protected VDB mViewDataBinding; protected VDB mViewDataBinding;

View File

@@ -100,6 +100,8 @@ public class CommonConfig {
public final static String AOLE_ACTION_APP_FORBID = "aole_app_forbid"; public final static String AOLE_ACTION_APP_FORBID = "aole_app_forbid";
/*强制安装应用,禁止卸载*/ /*强制安装应用,禁止卸载*/
public final static String AOLE_ACTION_FORCE_APP = "aole_force_app"; public final static String AOLE_ACTION_FORCE_APP = "aole_force_app";
/*指定应用安装源 非指定包名不能安装apk*/
public static final String APP_SOURCE_WHITE_LIST = "app_source_white_list";
/*应用ID管控*/ /*应用ID管控*/
public final static String AOLE_ACTION_APP_FORBID_ID = "aole_app_forbid_id"; public final static String AOLE_ACTION_APP_FORBID_ID = "aole_app_forbid_id";

View File

@@ -30,7 +30,7 @@ import java.io.Serializable;
* 磁盘缓存帮助类 * 磁盘缓存帮助类
*/ */
public class CacheHelper { public class CacheHelper {
private static final String TAG = CacheHelper.class.getSimpleName(); private static final String TAG = "CacheHelper";
private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE); private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);

View File

@@ -9,7 +9,7 @@ import com.aoleyun.sn.utils.JGYUtils;
import com.tencent.mmkv.MMKV; import com.tencent.mmkv.MMKV;
public class AoleyunActivityController extends IActivityController.Stub { public class AoleyunActivityController extends IActivityController.Stub {
private static final String TAG = AoleyunActivityController.class.getSimpleName(); private static final String TAG = "AoleyunActivityController";
private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE); private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
@Override @Override

View File

@@ -8,7 +8,7 @@ import com.aoleyun.sn.comm.CommonConfig;
import com.tencent.mmkv.MMKV; import com.tencent.mmkv.MMKV;
public class ConnectManager { public class ConnectManager {
private static final String TAG = ConnectManager.class.getSimpleName(); private static final String TAG = "ConnectManager";
public static final long ONE_MILLISECOND = 1000; public static final long ONE_MILLISECOND = 1000;
public static final long ONE_MINUTES_TIME = 60 * ONE_MILLISECOND; public static final long ONE_MINUTES_TIME = 60 * ONE_MILLISECOND;

View File

@@ -12,7 +12,7 @@ import com.baidu.location.LocationClient;
import com.baidu.location.LocationClientOption; import com.baidu.location.LocationClientOption;
public class MapManager { public class MapManager {
private String TAG = MapManager.class.getSimpleName(); private String TAG = "MapManager";
@SuppressLint("StaticFieldLeak") @SuppressLint("StaticFieldLeak")
private static MapManager sInstance; private static MapManager sInstance;

View File

@@ -198,7 +198,7 @@ import retrofit2.converter.gson.GsonConverterFactory;
import static com.google.gson.JsonParser.parseString; import static com.google.gson.JsonParser.parseString;
public class NetInterfaceManager { public class NetInterfaceManager {
private static final String TAG = NetInterfaceManager.class.getSimpleName(); private static final String TAG = "NetInterfaceManager";
@SuppressLint("StaticFieldLeak") @SuppressLint("StaticFieldLeak")
private static NetInterfaceManager INSTANCE; private static NetInterfaceManager INSTANCE;

View File

@@ -12,7 +12,7 @@ import retrofit2.Response;
public abstract class RetryCallback<T> implements Callback<T> { public abstract class RetryCallback<T> implements Callback<T> {
private static final String TAG = RetryCallback.class.getSimpleName(); private static final String TAG = "RetryCallback";
private int mRetryCount; private int mRetryCount;
private long mRetryInterval; private long mRetryInterval;

View File

@@ -22,7 +22,7 @@ import okio.Buffer;
* v1.0 2022-07-15 16:16:52 * v1.0 2022-07-15 16:16:52
*/ */
public class RepeatRequestInterceptor implements Interceptor { public class RepeatRequestInterceptor implements Interceptor {
private static final String TAG = RepeatRequestInterceptor.class.getSimpleName(); private static final String TAG = "RepeatRequestInterceptor";
private final ConcurrentHashMap<String, Long> requestIdsMap = new ConcurrentHashMap<>(); private final ConcurrentHashMap<String, Long> requestIdsMap = new ConcurrentHashMap<>();
public static final String REPEAT_REQUEST_PROTOCOL = "OKHTTP_REPEAT_REQUEST_PROTOCOL"; public static final String REPEAT_REQUEST_PROTOCOL = "OKHTTP_REPEAT_REQUEST_PROTOCOL";

View File

@@ -92,7 +92,7 @@ import retrofit2.Call;
import retrofit2.Response; import retrofit2.Response;
public class PushManager { public class PushManager {
private static final String TAG = PushManager.class.getSimpleName(); private static final String TAG = "PushManager";
public static final String ACTION_REFRESH_BINDING_STATUS = "RefreshBindingStatus"; public static final String ACTION_REFRESH_BINDING_STATUS = "RefreshBindingStatus";
public static final String AOLEYUN_REFRESH_DESKTOP = "aoleyun_refresh_desktop_action"; public static final String AOLEYUN_REFRESH_DESKTOP = "aoleyun_refresh_desktop_action";
@@ -248,6 +248,8 @@ public class PushManager {
/*绑定设备*/ /*绑定设备*/
private static final String BIND_DEVICE = "71"; private static final String BIND_DEVICE = "71";
/*文件分享*/
private static final String FILE_DISTRIBUTE = "72";
/*打开应用*/ /*打开应用*/
private static final String OPEN_APK = "73"; private static final String OPEN_APK = "73";
/*全局黑名单*/ /*全局黑名单*/
@@ -650,6 +652,9 @@ public class PushManager {
case BIND_DEVICE: case BIND_DEVICE:
bindService(extras); bindService(extras);
break; break;
case FILE_DISTRIBUTE:
ApkUtils.openPackage(mContext, "com.uiui.filecloud");
break;
case OPEN_APK: case OPEN_APK:
openApk(extras); openApk(extras);
break; break;

View File

@@ -18,7 +18,7 @@ import java.util.Map;
*/ */
public class AliMessageIntentService extends AliyunMessageIntentService { public class AliMessageIntentService extends AliyunMessageIntentService {
private static final String TAG = AliyunMessageIntentService.class.getSimpleName(); private static final String TAG = "AliyunMessageIntentService";
/** /**
* 推送通知的回调方法 * 推送通知的回调方法

View File

@@ -19,7 +19,7 @@ import java.util.Map;
*/ */
public class AliyunMessageReceiver extends MessageReceiver { public class AliyunMessageReceiver extends MessageReceiver {
// 消息接收部分的LOG_TAG // 消息接收部分的LOG_TAG
public static final String TAG = AliyunMessageReceiver.class.getSimpleName(); public static final String TAG = "AliyunMessageReceiver";
/** /**
* 推送通知的回调方法 * 推送通知的回调方法

View File

@@ -22,7 +22,7 @@ import io.reactivex.rxjava3.core.Observer;
import io.reactivex.rxjava3.disposables.Disposable; import io.reactivex.rxjava3.disposables.Disposable;
public class BootReceiver extends BroadcastReceiver { public class BootReceiver extends BroadcastReceiver {
private static String TAG = BootReceiver.class.getSimpleName() + ":aoleyunsn"; private static String TAG = "BootReceiver" + ":aoleyunsn";
public static final String BOOT_COMPLETED = "aoleyun.intent.action.BOOT_COMPLETED"; public static final String BOOT_COMPLETED = "aoleyun.intent.action.BOOT_COMPLETED";
static { static {

View File

@@ -23,7 +23,7 @@ import io.reactivex.rxjava3.core.Observer;
import io.reactivex.rxjava3.disposables.Disposable; import io.reactivex.rxjava3.disposables.Disposable;
public class NewAppReceiver extends BroadcastReceiver { public class NewAppReceiver extends BroadcastReceiver {
private static final String TAG = NewAppReceiver.class.getSimpleName(); private static final String TAG = "NewAppReceiver";
private static NewAppListener newAppListener; private static NewAppListener newAppListener;
private static LauncherListener launcherListener; private static LauncherListener launcherListener;

View File

@@ -28,7 +28,7 @@ public class LogDBManager {
private LogDBHelper mDBHelper; private LogDBHelper mDBHelper;
private static final String TABLE_NAME = "logtable"; private static final String TABLE_NAME = "logtable";
private static String TAG = LogDBManager.class.getSimpleName(); private static String TAG = "LogDBManager";
private LogDBManager(Context context) { private LogDBManager(Context context) {
if (context == null) { if (context == null) {

View File

@@ -108,7 +108,7 @@ import static android.os.BatteryManager.EXTRA_VOLTAGE;
* @time Created by 2018/8/17 11:27 * @time Created by 2018/8/17 11:27
*/ */
public class GuardService extends Service { public class GuardService extends Service {
private final static String TAG = GuardService.class.getSimpleName(); private final static String TAG = "GuardService";
private ServiceConnection mServiceConnection = new ServiceConnection() { private ServiceConnection mServiceConnection = new ServiceConnection() {
@Override @Override

View File

@@ -35,7 +35,7 @@ import okhttp3.RequestBody;
public class LogcatService extends Service { public class LogcatService extends Service {
public final static String LOGCAT_START_ACTION = "START"; public final static String LOGCAT_START_ACTION = "START";
public final static String LOGCAT_STOP_ACTION = "STOP"; public final static String LOGCAT_STOP_ACTION = "STOP";
private String TAG = LogcatService.class.getSimpleName(); private String TAG = "LogcatService";
public LogcatService() { public LogcatService() {

View File

@@ -23,7 +23,7 @@ import java.util.Arrays;
import java.util.List; import java.util.List;
public class RemoteService extends Service { public class RemoteService extends Service {
private String TAG = RemoteService.class.getSimpleName(); private String TAG = "RemoteService";
private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE); private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);

View File

@@ -35,7 +35,7 @@ import java.net.URI;
* @time Created by 2018/8/17 11:26 * @time Created by 2018/8/17 11:26
*/ */
public class StepService extends Service implements NetworkUtils.OnNetworkStatusChangedListener { public class StepService extends Service implements NetworkUtils.OnNetworkStatusChangedListener {
private final static String TAG = StepService.class.getSimpleName(); private final static String TAG = "StepService";
public JWebSocketClient client; public JWebSocketClient client;
private JWebSocketClientBinder mBinder = new JWebSocketClientBinder(); private JWebSocketClientBinder mBinder = new JWebSocketClientBinder();

View File

@@ -46,7 +46,7 @@ import io.reactivex.rxjava3.subjects.BehaviorSubject;
* @author jgy02 * @author jgy02
*/ */
public class MainSPresenter implements MainSContact.Presenter { public class MainSPresenter implements MainSContact.Presenter {
private static final String TAG = MainSPresenter.class.getSimpleName(); private static final String TAG = "MainSPresenter";
private MainSContact.MainView mView; private MainSContact.MainView mView;
private Context mContext; private Context mContext;

View File

@@ -88,7 +88,7 @@ import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.subjects.BehaviorSubject; import io.reactivex.rxjava3.subjects.BehaviorSubject;
public class MainService extends Service implements MainSContact.MainView, NetworkUtils.OnNetworkStatusChangedListener, LifecycleProvider<ActivityEvent> { public class MainService extends Service implements MainSContact.MainView, NetworkUtils.OnNetworkStatusChangedListener, LifecycleProvider<ActivityEvent> {
private static final String TAG = MainService.class.getSimpleName(); private static final String TAG = "MainService";
public MainSPresenter mPresenter; public MainSPresenter mPresenter;
private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE); private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);

View File

@@ -13,7 +13,7 @@ import javax.crypto.spec.SecretKeySpec;
*/ */
public class AESEncrypt { public class AESEncrypt {
private static final String TAG = AESEncrypt.class.getSimpleName() + " --> "; private static final String TAG = "AESEncrypt" + " --> ";
/** /**
* 加密算法 * 加密算法

View File

@@ -671,7 +671,7 @@ public class AesCbcWithIntegrity {
} }
} catch (Exception e) { } catch (Exception e) {
if (ALLOW_BROKEN_PRNG) { if (ALLOW_BROKEN_PRNG) {
Log.w(PrngFixes.class.getSimpleName(), "Failed to seed OpenSSL PRNG", e); Log.w("PrngFixes", "Failed to seed OpenSSL PRNG", e);
} else { } else {
throw new SecurityException("Failed to seed OpenSSL PRNG", e); throw new SecurityException("Failed to seed OpenSSL PRNG", e);
} }
@@ -714,7 +714,7 @@ public class AesCbcWithIntegrity {
SecureRandom rng1 = new SecureRandom(); SecureRandom rng1 = new SecureRandom();
if (!rng1.getProvider().getClass().getSimpleName().equals("LinuxPRNGSecureRandomProvider")) { if (!rng1.getProvider().getClass().getSimpleName().equals("LinuxPRNGSecureRandomProvider")) {
if (ALLOW_BROKEN_PRNG) { if (ALLOW_BROKEN_PRNG) {
Log.w(PrngFixes.class.getSimpleName(), Log.w("PrngFixes",
"new SecureRandom() backed by wrong Provider: " + rng1.getProvider().getClass()); "new SecureRandom() backed by wrong Provider: " + rng1.getProvider().getClass());
return; return;
} else { } else {
@@ -728,7 +728,7 @@ public class AesCbcWithIntegrity {
rng2 = SecureRandom.getInstance("SHA1PRNG"); rng2 = SecureRandom.getInstance("SHA1PRNG");
} catch (NoSuchAlgorithmException e) { } catch (NoSuchAlgorithmException e) {
if (ALLOW_BROKEN_PRNG) { if (ALLOW_BROKEN_PRNG) {
Log.w(PrngFixes.class.getSimpleName(), "SHA1PRNG not available", e); Log.w("PrngFixes", "SHA1PRNG not available", e);
return; return;
} else { } else {
new SecurityException("SHA1PRNG not available", e); new SecurityException("SHA1PRNG not available", e);
@@ -736,7 +736,7 @@ public class AesCbcWithIntegrity {
} }
if (!rng2.getProvider().getClass().getSimpleName().equals("LinuxPRNGSecureRandomProvider")) { if (!rng2.getProvider().getClass().getSimpleName().equals("LinuxPRNGSecureRandomProvider")) {
if (ALLOW_BROKEN_PRNG) { if (ALLOW_BROKEN_PRNG) {
Log.w(PrngFixes.class.getSimpleName(), Log.w("PrngFixes",
"SecureRandom.getInstance(\"SHA1PRNG\") backed by wrong" + " Provider: " "SecureRandom.getInstance(\"SHA1PRNG\") backed by wrong" + " Provider: "
+ rng2.getProvider().getClass()); + rng2.getProvider().getClass());
return; return;
@@ -824,7 +824,7 @@ public class AesCbcWithIntegrity {
} catch (IOException e) { } catch (IOException e) {
// On a small fraction of devices /dev/urandom is not // On a small fraction of devices /dev/urandom is not
// writable Log and ignore. // writable Log and ignore.
Log.w(PrngFixes.class.getSimpleName(), "Failed to mix seed into " Log.w("PrngFixes", "Failed to mix seed into "
+ URANDOM_FILE); + URANDOM_FILE);
} finally { } finally {
mSeeded = true; mSeeded = true;

View File

@@ -66,7 +66,7 @@ import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.schedulers.Schedulers; import io.reactivex.rxjava3.schedulers.Schedulers;
public class ApkUtils { public class ApkUtils {
private static final String TAG = ApkUtils.class.getSimpleName(); private static final String TAG = "ApkUtils";
public static final Set<String> aoleyunAPP = new HashSet<String>() {{ public static final Set<String> aoleyunAPP = new HashSet<String>() {{
this.add(BuildConfig.APPLICATION_ID); this.add(BuildConfig.APPLICATION_ID);

View File

@@ -24,7 +24,7 @@ import java.io.BufferedReader;
import java.io.FileReader; import java.io.FileReader;
public class AppUtil { public class AppUtil {
private static String TAG = AppUtil.class.getSimpleName(); private static String TAG = "AppUtil";
/** /**
* 描述:获取可用内存. * 描述:获取可用内存.

View File

@@ -10,7 +10,7 @@ import com.aoleyun.sn.service.main.MainService;
public class BootManager { public class BootManager {
private Context mContext; private Context mContext;
private final static String TAG = BootManager.class.getSimpleName(); private final static String TAG = "BootManager";
public BootManager(Context context) { public BootManager(Context context) {
this.mContext = context; this.mContext = context;

View File

@@ -15,7 +15,7 @@ import java.lang.reflect.Method;
public class CacheUtils { public class CacheUtils {
private static final String TAG = CacheUtils.class.getSimpleName(); private static final String TAG = "CacheUtils";
private final long MAX_WAIT_TIME = 60 * 1000; private final long MAX_WAIT_TIME = 60 * 1000;
private final long WAIT_TIME_INCR = 10 * 1000; private final long WAIT_TIME_INCR = 10 * 1000;

View File

@@ -45,7 +45,7 @@ import java.util.stream.Collectors;
* @描述 * @描述
*/ */
public class Camera2BackgroundUtil { public class Camera2BackgroundUtil {
private static final String TAG = Camera2BackgroundUtil.class.getSimpleName(); private static final String TAG = "Camera2BackgroundUtil";
private Context context; private Context context;
private CameraCallBack cameraCallBack; private CameraCallBack cameraCallBack;

View File

@@ -19,7 +19,7 @@ public class ForegroundAppUtil {
private static final long START_TIME = END_TIME - TIME_INTERVAL; private static final long START_TIME = END_TIME - TIME_INTERVAL;
public static final String TOPAPP_KEY = "TOP_ALWAYS_SHOW_APP_NAME"; public static final String TOPAPP_KEY = "TOP_ALWAYS_SHOW_APP_NAME";
private static String TAG = ForegroundAppUtil.class.getSimpleName(); private static String TAG = "ForegroundAppUtil";
public static String getForegroundPackageName(Context context) { public static String getForegroundPackageName(Context context) {
//系统应用可以直接获取 //系统应用可以直接获取

View File

@@ -111,7 +111,7 @@ import static android.app.ActivityManager.RECENT_IGNORE_UNAVAILABLE;
public class JGYUtils { public class JGYUtils {
private static final String TAG = JGYUtils.class.getSimpleName(); private static final String TAG = "JGYUtils";
/*九学王*/ /*九学王*/
public static final String JXW_LAUNCHER_PACKAGE_NAME = "com.jxw.launcher"; public static final String JXW_LAUNCHER_PACKAGE_NAME = "com.jxw.launcher";
@@ -1304,9 +1304,9 @@ public class JGYUtils {
pkgSet.addAll(ApkUtils.desktopAPP); pkgSet.addAll(ApkUtils.desktopAPP);
pkgSet.addAll(ApkUtils.aoleyunAPP); pkgSet.addAll(ApkUtils.aoleyunAPP);
pkgSet.addAll(ApkUtils.mJxwApp); pkgSet.addAll(ApkUtils.mJxwApp);
if ("K101".equals(Build.MODEL)||"AS001".equals(Build.MODEL)) {
if ("AS001".equals(Build.MODEL)) {
pkgSet.addAll(ApkUtils.aihuaApp); pkgSet.addAll(ApkUtils.aihuaApp);
pkgSet.addAll(aihuaAppList);
} }
if ("D1".equals(Build.MODEL)) { if ("D1".equals(Build.MODEL)) {
pkgSet.addAll(ApkUtils.dongwa); pkgSet.addAll(ApkUtils.dongwa);
@@ -1668,7 +1668,9 @@ public class JGYUtils {
this.add("com.aoleyunos.dop1"); this.add("com.aoleyunos.dop1");
this.add("com.aoleyunos.dop2"); this.add("com.aoleyunos.dop2");
this.add("com.aoleyunos.dop3"); this.add("com.aoleyunos.dop3");
}};
HashSet<String> aihuaAppList = new HashSet<String>() {{
//aihua //aihua
this.add("com.android.mms"); this.add("com.android.mms");
this.add("com.android.fmradio"); this.add("com.android.fmradio");
@@ -1684,10 +1686,11 @@ public class JGYUtils {
this.add("com.tongyi.aistudent"); this.add("com.tongyi.aistudent");
}}; }};
/**
* 隐藏系统所有应用 /**
* 除了设置,图库、视频、设置、文件管理器、通话、短信、日历、时钟、计算器 * 隐藏系统所有应用
*/ * 除了设置,图库、视频、设置、文件管理器、通话、短信、日历、时钟、计算器
*/
public void hideSystemAPP() { public void hideSystemAPP() {
PackageManager pm = mContext.getPackageManager(); PackageManager pm = mContext.getPackageManager();
try { try {

View File

@@ -15,7 +15,7 @@ import android.util.Log;
* @author fanhuitong * @author fanhuitong
*/ */
public class NetworkUtils { public class NetworkUtils {
private static String TAG = NetworkUtils.class.getSimpleName(); private static String TAG = "NetworkUtils";
/** /**
* 网络是否连接 * 网络是否连接

View File

@@ -5,7 +5,7 @@ import android.content.Context;
import android.util.Log; import android.util.Log;
public class ServiceAliveUtils { public class ServiceAliveUtils {
private static final String TAG = ServiceAliveUtils.class.getSimpleName(); private static final String TAG = "ServiceAliveUtils";
public static boolean isServiceAlive(Context mContext) { public static boolean isServiceAlive(Context mContext) {
boolean isServiceRunning = false; boolean isServiceRunning = false;

View File

@@ -32,7 +32,7 @@ import java.util.List;
public class SysSettingUtils { public class SysSettingUtils {
private static final String TAG = SysSettingUtils.class.getSimpleName(); private static final String TAG = "SysSettingUtils";
public SysSettingUtils() { public SysSettingUtils() {
@@ -390,9 +390,12 @@ public class SysSettingUtils {
} }
int old_setting_bht = Settings.System.getInt(context.getContentResolver(), CommonConfig.AOLE_ACTION_BHT_FORBID_ON, 1); int old_setting_bht = Settings.System.getInt(context.getContentResolver(), CommonConfig.AOLE_ACTION_BHT_FORBID_ON, 0);
int old_setting_bluetooth = Settings.System.getInt(context.getContentResolver(), CommonConfig.AOLE_ACTION_BT_FORBID_ON, 1); Log.e(TAG, "setBluetooth: old_setting_bht = " + old_setting_bht);
int old_setting_bhtvideo = mmkv.decodeInt(CommonConfig.AOLE_ACTION_BHTVIDEO_FORBID_ON, 1); int old_setting_bluetooth = Settings.System.getInt(context.getContentResolver(), CommonConfig.AOLE_ACTION_BT_FORBID_ON, 0);
Log.e(TAG, "setBluetooth: old_setting_bluetooth = " + old_setting_bluetooth);
int old_setting_bhtvideo = mmkv.decodeInt(CommonConfig.AOLE_ACTION_BHTVIDEO_FORBID_ON, 0);
Log.e(TAG, "setBluetooth: old_setting_bhtvideo = " + old_setting_bhtvideo);
if (old_setting_bht != setting_bht) { if (old_setting_bht != setting_bht) {

View File

@@ -31,7 +31,7 @@ import java.util.Date;
* 时间管控工具类 * 时间管控工具类
*/ */
public class TimeUtils { public class TimeUtils {
private static final String TAG = TimeUtils.class.getSimpleName(); private static final String TAG = "TimeUtils";
private static DateFormat df = new SimpleDateFormat("HH:mm"); private static DateFormat df = new SimpleDateFormat("HH:mm");
public static final String START_TIME_KEY = "START_TIME"; public static final String START_TIME_KEY = "START_TIME";
public static final String END_TIME_KEY = "END_TIME"; public static final String END_TIME_KEY = "END_TIME";

View File

@@ -28,7 +28,7 @@ import okhttp3.Request;
import okhttp3.Response; import okhttp3.Response;
public class URLUtils { public class URLUtils {
private static final String TAG = URLUtils.class.getSimpleName(); private static final String TAG = "URLUtils";
private Context mContext; private Context mContext;
private HashSet<String> baseURLList = new HashSet<>(); private HashSet<String> baseURLList = new HashSet<>();
private HashSet<String> nohttpURLList = new HashSet<>(); private HashSet<String> nohttpURLList = new HashSet<>();

View File

@@ -109,7 +109,7 @@ import static android.content.Context.WIFI_SERVICE;
public class Utils { public class Utils {
private static String TAG = Utils.class.getSimpleName(); private static String TAG = "Utils";
// MD5 设备地址标识 // MD5 设备地址标识
public static String getMAC(Context context) { public static String getMAC(Context context) {

View File

@@ -30,7 +30,7 @@ public class WiFiUtils {
private static WifiManager mWifiManager; private static WifiManager mWifiManager;
@SuppressLint("StaticFieldLeak") @SuppressLint("StaticFieldLeak")
private Context mContext; private Context mContext;
private static String TAG = WiFiUtils.class.getSimpleName(); private static String TAG = "WiFiUtils";
public WiFiUtils(Context context) { public WiFiUtils(Context context) {
this.mContext = context; this.mContext = context;

View File

@@ -51,7 +51,7 @@ public class XAPKUtils {
//https://www.jianshu.com/p/cd10d5278ebf?utm_campaign=hugo //https://www.jianshu.com/p/cd10d5278ebf?utm_campaign=hugo
//https://www.jianshu.com/p/580b61ee7aee //https://www.jianshu.com/p/580b61ee7aee
private static final String TAG = XAPKUtils.class.getSimpleName(); private static final String TAG = "XAPKUtils";
private static XAPKUtils sInstance; private static XAPKUtils sInstance;
private Context mContext; private Context mContext;

View File

@@ -1,131 +1,145 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" tools:context=".activity.requestlog.RequestLogActivity">
android:layout_height="match_parent">
<data>
<variable
name="click"
type="com.aoleyun.sn.activity.requestlog.RequestLogActivity.BtnClick" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/bannerLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/dp_32" android:layout_height="match_parent">
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/iv_back" android:id="@+id/bannerLayout"
android:layout_width="@dimen/dp_16" android:layout_width="match_parent"
android:layout_height="@dimen/dp_16"
android:layout_marginStart="@dimen/dp_8"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/bt_return"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="运行日志"
android:textColor="@color/title_textcolor"
android:textSize="@dimen/sp_14"
android:textStyle="bold"
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_refresh"
android:layout_width="@dimen/dp_16"
android:layout_height="@dimen/dp_16"
android:layout_marginEnd="@dimen/dp_8"
android:adjustViewBounds="true"
android:scaleType="centerInside"
android:src="@drawable/refresh"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:id="@+id/ll_title"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_32"
android:orientation="horizontal"
app:layout_constraintTop_toBottomOf="@+id/bannerLayout">
<TextView
android:id="@+id/tv_code"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="代码" />
<TextView
android:id="@+id/tv_timestamp"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="时间" />
<TextView
android:id="@+id/tv_event"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="事件" />
<TextView
android:id="@+id/tv_operate"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="操作" />
<TextView
android:id="@+id/tv_content"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="3"
android:gravity="center"
android:text="内容" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerview"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@+id/constraintLayout4"
app:layout_constraintTop_toBottomOf="@+id/ll_title" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout4"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_64"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<ImageView
android:id="@+id/iv_delete"
android:layout_width="@dimen/dp_32"
android:layout_height="@dimen/dp_32" android:layout_height="@dimen/dp_32"
android:adjustViewBounds="true" app:layout_constraintEnd_toEndOf="parent"
android:scaleType="centerInside" app:layout_constraintHorizontal_bias="0.0"
android:src="@drawable/delete" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/iv_back"
android:layout_width="@dimen/dp_16"
android:layout_height="@dimen/dp_16"
android:layout_marginStart="@dimen/dp_8"
android:adjustViewBounds="true"
android:onClick="@{click::exit}"
android:scaleType="centerCrop"
android:src="@drawable/bt_return"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="运行日志"
android:textColor="@color/title_textcolor"
android:textSize="@dimen/sp_14"
android:textStyle="bold"
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_refresh"
android:layout_width="@dimen/dp_16"
android:layout_height="@dimen/dp_16"
android:layout_marginEnd="@dimen/dp_8"
android:adjustViewBounds="true"
android:onClick="@{click::refresh}"
android:scaleType="centerInside"
android:src="@drawable/refresh"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:id="@+id/ll_title"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_32"
android:orientation="horizontal"
app:layout_constraintTop_toBottomOf="@+id/bannerLayout">
<TextView
android:id="@+id/tv_code"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="代码" />
<TextView
android:id="@+id/tv_timestamp"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="时间" />
<TextView
android:id="@+id/tv_event"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="事件" />
<TextView
android:id="@+id/tv_operate"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="操作" />
<TextView
android:id="@+id/tv_content"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="3"
android:gravity="center"
android:text="内容" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerview"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@+id/constraintLayout4"
app:layout_constraintTop_toBottomOf="@+id/ll_title" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout4"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_64"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent">
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/iv_delete"
android:layout_width="@dimen/dp_32"
android:layout_height="@dimen/dp_32"
android:onClick="@{click::delete}"
android:adjustViewBounds="true"
android:scaleType="centerInside"
android:src="@drawable/delete"
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>
</androidx.constraintlayout.widget.ConstraintLayout> </layout>

View File

@@ -1,98 +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:id="@+id/root"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activity.update.UpdateActivity">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_40"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/iv_back"
android:layout_width="@dimen/dp_24"
android:layout_height="@dimen/dp_24"
android:layout_marginStart="@dimen/dp_8"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/bt_return"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="应用更新检测"
android:textColor="@color/black"
android:textSize="@dimen/sp_14"
android:textStyle="bold"
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_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/main">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginStart="@dimen/dp_32"
android:layout_marginEnd="@dimen/dp_32"
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_nodata"
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">
<ImageView
android:id="@+id/imageView2"
android:layout_width="@dimen/dp_100"
android:layout_height="@dimen/dp_100"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/icon_nodata"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_16"
android:text="没有找到更新信息"
android:textSize="@dimen/sp_10"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/imageView2"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="@+id/imageView2"
app:layout_constraintTop_toBottomOf="@+id/imageView2" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -577,8 +577,8 @@
<TextView <TextView
android:id="@+id/tv_system_version" android:id="@+id/tv_system_version"
android:layout_width="wrap_content" android:layout_width="7dp"
android:layout_height="wrap_content" android:layout_height="12dp"
android:layout_marginEnd="@dimen/dp_16" android:layout_marginEnd="@dimen/dp_16"
android:ellipsize="end" android:ellipsize="end"
android:maxLength="30" android:maxLength="30"

View File

@@ -1,131 +1,145 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" tools:context=".activity.requestlog.RequestLogActivity">
android:layout_height="match_parent">
<data>
<variable
name="click"
type="com.aoleyun.sn.activity.requestlog.RequestLogActivity.BtnClick" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/bannerLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/dp_32" android:layout_height="match_parent">
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/iv_back" android:id="@+id/bannerLayout"
android:layout_width="@dimen/dp_16" android:layout_width="match_parent"
android:layout_height="@dimen/dp_16"
android:layout_marginStart="@dimen/dp_8"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/bt_return"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="运行日志"
android:textColor="@color/title_textcolor"
android:textSize="@dimen/sp_14"
android:textStyle="bold"
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_refresh"
android:layout_width="@dimen/dp_16"
android:layout_height="@dimen/dp_16"
android:layout_marginEnd="@dimen/dp_8"
android:adjustViewBounds="true"
android:scaleType="centerInside"
android:src="@drawable/refresh"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:id="@+id/ll_title"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_32"
android:orientation="horizontal"
app:layout_constraintTop_toBottomOf="@+id/bannerLayout">
<TextView
android:id="@+id/tv_code"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="代码" />
<TextView
android:id="@+id/tv_timestamp"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="时间" />
<TextView
android:id="@+id/tv_event"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="事件" />
<TextView
android:id="@+id/tv_operate"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="操作" />
<TextView
android:id="@+id/tv_content"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="3"
android:gravity="center"
android:text="内容" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerview"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@+id/constraintLayout4"
app:layout_constraintTop_toBottomOf="@+id/ll_title" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout4"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_64"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<ImageView
android:id="@+id/iv_delete"
android:layout_width="@dimen/dp_32"
android:layout_height="@dimen/dp_32" android:layout_height="@dimen/dp_32"
android:adjustViewBounds="true" app:layout_constraintEnd_toEndOf="parent"
android:scaleType="centerInside" app:layout_constraintHorizontal_bias="0.0"
android:src="@drawable/delete" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/iv_back"
android:layout_width="@dimen/dp_16"
android:layout_height="@dimen/dp_16"
android:layout_marginStart="@dimen/dp_8"
android:adjustViewBounds="true"
android:onClick="@{click::exit}"
android:scaleType="centerCrop"
android:src="@drawable/bt_return"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="运行日志"
android:textColor="@color/title_textcolor"
android:textSize="@dimen/sp_14"
android:textStyle="bold"
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_refresh"
android:layout_width="@dimen/dp_16"
android:layout_height="@dimen/dp_16"
android:layout_marginEnd="@dimen/dp_8"
android:adjustViewBounds="true"
android:onClick="@{click::refresh}"
android:scaleType="centerInside"
android:src="@drawable/refresh"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:id="@+id/ll_title"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_32"
android:orientation="horizontal"
app:layout_constraintTop_toBottomOf="@+id/bannerLayout">
<TextView
android:id="@+id/tv_code"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="代码" />
<TextView
android:id="@+id/tv_timestamp"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="时间" />
<TextView
android:id="@+id/tv_event"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="事件" />
<TextView
android:id="@+id/tv_operate"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="操作" />
<TextView
android:id="@+id/tv_content"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="3"
android:gravity="center"
android:text="内容" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerview"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@+id/constraintLayout4"
app:layout_constraintTop_toBottomOf="@+id/ll_title" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout4"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_64"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent">
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/iv_delete"
android:layout_width="@dimen/dp_32"
android:layout_height="@dimen/dp_32"
android:adjustViewBounds="true"
android:onClick="@{click::delete}"
android:scaleType="centerInside"
android:src="@drawable/delete"
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>
</androidx.constraintlayout.widget.ConstraintLayout> </layout>

View File

@@ -1,96 +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:id="@+id/root"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activity.update.UpdateActivity">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_40"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/iv_back"
android:layout_width="@dimen/dp_24"
android:layout_height="@dimen/dp_24"
android:layout_marginStart="@dimen/dp_8"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/bt_return"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="应用更新检测"
android:textColor="@color/black"
android:textSize="@dimen/sp_14"
android:textStyle="bold"
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_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/main">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
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_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_nodata"
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">
<ImageView
android:id="@+id/imageView2"
android:layout_width="@dimen/dp_100"
android:layout_height="@dimen/dp_100"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/icon_nodata"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_16"
android:text="没有找到更新信息"
android:textSize="@dimen/sp_10"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/imageView2"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="@+id/imageView2"
app:layout_constraintTop_toBottomOf="@+id/imageView2" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,72 +1,79 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activity.CleanupActivity"> tools:context=".activity.CleanupActivity">
<data>
</data>
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="@dimen/dp_260" android:layout_width="match_parent"
android:layout_height="@dimen/dp_180" android:layout_height="match_parent">
android:layout_centerInParent="true"
android:background="@drawable/bg_dialog"
android:minWidth="@dimen/dp_260"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/title" android:layout_width="@dimen/dp_260"
android:layout_width="wrap_content" android:layout_height="@dimen/dp_180"
android:layout_height="wrap_content" android:layout_centerInParent="true"
android:layout_gravity="center" android:background="@drawable/bg_dialog"
android:layout_marginTop="@dimen/dp_16" android:minWidth="@dimen/dp_260"
android:gravity="center_vertical" android:orientation="vertical"
android:text="一键加速"
android:textColor="@color/black"
android:textSize="@dimen/sp_13"
android:textStyle="bold"
android:visibility="visible"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="一键加速" />
<com.king.view.circleprogressview.CircleProgressView
android:id="@+id/cpv"
android:layout_width="@dimen/dp_100"
android:layout_height="@dimen/dp_100"
app:cpvDuration="1000"
app:cpvLabelTextColor="@color/black"
app:cpvLabelTextSize="@dimen/sp_11"
app:cpvNormalColor="#D8EAFD"
app:cpvProgressColor="#0480FF"
app:cpvShowTick="false"
app:cpvStrokeWidth="@dimen/dp_12"
app:layout_constraintBottom_toTopOf="@+id/tv_clean"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/title" />
<TextView
android:id="@+id/tv_clean"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_8"
android:layout_weight="1"
android:background="@drawable/clean_background"
android:gravity="center"
android:singleLine="true"
android:text="一键加速"
android:textColor="@color/white"
android:textSize="@dimen/sp_8"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
tools:text="一键加速" /> app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="@dimen/dp_16"
android:gravity="center_vertical"
android:text="一键加速"
android:textColor="@color/black"
android:textSize="@dimen/sp_13"
android:textStyle="bold"
android:visibility="visible"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="一键加速" />
<com.king.view.circleprogressview.CircleProgressView
android:id="@+id/cpv"
android:layout_width="@dimen/dp_100"
android:layout_height="@dimen/dp_100"
app:cpvDuration="1000"
app:cpvLabelTextColor="@color/black"
app:cpvLabelTextSize="@dimen/sp_11"
app:cpvNormalColor="#D8EAFD"
app:cpvProgressColor="#0480FF"
app:cpvShowTick="false"
app:cpvStrokeWidth="@dimen/dp_12"
app:layout_constraintBottom_toTopOf="@+id/tv_clean"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/title" />
<TextView
android:id="@+id/tv_clean"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_8"
android:layout_weight="1"
android:background="@drawable/clean_background"
android:gravity="center"
android:singleLine="true"
android:text="一键加速"
android:textColor="@color/white"
android:textSize="@dimen/sp_8"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:text="一键加速" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </layout>

View File

@@ -1,284 +1,291 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#1f2127"
tools:context=".activity.EyeProtectionActivity"> tools:context=".activity.EyeProtectionActivity">
<data>
</data>
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/dp_32" android:layout_height="match_parent"
app:layout_constraintTop_toTopOf="parent"> android:background="#1f2127">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_exit" android:id="@+id/constraintLayout"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="@dimen/dp_32"
android:layout_marginStart="@dimen/dp_8"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
<ImageView <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/iv_back" android:id="@+id/cl_exit"
android:layout_width="@dimen/dp_16"
android:layout_height="@dimen/dp_16"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/back"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="护眼功能" android:layout_marginStart="@dimen/dp_8"
android:textColor="@color/white"
android:textSize="@dimen/sp_13"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/iv_back" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/iv_back"
android:layout_width="@dimen/dp_16"
android:layout_height="@dimen/dp_16"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/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:text="护眼功能"
android:textColor="@color/white"
android:textSize="@dimen/sp_13"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/iv_back"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<ScrollView <ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/constraintLayout">
<LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="0dp"
android:orientation="vertical"> app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/constraintLayout">
<androidx.constraintlayout.widget.ConstraintLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/dp_54" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_64" android:orientation="vertical">
android:layout_marginEnd="@dimen/dp_64"
android:background="@drawable/item_eye_background">
<TextView <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/textView1" android:layout_width="match_parent"
android:layout_width="wrap_content" android:layout_height="@dimen/dp_54"
android:layout_height="wrap_content" android:layout_marginStart="@dimen/dp_64"
android:layout_marginStart="@dimen/dp_8" android:layout_marginEnd="@dimen/dp_64"
android:maxLines="1" android:background="@drawable/item_eye_background">
android:text="滤蓝光模式"
android:textColor="@color/white"
android:textSize="@dimen/sp_11"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView <TextView
android:layout_width="0dp" android:id="@+id/textView1"
android:layout_height="wrap_content" android:layout_width="wrap_content"
android:layout_marginEnd="@dimen/dp_16" android:layout_height="wrap_content"
android:maxLines="2" android:layout_marginStart="@dimen/dp_8"
android:text="开启滤蓝光护眼,让屏幕偏暖色,保护视力,减少视觉疲劳。" android:maxLines="1"
android:textColor="@color/white" android:text="滤蓝光模式"
android:textSize="@dimen/sp_9" android:textColor="@color/white"
app:layout_constraintBottom_toBottomOf="parent" android:textSize="@dimen/sp_11"
app:layout_constraintEnd_toStartOf="@+id/toggleButton1" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintStart_toStartOf="@+id/textView1" app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toBottomOf="@+id/textView1" />
<com.aoleyun.sn.view.ToggleButton <TextView
android:id="@+id/toggleButton1" android:layout_width="0dp"
android:layout_width="@dimen/dp_34" android:layout_height="wrap_content"
android:layout_height="@dimen/dp_18" android:layout_marginEnd="@dimen/dp_16"
android:layout_marginEnd="@dimen/dp_16" android:maxLines="2"
app:layout_constraintBottom_toBottomOf="parent" android:text="开启滤蓝光护眼,让屏幕偏暖色,保护视力,减少视觉疲劳。"
app:layout_constraintEnd_toEndOf="parent" android:textColor="@color/white"
app:layout_constraintTop_toTopOf="parent" /> android:textSize="@dimen/sp_9"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/toggleButton1"
app:layout_constraintStart_toStartOf="@+id/textView1"
app:layout_constraintTop_toBottomOf="@+id/textView1" />
</androidx.constraintlayout.widget.ConstraintLayout> <com.aoleyun.sn.view.ToggleButton
android:id="@+id/toggleButton1"
android:layout_width="@dimen/dp_34"
android:layout_height="@dimen/dp_18"
android:layout_marginEnd="@dimen/dp_16"
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="@dimen/dp_54"
android:layout_marginStart="@dimen/dp_64"
android:layout_marginTop="@dimen/dp_8"
android:layout_marginEnd="@dimen/dp_64"
android:background="@drawable/item_eye_background">
<TextView <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/textView2" android:layout_width="match_parent"
android:layout_width="wrap_content" android:layout_height="@dimen/dp_54"
android:layout_height="wrap_content" android:layout_marginStart="@dimen/dp_64"
android:layout_marginStart="@dimen/dp_8" android:layout_marginTop="@dimen/dp_8"
android:maxLines="1" android:layout_marginEnd="@dimen/dp_64"
android:text="阅读模式" android:background="@drawable/item_eye_background">
android:textColor="@color/white"
android:textSize="@dimen/sp_11"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView <TextView
android:layout_width="0dp" android:id="@+id/textView2"
android:layout_height="wrap_content" android:layout_width="wrap_content"
android:layout_marginEnd="@dimen/dp_16" android:layout_height="wrap_content"
android:maxLines="2" android:layout_marginStart="@dimen/dp_8"
android:text="通过模拟纸张的色调,体验如墨水屏般的显示效果,保护视力。" android:maxLines="1"
android:textColor="@color/white" android:text="阅读模式"
android:textSize="@dimen/sp_9" android:textColor="@color/white"
app:layout_constraintBottom_toBottomOf="parent" android:textSize="@dimen/sp_11"
app:layout_constraintEnd_toStartOf="@+id/toggleButton2" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintStart_toStartOf="@+id/textView2" app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toBottomOf="@+id/textView2" />
<com.aoleyun.sn.view.ToggleButton <TextView
android:id="@+id/toggleButton2" android:layout_width="0dp"
android:layout_width="@dimen/dp_34" android:layout_height="wrap_content"
android:layout_height="@dimen/dp_18" android:layout_marginEnd="@dimen/dp_16"
android:layout_marginEnd="@dimen/dp_16" android:maxLines="2"
app:layout_constraintBottom_toBottomOf="parent" android:text="通过模拟纸张的色调,体验如墨水屏般的显示效果,保护视力。"
app:layout_constraintEnd_toEndOf="parent" android:textColor="@color/white"
app:layout_constraintTop_toTopOf="parent" /> android:textSize="@dimen/sp_9"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/toggleButton2"
app:layout_constraintStart_toStartOf="@+id/textView2"
app:layout_constraintTop_toBottomOf="@+id/textView2" />
</androidx.constraintlayout.widget.ConstraintLayout> <com.aoleyun.sn.view.ToggleButton
android:id="@+id/toggleButton2"
android:layout_width="@dimen/dp_34"
android:layout_height="@dimen/dp_18"
android:layout_marginEnd="@dimen/dp_16"
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="@dimen/dp_54"
android:layout_marginStart="@dimen/dp_64"
android:layout_marginTop="@dimen/dp_8"
android:layout_marginEnd="@dimen/dp_64"
android:background="@drawable/item_eye_background"
android:visibility="gone">
<TextView <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/textView3" android:layout_width="match_parent"
android:layout_width="wrap_content" android:layout_height="@dimen/dp_54"
android:layout_height="wrap_content" android:layout_marginStart="@dimen/dp_64"
android:layout_marginStart="@dimen/dp_8" android:layout_marginTop="@dimen/dp_8"
android:maxLines="1" android:layout_marginEnd="@dimen/dp_64"
android:text="躺姿提醒(暂未开放)" android:background="@drawable/item_eye_background"
android:textColor="@color/white" android:visibility="gone">
android:textSize="@dimen/sp_11"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView <TextView
android:layout_width="0dp" android:id="@+id/textView3"
android:layout_height="wrap_content" android:layout_width="wrap_content"
android:layout_marginEnd="@dimen/dp_16" android:layout_height="wrap_content"
android:maxLines="2" android:layout_marginStart="@dimen/dp_8"
android:text="通仰躺、侧卧时使用平板,提醒坐正后使用" android:maxLines="1"
android:textColor="@color/white" android:text="躺姿提醒(暂未开放)"
android:textSize="@dimen/sp_9" android:textColor="@color/white"
app:layout_constraintBottom_toBottomOf="parent" android:textSize="@dimen/sp_11"
app:layout_constraintEnd_toStartOf="@+id/toggleButton3" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintStart_toStartOf="@+id/textView3" app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toBottomOf="@+id/textView3" />
<com.aoleyun.sn.view.ToggleButton <TextView
android:id="@+id/toggleButton3" android:layout_width="0dp"
android:layout_width="@dimen/dp_34" android:layout_height="wrap_content"
android:layout_height="@dimen/dp_18" android:layout_marginEnd="@dimen/dp_16"
android:layout_marginEnd="@dimen/dp_16" android:maxLines="2"
app:layout_constraintBottom_toBottomOf="parent" android:text="通仰躺、侧卧时使用平板,提醒坐正后使用"
app:layout_constraintEnd_toEndOf="parent" android:textColor="@color/white"
app:layout_constraintTop_toTopOf="parent" /> android:textSize="@dimen/sp_9"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/toggleButton3"
app:layout_constraintStart_toStartOf="@+id/textView3"
app:layout_constraintTop_toBottomOf="@+id/textView3" />
</androidx.constraintlayout.widget.ConstraintLayout> <com.aoleyun.sn.view.ToggleButton
android:id="@+id/toggleButton3"
android:layout_width="@dimen/dp_34"
android:layout_height="@dimen/dp_18"
android:layout_marginEnd="@dimen/dp_16"
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="@dimen/dp_54"
android:layout_marginStart="@dimen/dp_64"
android:layout_marginTop="@dimen/dp_8"
android:layout_marginEnd="@dimen/dp_64"
android:background="@drawable/item_eye_background"
android:visibility="gone">
<TextView <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/textView4" android:layout_width="match_parent"
android:layout_width="wrap_content" android:layout_height="@dimen/dp_54"
android:layout_height="wrap_content" android:layout_marginStart="@dimen/dp_64"
android:layout_marginStart="@dimen/dp_8" android:layout_marginTop="@dimen/dp_8"
android:maxLines="1" android:layout_marginEnd="@dimen/dp_64"
android:text="抖动提醒(暂未开放)" android:background="@drawable/item_eye_background"
android:textColor="@color/white" android:visibility="gone">
android:textSize="@dimen/sp_11"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView <TextView
android:layout_width="0dp" android:id="@+id/textView4"
android:layout_height="wrap_content" android:layout_width="wrap_content"
android:layout_marginEnd="@dimen/dp_16" android:layout_height="wrap_content"
android:maxLines="2" android:layout_marginStart="@dimen/dp_8"
android:text="走路、乘车等抖动环境下,提醒到平稳环境下使用" android:maxLines="1"
android:textColor="@color/white" android:text="抖动提醒(暂未开放)"
android:textSize="@dimen/sp_9" android:textColor="@color/white"
app:layout_constraintBottom_toBottomOf="parent" android:textSize="@dimen/sp_11"
app:layout_constraintEnd_toStartOf="@+id/toggleButton4" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintStart_toStartOf="@+id/textView4" app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toBottomOf="@+id/textView4" />
<com.aoleyun.sn.view.ToggleButton <TextView
android:id="@+id/toggleButton4" android:layout_width="0dp"
android:layout_width="@dimen/dp_34" android:layout_height="wrap_content"
android:layout_height="@dimen/dp_18" android:layout_marginEnd="@dimen/dp_16"
android:layout_marginEnd="@dimen/dp_16" android:maxLines="2"
app:layout_constraintBottom_toBottomOf="parent" android:text="走路、乘车等抖动环境下,提醒到平稳环境下使用"
app:layout_constraintEnd_toEndOf="parent" android:textColor="@color/white"
app:layout_constraintTop_toTopOf="parent" /> android:textSize="@dimen/sp_9"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/toggleButton4"
app:layout_constraintStart_toStartOf="@+id/textView4"
app:layout_constraintTop_toBottomOf="@+id/textView4" />
</androidx.constraintlayout.widget.ConstraintLayout> <com.aoleyun.sn.view.ToggleButton
android:id="@+id/toggleButton4"
android:layout_width="@dimen/dp_34"
android:layout_height="@dimen/dp_18"
android:layout_marginEnd="@dimen/dp_16"
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="@dimen/dp_54"
android:layout_marginStart="@dimen/dp_64"
android:layout_marginTop="@dimen/dp_8"
android:layout_marginEnd="@dimen/dp_64"
android:background="@drawable/item_eye_background"
android:visibility="gone">
<TextView <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/textView5" android:layout_width="match_parent"
android:layout_width="wrap_content" android:layout_height="@dimen/dp_54"
android:layout_height="wrap_content" android:layout_marginStart="@dimen/dp_64"
android:layout_marginStart="@dimen/dp_8" android:layout_marginTop="@dimen/dp_8"
android:maxLines="1" android:layout_marginEnd="@dimen/dp_64"
android:text="亮度提醒(暂未开放)" android:background="@drawable/item_eye_background"
android:textColor="@color/white" android:visibility="gone">
android:textSize="@dimen/sp_11"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView <TextView
android:layout_width="0dp" android:id="@+id/textView5"
android:layout_height="wrap_content" android:layout_width="wrap_content"
android:layout_marginEnd="@dimen/dp_16" android:layout_height="wrap_content"
android:maxLines="2" android:layout_marginStart="@dimen/dp_8"
android:text="环境亮度过亮或过暗时,提醒到事宜的环境下使用" android:maxLines="1"
android:textColor="@color/white" android:text="亮度提醒(暂未开放)"
android:textSize="@dimen/sp_9" android:textColor="@color/white"
app:layout_constraintBottom_toBottomOf="parent" android:textSize="@dimen/sp_11"
app:layout_constraintEnd_toStartOf="@+id/toggleButton5" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintStart_toStartOf="@+id/textView5" app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toBottomOf="@+id/textView5" />
<com.aoleyun.sn.view.ToggleButton <TextView
android:id="@+id/toggleButton5" android:layout_width="0dp"
android:layout_width="@dimen/dp_34" android:layout_height="wrap_content"
android:layout_height="@dimen/dp_18" android:layout_marginEnd="@dimen/dp_16"
android:layout_marginEnd="@dimen/dp_16" android:maxLines="2"
app:layout_constraintBottom_toBottomOf="parent" android:text="环境亮度过亮或过暗时,提醒到事宜的环境下使用"
app:layout_constraintEnd_toEndOf="parent" android:textColor="@color/white"
app:layout_constraintTop_toTopOf="parent" /> android:textSize="@dimen/sp_9"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/toggleButton5"
app:layout_constraintStart_toStartOf="@+id/textView5"
app:layout_constraintTop_toBottomOf="@+id/textView5" />
</androidx.constraintlayout.widget.ConstraintLayout> <com.aoleyun.sn.view.ToggleButton
android:id="@+id/toggleButton5"
android:layout_width="@dimen/dp_34"
android:layout_height="@dimen/dp_18"
android:layout_marginEnd="@dimen/dp_16"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</LinearLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView> </LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@@ -1,96 +1,106 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/root"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activity.update.UpdateActivity"> tools:context=".activity.update.UpdateActivity">
<androidx.constraintlayout.widget.ConstraintLayout <data>
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_40"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView <variable
android:id="@+id/iv_back" name="click"
android:layout_width="@dimen/dp_24" type="com.aoleyun.sn.activity.update.UpdateActivity.BtnClick" />
android:layout_height="@dimen/dp_24" </data>
android:layout_marginStart="@dimen/dp_8"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/bt_return"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="应用更新检测"
android:textColor="@color/black"
android:textSize="@dimen/sp_14"
android:textStyle="bold"
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:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="match_parent">
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/main">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
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_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_nodata" android:id="@+id/main"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="@dimen/dp_40"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
<ImageView <ImageView
android:id="@+id/imageView2" android:id="@+id/iv_back"
android:layout_width="@dimen/dp_100" android:layout_width="@dimen/dp_24"
android:layout_height="@dimen/dp_100" android:layout_height="@dimen/dp_24"
android:layout_marginStart="@dimen/dp_8"
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:onClick="@{click::exit}"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@drawable/icon_nodata" android:src="@drawable/bt_return"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<TextView <TextView
android:id="@+id/textView7" android:id="@+id/textView5"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_16" android:text="应用更新检测"
android:text="没有找到更新信息" android:textColor="@color/black"
android:textSize="@dimen/sp_10" android:textSize="@dimen/sp_14"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/imageView2" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintStart_toStartOf="@+id/imageView2" app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toBottomOf="@+id/imageView2" /> </androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/main">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
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_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_nodata"
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">
<ImageView
android:id="@+id/imageView2"
android:layout_width="@dimen/dp_100"
android:layout_height="@dimen/dp_100"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/icon_nodata"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_16"
android:text="没有找到更新信息"
android:textSize="@dimen/sp_10"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/imageView2"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="@+id/imageView2"
app:layout_constraintTop_toBottomOf="@+id/imageView2" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </layout>