version:1.0.4
fix: update:增加下载
@@ -16,8 +16,8 @@ android {
|
||||
minSdkVersion 24
|
||||
targetSdkVersion 29
|
||||
|
||||
versionCode 4
|
||||
versionName "1.0.3"
|
||||
versionCode 5
|
||||
versionName "1.0.4"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@ import com.hjq.toast.Toaster;
|
||||
import com.tencent.mmkv.MMKV;
|
||||
import com.xwad.os.BuildConfig;
|
||||
import com.xwad.os.R;
|
||||
import com.xwad.os.activity.activation.ActivationActivity;
|
||||
import com.xwad.os.activity.login.LoginActivity;
|
||||
import com.xwad.os.activity.permission.PermissionActivity;
|
||||
import com.xwad.os.base.mvvm.BaseMvvmActivity;
|
||||
@@ -53,17 +52,24 @@ import com.xwad.os.jxw.JxwPackageConfig;
|
||||
import com.xwad.os.jxw.SPUtils;
|
||||
import com.xwad.os.jxw.StudyRecordAPKInfo;
|
||||
import com.xwad.os.jxw.TabAdapter;
|
||||
import com.xwad.os.jxw.Util;
|
||||
import com.xwad.os.jxw.util.Util;
|
||||
import com.xwad.os.jxw.event.UpdateGradeEvent;
|
||||
import com.xwad.os.jxw.fragment.SztzFragment;
|
||||
import com.xwad.os.manager.DeviceSNManager;
|
||||
import com.xwad.os.manager.RemoteManager;
|
||||
import com.xwad.os.utils.DataUtil;
|
||||
import com.xwad.os.utils.OpenApkUtils;
|
||||
import com.xwad.os.utils.Utils;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class HomeActivity extends BaseMvvmActivity<HomeViewModel, ActivityHomeBinding> implements RemoteManager.ConnectedListener {
|
||||
private static final String TAG = "MainActivity";
|
||||
private static final String TAG = "HomeActivity";
|
||||
|
||||
private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
|
||||
|
||||
@@ -72,6 +78,8 @@ public class HomeActivity extends BaseMvvmActivity<HomeViewModel, ActivityHomeBi
|
||||
|
||||
private int defaultCurrent = 0;
|
||||
|
||||
private TabAdapter tabAdapter;
|
||||
|
||||
@Override
|
||||
public void onRemoteConnected() {
|
||||
Log.e(TAG, "onConnected: ");
|
||||
@@ -95,6 +103,11 @@ public class HomeActivity extends BaseMvvmActivity<HomeViewModel, ActivityHomeBi
|
||||
@Override
|
||||
public void initView() {
|
||||
Log.e(TAG, "initView: getSerial = " + RemoteManager.getInstance().getSerial());
|
||||
Log.e(TAG, "initView: getDeviceSN = " + DeviceSNManager.getDeviceSN());
|
||||
|
||||
if (!EventBus.getDefault().isRegistered(this)) {
|
||||
EventBus.getDefault().register(this);
|
||||
}
|
||||
|
||||
startActivity(new Intent(HomeActivity.this, LoginActivity.class));
|
||||
RemoteManager.setListener(this);
|
||||
@@ -123,7 +136,8 @@ public class HomeActivity extends BaseMvvmActivity<HomeViewModel, ActivityHomeBi
|
||||
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);
|
||||
linearLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
|
||||
mViewDataBinding.rlTab.setLayoutManager(linearLayoutManager);
|
||||
TabAdapter tabAdapter = new TabAdapter(tabBeanLists);
|
||||
|
||||
tabAdapter = new TabAdapter(tabBeanLists);
|
||||
tabAdapter.setOnItemClickListener(new TabAdapter.RadiaoOnItemClickListener() {
|
||||
@Override
|
||||
public void onSelectClick(int i) {
|
||||
@@ -133,37 +147,8 @@ public class HomeActivity extends BaseMvvmActivity<HomeViewModel, ActivityHomeBi
|
||||
});
|
||||
mViewDataBinding.rlTab.setAdapter(tabAdapter);
|
||||
|
||||
fragments.clear();
|
||||
tabBeanLists.clear();
|
||||
fragments.add(new MineFragment());
|
||||
fragments.add(new AiFragment());
|
||||
fragments.add(new ChineseFragment());
|
||||
fragments.add(new MathFragment());
|
||||
fragments.add(new EnglishFragment());
|
||||
fragments.add(new ComplexFragment());
|
||||
fragments.add(new ReadFragment());
|
||||
// if (Util.checkGrade(SPUtils.getGrade()).equals("小学")) {
|
||||
// this.fragments.add(new SztzFragment());
|
||||
// }
|
||||
fragments.add(new SafeFragment());
|
||||
tabBeanLists.add(new TabBean("我的", R.drawable.icon_tab_wd, R.drawable.icon_tab_wd_pre));
|
||||
tabBeanLists.add(new TabBean("AI+学习", R.drawable.icon_tab_aixx, R.drawable.icon_tab_aixx_pre));
|
||||
tabBeanLists.add(new TabBean("语文", R.drawable.icon_tab_yw, R.drawable.icon_tab_yw_pre));
|
||||
tabBeanLists.add(new TabBean("数学", R.drawable.icon_tab_sx, R.drawable.icon_tab_sx_pre));
|
||||
tabBeanLists.add(new TabBean("英语", R.drawable.icon_tab_yy, R.drawable.icon_tab_yy_pre));
|
||||
tabBeanLists.add(new TabBean("其他学科", R.drawable.icon_tab_qtxx, R.drawable.icon_tab_qtxx_pre));
|
||||
tabBeanLists.add(new TabBean("读书", R.drawable.icon_tab_ds, R.drawable.icon_tab_ds_pre));
|
||||
// if (Util.checkGrade(SPUtils.getGrade()).equals("小学")) {
|
||||
// this.tabBeanLists.add(new TabBean("素养课", R.drawable.icon_tab_syk, R.drawable.icon_tab_syk_pre));
|
||||
// }
|
||||
tabBeanLists.add(new TabBean("绿色安全", R.drawable.icon_tab_lsaq, R.drawable.icon_tab_lsaq_pre));
|
||||
tabAdapter.setData(this.tabBeanLists);
|
||||
mViewDataBinding.subjectViewPager.setOffscreenPageLimit(10);
|
||||
tabAdapter.setChoosePosition(defaultCurrent);
|
||||
mViewDataBinding.subjectViewPager.setCurrentItem(defaultCurrent);
|
||||
mViewDataBinding.subjectViewPager.setScrollAnim(true);
|
||||
mViewDataBinding.subjectViewPager.setAdapter(new TabFragmentAdapter(getSupportFragmentManager()));
|
||||
|
||||
mViewDataBinding.subjectViewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
||||
@Override
|
||||
public void onPageScrollStateChanged(int i) {
|
||||
@@ -182,16 +167,59 @@ public class HomeActivity extends BaseMvvmActivity<HomeViewModel, ActivityHomeBi
|
||||
}
|
||||
});
|
||||
|
||||
mViewDataBinding.tvTime.setText(DataUtil.formatDateHour());
|
||||
registTimeReceiver();
|
||||
registBateeryReceiver();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
initDatas();
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onGkNoticeEvent(UpdateGradeEvent updateGradeEvent) {
|
||||
Log.e(TAG, "onGkNoticeEvent: ");
|
||||
initDatas();
|
||||
}
|
||||
|
||||
private void initDatas() {
|
||||
Log.e(TAG, "initDatas: ");
|
||||
mViewDataBinding.tvTime.setText(DataUtil.formatDateHour());
|
||||
|
||||
fragments.clear();
|
||||
tabBeanLists.clear();
|
||||
fragments.add(new MineFragment());
|
||||
fragments.add(new AiFragment());
|
||||
fragments.add(new ChineseFragment());
|
||||
fragments.add(new MathFragment());
|
||||
fragments.add(new EnglishFragment());
|
||||
fragments.add(new ComplexFragment());
|
||||
fragments.add(new ReadFragment());
|
||||
// if ("小学".equals(Util.checkGrade(SPUtils.getGrade()))) {
|
||||
fragments.add(new SztzFragment());
|
||||
// }
|
||||
fragments.add(new SafeFragment());
|
||||
|
||||
tabBeanLists.add(new TabBean("我的", R.drawable.icon_tab_wd, R.drawable.icon_tab_wd_pre));
|
||||
tabBeanLists.add(new TabBean("AI+学习", R.drawable.icon_tab_aixx, R.drawable.icon_tab_aixx_pre));
|
||||
tabBeanLists.add(new TabBean("语文", R.drawable.icon_tab_yw, R.drawable.icon_tab_yw_pre));
|
||||
tabBeanLists.add(new TabBean("数学", R.drawable.icon_tab_sx, R.drawable.icon_tab_sx_pre));
|
||||
tabBeanLists.add(new TabBean("英语", R.drawable.icon_tab_yy, R.drawable.icon_tab_yy_pre));
|
||||
tabBeanLists.add(new TabBean("其他学科", R.drawable.icon_tab_qtxx, R.drawable.icon_tab_qtxx_pre));
|
||||
tabBeanLists.add(new TabBean("读书", R.drawable.icon_tab_ds, R.drawable.icon_tab_ds_pre));
|
||||
// if ("小学".equals(Util.checkGrade(SPUtils.getGrade()))) {
|
||||
tabBeanLists.add(new TabBean("素养课", R.drawable.icon_tab_syk, R.drawable.icon_tab_syk_pre));
|
||||
// }
|
||||
tabBeanLists.add(new TabBean("绿色安全", R.drawable.icon_tab_lsaq, R.drawable.icon_tab_lsaq_pre));
|
||||
|
||||
tabAdapter.setData(tabBeanLists);
|
||||
tabAdapter.setChoosePosition(defaultCurrent);
|
||||
mViewDataBinding.subjectViewPager.setAdapter(new TabFragmentAdapter(getSupportFragmentManager()));
|
||||
mViewDataBinding.subjectViewPager.setCurrentItem(defaultCurrent);
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void hideSystemUI() {
|
||||
// Enables regular immersive mode.
|
||||
// For "lean back" mode, remove SYSTEM_UI_FLAG_IMMERSIVE.
|
||||
@@ -322,6 +350,7 @@ public class HomeActivity extends BaseMvvmActivity<HomeViewModel, ActivityHomeBi
|
||||
RemoteManager.removeListener(this);
|
||||
unRegistTimeReceiver();
|
||||
unregistBateeryReceiver();
|
||||
EventBus.getDefault().unregister(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -570,7 +599,8 @@ public class HomeActivity extends BaseMvvmActivity<HomeViewModel, ActivityHomeBi
|
||||
|
||||
public void onClick(View view) {
|
||||
Log.e(TAG, "onClick: " + view.getTag());
|
||||
OpenApkUtils.getInstance().openJxwApp((String) view.getTag());
|
||||
|
||||
OpenApkUtils.getInstance().openJxwApp(this, (String) view.getTag());
|
||||
// MyApp.getInstance().mBottomBtnOnClickListener.setContext(this);
|
||||
// MyApp.getInstance().mBottomBtnOnClickListener.onClick((String) view.getTag());
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
package com.xwad.os.activity.login;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
|
||||
import com.hjq.toast.Toaster;
|
||||
import com.xwad.os.R;
|
||||
import com.xwad.os.activity.login.result.LoginSuccessfulActivity;
|
||||
import com.xwad.os.base.mvvm.BaseMvvmActivity;
|
||||
import com.xwad.os.databinding.ActivityLoginBinding;
|
||||
|
||||
@@ -34,8 +35,42 @@ public class LoginActivity extends BaseMvvmActivity<LoginViewModel, ActivityLogi
|
||||
}
|
||||
|
||||
public class BtnClick {
|
||||
public void loginPhone(View view) {
|
||||
startActivity(new Intent(LoginActivity.this, LoginSuccessfulActivity.class));
|
||||
public void getCode(View view) {
|
||||
Editable editable = mViewDataBinding.etMobile.getText();
|
||||
if (editable == null) {
|
||||
Toaster.show("请输入手机号");
|
||||
return;
|
||||
}
|
||||
String mobile = editable.toString();
|
||||
if (TextUtils.isEmpty(mobile)) {
|
||||
Toaster.show("请输入手机号");
|
||||
return;
|
||||
}
|
||||
mViewModel.getPhoneCode(mobile);
|
||||
}
|
||||
|
||||
public void codeLogin(View view) {
|
||||
Editable editable = mViewDataBinding.etMobile.getText();
|
||||
if (editable == null) {
|
||||
Toaster.show("请输入手机号");
|
||||
return;
|
||||
}
|
||||
String mobile = editable.toString();
|
||||
if (TextUtils.isEmpty(mobile)) {
|
||||
Toaster.show("请输入手机号");
|
||||
return;
|
||||
}
|
||||
Editable codeEditable = mViewDataBinding.etCode.getText();
|
||||
if (codeEditable == null) {
|
||||
Toaster.show("请输入验证码");
|
||||
return;
|
||||
}
|
||||
String code = codeEditable.toString();
|
||||
if (TextUtils.isEmpty(code)) {
|
||||
Toaster.show("请输入验证码");
|
||||
return;
|
||||
}
|
||||
mViewModel.codeLogin(mobile, code);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,94 @@
|
||||
package com.xwad.os.activity.login;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
|
||||
import com.hjq.toast.Toaster;
|
||||
import com.trello.rxlifecycle4.RxLifecycle;
|
||||
import com.trello.rxlifecycle4.android.ActivityEvent;
|
||||
import com.xwad.os.base.mvvm.BaseViewModel;
|
||||
import com.xwad.os.bean.BaseResponse;
|
||||
import com.xwad.os.databinding.ActivityLoginBinding;
|
||||
import com.xwad.os.network.NetInterfaceManager;
|
||||
|
||||
import io.reactivex.rxjava3.annotations.NonNull;
|
||||
import io.reactivex.rxjava3.core.Observer;
|
||||
import io.reactivex.rxjava3.disposables.Disposable;
|
||||
|
||||
public class LoginViewModel extends BaseViewModel<ActivityLoginBinding, ActivityEvent> {
|
||||
|
||||
@Override
|
||||
public ActivityLoginBinding getVDBinding() {
|
||||
return binding;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
|
||||
}
|
||||
|
||||
public MutableLiveData<Boolean> mSentSuccessfullyData = new MutableLiveData<>();
|
||||
|
||||
public void getPhoneCode(String mobile) {
|
||||
NetInterfaceManager.getInstance().getPhoneCodeObservable(mobile)
|
||||
.compose(RxLifecycle.bindUntilEvent(getLifecycle(), ActivityEvent.DESTROY))
|
||||
.subscribe(new Observer<BaseResponse>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
Log.e("getPhoneCode", "onSubscribe: ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull BaseResponse baseResponse) {
|
||||
Log.e("getPhoneCode", "onNext: ");
|
||||
mSentSuccessfullyData.setValue(baseResponse.code == 200);
|
||||
Toaster.show(baseResponse.msg);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
Log.e("getPhoneCode", "onError: " + e.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e("getPhoneCode", "onComplete: ");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public MutableLiveData<Boolean> mLoginSuccessfullyData = new MutableLiveData<>();
|
||||
|
||||
public void codeLogin(String mobile, String code) {
|
||||
NetInterfaceManager.getInstance().getCodeLoginObservable(mobile, code)
|
||||
.compose(RxLifecycle.bindUntilEvent(getLifecycle(), ActivityEvent.DESTROY))
|
||||
.subscribe(new Observer<BaseResponse>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
Log.e("codeLogin", "onSubscribe: ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull BaseResponse baseResponse) {
|
||||
Log.e("codeLogin", "onNext: " + baseResponse);
|
||||
if (baseResponse.code == 200) {
|
||||
mLoginSuccessfullyData.setValue(true);
|
||||
} else {
|
||||
mLoginSuccessfullyData.setValue(false);
|
||||
Toaster.show(baseResponse.msg);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
Log.e("codeLogin", "onError: " + e.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e("codeLogin", "onComplete: ");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,11 +13,15 @@ import com.xwad.os.R;
|
||||
import com.xwad.os.base.mvvm.BaseMvvmActivity;
|
||||
import com.xwad.os.config.CommonConfig;
|
||||
import com.xwad.os.databinding.ActivitySelecteGradeBinding;
|
||||
import com.xwad.os.jxw.SPUtils;
|
||||
import com.xwad.os.jxw.event.UpdateGradeEvent;
|
||||
import com.xwad.os.manager.RemoteManager;
|
||||
import com.xwad.os.utils.ActivationUtil;
|
||||
import com.xwad.os.utils.LenovoCsdkUtil;
|
||||
import com.xwad.os.utils.Utils;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -120,16 +124,16 @@ public class SelecteGradeActivity extends BaseMvvmActivity<SelecteGradeViewModel
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
mViewModel.mSuccessfulData.observe(this, new Observer<Boolean>() {
|
||||
@Override
|
||||
public void onChanged(Boolean aBoolean) {
|
||||
if (aBoolean) {
|
||||
Toaster.showLong("桌面调整,正在重启");
|
||||
Utils.triggerRebirth(SelecteGradeActivity.this);
|
||||
finish();
|
||||
}
|
||||
}
|
||||
});
|
||||
// mViewModel.mSuccessfulData.observe(this, new Observer<Boolean>() {
|
||||
// @Override
|
||||
// public void onChanged(Boolean aBoolean) {
|
||||
// if (aBoolean) {
|
||||
// Toaster.showLong("桌面调整,正在重启");
|
||||
// Utils.triggerRebirth(SelecteGradeActivity.this);
|
||||
// finish();
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
public void setPrimary(View view) {
|
||||
@@ -167,12 +171,15 @@ public class SelecteGradeActivity extends BaseMvvmActivity<SelecteGradeViewModel
|
||||
|
||||
public void submit(View view) {
|
||||
mMMKV.encode(CommonConfig.UIUI_USER_GRADE_KEY, grade);
|
||||
if (ActivationUtil.getInstance().isActivation()) {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("sn", RemoteManager.getInstance().getSerial());
|
||||
params.put("sn_grade", grade);
|
||||
mViewModel.updateInfo(params);
|
||||
}
|
||||
// if (ActivationUtil.getInstance().isActivation()) {
|
||||
// Map<String, String> params = new HashMap<>();
|
||||
// params.put("sn", RemoteManager.getInstance().getSerial());
|
||||
// params.put("sn_grade", grade);
|
||||
// mViewModel.updateInfo(params);
|
||||
// }
|
||||
SPUtils.setGrade(grade);
|
||||
EventBus.getDefault().postSticky(new UpdateGradeEvent());
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
218
app/src/main/java/com/xwad/os/bean/AppInfo.java
Normal file
@@ -0,0 +1,218 @@
|
||||
package com.xwad.os.bean;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonParser;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AppInfo implements Serializable {
|
||||
private static final long serialVersionUID = -3148862992697783934L;
|
||||
|
||||
private int id;
|
||||
private String app_name;
|
||||
private String app_img;
|
||||
private String app_developer;
|
||||
private long app_size;
|
||||
private String app_package;
|
||||
private String app_version_name;
|
||||
private int app_version_code;
|
||||
private String app_md5;
|
||||
private int app_score;
|
||||
private String app_preview1;
|
||||
private String app_preview2;
|
||||
private String app_preview3;
|
||||
private String app_url;
|
||||
private String app_remarks;
|
||||
private String app_desc;
|
||||
private int is_promote;
|
||||
private int weight;
|
||||
private String discount;
|
||||
private String use_type;
|
||||
private int is_autodown;
|
||||
private String third_url;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getApp_name() {
|
||||
return app_name;
|
||||
}
|
||||
|
||||
public void setApp_name(String app_name) {
|
||||
this.app_name = app_name;
|
||||
}
|
||||
|
||||
public String getApp_img() {
|
||||
return app_img;
|
||||
}
|
||||
|
||||
public void setApp_img(String app_img) {
|
||||
this.app_img = app_img;
|
||||
}
|
||||
|
||||
public String getApp_developer() {
|
||||
return app_developer;
|
||||
}
|
||||
|
||||
public void setApp_developer(String app_developer) {
|
||||
this.app_developer = app_developer;
|
||||
}
|
||||
|
||||
public long getApp_size() {
|
||||
return app_size;
|
||||
}
|
||||
|
||||
public void setApp_size(long app_size) {
|
||||
this.app_size = app_size;
|
||||
}
|
||||
|
||||
public String getApp_package() {
|
||||
return app_package;
|
||||
}
|
||||
|
||||
public void setApp_package(String app_package) {
|
||||
this.app_package = app_package;
|
||||
}
|
||||
|
||||
public String getApp_version_name() {
|
||||
return app_version_name;
|
||||
}
|
||||
|
||||
public void setApp_version_name(String app_version_name) {
|
||||
this.app_version_name = app_version_name;
|
||||
}
|
||||
|
||||
public int getApp_version_code() {
|
||||
return app_version_code;
|
||||
}
|
||||
|
||||
public void setApp_version_code(int app_version_code) {
|
||||
this.app_version_code = app_version_code;
|
||||
}
|
||||
|
||||
public String getApp_md5() {
|
||||
return app_md5;
|
||||
}
|
||||
|
||||
public void setApp_md5(String app_md5) {
|
||||
this.app_md5 = app_md5;
|
||||
}
|
||||
|
||||
public int getApp_score() {
|
||||
return app_score;
|
||||
}
|
||||
|
||||
public void setApp_score(int app_score) {
|
||||
this.app_score = app_score;
|
||||
}
|
||||
|
||||
public String getApp_preview1() {
|
||||
return app_preview1;
|
||||
}
|
||||
|
||||
public void setApp_preview1(String app_preview1) {
|
||||
this.app_preview1 = app_preview1;
|
||||
}
|
||||
|
||||
public String getApp_preview2() {
|
||||
return app_preview2;
|
||||
}
|
||||
|
||||
public void setApp_preview2(String app_preview2) {
|
||||
this.app_preview2 = app_preview2;
|
||||
}
|
||||
|
||||
public String getApp_preview3() {
|
||||
return app_preview3;
|
||||
}
|
||||
|
||||
public void setApp_preview3(String app_preview3) {
|
||||
this.app_preview3 = app_preview3;
|
||||
}
|
||||
|
||||
public String getApp_url() {
|
||||
return app_url;
|
||||
}
|
||||
|
||||
public void setApp_url(String app_url) {
|
||||
this.app_url = app_url;
|
||||
}
|
||||
|
||||
public String getApp_remarks() {
|
||||
return app_remarks;
|
||||
}
|
||||
|
||||
public void setApp_remarks(String app_remarks) {
|
||||
this.app_remarks = app_remarks;
|
||||
}
|
||||
|
||||
public String getApp_desc() {
|
||||
return app_desc;
|
||||
}
|
||||
|
||||
public void setApp_desc(String app_desc) {
|
||||
this.app_desc = app_desc;
|
||||
}
|
||||
|
||||
public int getIs_promote() {
|
||||
return is_promote;
|
||||
}
|
||||
|
||||
public void setIs_promote(int is_promote) {
|
||||
this.is_promote = is_promote;
|
||||
}
|
||||
|
||||
public int getWeight() {
|
||||
return weight;
|
||||
}
|
||||
|
||||
public void setWeight(int weight) {
|
||||
this.weight = weight;
|
||||
}
|
||||
|
||||
public String getDiscount() {
|
||||
return discount;
|
||||
}
|
||||
|
||||
public void setDiscount(String discount) {
|
||||
this.discount = discount;
|
||||
}
|
||||
|
||||
public String getUse_type() {
|
||||
return use_type;
|
||||
}
|
||||
|
||||
public void setUse_type(String use_type) {
|
||||
this.use_type = use_type;
|
||||
}
|
||||
|
||||
public int getIs_autodown() {
|
||||
return is_autodown;
|
||||
}
|
||||
|
||||
public void setIs_autodown(int is_autodown) {
|
||||
this.is_autodown = is_autodown;
|
||||
}
|
||||
|
||||
public String getThird_url() {
|
||||
return third_url;
|
||||
}
|
||||
|
||||
public void setThird_url(String third_url) {
|
||||
this.third_url = third_url;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return JsonParser.parseString(new Gson().toJson(this)).getAsJsonObject().toString();
|
||||
}
|
||||
}
|
||||
@@ -123,6 +123,21 @@ public class AriaDownloadInfo implements Serializable {
|
||||
appUpdateInfo.getApp_md5()
|
||||
);
|
||||
}
|
||||
|
||||
public static AriaDownloadInfo toAriaDownloadInfo(AppInfo appInfo) {
|
||||
return new AriaDownloadInfo(
|
||||
appInfo.getId(),
|
||||
appInfo.getApp_name(),
|
||||
appInfo.getApp_package(),
|
||||
appInfo.getApp_version_name(),
|
||||
appInfo.getApp_version_code(),
|
||||
appInfo.getApp_url(),
|
||||
appInfo.getApp_img(),
|
||||
appInfo.getApp_size(),
|
||||
appInfo.getApp_md5()
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// public static AriaDownloadInfo toAriaDownloadInfo(AppDetails appDetails) {
|
||||
// return new AriaDownloadInfo(
|
||||
|
||||
@@ -16,7 +16,7 @@ import com.xwad.os.R;
|
||||
import com.xwad.os.base.mvvm.fragment.BaseMvvmFragment;
|
||||
import com.xwad.os.config.CommonConfig;
|
||||
import com.xwad.os.databinding.FragmentAiBinding;
|
||||
import com.xwad.os.jxw.Util;
|
||||
import com.xwad.os.jxw.util.Util;
|
||||
import com.youth.banner.adapter.BannerAdapter;
|
||||
import com.youth.banner.listener.OnBannerListener;
|
||||
import com.youth.banner.transformer.ZoomOutPageTransformer;
|
||||
|
||||
@@ -25,7 +25,7 @@ import com.xwad.os.bean.jxw.ItemsBean;
|
||||
import com.xwad.os.databinding.FragmentChineseBinding;
|
||||
import com.xwad.os.jxw.AssertUtils;
|
||||
import com.xwad.os.jxw.SPUtils;
|
||||
import com.xwad.os.jxw.Util;
|
||||
import com.xwad.os.jxw.util.Util;
|
||||
import com.xwad.os.manager.AmapManager;
|
||||
import com.xwad.os.utils.OpenApkUtils;
|
||||
import com.xwad.os.view.jxw.widget.AppsDialog;
|
||||
@@ -51,7 +51,7 @@ public class ChineseFragment extends BaseMvvmFragment<ChineseViewModel, Fragment
|
||||
|
||||
|
||||
private Activity mContext;
|
||||
private List<ItemsBean> appList = new ArrayList();
|
||||
private List<ItemsBean> appList = new ArrayList<>();
|
||||
private BaseQuickAdapter<ItemsBean, BaseViewHolder> contentAdapter = new BaseQuickAdapter<ItemsBean, BaseViewHolder>(R.layout.item_yw_app) {
|
||||
@Override
|
||||
public void convert(BaseViewHolder baseViewHolder, final ItemsBean itemsBean) {
|
||||
@@ -226,7 +226,7 @@ public class ChineseFragment extends BaseMvvmFragment<ChineseViewModel, Fragment
|
||||
private void setTag(View view) {
|
||||
String str;
|
||||
String checkGrade = Util.checkGrade(SPUtils.getGrade());
|
||||
if (checkGrade.equals("小学")) {
|
||||
if ("小学".equals(checkGrade)) {
|
||||
str = "tag_args_new_ztsp_xxyw";
|
||||
} else {
|
||||
str = checkGrade.equals("初中") ? "tag_args_new_ztsp_czyw" : "tag_args_new_ztsp_gzyw";
|
||||
@@ -294,7 +294,7 @@ public class ChineseFragment extends BaseMvvmFragment<ChineseViewModel, Fragment
|
||||
contentAdapter.notifyDataSetChanged();
|
||||
// MyApp.getInstance().mBottomBtnOnClickListener.setContext(getActivity());
|
||||
// MyApp.getInstance().mBottomBtnOnClickListener.onClick(obj);
|
||||
OpenApkUtils.getInstance().openJxwApp(obj);
|
||||
OpenApkUtils.getInstance().openJxwApp(mContext, obj);
|
||||
}
|
||||
|
||||
private void saveTag(ItemsBean itemsBean) {
|
||||
|
||||
@@ -23,6 +23,8 @@ import com.xwad.os.bean.jxw.TabBean;
|
||||
import com.xwad.os.databinding.FragmentComplexBinding;
|
||||
import com.xwad.os.jxw.AssertUtils;
|
||||
import com.xwad.os.jxw.LearnStageBean;
|
||||
import com.xwad.os.jxw.SPUtils;
|
||||
import com.xwad.os.jxw.util.Util;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
@@ -109,15 +111,16 @@ public class ComplexFragment extends BaseMvvmFragment<ComplexViewModel, Fragment
|
||||
mViewDataBinding.rvTitle.setLayoutManager(linearLayoutManager);
|
||||
|
||||
|
||||
// if (Util.checkGrade(SPUtils.getGrade()).equals("小学")) {
|
||||
// xxPage.setVisibility(View.VISIBLE);
|
||||
// subject_viewPager.setVisibility(View.GONE);
|
||||
// rv_title.setVisibility(View.GONE);
|
||||
// } else {
|
||||
// xxPage.setVisibility(View.GONE);
|
||||
// subject_viewPager.setVisibility(View.VISIBLE);
|
||||
// rv_title.setVisibility(View.VISIBLE);
|
||||
// }
|
||||
if ("小学".equals(Util.checkGrade(SPUtils.getGrade()))) {
|
||||
mViewDataBinding.rlXx.setVisibility(View.VISIBLE);
|
||||
mViewDataBinding.subjectViewPager.setVisibility(View.GONE);
|
||||
mViewDataBinding.rvTitle.setVisibility(View.GONE);
|
||||
} else {
|
||||
mViewDataBinding.rlXx.setVisibility(View.GONE);
|
||||
mViewDataBinding.subjectViewPager.setVisibility(View.VISIBLE);
|
||||
mViewDataBinding.rvTitle.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
tabBeanList.clear();
|
||||
mFragment.clear();
|
||||
for (LearnStageBean learnStageBean : getLearnStage()) {
|
||||
|
||||
@@ -25,7 +25,7 @@ import com.xwad.os.databinding.FragmentEnglishBinding;
|
||||
import com.xwad.os.jxw.AssertUtils;
|
||||
import com.xwad.os.jxw.SPUtils;
|
||||
import com.xwad.os.jxw.TbddProviderUtil;
|
||||
import com.xwad.os.jxw.Util;
|
||||
import com.xwad.os.jxw.util.Util;
|
||||
import com.xwad.os.utils.OpenApkUtils;
|
||||
import com.xwad.os.view.jxw.widget.AppsDialog;
|
||||
|
||||
@@ -49,7 +49,7 @@ public class EnglishFragment extends BaseMvvmFragment<EnglishViewModel, Fragment
|
||||
private static final String type = "yy";
|
||||
|
||||
private Activity mContext;
|
||||
private List<ItemsBean> appList = new ArrayList();
|
||||
private List<ItemsBean> appList = new ArrayList<>();
|
||||
private BaseQuickAdapter<ItemsBean, BaseViewHolder> contentAdapter = new BaseQuickAdapter<ItemsBean, BaseViewHolder>(R.layout.item_yw_app) {
|
||||
@Override
|
||||
public void convert(BaseViewHolder baseViewHolder, final ItemsBean itemsBean) {
|
||||
@@ -124,7 +124,7 @@ public class EnglishFragment extends BaseMvvmFragment<EnglishViewModel, Fragment
|
||||
mViewModel.setCtx(getCtx());
|
||||
mViewModel.setLifecycle(getLifecycleSubject());
|
||||
mViewModel.setVDBinding(mViewDataBinding);
|
||||
// mViewDataBinding.setClick(new BtnClick());
|
||||
mViewDataBinding.setClick(new BtnClick());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -190,7 +190,7 @@ public class EnglishFragment extends BaseMvvmFragment<EnglishViewModel, Fragment
|
||||
private void setTag(View view) {
|
||||
String str;
|
||||
String checkGrade = Util.checkGrade(SPUtils.getGrade());
|
||||
if (checkGrade.equals("小学")) {
|
||||
if ("小学".equals(checkGrade)) {
|
||||
str = "tag_args_new_ztsp_xxyy";
|
||||
} else {
|
||||
str = checkGrade.equals("初中") ? "tag_args_new_ztsp_czyy" : "tag_args_new_ztsp_gzyy";
|
||||
@@ -214,7 +214,6 @@ public class EnglishFragment extends BaseMvvmFragment<EnglishViewModel, Fragment
|
||||
|
||||
private void load() {
|
||||
TbddBookBean tbddData = TbddProviderUtil.getTbddData("英语", "", "");
|
||||
try {
|
||||
if (tbddData != null) {
|
||||
mViewDataBinding.ivZb.setVisibility(View.VISIBLE);
|
||||
Glide.with(mContext).load(tbddData.getCoverUrl()).into(mViewDataBinding.ivCover);
|
||||
@@ -222,8 +221,6 @@ public class EnglishFragment extends BaseMvvmFragment<EnglishViewModel, Fragment
|
||||
mViewDataBinding.ivZb.setVisibility(View.GONE);
|
||||
mViewDataBinding.ivCover.setBackgroundResource(R.drawable.icon_yw_tjsb);
|
||||
}
|
||||
} catch (Exception unused) {
|
||||
}
|
||||
}
|
||||
|
||||
public void getMyList() {
|
||||
@@ -272,7 +269,7 @@ public class EnglishFragment extends BaseMvvmFragment<EnglishViewModel, Fragment
|
||||
contentAdapter.notifyDataSetChanged();
|
||||
// MyApp.getInstance().mBottomBtnOnClickListener.setContext(getActivity());
|
||||
// MyApp.getInstance().mBottomBtnOnClickListener.onClick(obj);
|
||||
OpenApkUtils.getInstance().openJxwApp(obj);
|
||||
OpenApkUtils.getInstance().openJxwApp(mContext, obj);
|
||||
}
|
||||
|
||||
private void saveTag(ItemsBean itemsBean) {
|
||||
|
||||
@@ -22,7 +22,7 @@ import com.xwad.os.bean.jxw.ItemsBean;
|
||||
import com.xwad.os.databinding.FragmentMathBinding;
|
||||
import com.xwad.os.jxw.AssertUtils;
|
||||
import com.xwad.os.jxw.SPUtils;
|
||||
import com.xwad.os.jxw.Util;
|
||||
import com.xwad.os.jxw.util.Util;
|
||||
import com.xwad.os.utils.OpenApkUtils;
|
||||
import com.xwad.os.view.jxw.widget.AppsDialog;
|
||||
|
||||
@@ -185,7 +185,7 @@ public class MathFragment extends BaseMvvmFragment<MathViewModel, FragmentMathBi
|
||||
private void setTag(View view) {
|
||||
String str;
|
||||
String checkGrade = Util.checkGrade(SPUtils.getGrade());
|
||||
if (checkGrade.equals("小学")) {
|
||||
if ("小学".equals(checkGrade)) {
|
||||
str = "tag_args_new_ztsp_xxsx";
|
||||
} else {
|
||||
str = checkGrade.equals("初中") ? "tag_args_new_ztsp_czsx" : "tag_args_new_ztsp_gzsx";
|
||||
@@ -253,7 +253,7 @@ public class MathFragment extends BaseMvvmFragment<MathViewModel, FragmentMathBi
|
||||
contentAdapter.notifyDataSetChanged();
|
||||
// MyApp.getInstance().mBottomBtnOnClickListener.setContext(getActivity());
|
||||
// MyApp.getInstance().mBottomBtnOnClickListener.onClick(obj);
|
||||
OpenApkUtils.getInstance().openJxwApp(obj);
|
||||
OpenApkUtils.getInstance().openJxwApp(mContext, obj);
|
||||
}
|
||||
|
||||
private void saveTag(ItemsBean itemsBean) {
|
||||
|
||||
@@ -18,11 +18,13 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.xwad.os.R;
|
||||
import com.xwad.os.activity.activation.ActivationActivity;
|
||||
import com.xwad.os.activity.home.HomeActivity;
|
||||
import com.xwad.os.activity.user.UserActivity;
|
||||
import com.xwad.os.base.mvvm.fragment.BaseMvvmFragment;
|
||||
import com.xwad.os.bean.jxw.AppInfo;
|
||||
import com.xwad.os.config.CommonConfig;
|
||||
import com.xwad.os.databinding.FragmentMineBinding;
|
||||
import com.tencent.mmkv.MMKV;
|
||||
import com.xwad.os.jxw.SPUtils;
|
||||
import com.xwad.os.jxw.StudyRecordMng;
|
||||
import com.xwad.os.jxw.ToastUtil;
|
||||
import com.xwad.os.jxw.adapter.ZhMenuAdapter;
|
||||
@@ -53,8 +55,8 @@ public class MineFragment extends BaseMvvmFragment<MineViewModel, FragmentMineBi
|
||||
|
||||
private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
|
||||
private Activity mContext;
|
||||
private ZhMenuAdapter zhMenuAdapter;
|
||||
private List<AppInfo> mlistAppInfo = new ArrayList<>();
|
||||
// private ZhMenuAdapter zhMenuAdapter;
|
||||
// private List<AppInfo> mlistAppInfo = new ArrayList<>();
|
||||
private Handler mHandler = new Handler();
|
||||
public String file_name = "app_list_6.0";
|
||||
|
||||
@@ -111,78 +113,80 @@ public class MineFragment extends BaseMvvmFragment<MineViewModel, FragmentMineBi
|
||||
mParam2 = getArguments().getString(ARG_PARAM2);
|
||||
}
|
||||
|
||||
mViewDataBinding.gridViewId.setLayoutManager(new GridLayoutManager(mContext, 8));
|
||||
zhMenuAdapter = new ZhMenuAdapter(mContext, mlistAppInfo);
|
||||
mViewDataBinding.gridViewId.setAdapter(zhMenuAdapter);
|
||||
// mViewDataBinding.relaRoot.setOnClickListener(new View.OnClickListener() {
|
||||
// mViewDataBinding.gridViewId.setLayoutManager(new GridLayoutManager(mContext, 8));
|
||||
// zhMenuAdapter = new ZhMenuAdapter(mContext, mlistAppInfo);
|
||||
// mViewDataBinding.gridViewId.setAdapter(zhMenuAdapter);
|
||||
//// mViewDataBinding.relaRoot.setOnClickListener(new View.OnClickListener() {
|
||||
//// @Override
|
||||
//// public void onClick(View view) {
|
||||
//// zhMenuAdapter.setToDelete(false);
|
||||
//// }
|
||||
//// });
|
||||
// RecyclerMarginClickHelper.setOnMarginClickListener(mViewDataBinding.gridViewId, new View.OnClickListener() {
|
||||
// @Override
|
||||
// public void onClick(View view) {
|
||||
// zhMenuAdapter.setToDelete(false);
|
||||
// }
|
||||
// });
|
||||
RecyclerMarginClickHelper.setOnMarginClickListener(mViewDataBinding.gridViewId, new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
zhMenuAdapter.setToDelete(false);
|
||||
}
|
||||
});
|
||||
zhMenuAdapter.setOnItemClickListener(new ZhMenuAdapter.RadiaoOnItemClickListener() {
|
||||
@Override
|
||||
public void onSelectClick(int i) {
|
||||
AppInfo appInfo;
|
||||
if (mlistAppInfo == null || mlistAppInfo.size() <= 0 || (appInfo = mlistAppInfo.get(i)) == null) {
|
||||
return;
|
||||
}
|
||||
if (appInfo.appName.equals("切换壁纸")) {
|
||||
QhbzDialog qhbzDialog = new QhbzDialog(mContext);
|
||||
qhbzDialog.show();
|
||||
qhbzDialog.setOnCallback(new QhbzDialog.Callback() {
|
||||
@Override
|
||||
public void onCallback(int i2) {
|
||||
EventBus.getDefault().postSticky(new UpdateColorEvent());
|
||||
}
|
||||
});
|
||||
} else if (!TextUtils.isEmpty(appInfo.getPkgName())) {
|
||||
Log.e(TAG, "onSelectClick: onItemClick 11");
|
||||
startApkByPackName(mContext, appInfo.getPkgName());
|
||||
} else if (TextUtils.isEmpty(appInfo.mStargss)) {
|
||||
// zhMenuAdapter.setOnItemClickListener(new ZhMenuAdapter.RadiaoOnItemClickListener() {
|
||||
// @Override
|
||||
// public void onSelectClick(int i) {
|
||||
// AppInfo appInfo;
|
||||
// if (mlistAppInfo == null || mlistAppInfo.size() <= 0 || (appInfo = mlistAppInfo.get(i)) == null) {
|
||||
// return;
|
||||
// }
|
||||
// if (appInfo.appName.equals("切换壁纸")) {
|
||||
// QhbzDialog qhbzDialog = new QhbzDialog(mContext);
|
||||
// qhbzDialog.show();
|
||||
// qhbzDialog.setOnCallback(new QhbzDialog.Callback() {
|
||||
// @Override
|
||||
// public void onCallback(int i2) {
|
||||
// EventBus.getDefault().postSticky(new UpdateColorEvent());
|
||||
// }
|
||||
// });
|
||||
// } else if (!TextUtils.isEmpty(appInfo.getPkgName())) {
|
||||
// Log.e(TAG, "onSelectClick: onItemClick 11");
|
||||
// startApkByPackName(mContext, appInfo.getPkgName());
|
||||
// } else if (TextUtils.isEmpty(appInfo.mStargss)) {
|
||||
//
|
||||
// } else {
|
||||
// Log.e(TAG, "onItemClick66 " + appInfo.mStargss);
|
||||
//// MyApp.getInstance().mBottomBtnOnClickListener.setContext(mContext);
|
||||
//// MyApp.getInstance().mBottomBtnOnClickListener.onClick(appInfo.mStargss);
|
||||
// OpenApkUtils.getInstance().openJxwApp(appInfo.mStargss);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onDeleteClick(final String str, final int i, String str2) {
|
||||
// RemoveAppDialog removeAppDialog = new RemoveAppDialog(mContext, str2);
|
||||
// removeAppDialog.show();
|
||||
// removeAppDialog.setOnCallback(new RemoveAppDialog.Callback() {
|
||||
// @Override
|
||||
// public void onCallback() {
|
||||
// readContent(str, i);
|
||||
// if (mlistAppInfo != null) {
|
||||
// mlistAppInfo.clear();
|
||||
// }
|
||||
// initAppData();
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
// zhMenuAdapter.setOnItemChildLongClickListener(new BaseQuickAdapter.OnItemChildLongClickListener() {
|
||||
// @Override
|
||||
// public boolean onItemChildLongClick(BaseQuickAdapter baseQuickAdapter, View view, int i) {
|
||||
// zhMenuAdapter.setToDelete(true);
|
||||
// return false;
|
||||
// }
|
||||
// });
|
||||
|
||||
} else {
|
||||
Log.e(TAG, "onItemClick66 " + appInfo.mStargss);
|
||||
// MyApp.getInstance().mBottomBtnOnClickListener.setContext(mContext);
|
||||
// MyApp.getInstance().mBottomBtnOnClickListener.onClick(appInfo.mStargss);
|
||||
OpenApkUtils.getInstance().openJxwApp(appInfo.mStargss);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDeleteClick(final String str, final int i, String str2) {
|
||||
RemoveAppDialog removeAppDialog = new RemoveAppDialog(mContext, str2);
|
||||
removeAppDialog.show();
|
||||
removeAppDialog.setOnCallback(new RemoveAppDialog.Callback() {
|
||||
@Override
|
||||
public void onCallback() {
|
||||
readContent(str, i);
|
||||
if (mlistAppInfo != null) {
|
||||
mlistAppInfo.clear();
|
||||
}
|
||||
initAppData();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
zhMenuAdapter.setOnItemChildLongClickListener(new BaseQuickAdapter.OnItemChildLongClickListener() {
|
||||
@Override
|
||||
public boolean onItemChildLongClick(BaseQuickAdapter baseQuickAdapter, View view, int i) {
|
||||
zhMenuAdapter.setToDelete(true);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData(Bundle savedInstanceState) {
|
||||
initAppData();
|
||||
// initAppData();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -193,7 +197,19 @@ public class MineFragment extends BaseMvvmFragment<MineViewModel, FragmentMineBi
|
||||
|
||||
@Override
|
||||
public void fetchData() {
|
||||
initAppData();
|
||||
String nickName = mMMKV.decodeString(CommonConfig.UIUI_USER_NAME_KEY, "");
|
||||
if (TextUtils.isEmpty(nickName)) {
|
||||
mViewDataBinding.tvName.setText(getString(R.string.default_nickname));
|
||||
} else {
|
||||
mViewDataBinding.tvName.setText(nickName);
|
||||
}
|
||||
String sn_grade = mMMKV.decodeString(CommonConfig.UIUI_USER_GRADE_KEY, "");
|
||||
if (TextUtils.isEmpty(sn_grade)) {
|
||||
mViewDataBinding.tvGrade.setText(getString(R.string.default_grade));
|
||||
} else {
|
||||
mViewDataBinding.tvGrade.setText(sn_grade);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -208,63 +224,65 @@ public class MineFragment extends BaseMvvmFragment<MineViewModel, FragmentMineBi
|
||||
|
||||
}
|
||||
|
||||
public void initAppData() {
|
||||
AppInfo build = new AppInfo.Builder().appLabel("课程表").appStargs(getResources().getString(R.string.tag_args_new_kcb)).appIcon(mContext.getResources().getDrawable(R.drawable.icon_bbx_kcb)).build();
|
||||
AppInfo build2 = new AppInfo.Builder().appLabel("语音翻译").appStargs(getResources().getString(R.string.tag_args_new_zyhy)).appIcon(mContext.getResources().getDrawable(R.drawable.icon_bbx_yyfy)).build();
|
||||
// AppInfo build3 = new AppInfo.Builder().appLabel("使用助手").appStargs(getResources().getString(R.string.tag_args_new_sysmx)).appIcon(mContext.getResources().getDrawable(R.drawable.icon_bbx_syzs)).build();
|
||||
AppInfo build4 = new AppInfo.Builder().appLabel("资源更新").appStargs(getResources().getString(R.string.tag_args_updae)).appIcon(mContext.getResources().getDrawable(R.drawable.icon_bbx_yygx)).build();
|
||||
AppInfo build5 = new AppInfo.Builder().appLabel("一键加速").appStargs(getResources().getString(R.string.tag_args_new_yjjs)).appIcon(mContext.getResources().getDrawable(R.drawable.icon_bbx_yjjs)).build();
|
||||
AppInfo build6 = new AppInfo.Builder().appLabel("下载中心").appStargs(getResources().getString(R.string.tag_args_new_download)).appIcon(mContext.getResources().getDrawable(R.drawable.icon_bbx_xzzx)).build();
|
||||
AppInfo build7 = new AppInfo.Builder().appLabel("切换壁纸").appStargs(getResources().getString(R.string.tag_args_launcher)).appIcon(mContext.getResources().getDrawable(R.drawable.icon_bbx_qhbz)).build();
|
||||
AppInfo build8 = new AppInfo.Builder().appLabel("回到安卓").appStargs(getResources().getString(R.string.tag_args_launcher)).appIcon(mContext.getResources().getDrawable(R.drawable.icon_bbx_azpt)).build();
|
||||
AppInfo build9 = new AppInfo.Builder().appLabel("设置").appStargs(getResources().getString(R.string.tag_args_new_jxwSettings)).appIcon(mContext.getResources().getDrawable(R.drawable.icon_bbx_sz)).build();
|
||||
mlistAppInfo.add(build);
|
||||
mlistAppInfo.add(build2);
|
||||
// mlistAppInfo.add(build3);
|
||||
mlistAppInfo.add(build4);
|
||||
mlistAppInfo.add(build5);
|
||||
mlistAppInfo.add(build6);
|
||||
mlistAppInfo.add(build7);
|
||||
mlistAppInfo.add(build8);
|
||||
mlistAppInfo.add(build9);
|
||||
getAppData();
|
||||
mHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
zhMenuAdapter.setData(mlistAppInfo);
|
||||
zhMenuAdapter.notifyDataSetChanged();
|
||||
}
|
||||
});
|
||||
}
|
||||
// public void initAppData() {
|
||||
// mlistAppInfo.clear();
|
||||
// AppInfo build = new AppInfo.Builder().appLabel("课程表").appStargs(getResources().getString(R.string.tag_args_new_kcb)).appIcon(mContext.getResources().getDrawable(R.drawable.icon_bbx_kcb)).build();
|
||||
// AppInfo build2 = new AppInfo.Builder().appLabel("语音翻译").appStargs(getResources().getString(R.string.tag_args_new_zyhy)).appIcon(mContext.getResources().getDrawable(R.drawable.icon_bbx_yyfy)).build();
|
||||
//// AppInfo build3 = new AppInfo.Builder().appLabel("使用助手").appStargs(getResources().getString(R.string.tag_args_new_sysmx)).appIcon(mContext.getResources().getDrawable(R.drawable.icon_bbx_syzs)).build();
|
||||
// AppInfo build4 = new AppInfo.Builder().appLabel("资源更新").appStargs(getResources().getString(R.string.tag_args_updae)).appIcon(mContext.getResources().getDrawable(R.drawable.icon_bbx_yygx)).build();
|
||||
// AppInfo build5 = new AppInfo.Builder().appLabel("一键加速").appStargs(getResources().getString(R.string.tag_args_new_yjjs)).appIcon(mContext.getResources().getDrawable(R.drawable.icon_bbx_yjjs)).build();
|
||||
// AppInfo build6 = new AppInfo.Builder().appLabel("下载中心").appStargs(getResources().getString(R.string.tag_args_new_download)).appIcon(mContext.getResources().getDrawable(R.drawable.icon_bbx_xzzx)).build();
|
||||
// AppInfo build7 = new AppInfo.Builder().appLabel("切换壁纸").appStargs(getResources().getString(R.string.tag_args_launcher)).appIcon(mContext.getResources().getDrawable(R.drawable.icon_bbx_qhbz)).build();
|
||||
// AppInfo build8 = new AppInfo.Builder().appLabel("回到安卓").appStargs(getResources().getString(R.string.tag_args_launcher)).appIcon(mContext.getResources().getDrawable(R.drawable.icon_bbx_azpt)).build();
|
||||
// AppInfo build9 = new AppInfo.Builder().appLabel("设置").appStargs(getResources().getString(R.string.tag_args_new_jxwSettings)).appIcon(mContext.getResources().getDrawable(R.drawable.icon_bbx_sz)).build();
|
||||
// mlistAppInfo.add(build);
|
||||
// mlistAppInfo.add(build2);
|
||||
//// mlistAppInfo.add(build3);
|
||||
// mlistAppInfo.add(build4);
|
||||
// mlistAppInfo.add(build5);
|
||||
// mlistAppInfo.add(build6);
|
||||
// mlistAppInfo.add(build7);
|
||||
// mlistAppInfo.add(build8);
|
||||
// mlistAppInfo.add(build9);
|
||||
//// getAppData();
|
||||
// mHandler.post(new Runnable() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
// zhMenuAdapter.setData(mlistAppInfo);
|
||||
// zhMenuAdapter.notifyDataSetChanged();
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// }
|
||||
|
||||
private void getAppData() {
|
||||
File fileStreamPath = mContext.getFileStreamPath(file_name);
|
||||
if (!fileStreamPath.exists()) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
BufferedReader bufferedReader = new BufferedReader(new FileReader(fileStreamPath));
|
||||
PackageManager packageManager = mContext.getPackageManager();
|
||||
while (true) {
|
||||
String readLine = bufferedReader.readLine();
|
||||
if (readLine != null) {
|
||||
try {
|
||||
ApplicationInfo applicationInfo = packageManager.getApplicationInfo(readLine, PackageManager.GET_META_DATA);
|
||||
mlistAppInfo.add(new AppInfo.Builder().appLabel((String) packageManager.getApplicationLabel(applicationInfo)).pkgName(readLine).appIcon(packageManager.getApplicationIcon(applicationInfo)).build());
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
bufferedReader.close();
|
||||
return;
|
||||
}
|
||||
}
|
||||
} catch (FileNotFoundException e2) {
|
||||
e2.printStackTrace();
|
||||
} catch (IOException e3) {
|
||||
e3.printStackTrace();
|
||||
}
|
||||
}
|
||||
// private void getAppData() {
|
||||
// File fileStreamPath = mContext.getFileStreamPath(file_name);
|
||||
// if (!fileStreamPath.exists()) {
|
||||
// return;
|
||||
// }
|
||||
// try {
|
||||
// BufferedReader bufferedReader = new BufferedReader(new FileReader(fileStreamPath));
|
||||
// PackageManager packageManager = mContext.getPackageManager();
|
||||
// while (true) {
|
||||
// String readLine = bufferedReader.readLine();
|
||||
// if (readLine != null) {
|
||||
// try {
|
||||
// ApplicationInfo applicationInfo = packageManager.getApplicationInfo(readLine, PackageManager.GET_META_DATA);
|
||||
// mlistAppInfo.add(new AppInfo.Builder().appLabel((String) packageManager.getApplicationLabel(applicationInfo)).pkgName(readLine).appIcon(packageManager.getApplicationIcon(applicationInfo)).build());
|
||||
// } catch (PackageManager.NameNotFoundException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// } else {
|
||||
// bufferedReader.close();
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
// } catch (FileNotFoundException e2) {
|
||||
// e2.printStackTrace();
|
||||
// } catch (IOException e3) {
|
||||
// e3.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
|
||||
void startApkByPackName(Context context, String str) {
|
||||
try {
|
||||
@@ -311,7 +329,18 @@ public class MineFragment extends BaseMvvmFragment<MineViewModel, FragmentMineBi
|
||||
|
||||
public class BtnClick {
|
||||
public void toLigin(View view) {
|
||||
startActivity(new Intent(mContext, ActivationActivity.class));
|
||||
startActivity(new Intent(mContext, UserActivity.class));
|
||||
}
|
||||
|
||||
public void setWallpaper(View view) {
|
||||
QhbzDialog qhbzDialog = new QhbzDialog(mContext);
|
||||
qhbzDialog.show();
|
||||
qhbzDialog.setOnCallback(new QhbzDialog.Callback() {
|
||||
@Override
|
||||
public void onCallback(int i2) {
|
||||
EventBus.getDefault().postSticky(new UpdateColorEvent());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,6 +113,10 @@ public class SafeFragment extends BaseMvvmFragment<SafeViewModel, FragmentSafeBi
|
||||
|
||||
@Override
|
||||
protected void initView(Bundle bundle) {
|
||||
if (!EventBus.getDefault().isRegistered(this)) {
|
||||
EventBus.getDefault().register(this);
|
||||
}
|
||||
|
||||
if (getArguments() != null) {
|
||||
mParam1 = getArguments().getString(ARG_PARAM1);
|
||||
mParam2 = getArguments().getString(ARG_PARAM2);
|
||||
@@ -158,7 +162,7 @@ public class SafeFragment extends BaseMvvmFragment<SafeViewModel, FragmentSafeBi
|
||||
Log.e(TAG, "onItemClick66 " + appInfo.mStargss);
|
||||
// MyApp.getInstance().mBottomBtnOnClickListener.setContext(mContext);
|
||||
// MyApp.getInstance().mBottomBtnOnClickListener.onClick(appInfo.mStargss);
|
||||
OpenApkUtils.getInstance().openJxwApp(appInfo.mStargss);
|
||||
OpenApkUtils.getInstance().openJxwApp(mContext, appInfo.mStargss);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -201,12 +205,6 @@ public class SafeFragment extends BaseMvvmFragment<SafeViewModel, FragmentSafeBi
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fetchData() {
|
||||
if (mlistAppInfo != null) {
|
||||
@@ -216,8 +214,9 @@ public class SafeFragment extends BaseMvvmFragment<SafeViewModel, FragmentSafeBi
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
EventBus.getDefault().unregister(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
package com.xwad.os.jxw.event;
|
||||
|
||||
public class UpdateGradeEvent {
|
||||
}
|
||||
@@ -15,7 +15,7 @@ import com.xwad.os.R;
|
||||
import com.xwad.os.jxw.BaseNewFragment;
|
||||
import com.xwad.os.jxw.CommonUtil;
|
||||
import com.xwad.os.jxw.ToastUtil;
|
||||
import com.xwad.os.jxw.Util;
|
||||
import com.xwad.os.jxw.util.Util;
|
||||
|
||||
public class BookFragment extends BaseNewFragment {
|
||||
private String bookId;
|
||||
|
||||
@@ -13,14 +13,11 @@ import com.xwad.os.R;
|
||||
import com.xwad.os.bean.jxw.BookBean;
|
||||
import com.xwad.os.jxw.BaseNewFragment;
|
||||
import com.xwad.os.jxw.CommonUtil;
|
||||
import com.xwad.os.jxw.Util;
|
||||
import com.xwad.os.jxw.util.Util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
||||
|
||||
public class BookListFragment extends BaseNewFragment {
|
||||
List<BookBean> bookBeans = new ArrayList();
|
||||
ImageView iv_book_icon;
|
||||
|
||||
@@ -9,8 +9,10 @@ import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.google.gson.Gson;
|
||||
@@ -214,7 +216,7 @@ public class HxFragment extends BaseNewFragment {
|
||||
contentAdapter.notifyDataSetChanged();
|
||||
// MyApp.getInstance().mBottomBtnOnClickListener.setContext(getActivity());
|
||||
// MyApp.getInstance().mBottomBtnOnClickListener.onClick(obj);
|
||||
OpenApkUtils.getInstance().openJxwApp(obj);
|
||||
OpenApkUtils.getInstance().openJxwApp(getActivity(), obj);
|
||||
}
|
||||
|
||||
private void saveTag(ItemsBean itemsBean) {
|
||||
|
||||
@@ -223,7 +223,7 @@ public class SwFragment extends BaseNewFragment {
|
||||
contentAdapter.notifyDataSetChanged();
|
||||
// MyApp.getInstance().mBottomBtnOnClickListener.setContext(getActivity());
|
||||
// MyApp.getInstance().mBottomBtnOnClickListener.onClick(obj);
|
||||
OpenApkUtils.getInstance().openJxwApp(obj);
|
||||
OpenApkUtils.getInstance().openJxwApp(getActivity(), obj);
|
||||
}
|
||||
|
||||
private void saveTag(ItemsBean itemsBean) {
|
||||
|
||||
28
app/src/main/java/com/xwad/os/jxw/fragment/SztzFragment.java
Normal file
@@ -0,0 +1,28 @@
|
||||
package com.xwad.os.jxw.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.xwad.os.R;
|
||||
import com.xwad.os.jxw.BaseNewFragment;
|
||||
|
||||
public class SztzFragment extends BaseNewFragment {
|
||||
@Override
|
||||
public void initListener() {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void lazyLoad() {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected View createView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
||||
return layoutInflater.inflate(R.layout.fg_content_sztz, viewGroup, false);
|
||||
}
|
||||
}
|
||||
@@ -222,7 +222,7 @@ public class WlFragment extends BaseNewFragment {
|
||||
contentAdapter.notifyDataSetChanged();
|
||||
// MyApp.getInstance().mBottomBtnOnClickListener.setContext(getActivity());
|
||||
// MyApp.getInstance().mBottomBtnOnClickListener.onClick(obj);
|
||||
OpenApkUtils.getInstance().openJxwApp(obj);
|
||||
OpenApkUtils.getInstance().openJxwApp(getActivity(), obj);
|
||||
}
|
||||
|
||||
private void saveTag(ItemsBean itemsBean) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.xwad.os.jxw;
|
||||
package com.xwad.os.jxw.util;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.NetworkInfo;
|
||||
@@ -54,8 +55,8 @@ public class Util {
|
||||
// }
|
||||
}
|
||||
|
||||
public static void downloadClickListener(Context context, String str, String str2, String str3, String str4) {
|
||||
OpenApkUtils.getInstance().openJxwApp("" + str + "," + str2 + "," + str3 + "," + str.substring(str.lastIndexOf(".") + 1) + "," + str4);
|
||||
public static void downloadClickListener(Activity activity, String str, String str2, String str3, String str4) {
|
||||
OpenApkUtils.getInstance().openJxwApp(activity, "" + str + "," + str2 + "," + str3 + "," + str.substring(str.lastIndexOf(".") + 1) + "," + str4);
|
||||
}
|
||||
|
||||
public static String checkGrade(String str) {
|
||||
100
app/src/main/java/com/xwad/os/manager/DeviceSNManager.java
Normal file
@@ -0,0 +1,100 @@
|
||||
package com.xwad.os.manager;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.tencent.mmkv.MMKV;
|
||||
import com.xwad.os.config.CommonConfig;
|
||||
|
||||
import java.util.Random;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
public class DeviceSNManager {
|
||||
private static final String SN_KEY = "device_sn";
|
||||
private static final String PREFIX = "CDSN";
|
||||
private static final int RANDOM_DIGITS = 9;
|
||||
|
||||
private static MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
|
||||
|
||||
public DeviceSNManager() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备SN,如果不存在则创建新的
|
||||
*/
|
||||
public static String getDeviceSN() {
|
||||
String existingSN = mMMKV.decodeString(SN_KEY, "");
|
||||
|
||||
if (!TextUtils.isEmpty(existingSN)) {
|
||||
return existingSN;
|
||||
}
|
||||
String newSN = generateNewSN();
|
||||
mMMKV.encode(SN_KEY, newSN);
|
||||
return newSN;
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成新的设备SN
|
||||
* 格式:CDSN202511T923852225
|
||||
*/
|
||||
private static String generateNewSN() {
|
||||
StringBuilder snBuilder = new StringBuilder();
|
||||
// 添加前缀
|
||||
snBuilder.append(PREFIX);
|
||||
// 添加年份月份
|
||||
String timeYear = formatTimestamp(System.currentTimeMillis());
|
||||
snBuilder.append(timeYear);
|
||||
|
||||
// 添加基于时间戳的9位随机数字
|
||||
snBuilder.append(generateRandomString(10));
|
||||
|
||||
return snBuilder.toString();
|
||||
}
|
||||
|
||||
// 定义可供随机选择的字符池
|
||||
private static final String LETTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
private static final String LETTERS_AND_DIGITS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
||||
|
||||
public static String generateRandomString(int length) {
|
||||
if (length < 1) {
|
||||
throw new IllegalArgumentException("Length must be at least 1");
|
||||
}
|
||||
|
||||
Random random = new Random();
|
||||
StringBuilder sb = new StringBuilder(length);
|
||||
|
||||
// 第一位:确保是字母
|
||||
sb.append(LETTERS.charAt(random.nextInt(LETTERS.length())));
|
||||
|
||||
// 剩余位数:字母或数字
|
||||
for (int i = 1; i < length; i++) {
|
||||
sb.append(LETTERS_AND_DIGITS.charAt(random.nextInt(LETTERS_AND_DIGITS.length())));
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除已存储的SN(用于测试或重新生成)
|
||||
*/
|
||||
public static void clearDeviceSN() {
|
||||
mMMKV.removeValueForKey(SN_KEY);
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查是否已存在SN
|
||||
*/
|
||||
public static boolean hasDeviceSN() {
|
||||
return mMMKV.containsKey(SN_KEY) && !TextUtils.isEmpty(mMMKV.decodeString(SN_KEY, ""));
|
||||
}
|
||||
|
||||
public static String formatTimestamp(long timestamp) {
|
||||
// 创建指定格式的格式化对象,"yyyyMM" 表示6位数字的年份和月份,"'T'" 表示字面量字符 T
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMM'T'");
|
||||
Date date = new Date(timestamp);
|
||||
// 将 Date 对象格式化为字符串
|
||||
return sdf.format(date);
|
||||
}
|
||||
}
|
||||
@@ -10,8 +10,10 @@ import com.tencent.mmkv.MMKV;
|
||||
import com.trello.rxlifecycle4.RxLifecycle;
|
||||
import com.trello.rxlifecycle4.android.ActivityEvent;
|
||||
import com.trello.rxlifecycle4.android.FragmentEvent;
|
||||
import com.xwad.os.BuildConfig;
|
||||
import com.xwad.os.alarm.AlarmUtils;
|
||||
import com.xwad.os.bean.AlarmClockData;
|
||||
import com.xwad.os.bean.AppInfo;
|
||||
import com.xwad.os.bean.AppUpdateInfo;
|
||||
import com.xwad.os.bean.BaseResponse;
|
||||
import com.xwad.os.bean.GuideBean;
|
||||
@@ -27,11 +29,14 @@ import com.xwad.os.bean.UserAvatarInfo;
|
||||
import com.xwad.os.config.CommonConfig;
|
||||
import com.xwad.os.disklrucache.CacheHelper;
|
||||
import com.xwad.os.gson.GsonUtils;
|
||||
import com.xwad.os.manager.DeviceSNManager;
|
||||
import com.xwad.os.manager.RemoteManager;
|
||||
import com.xwad.os.network.api.AlarmClockApi;
|
||||
import com.xwad.os.network.api.AppApi;
|
||||
import com.xwad.os.network.api.AppUsageRecordApi;
|
||||
import com.xwad.os.network.api.FilesApi;
|
||||
import com.xwad.os.network.api.HomeworkApi;
|
||||
import com.xwad.os.network.api.LoginApi;
|
||||
import com.xwad.os.network.api.PhraseApi;
|
||||
import com.xwad.os.network.api.SnInfoApi;
|
||||
import com.xwad.os.network.api.SettingApi;
|
||||
@@ -345,6 +350,34 @@ public class NetInterfaceManager {
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse<AppInfo>> getAdminAppObservable(String app_package) {
|
||||
return mRetrofit.create(AppApi.class)
|
||||
.getAdminApp(BuildConfig.APPLICATION_ID, app_package)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse> getPhoneCodeObservable(String mobile) {
|
||||
return mRetrofit.create(LoginApi.class)
|
||||
.getCode(mobile)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse> getCodeLoginObservable(String mobile, String code) {
|
||||
return mRetrofit.create(LoginApi.class)
|
||||
.codeLogin(mobile, code, DeviceSNManager.getDeviceSN())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse> getUserLoginObservable(String mobile, String password) {
|
||||
return mRetrofit.create(LoginApi.class)
|
||||
.userLogin(mobile, password, DeviceSNManager.getDeviceSN())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
* execution
|
||||
|
||||
@@ -1,7 +1,22 @@
|
||||
package com.xwad.os.network;
|
||||
|
||||
public class UrlAddress {
|
||||
public static final String ROOT_URL = "https://led.aolelearn.com/android/";
|
||||
public static final String ROOT_URL = "https://365api.uiuipad.com/android/";
|
||||
|
||||
|
||||
/*发送登录验证码*/
|
||||
public final static String LOGIN_GET_CODE = "login/get-code";
|
||||
/*验证码登录*/
|
||||
public final static String CODE_LOGIN = "login/code-login";
|
||||
/*账号密码登录*/
|
||||
public final static String USER_LOGIN = "login/user-login";
|
||||
|
||||
|
||||
/*获取管理员所有应用*/
|
||||
public final static String GET_ADMIN_APP = "getAdminApp";
|
||||
public final static String APP_FORCE_INSTALL = "app/force-install";
|
||||
|
||||
|
||||
|
||||
/*设备信息接口*/
|
||||
public static final String SNINFO = "sn/getSnInfo";
|
||||
|
||||
18
app/src/main/java/com/xwad/os/network/api/AppApi.java
Normal file
@@ -0,0 +1,18 @@
|
||||
package com.xwad.os.network.api;
|
||||
|
||||
import com.xwad.os.bean.AppInfo;
|
||||
import com.xwad.os.bean.BaseResponse;
|
||||
import com.xwad.os.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface AppApi {
|
||||
@GET(UrlAddress.APP_FORCE_INSTALL)
|
||||
Observable<BaseResponse<AppInfo>> getAdminApp(
|
||||
@Query("desktop_app_package") String desktop_app_package,
|
||||
@Query("app_package") String app_package
|
||||
);
|
||||
|
||||
}
|
||||
34
app/src/main/java/com/xwad/os/network/api/LoginApi.java
Normal file
@@ -0,0 +1,34 @@
|
||||
package com.xwad.os.network.api;
|
||||
|
||||
import com.xwad.os.bean.BaseResponse;
|
||||
import com.xwad.os.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface LoginApi {
|
||||
@GET(UrlAddress.LOGIN_GET_CODE)
|
||||
Observable<BaseResponse> getCode(
|
||||
@Query("mobile") String mobile
|
||||
);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.CODE_LOGIN)
|
||||
Observable<BaseResponse> codeLogin(
|
||||
@Field("mobile") String mobile,
|
||||
@Field("code") String code,
|
||||
@Field("sn") String sn
|
||||
);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.USER_LOGIN)
|
||||
Observable<BaseResponse> userLogin(
|
||||
@Query("mobile") String mobile,
|
||||
@Query("password") String password,
|
||||
@Field("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -48,6 +48,7 @@ public class DownloadService extends Service {
|
||||
|
||||
mNotificationManagerCompat = NotificationManagerCompat.from(this);
|
||||
createNotificationChannel();
|
||||
createDownloadNotificationChannel();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -63,9 +64,9 @@ public class DownloadService extends Service {
|
||||
|
||||
private static final String CHANNEL_ID = "CHANNEL_ID";
|
||||
private static final String CHANNEL_NAME = "系统通知";
|
||||
private static final String CHANNEL_DESCRIPTION = "关怀桌面通知";
|
||||
private static final String CHANNEL_DESCRIPTION = "学王365通知";
|
||||
|
||||
private static final String CHANNEL_DOWNLOAD = "DOWNLOAD_CHANNEL";
|
||||
private static final String CHANNEL_DOWNLOAD_ID = "DOWNLOAD_CHANNEL";
|
||||
private static final String CHANNEL_DOWNLOAD_NAME = "下载管理";
|
||||
private static final String CHANNEL_DOWNLOAD_DESCRIPTION = "下载管理通知";
|
||||
|
||||
@@ -73,11 +74,8 @@ public class DownloadService extends Service {
|
||||
// Create the NotificationChannel, but only on API 26+ because
|
||||
// the NotificationChannel class is new and not in the support library
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
CharSequence name = CHANNEL_NAME;
|
||||
String description = CHANNEL_DESCRIPTION;
|
||||
int importance = NotificationManager.IMPORTANCE_DEFAULT;
|
||||
NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);
|
||||
channel.setDescription(description);
|
||||
NotificationChannel channel = new NotificationChannel(CHANNEL_ID, CHANNEL_NAME, NotificationManager.IMPORTANCE_DEFAULT);
|
||||
channel.setDescription(CHANNEL_DESCRIPTION);
|
||||
// Register the channel with the system; you can't change the importance
|
||||
// or other notification behaviors after this
|
||||
NotificationManager notificationManager = getSystemService(NotificationManager.class);
|
||||
@@ -92,7 +90,7 @@ public class DownloadService extends Service {
|
||||
Intent intent = new Intent(this, DownloadService.class);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
NotificationCompat.Builder builder = new NotificationCompat.Builder(this, "CHANNEL_ID")
|
||||
NotificationCompat.Builder builder = new NotificationCompat.Builder(this, CHANNEL_ID)
|
||||
.setSmallIcon(R.mipmap.ic_launcher)
|
||||
.setContentTitle("关怀系统正在运行")
|
||||
// .setContentText("测试内容")
|
||||
@@ -107,8 +105,21 @@ public class DownloadService extends Service {
|
||||
startForeground(NotificationID, builder.build());
|
||||
}
|
||||
|
||||
private void createDownloadNotificationChannel() {
|
||||
// Create the NotificationChannel, but only on API 26+ because
|
||||
// the NotificationChannel class is new and not in the support library
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
NotificationChannel channel = new NotificationChannel(CHANNEL_DOWNLOAD_ID, CHANNEL_DOWNLOAD_NAME, NotificationManager.IMPORTANCE_DEFAULT);
|
||||
channel.setDescription(CHANNEL_DOWNLOAD_DESCRIPTION);
|
||||
// Register the channel with the system; you can't change the importance
|
||||
// or other notification behaviors after this
|
||||
NotificationManager notificationManager = getSystemService(NotificationManager.class);
|
||||
notificationManager.createNotificationChannel(channel);
|
||||
}
|
||||
}
|
||||
|
||||
private void sendDownloadRunning(AriaDownloadInfo ariaDownloadInfo, int progress) {
|
||||
NotificationCompat.Builder builder = new NotificationCompat.Builder(this, CHANNEL_DOWNLOAD)
|
||||
NotificationCompat.Builder builder = new NotificationCompat.Builder(this, CHANNEL_DOWNLOAD_ID)
|
||||
.setSmallIcon(R.mipmap.ic_launcher)
|
||||
.setLargeIcon(BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher))
|
||||
.setContentTitle(ariaDownloadInfo.getAppName())
|
||||
@@ -120,11 +131,12 @@ public class DownloadService extends Service {
|
||||
.setProgress(100, progress, false)
|
||||
.setPriority(NotificationCompat.PRIORITY_HIGH);
|
||||
// notificationId is a unique int for each notification that you must define
|
||||
mNotificationManagerCompat.notify(ariaDownloadInfo.getAppId(), builder.build());
|
||||
// mNotificationManagerCompat.notify(ariaDownloadInfo.getAppId(), builder.build());
|
||||
startForeground(ariaDownloadInfo.getAppId(), builder.build());
|
||||
}
|
||||
|
||||
private void sendDownloadComplete(AriaDownloadInfo ariaDownloadInfo, String path) {
|
||||
NotificationCompat.Builder builder = new NotificationCompat.Builder(this, CHANNEL_DOWNLOAD)
|
||||
NotificationCompat.Builder builder = new NotificationCompat.Builder(this, CHANNEL_DOWNLOAD_ID)
|
||||
.setSmallIcon(R.mipmap.ic_launcher)
|
||||
.setLargeIcon(BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher))
|
||||
.setContentTitle(ariaDownloadInfo.getAppName())
|
||||
@@ -163,7 +175,7 @@ public class DownloadService extends Service {
|
||||
}
|
||||
|
||||
private void sendDownloadFail(AriaDownloadInfo ariaDownloadInfo) {
|
||||
NotificationCompat.Builder builder = new NotificationCompat.Builder(this, CHANNEL_DOWNLOAD)
|
||||
NotificationCompat.Builder builder = new NotificationCompat.Builder(this, CHANNEL_DOWNLOAD_ID)
|
||||
.setSmallIcon(R.mipmap.ic_launcher)
|
||||
.setLargeIcon(BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher))
|
||||
.setContentTitle(ariaDownloadInfo.getAppName())
|
||||
|
||||
@@ -14,6 +14,7 @@ import android.util.Log;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.arialyy.aria.core.Aria;
|
||||
import com.xwad.os.bean.AppInfo;
|
||||
import com.xwad.os.bean.AppUpdateInfo;
|
||||
import com.xwad.os.bean.AriaDownloadInfo;
|
||||
import com.xwad.os.bean.HomeworkBean;
|
||||
@@ -31,10 +32,10 @@ public class FileUtil {
|
||||
|
||||
public static String getFileType(String url) {
|
||||
if (url.indexOf("/") == -1) {
|
||||
return url.substring(url.indexOf("."), url.length());
|
||||
return url.substring(url.indexOf("."));
|
||||
} else {
|
||||
String fileName = url.substring(url.lastIndexOf("/"));
|
||||
return fileName.substring(fileName.indexOf("."), fileName.length());
|
||||
return fileName.substring(fileName.indexOf("."));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -203,7 +204,7 @@ public class FileUtil {
|
||||
}
|
||||
MessageDigest digest = null;
|
||||
FileInputStream in = null;
|
||||
byte buffer[] = new byte[1024];
|
||||
byte[] buffer = new byte[1024];
|
||||
int len;
|
||||
try {
|
||||
digest = MessageDigest.getInstance("MD5");
|
||||
@@ -231,6 +232,12 @@ public class FileUtil {
|
||||
// ariaDownload(context, url, ariaDownloadInfo);
|
||||
// }
|
||||
|
||||
public static void ariaDownload(Context context, String url, AppInfo appInfo) {
|
||||
Log.e(TAG, "ariaDownload: " + appInfo);
|
||||
AriaDownloadInfo ariaDownloadInfo = AriaDownloadInfo.toAriaDownloadInfo(appInfo);
|
||||
ariaDownload(context, url, ariaDownloadInfo);
|
||||
}
|
||||
|
||||
public static void ariaDownload(Context context, String url, AppUpdateInfo appUpdateInfo) {
|
||||
Log.e(TAG, "ariaDownload: " + appUpdateInfo);
|
||||
AriaDownloadInfo ariaDownloadInfo = AriaDownloadInfo.toAriaDownloadInfo(appUpdateInfo);
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.xwad.os.utils;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.content.ComponentName;
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
@@ -10,15 +12,26 @@ import android.content.pm.PackageManager;
|
||||
import android.os.Build;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.hjq.toast.Toaster;
|
||||
import com.tencent.mmkv.MMKV;
|
||||
import com.xwad.os.R;
|
||||
import com.xwad.os.bean.AppInfo;
|
||||
import com.xwad.os.bean.BaseResponse;
|
||||
import com.xwad.os.bean.LessonJson;
|
||||
import com.xwad.os.config.CommonConfig;
|
||||
import com.xwad.os.jxw.JxwPackageConfig;
|
||||
import com.xwad.os.manager.RemoteManager;
|
||||
import com.hjq.toast.Toaster;
|
||||
import com.tencent.mmkv.MMKV;
|
||||
import com.xwad.os.network.NetInterfaceManager;
|
||||
import com.xwad.os.service.DownloadService;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.math.BigDecimal;
|
||||
@@ -27,6 +40,10 @@ import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.function.BiConsumer;
|
||||
|
||||
import io.reactivex.rxjava3.annotations.NonNull;
|
||||
import io.reactivex.rxjava3.core.Observer;
|
||||
import io.reactivex.rxjava3.disposables.Disposable;
|
||||
|
||||
public class OpenApkUtils {
|
||||
private static final String TAG = "OpenApkUtils";
|
||||
|
||||
@@ -636,7 +653,7 @@ public class OpenApkUtils {
|
||||
*
|
||||
* @param paramStr 参数字符串(格式:包名,类名,extra参数,第四项,第五项)
|
||||
*/
|
||||
public void openJxwApp(String paramStr) {
|
||||
public void openJxwApp(Activity context, String paramStr) {
|
||||
if (TextUtils.isEmpty(paramStr)) {
|
||||
Log.e(TAG, "context为空或参数字符串为空");
|
||||
return;
|
||||
@@ -654,10 +671,15 @@ public class OpenApkUtils {
|
||||
String className = totalParts[1]; // 第二项:类名
|
||||
String extraParamStr = totalParts.length > 2 ? totalParts[2] : ""; // 第三项:Intent Extra参数
|
||||
String fourthParam = totalParts.length > 3 ? totalParts[3] : ""; // 第四项(自定义)
|
||||
String fifthParam = totalParts.length > 4 ? totalParts[4] : ""; // 第五项(自定义)
|
||||
String appName = totalParts.length > 4 ? totalParts[4] : ""; // 第五项(自定义)
|
||||
|
||||
Log.d(TAG, "包名:" + packageName + "\n类名:" + className
|
||||
+ "\n第四项:" + fourthParam + "\n第五项:" + fifthParam);
|
||||
+ "\n第四项:" + fourthParam + "\n应用名:" + appName);
|
||||
|
||||
if (!ApkUtils.isAvailable(mContext, packageName)) {
|
||||
showDownloadDialog(context, packageName, appName);
|
||||
return;
|
||||
}
|
||||
|
||||
// 2. 构建Intent并设置Component(包名+类名)
|
||||
Intent intent = new Intent();
|
||||
@@ -689,7 +711,7 @@ public class OpenApkUtils {
|
||||
|
||||
// 4. 启动Activity(处理异常)
|
||||
try {
|
||||
mContext.startActivity(intent);
|
||||
context.startActivity(intent);
|
||||
} catch (Exception e) {
|
||||
if (e instanceof android.content.ActivityNotFoundException) {
|
||||
Log.e(TAG, "未找到目标Activity:" + packageName + "/" + className);
|
||||
@@ -747,4 +769,77 @@ public class OpenApkUtils {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void showDownloadDialog(Activity context, String pkg, String appName) {
|
||||
Dialog dialog = new Dialog(context, R.style.ActionSheet);
|
||||
Window window = dialog.getWindow();
|
||||
View inflate = ((LayoutInflater) context.getSystemService("layout_inflater")).inflate(R.layout.download_dialog, (ViewGroup) null);
|
||||
TextView textView = inflate.findViewById(R.id.download_cancel);
|
||||
TextView textView2 = inflate.findViewById(R.id.tag_title);
|
||||
if (!TextUtils.isEmpty(appName)) {
|
||||
textView2.setText("未安装\"" + appName + "\"\n下载后可继续使用!");
|
||||
}
|
||||
TextView textView3 = inflate.findViewById(R.id.download_ok);
|
||||
textView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
textView3.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
getAppInfo(pkg);
|
||||
Intent intent = new Intent(mContext, DownloadService.class);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
mContext.startForegroundService(intent);
|
||||
} else {
|
||||
mContext.startService(intent);
|
||||
}
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
WindowManager.LayoutParams attributes = window.getAttributes();
|
||||
attributes.x = 0;
|
||||
attributes.y = 0;
|
||||
attributes.gravity = 17;
|
||||
dialog.onWindowAttributesChanged(attributes);
|
||||
dialog.setCanceledOnTouchOutside(true);
|
||||
dialog.setContentView(inflate);
|
||||
window.setDimAmount(0.6f);
|
||||
dialog.show();
|
||||
window.setAttributes(attributes);
|
||||
}
|
||||
|
||||
public void getAppInfo(String pkg) {
|
||||
NetInterfaceManager.getInstance().getAdminAppObservable(pkg)
|
||||
.subscribe(new Observer<BaseResponse<AppInfo>>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
Log.e("getAppInfo", "onSubscribe: ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull BaseResponse<AppInfo> baseResponse) {
|
||||
Log.e("getAppInfo", "onNext: " + baseResponse);
|
||||
if (baseResponse.code == 200) {
|
||||
AppInfo appInfo = baseResponse.data;
|
||||
FileUtil.ariaDownload(mContext, appInfo.getApp_url(), appInfo);
|
||||
} else {
|
||||
Toaster.showLong("没有找到应用信息,请联系客服");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
Log.e("getAppInfo", "onError: " + e.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e("getAppInfo", "onComplete: ");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ import com.xwad.os.R;
|
||||
import com.xwad.os.base.BaseApplication;
|
||||
import com.xwad.os.bean.jxw.ItemsBean;
|
||||
import com.xwad.os.jxw.AssertUtils;
|
||||
import com.xwad.os.jxw.SPUtils;
|
||||
import com.xwad.os.utils.OpenApkUtils;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
@@ -37,14 +38,17 @@ import java.util.List;
|
||||
|
||||
public class AppsDialog extends Dialog {
|
||||
private String FILE_NAME;
|
||||
|
||||
private Activity activity;
|
||||
AppAdapter appAdapter;
|
||||
List<ItemsBean> appList;
|
||||
int count;
|
||||
private AppAdapter appAdapter;
|
||||
|
||||
private List<ItemsBean> appList;
|
||||
private int count;
|
||||
private Callback mCallback;
|
||||
RecyclerView rv_apps;
|
||||
TextView tv_title;
|
||||
String type;
|
||||
private String type;
|
||||
|
||||
private RecyclerView rv_apps;
|
||||
private TextView tv_title;
|
||||
|
||||
public interface Callback {
|
||||
void onCallback();
|
||||
@@ -52,7 +56,7 @@ public class AppsDialog extends Dialog {
|
||||
|
||||
public AppsDialog(Context context, String str) {
|
||||
super(context, R.style.ActionSheetDialogStyle);
|
||||
appList = new ArrayList();
|
||||
appList = new ArrayList<>();
|
||||
FILE_NAME = "app_list_";
|
||||
activity = (Activity) context;
|
||||
type = str;
|
||||
@@ -80,32 +84,40 @@ public class AppsDialog extends Dialog {
|
||||
rv_apps = findViewById(R.id.rv_apps);
|
||||
tv_title = findViewById(R.id.tv_title);
|
||||
appAdapter = new AppAdapter(getApps());
|
||||
if (type.equals("yw")) {
|
||||
switch (type) {
|
||||
case "yw":
|
||||
tv_title.setText("语文学习应用");
|
||||
gridLayoutManager = new GridLayoutManager(activity, 5);
|
||||
count = 2;
|
||||
} else if (type.equals("sx")) {
|
||||
break;
|
||||
case "sx":
|
||||
tv_title.setText("数学学习应用");
|
||||
gridLayoutManager = new GridLayoutManager(activity, 5);
|
||||
count = 2;
|
||||
} else if (type.equals("yy")) {
|
||||
break;
|
||||
case "yy":
|
||||
tv_title.setText("英语学习应用");
|
||||
gridLayoutManager = new GridLayoutManager(activity, 5);
|
||||
count = 2;
|
||||
} else if (type.equals("wl")) {
|
||||
break;
|
||||
case "wl":
|
||||
tv_title.setText("物理学习应用");
|
||||
gridLayoutManager = new GridLayoutManager(activity, 4);
|
||||
count = 1;
|
||||
} else if (type.equals("hx")) {
|
||||
break;
|
||||
case "hx":
|
||||
tv_title.setText("化学学习应用");
|
||||
gridLayoutManager = new GridLayoutManager(activity, 5);
|
||||
count = 1;
|
||||
} else if (type.equals("sw")) {
|
||||
break;
|
||||
case "sw":
|
||||
tv_title.setText("生物学习应用");
|
||||
gridLayoutManager = new GridLayoutManager(activity, 3);
|
||||
count = 1;
|
||||
} else {
|
||||
break;
|
||||
default:
|
||||
gridLayoutManager = null;
|
||||
break;
|
||||
}
|
||||
rv_apps.setLayoutManager(gridLayoutManager);
|
||||
rv_apps.setAdapter(appAdapter);
|
||||
@@ -146,7 +158,7 @@ public class AppsDialog extends Dialog {
|
||||
}
|
||||
|
||||
private List<ItemsBean> getApps() {
|
||||
String grade = "一年级";
|
||||
String grade = SPUtils.getGrade();
|
||||
Gson gson = new Gson();
|
||||
String jsonString = AssertUtils.getFromAssets(BaseApplication.getInstance(), "script/" + type + "_apps.json");
|
||||
Type type = new TypeToken<List<ItemsBean>>() {
|
||||
@@ -176,7 +188,7 @@ public class AppsDialog extends Dialog {
|
||||
}
|
||||
// MyApp.getInstance().mBottomBtnOnClickListener.setContext(activity);
|
||||
// MyApp.getInstance().mBottomBtnOnClickListener.onClick(viewTag);
|
||||
OpenApkUtils.getInstance().openJxwApp(viewTag);
|
||||
OpenApkUtils.getInstance().openJxwApp(activity, viewTag);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
import com.xwad.os.R;
|
||||
import com.xwad.os.bean.jxw.TaskBean;
|
||||
import com.xwad.os.jxw.ToastUtil;
|
||||
import com.xwad.os.jxw.Util;
|
||||
import com.xwad.os.jxw.util.Util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -30,7 +30,7 @@ import com.xwad.os.jxw.Constant;
|
||||
import com.xwad.os.jxw.JiaoShuiDialog;
|
||||
import com.xwad.os.jxw.SPUtils;
|
||||
import com.xwad.os.jxw.StudyRecordAPKInfo;
|
||||
import com.xwad.os.jxw.Util;
|
||||
import com.xwad.os.jxw.util.Util;
|
||||
|
||||
import org.libpag.PAGView;
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 318 KiB After Width: | Height: | Size: 867 KiB |
|
Before Width: | Height: | Size: 622 KiB After Width: | Height: | Size: 1.7 MiB |
BIN
app/src/main/res/drawable-xxhdpi/card_robot_background.png
Normal file
|
After Width: | Height: | Size: 85 KiB |
|
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 1.5 MiB |
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#80ffffff"/>
|
||||
<corners android:radius="30dp"/>
|
||||
<corners android:radius="8dp" />
|
||||
</shape>
|
||||
6
app/src/main/res/drawable/download_ok_bg.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#3c77fc" />
|
||||
<corners android:radius="14dp" />
|
||||
</shape>
|
||||
@@ -1,6 +1,6 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="1024"
|
||||
android:viewportHeight="1024">
|
||||
<path
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="1024"
|
||||
android:viewportHeight="1024">
|
||||
<path
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
android:id="@+id/iv_logo"
|
||||
android:layout_width="112dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginStart="48dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/xuewang_logo_ai"
|
||||
@@ -44,9 +44,9 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="11sp"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/linearLayout6"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
@@ -74,12 +74,13 @@
|
||||
android:id="@+id/iv_wifi"
|
||||
android:layout_width="11dp"
|
||||
android:layout_height="9dp"
|
||||
android:visibility="gone"
|
||||
android:layout_marginStart="3dp" />
|
||||
|
||||
<com.xwad.os.view.jxw.view.JxwBatteryCircular
|
||||
android:id="@+id/battery_view"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="10dp"
|
||||
android:layout_marginStart="3dp" />
|
||||
</LinearLayout>
|
||||
|
||||
@@ -145,8 +146,10 @@
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rl_tab"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_below="@+id/home"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home" />
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -26,19 +26,20 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView8"
|
||||
android:layout_width="174dp"
|
||||
android:layout_height="27dp"
|
||||
android:layout_width="249dp"
|
||||
android:layout_height="39dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/icon_xuewang365_logo"
|
||||
app:layout_constraintBottom_toTopOf="@+id/constraintLayout18"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout18"
|
||||
android:layout_width="345dp"
|
||||
android:layout_height="206dp"
|
||||
android:layout_marginTop="32dp"
|
||||
android:background="@drawable/icon_logon_background"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingTop="8dp"
|
||||
@@ -47,7 +48,7 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/imageView8">
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -113,14 +114,16 @@
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_mobile"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="4dp"
|
||||
android:background="@null"
|
||||
android:hint="手机号"
|
||||
android:inputType="phone"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="#cbdaee"
|
||||
android:hint="手机号"
|
||||
android:textSize="11sp"
|
||||
android:layout_marginStart="4dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/view1"
|
||||
@@ -176,11 +179,13 @@
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_code"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="4dp"
|
||||
android:background="@null"
|
||||
android:hint="验证码"
|
||||
android:inputType="number"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="#cbdaee"
|
||||
android:textSize="11sp"
|
||||
@@ -196,6 +201,7 @@
|
||||
android:layout_width="96dp"
|
||||
android:layout_height="29dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:onClick="@{click::getCode}"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/icon_login_sms_code"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@@ -215,8 +221,8 @@
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="25dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:onClick="@{click::codeLogin}"
|
||||
android:scaleType="centerCrop"
|
||||
android:onClick="@{click::loginPhone}"
|
||||
android:src="@drawable/icon_activation_confirm"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -26,19 +26,20 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView8"
|
||||
android:layout_width="174dp"
|
||||
android:layout_height="27dp"
|
||||
android:layout_width="249dp"
|
||||
android:layout_height="39dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/icon_xuewang365_logo"
|
||||
app:layout_constraintBottom_toTopOf="@+id/constraintLayout17"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout17"
|
||||
android:layout_width="345dp"
|
||||
android:layout_height="206dp"
|
||||
android:layout_marginTop="32dp"
|
||||
android:background="@drawable/icon_logon_background"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingTop="8dp"
|
||||
@@ -47,12 +48,11 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/imageView8">
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
@@ -87,9 +87,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="本机已激活成功,系统终身免费,谢谢您的使用。"
|
||||
android:text="@string/license_verification_successful"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
||||
58
app/src/main/res/layout/download_dialog.xml
Normal file
@@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="269dp"
|
||||
android:layout_height="225dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="2dp"
|
||||
android:background="@drawable/yysc_tc">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tag_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:layout_marginTop="123dp"
|
||||
android:layout_marginRight="6dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/no_install"
|
||||
android:textColor="#333333"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginBottom="19dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/download_cancel"
|
||||
android:layout_width="81dp"
|
||||
android:layout_height="28dp"
|
||||
android:background="@drawable/download_cancel_bg"
|
||||
android:gravity="center"
|
||||
android:text="@string/no_download"
|
||||
android:textColor="#666666"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/download_ok"
|
||||
android:layout_width="81dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginLeft="38dp"
|
||||
android:background="@drawable/download_ok_bg"
|
||||
android:gravity="center"
|
||||
android:text="@string/to_download"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
538
app/src/main/res/layout/fg_content_example.xml
Normal file
@@ -0,0 +1,538 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="190dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/ll_zjx"
|
||||
android:layout_width="1200dp"
|
||||
android:layout_height="960dp"
|
||||
android:background="@drawable/icon_yw_zjx_l"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="50dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_tab_tbjzx"
|
||||
android:layout_width="350dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_tab_tbjzx"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="21dp"
|
||||
android:text="AI同步精准学"
|
||||
android:textColor="#b3b1ca"
|
||||
android:textSize="36sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_tab_tbjzx"
|
||||
android:layout_width="266dp"
|
||||
android:layout_height="86dp"
|
||||
android:layout_marginTop="27dp"
|
||||
android:background="@drawable/icon_yw_tbjzx" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_tab_dyfx"
|
||||
android:layout_width="310dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_tab_dyfx"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="21dp"
|
||||
android:text="AI单元复习"
|
||||
android:textColor="#b3b1ca"
|
||||
android:textSize="36sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_tab_dyfx"
|
||||
android:layout_width="256dp"
|
||||
android:layout_height="86dp"
|
||||
android:layout_marginTop="27dp"
|
||||
android:background="@drawable/icon_yw_dyfx"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_tab_jdbk"
|
||||
android:layout_width="286dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_tab_jdbk"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="21dp"
|
||||
android:text="AI阶段备考"
|
||||
android:textColor="#b3b1ca"
|
||||
android:textSize="36sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_tab_jdbk"
|
||||
android:layout_width="256dp"
|
||||
android:layout_height="86dp"
|
||||
android:layout_marginTop="27dp"
|
||||
android:background="@drawable/icon_yw_aijdbk"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_tbjzx"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="160dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="39dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="480dp"
|
||||
android:layout_height="400dp"
|
||||
android:background="@drawable/icon_yw_tbdd_bg"
|
||||
android:paddingLeft="25dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_kb"
|
||||
android:layout_width="325dp"
|
||||
android:layout_height="380dp"
|
||||
android:layout_marginLeft="43dp"
|
||||
android:onClick="onClick"
|
||||
android:tag="@string/tag_args_tbdd_yy_new_six">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="283dp"
|
||||
android:layout_height="47dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:background="@drawable/icon_yw_tbdd_dizuo" />
|
||||
|
||||
<View
|
||||
android:layout_width="232dp"
|
||||
android:layout_height="327dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="38dp"
|
||||
android:background="@drawable/bg_shape_tbdd_book_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_cover"
|
||||
android:layout_width="212dp"
|
||||
android:layout_height="307dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="48dp"
|
||||
android:background="@drawable/icon_yw_tjsb" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="69dp"
|
||||
android:layout_marginLeft="130dp"
|
||||
android:layout_marginTop="300dp"
|
||||
android:background="@drawable/icon_tbdd_diandu" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_zb"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/icon_kbdd_zb" />
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="480dp"
|
||||
android:layout_height="330dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginTop="30dp"
|
||||
android:background="@drawable/icon_yw_tbfd_bg"
|
||||
android:onClick="onClick"
|
||||
android:tag="@string/tag_args_new_tbfd_yy" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="600dp"
|
||||
android:layout_height="760dp"
|
||||
android:layout_marginLeft="40dp"
|
||||
android:background="@drawable/icon_yw_khl"
|
||||
android:onClick="onGoJzx"
|
||||
android:tag="0|英语" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_dyfx"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="160dp"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="482dp"
|
||||
android:layout_height="760dp"
|
||||
android:layout_marginLeft="40dp"
|
||||
android:background="@drawable/icon_yw_dnxfx_bg"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="360dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_marginTop="167dp"
|
||||
android:background="@drawable/bg_shape_d9d9d9_20"
|
||||
android:gravity="center"
|
||||
android:onClick="onGoJzx"
|
||||
android:orientation="horizontal"
|
||||
android:tag="10|英语">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:background="@drawable/icon_dyfx_zskj" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="24dp"
|
||||
android:text="知识框架"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="30sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:background="@drawable/icon_dyfx_x" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="360dp"
|
||||
android:layout_height="100dp"
|
||||
android:background="@drawable/bg_shape_d9d9d9_20"
|
||||
android:gravity="center"
|
||||
android:onClick="onGoJzx"
|
||||
android:orientation="horizontal"
|
||||
android:tag="11|英语">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:background="@drawable/icon_dyfx_zsdjj" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="24dp"
|
||||
android:text="知识点精讲"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="30sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:background="@drawable/icon_dyfx_x" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="360dp"
|
||||
android:layout_height="100dp"
|
||||
android:background="@drawable/bg_shape_d9d9d9_20"
|
||||
android:gravity="center"
|
||||
android:onClick="onGoJzx"
|
||||
android:orientation="horizontal"
|
||||
android:tag="12|英语">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:background="@drawable/icon_dyfx_xbbj" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="24dp"
|
||||
android:text="学霸笔记"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="30sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:background="@drawable/icon_dyfx_x" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="360dp"
|
||||
android:layout_height="100dp"
|
||||
android:background="@drawable/bg_shape_d9d9d9_20"
|
||||
android:gravity="center"
|
||||
android:onClick="onGoJzx"
|
||||
android:orientation="horizontal"
|
||||
android:tag="13|英语">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:background="@drawable/icon_dyfx_ztjj" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="24dp"
|
||||
android:text="真题精讲"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="30sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="600dp"
|
||||
android:layout_height="760dp"
|
||||
android:layout_marginLeft="39dp"
|
||||
android:background="@drawable/icon_yw_aidyfxl_bg"
|
||||
android:onClick="onGoJzx"
|
||||
android:tag="9|英语" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_jdbk"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="160dp"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_brdzj"
|
||||
android:layout_width="540dp"
|
||||
android:layout_height="760dp"
|
||||
android:layout_marginRight="40dp"
|
||||
android:background="@drawable/icon_yw_brdzj"
|
||||
android:onClick="onGoJzx"
|
||||
android:tag="5|英语" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_aijdc"
|
||||
android:layout_width="540dp"
|
||||
android:layout_height="400dp"
|
||||
android:layout_marginBottom="40dp"
|
||||
android:layout_toRightOf="@+id/iv_brdzj"
|
||||
android:background="@drawable/icon_yw_aijdc"
|
||||
android:onClick="onGoJzx"
|
||||
android:tag="1|英语" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/iv_qyj"
|
||||
android:layout_width="540dp"
|
||||
android:layout_height="320dp"
|
||||
android:layout_below="@+id/iv_aijdc"
|
||||
android:layout_toRightOf="@+id/iv_brdzj"
|
||||
android:background="@drawable/bg_shape_b6f3fa_40"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="40dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="40dp"
|
||||
android:text="试卷中心"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="40sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:text="真题来演练,提升超惊艳"
|
||||
android:textColor="#60ffffff"
|
||||
android:textSize="28sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="124dp"
|
||||
android:background="@drawable/bg_shape_d9d9d9_20"
|
||||
android:gravity="center"
|
||||
android:onClick="onGoSjzx"
|
||||
android:orientation="vertical"
|
||||
android:tag="1669|英语">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="67dp"
|
||||
android:layout_height="62dp"
|
||||
android:background="@drawable/icon_yw_qz" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:paddingRight="6dp"
|
||||
android:text="期中"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="28sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="124dp"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:layout_marginRight="30dp"
|
||||
android:background="@drawable/bg_shape_d9d9d9_20"
|
||||
android:gravity="center"
|
||||
android:onClick="onGoSjzx"
|
||||
android:orientation="vertical"
|
||||
android:tag="1670|英语">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="67dp"
|
||||
android:layout_height="62dp"
|
||||
android:background="@drawable/icon_yw_qm" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:text="期末"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="28sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="124dp"
|
||||
android:background="@drawable/bg_shape_d9d9d9_20"
|
||||
android:gravity="center"
|
||||
android:onClick="onGoSjzx"
|
||||
android:orientation="vertical"
|
||||
android:tag="1671|英语">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="67dp"
|
||||
android:layout_height="62dp"
|
||||
android:background="@drawable/icon_yw_mnk" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingRight="4dp"
|
||||
android:text="模拟考"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="28sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="40dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="540dp"
|
||||
android:layout_height="275dp"
|
||||
android:background="@drawable/icon_yy_xx_lwxfy"
|
||||
android:onClick="onClick"
|
||||
android:tag="@string/taf_args_xfy" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="40dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="275dp"
|
||||
android:background="@drawable/icon_yy_xx_jpkc"
|
||||
android:onClick="onClick"
|
||||
android:tag="@string/tag_args_new_xksp_yy" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_zxts"
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="275dp"
|
||||
android:layout_marginLeft="40dp"
|
||||
android:background="@drawable/icon_yy_xx_zxts"
|
||||
android:onClick="onClick" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="540dp"
|
||||
android:layout_height="330dp"
|
||||
android:layout_marginTop="40dp"
|
||||
android:background="@drawable/bg_shape_zjxx"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_apps"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="40dp"
|
||||
android:layout_marginTop="40dp"
|
||||
android:layout_marginRight="40dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="学习应用"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="36sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@drawable/icon_yw_zjxx_right" />
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_apps"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="44dp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
538
app/src/main/res/layout/fg_content_example_after.xml
Normal file
@@ -0,0 +1,538 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="64dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/ll_zjx"
|
||||
android:layout_width="407dp"
|
||||
android:layout_height="325dp"
|
||||
android:background="@drawable/icon_yw_zjx_l"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="17dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_tab_tbjzx"
|
||||
android:layout_width="119dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_tab_tbjzx"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="7dp"
|
||||
android:text="AI同步精准学"
|
||||
android:textColor="#b3b1ca"
|
||||
android:textSize="36sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_tab_tbjzx"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="29dp"
|
||||
android:layout_marginTop="9dp"
|
||||
android:background="@drawable/icon_yw_tbjzx" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_tab_dyfx"
|
||||
android:layout_width="105dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_tab_dyfx"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="7dp"
|
||||
android:text="AI单元复习"
|
||||
android:textColor="#b3b1ca"
|
||||
android:textSize="36sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_tab_dyfx"
|
||||
android:layout_width="87dp"
|
||||
android:layout_height="29dp"
|
||||
android:layout_marginTop="9dp"
|
||||
android:background="@drawable/icon_yw_dyfx"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_tab_jdbk"
|
||||
android:layout_width="97dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_tab_jdbk"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="7dp"
|
||||
android:text="AI阶段备考"
|
||||
android:textColor="#b3b1ca"
|
||||
android:textSize="36sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_tab_jdbk"
|
||||
android:layout_width="87dp"
|
||||
android:layout_height="29dp"
|
||||
android:layout_marginTop="9dp"
|
||||
android:background="@drawable/icon_yw_aijdbk"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_tbjzx"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="54dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="13dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="163dp"
|
||||
android:layout_height="136dp"
|
||||
android:background="@drawable/icon_yw_tbdd_bg"
|
||||
android:paddingLeft="8dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_kb"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="129dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:onClick="onClick"
|
||||
android:tag="@string/tag_args_tbdd_yy_new_six">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="96dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:background="@drawable/icon_yw_tbdd_dizuo" />
|
||||
|
||||
<View
|
||||
android:layout_width="79dp"
|
||||
android:layout_height="111dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="13dp"
|
||||
android:background="@drawable/bg_shape_tbdd_book_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_cover"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="104dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="@drawable/icon_yw_tjsb" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="51dp"
|
||||
android:layout_height="23dp"
|
||||
android:layout_marginLeft="44dp"
|
||||
android:layout_marginTop="102dp"
|
||||
android:background="@drawable/icon_tbdd_diandu" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_zb"
|
||||
android:layout_width="41dp"
|
||||
android:layout_height="41dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:background="@drawable/icon_kbdd_zb" />
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="163dp"
|
||||
android:layout_height="112dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/icon_yw_tbfd_bg"
|
||||
android:onClick="onClick"
|
||||
android:tag="@string/tag_args_new_tbfd_yy" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="203dp"
|
||||
android:layout_height="258dp"
|
||||
android:layout_marginLeft="14dp"
|
||||
android:background="@drawable/icon_yw_khl"
|
||||
android:onClick="onGoJzx"
|
||||
android:tag="0|英语" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_dyfx"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="54dp"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="163dp"
|
||||
android:layout_height="258dp"
|
||||
android:layout_marginLeft="14dp"
|
||||
android:background="@drawable/icon_yw_dnxfx_bg"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="122dp"
|
||||
android:layout_height="34dp"
|
||||
android:layout_marginTop="57dp"
|
||||
android:background="@drawable/bg_shape_d9d9d9_20"
|
||||
android:gravity="center"
|
||||
android:onClick="onGoJzx"
|
||||
android:orientation="horizontal"
|
||||
android:tag="10|英语">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="27dp"
|
||||
android:layout_height="27dp"
|
||||
android:background="@drawable/icon_dyfx_zskj" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:text="知识框架"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="30sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:background="@drawable/icon_dyfx_x" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="122dp"
|
||||
android:layout_height="34dp"
|
||||
android:background="@drawable/bg_shape_d9d9d9_20"
|
||||
android:gravity="center"
|
||||
android:onClick="onGoJzx"
|
||||
android:orientation="horizontal"
|
||||
android:tag="11|英语">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="27dp"
|
||||
android:layout_height="27dp"
|
||||
android:background="@drawable/icon_dyfx_zsdjj" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:text="知识点精讲"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="30sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:background="@drawable/icon_dyfx_x" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="122dp"
|
||||
android:layout_height="34dp"
|
||||
android:background="@drawable/bg_shape_d9d9d9_20"
|
||||
android:gravity="center"
|
||||
android:onClick="onGoJzx"
|
||||
android:orientation="horizontal"
|
||||
android:tag="12|英语">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="27dp"
|
||||
android:layout_height="27dp"
|
||||
android:background="@drawable/icon_dyfx_xbbj" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:text="学霸笔记"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="30sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:background="@drawable/icon_dyfx_x" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="122dp"
|
||||
android:layout_height="34dp"
|
||||
android:background="@drawable/bg_shape_d9d9d9_20"
|
||||
android:gravity="center"
|
||||
android:onClick="onGoJzx"
|
||||
android:orientation="horizontal"
|
||||
android:tag="13|英语">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="27dp"
|
||||
android:layout_height="27dp"
|
||||
android:background="@drawable/icon_dyfx_ztjj" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:text="真题精讲"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="30sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="203dp"
|
||||
android:layout_height="258dp"
|
||||
android:layout_marginLeft="13dp"
|
||||
android:background="@drawable/icon_yw_aidyfxl_bg"
|
||||
android:onClick="onGoJzx"
|
||||
android:tag="9|英语" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_jdbk"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="54dp"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_brdzj"
|
||||
android:layout_width="183dp"
|
||||
android:layout_height="258dp"
|
||||
android:layout_marginRight="14dp"
|
||||
android:background="@drawable/icon_yw_brdzj"
|
||||
android:onClick="onGoJzx"
|
||||
android:tag="5|英语" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_aijdc"
|
||||
android:layout_width="183dp"
|
||||
android:layout_height="136dp"
|
||||
android:layout_marginBottom="14dp"
|
||||
android:layout_toRightOf="@+id/iv_brdzj"
|
||||
android:background="@drawable/icon_yw_aijdc"
|
||||
android:onClick="onGoJzx"
|
||||
android:tag="1|英语" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/iv_qyj"
|
||||
android:layout_width="183dp"
|
||||
android:layout_height="108dp"
|
||||
android:layout_below="@+id/iv_aijdc"
|
||||
android:layout_toRightOf="@+id/iv_brdzj"
|
||||
android:background="@drawable/bg_shape_b6f3fa_40"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="14dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="14dp"
|
||||
android:text="试卷中心"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="40sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:text="真题来演练,提升超惊艳"
|
||||
android:textColor="#60ffffff"
|
||||
android:textSize="28sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="47dp"
|
||||
android:layout_height="42dp"
|
||||
android:background="@drawable/bg_shape_d9d9d9_20"
|
||||
android:gravity="center"
|
||||
android:onClick="onGoSjzx"
|
||||
android:orientation="vertical"
|
||||
android:tag="1669|英语">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="23dp"
|
||||
android:layout_height="21dp"
|
||||
android:background="@drawable/icon_yw_qz" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="1dp"
|
||||
android:paddingRight="2dp"
|
||||
android:text="期中"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="28sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="47dp"
|
||||
android:layout_height="42dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:background="@drawable/bg_shape_d9d9d9_20"
|
||||
android:gravity="center"
|
||||
android:onClick="onGoSjzx"
|
||||
android:orientation="vertical"
|
||||
android:tag="1670|英语">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="23dp"
|
||||
android:layout_height="21dp"
|
||||
android:background="@drawable/icon_yw_qm" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="1dp"
|
||||
android:text="期末"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="28sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="47dp"
|
||||
android:layout_height="42dp"
|
||||
android:background="@drawable/bg_shape_d9d9d9_20"
|
||||
android:gravity="center"
|
||||
android:onClick="onGoSjzx"
|
||||
android:orientation="vertical"
|
||||
android:tag="1671|英语">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="23dp"
|
||||
android:layout_height="21dp"
|
||||
android:background="@drawable/icon_yw_mnk" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingRight="1dp"
|
||||
android:text="模拟考"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="28sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="14dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="183dp"
|
||||
android:layout_height="93dp"
|
||||
android:background="@drawable/icon_yy_xx_lwxfy"
|
||||
android:onClick="onClick"
|
||||
android:tag="@string/taf_args_xfy" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="14dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="85dp"
|
||||
android:layout_height="93dp"
|
||||
android:background="@drawable/icon_yy_xx_jpkc"
|
||||
android:onClick="onClick"
|
||||
android:tag="@string/tag_args_new_xksp_yy" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_zxts"
|
||||
android:layout_width="85dp"
|
||||
android:layout_height="93dp"
|
||||
android:layout_marginLeft="14dp"
|
||||
android:background="@drawable/icon_yy_xx_zxts"
|
||||
android:onClick="onClick" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="183dp"
|
||||
android:layout_height="112dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:background="@drawable/bg_shape_zjxx"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_apps"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="14dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginRight="14dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="学习应用"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="36sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@drawable/icon_yw_zjxx_right" />
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_apps"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="15dp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
86
app/src/main/res/layout/fg_content_sztz.xml
Normal file
@@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.xwad.os.view.jxw.view.AlphaImageView
|
||||
android:layout_width="177dp"
|
||||
android:layout_height="166dp"
|
||||
android:background="@drawable/icon_syk_hbdh"
|
||||
android:onClick="onClick"
|
||||
android:tag="@string/tag_args_new_sztz_hbdh" />
|
||||
|
||||
<com.xwad.os.view.jxw.view.AlphaImageView
|
||||
android:layout_width="177dp"
|
||||
android:layout_height="122dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:background="@drawable/icon_syk_sf"
|
||||
android:onClick="onClick"
|
||||
android:tag="@string/tag_args_new_sztz_sf" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_marginRight="12dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.xwad.os.view.jxw.view.AlphaImageView
|
||||
android:layout_width="177dp"
|
||||
android:layout_height="122dp"
|
||||
android:background="@drawable/icon_syk_kxsys"
|
||||
android:onClick="onClick"
|
||||
android:tag="@string/tag_args_new_sztz_kxsy" />
|
||||
|
||||
<com.xwad.os.view.jxw.view.AlphaImageView
|
||||
android:layout_width="177dp"
|
||||
android:layout_height="166dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:background="@drawable/icon_syk_kpbk"
|
||||
android:onClick="onClick"
|
||||
android:tag="@string/tag_args_new_sztz_bk" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.xwad.os.view.jxw.view.AlphaImageView
|
||||
android:layout_width="177dp"
|
||||
android:layout_height="166dp"
|
||||
android:background="@drawable/icon_syk_lswh"
|
||||
android:onClick="onClick"
|
||||
android:tag="@string/tag_args_new_sztz_zhwh" />
|
||||
|
||||
<com.xwad.os.view.jxw.view.AlphaImageView
|
||||
android:layout_width="177dp"
|
||||
android:layout_height="122dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:background="@drawable/icon_syk_ms"
|
||||
android:onClick="onClick"
|
||||
android:tag="@string/tag_args_new_sztz_ms" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -47,6 +47,10 @@
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_xx"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
|
||||
@@ -11,11 +11,19 @@
|
||||
type="com.xwad.os.fragment.english.EnglishFragment.BtnClick" />
|
||||
</data>
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!-- android:layout_width="602dp"-->
|
||||
<!-- android:layout_height="325dp"-->
|
||||
<!-- android:background="@color/white"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent">-->
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -175,8 +183,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_zb"
|
||||
android:layout_width="38dp"
|
||||
android:layout_height="38dp"
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="42dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:background="@drawable/icon_kbdd_zb" />
|
||||
</RelativeLayout>
|
||||
@@ -557,6 +565,9 @@
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</layout>
|
||||
@@ -29,7 +29,7 @@
|
||||
<ImageView
|
||||
android:id="@+id/imageView6"
|
||||
android:layout_width="555dp"
|
||||
android:layout_height="222dp"
|
||||
android:layout_height="198dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/icon_mine_robot"
|
||||
@@ -41,14 +41,14 @@
|
||||
android:id="@+id/constraintLayout6"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="150dp"
|
||||
android:layout_marginTop="164dp"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/rl_grxx"
|
||||
android:layout_width="207dp"
|
||||
android:layout_height="70dp"
|
||||
android:background="@drawable/bg_shape_212562_40"
|
||||
android:background="@drawable/card_robot_background"
|
||||
android:onClick="@{click::toLigin}"
|
||||
android:tag="@string/tag_args_xxgrzx"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -237,7 +237,6 @@
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/rela_root"
|
||||
android:layout_width="match_parent"
|
||||
@@ -245,16 +244,357 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/constraintLayout6">
|
||||
app:layout_constraintTop_toBottomOf="@+id/imageView6">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/gridView_id"
|
||||
<LinearLayout
|
||||
style="@style/vertical_style"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="66dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="1">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="@dimen/mine_icon_width"
|
||||
android:layout_height="match_parent"
|
||||
android:onClick="onClick"
|
||||
android:tag="@string/tag_args_new_kcb">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/app_icon1"
|
||||
android:layout_width="@dimen/mine_icon_height"
|
||||
android:layout_height="@dimen/mine_icon_height"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@drawable/icon_bbx_kcb"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app_name1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="2dp"
|
||||
android:singleLine="true"
|
||||
android:text="课程表"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/mine_app_name_size"
|
||||
app:layout_constraintEnd_toEndOf="@+id/app_icon1"
|
||||
app:layout_constraintStart_toStartOf="@+id/app_icon1"
|
||||
app:layout_constraintTop_toBottomOf="@+id/app_icon1" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="@dimen/mine_icon_width"
|
||||
android:layout_height="match_parent"
|
||||
android:onClick="onClick"
|
||||
android:tag="@string/tag_args_new_zyhy">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/app_icon2"
|
||||
android:layout_width="@dimen/mine_icon_height"
|
||||
android:layout_height="@dimen/mine_icon_height"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@drawable/icon_bbx_yyfy"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app_name2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="2dp"
|
||||
android:singleLine="true"
|
||||
android:text="语音翻译"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/mine_app_name_size"
|
||||
app:layout_constraintEnd_toEndOf="@+id/app_icon2"
|
||||
app:layout_constraintStart_toStartOf="@+id/app_icon2"
|
||||
app:layout_constraintTop_toBottomOf="@+id/app_icon2" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="@dimen/mine_icon_width"
|
||||
android:layout_height="match_parent"
|
||||
android:onClick="onClick"
|
||||
android:tag="@string/tag_args_updae">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/app_icon3"
|
||||
android:layout_width="@dimen/mine_icon_height"
|
||||
android:layout_height="@dimen/mine_icon_height"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@drawable/icon_bbx_yygx"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app_name3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="2dp"
|
||||
android:singleLine="true"
|
||||
android:text="资源更新"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/mine_app_name_size"
|
||||
app:layout_constraintEnd_toEndOf="@+id/app_icon3"
|
||||
app:layout_constraintStart_toStartOf="@+id/app_icon3"
|
||||
app:layout_constraintTop_toBottomOf="@+id/app_icon3" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="@dimen/mine_icon_width"
|
||||
android:layout_height="match_parent"
|
||||
android:onClick="onClick"
|
||||
android:tag="@string/tag_args_new_yjjs">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/app_icon4"
|
||||
android:layout_width="@dimen/mine_icon_height"
|
||||
android:layout_height="@dimen/mine_icon_height"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@drawable/icon_bbx_yjjs"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app_name4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="2dp"
|
||||
android:singleLine="true"
|
||||
android:text="一键加速"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/mine_app_name_size"
|
||||
app:layout_constraintEnd_toEndOf="@+id/app_icon4"
|
||||
app:layout_constraintStart_toStartOf="@+id/app_icon4"
|
||||
app:layout_constraintTop_toBottomOf="@+id/app_icon4" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="@dimen/mine_icon_width"
|
||||
android:layout_height="match_parent"
|
||||
android:onClick="onClick"
|
||||
android:tag="@string/tag_args_new_download">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/app_icon5"
|
||||
android:layout_width="@dimen/mine_icon_height"
|
||||
android:layout_height="@dimen/mine_icon_height"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@drawable/icon_bbx_xzzx"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app_name5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="2dp"
|
||||
android:singleLine="true"
|
||||
android:text="下载中心"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/mine_app_name_size"
|
||||
app:layout_constraintEnd_toEndOf="@+id/app_icon5"
|
||||
app:layout_constraintStart_toStartOf="@+id/app_icon5"
|
||||
app:layout_constraintTop_toBottomOf="@+id/app_icon5" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="@dimen/mine_icon_width"
|
||||
android:layout_height="match_parent"
|
||||
android:onClick="@{click::setWallpaper}"
|
||||
android:tag="@string/tag_args_launcher">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/app_icon6"
|
||||
android:layout_width="@dimen/mine_icon_height"
|
||||
android:layout_height="@dimen/mine_icon_height"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@drawable/icon_bbx_qhbz"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app_name6"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="2dp"
|
||||
android:singleLine="true"
|
||||
android:text="切换壁纸"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/mine_app_name_size"
|
||||
app:layout_constraintEnd_toEndOf="@+id/app_icon6"
|
||||
app:layout_constraintStart_toStartOf="@+id/app_icon6"
|
||||
app:layout_constraintTop_toBottomOf="@+id/app_icon6" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="@dimen/mine_icon_width"
|
||||
android:layout_height="match_parent"
|
||||
android:onClick="onClick"
|
||||
android:tag="@string/tag_args_launcher">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/app_icon7"
|
||||
android:layout_width="@dimen/mine_icon_height"
|
||||
android:layout_height="@dimen/mine_icon_height"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@drawable/icon_bbx_azpt"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app_name7"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="2dp"
|
||||
android:singleLine="true"
|
||||
android:text="回到安卓"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/mine_app_name_size"
|
||||
app:layout_constraintEnd_toEndOf="@+id/app_icon7"
|
||||
app:layout_constraintStart_toStartOf="@+id/app_icon7"
|
||||
app:layout_constraintTop_toBottomOf="@+id/app_icon7" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="@dimen/mine_icon_width"
|
||||
android:layout_height="match_parent"
|
||||
android:onClick="onClick"
|
||||
android:tag="@string/tag_args_new_jxwSettings">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/app_icon8"
|
||||
android:layout_width="@dimen/mine_icon_height"
|
||||
android:layout_height="@dimen/mine_icon_height"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@drawable/icon_bbx_sz"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app_name8"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="2dp"
|
||||
android:singleLine="true"
|
||||
android:text="设置"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/mine_app_name_size"
|
||||
app:layout_constraintEnd_toEndOf="@+id/app_icon8"
|
||||
app:layout_constraintStart_toStartOf="@+id/app_icon8"
|
||||
app:layout_constraintTop_toBottomOf="@+id/app_icon8" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 49 KiB |
@@ -3290,4 +3290,7 @@
|
||||
<dimen name="y997">997px</dimen>
|
||||
<dimen name="y998">998px</dimen>
|
||||
<dimen name="y999">999px</dimen>
|
||||
<dimen name="mine_icon_height">40dp</dimen>
|
||||
<dimen name="mine_icon_width">52dp</dimen>
|
||||
<dimen name="mine_app_name_size">10sp</dimen>
|
||||
</resources>
|
||||
@@ -1,5 +1,5 @@
|
||||
<resources>
|
||||
<string name="app_name">学王365旗舰</string>
|
||||
<string name="app_name">学王365</string>
|
||||
<string name="privacy_agreement"><u>隐私协议</u></string>
|
||||
<string name="privacy_agreement_title">服务协议和隐私政策</string>
|
||||
<string name="privacy_agreement_content">\t\t\t\t请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了向你提供即时通讯,内容分享等服务,
|
||||
@@ -21,4 +21,6 @@
|
||||
</string>
|
||||
<string name="license_notice">如果您已经订购实体包装版,您可以在包装盒内找到“许可证”贴纸,\n请刮开涂层,将密钥输入在下面的对话框内</string>
|
||||
|
||||
<string name="license_verification_successful">许可证验证成功,本账户已可长期使用,\n点击开启学习之旅!</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -109,22 +109,4 @@
|
||||
<item name="android:button">@drawable/custom_radio_selector</item>
|
||||
</style>
|
||||
|
||||
<style name="vertical_style" parent="">
|
||||
<item name="android:scrollbarSize">3dp</item>
|
||||
<item name="android:scrollbarThumbVertical">@drawable/vertical_scrollbar</item>
|
||||
<item name="android:scrollbars">vertical</item>
|
||||
</style>
|
||||
|
||||
<style name="ActionSheetDialogStyle" parent="@android:style/Theme.Dialog">
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<item name="android:windowFrame">@null</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:windowIsFloating">true</item>
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
<item name="android:backgroundDimEnabled">true</item>
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
</resources>
|
||||
|
||||
30
app/src/main/res/values/styles_jxw.xml
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="vertical_style" parent="">
|
||||
<item name="android:scrollbarSize">3dp</item>
|
||||
<item name="android:scrollbarThumbVertical">@drawable/vertical_scrollbar</item>
|
||||
<item name="android:scrollbars">vertical</item>
|
||||
</style>
|
||||
|
||||
<style name="ActionSheetDialogStyle" parent="@android:style/Theme.Dialog">
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<item name="android:windowFrame">@null</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:windowIsFloating">true</item>
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
<item name="android:backgroundDimEnabled">true</item>
|
||||
</style>
|
||||
|
||||
<style name="ActionSheet" parent="@android:style/Theme.Dialog">
|
||||
<item name="android:windowBackground">@color/transparent</item>
|
||||
<item name="android:windowFrame">@null</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:windowIsFloating">true</item>
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
<item name="android:background">@color/transparent</item>
|
||||
<item name="android:backgroundDimEnabled">true</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||