version:1.7.0
fix: update:修改布局
This commit is contained in:
@@ -16,8 +16,8 @@ android {
|
|||||||
minSdkVersion 24
|
minSdkVersion 24
|
||||||
targetSdkVersion 29
|
targetSdkVersion 29
|
||||||
|
|
||||||
versionCode 61
|
versionCode 62
|
||||||
versionName "1.6.9"
|
versionName "1.7.0"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import android.content.res.Configuration;
|
|||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.Debug;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
@@ -25,12 +26,17 @@ import androidx.fragment.app.Fragment;
|
|||||||
import androidx.fragment.app.FragmentManager;
|
import androidx.fragment.app.FragmentManager;
|
||||||
import androidx.viewpager.widget.ViewPager;
|
import androidx.viewpager.widget.ViewPager;
|
||||||
|
|
||||||
|
import com.alibaba.sdk.android.push.CloudPushService;
|
||||||
|
import com.alibaba.sdk.android.push.noonesdk.PushServiceFactory;
|
||||||
|
import com.arialyy.aria.core.Aria;
|
||||||
import com.hjq.permissions.OnPermissionCallback;
|
import com.hjq.permissions.OnPermissionCallback;
|
||||||
import com.hjq.permissions.Permission;
|
import com.hjq.permissions.Permission;
|
||||||
import com.hjq.permissions.XXPermissions;
|
import com.hjq.permissions.XXPermissions;
|
||||||
|
import com.tencent.bugly.crashreport.CrashReport;
|
||||||
import com.tencent.mmkv.MMKV;
|
import com.tencent.mmkv.MMKV;
|
||||||
import com.uiui.zyos.BuildConfig;
|
import com.uiui.zyos.BuildConfig;
|
||||||
import com.uiui.zyos.R;
|
import com.uiui.zyos.R;
|
||||||
|
import com.uiui.zyos.activity.ExitActivity;
|
||||||
import com.uiui.zyos.base.BaseActivity;
|
import com.uiui.zyos.base.BaseActivity;
|
||||||
import com.uiui.zyos.base.viewpager.BaseFragmentPagerAdapter;
|
import com.uiui.zyos.base.viewpager.BaseFragmentPagerAdapter;
|
||||||
import com.uiui.zyos.config.CommonConfig;
|
import com.uiui.zyos.config.CommonConfig;
|
||||||
@@ -80,6 +86,8 @@ public class MainActivity extends BaseActivity implements MainContact.MainView,
|
|||||||
ConstraintLayout cl_7;
|
ConstraintLayout cl_7;
|
||||||
@BindView(R.id.cl_8)
|
@BindView(R.id.cl_8)
|
||||||
ConstraintLayout cl_8;
|
ConstraintLayout cl_8;
|
||||||
|
@BindView(R.id.cl_9)
|
||||||
|
ConstraintLayout cl_9;
|
||||||
|
|
||||||
@BindView(R.id.iv_robot)
|
@BindView(R.id.iv_robot)
|
||||||
ImageView iv_robot;
|
ImageView iv_robot;
|
||||||
@@ -109,21 +117,20 @@ public class MainActivity extends BaseActivity implements MainContact.MainView,
|
|||||||
// For "lean back" mode, remove SYSTEM_UI_FLAG_IMMERSIVE.
|
// For "lean back" mode, remove SYSTEM_UI_FLAG_IMMERSIVE.
|
||||||
// Or for "sticky immersive," replace it with SYSTEM_UI_FLAG_IMMERSIVE_STICKY
|
// Or for "sticky immersive," replace it with SYSTEM_UI_FLAG_IMMERSIVE_STICKY
|
||||||
View decorView = getWindow().getDecorView();
|
View decorView = getWindow().getDecorView();
|
||||||
decorView.setSystemUiVisibility(
|
decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_IMMERSIVE
|
||||||
View.SYSTEM_UI_FLAG_IMMERSIVE
|
|
||||||
// Set the content to appear under the system bars so that the
|
// Set the content to appear under the system bars so that the
|
||||||
// content doesn't resize when the system bars hide and show.
|
// content doesn't resize when the system bars hide and show.
|
||||||
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE
|
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
|
||||||
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
|
|
||||||
// | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
// | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
||||||
// Hide the nav bar and status bar
|
// Hide the nav bar and status bar
|
||||||
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
|
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN);
|
||||||
| View.SYSTEM_UI_FLAG_FULLSCREEN);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initView() {
|
public void initView() {
|
||||||
Log.e(TAG, "initView: ");
|
Log.e(TAG, "initView: ");
|
||||||
|
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= 33) {
|
if (Build.VERSION.SDK_INT >= 33) {
|
||||||
hideSystemUI();
|
hideSystemUI();
|
||||||
}
|
}
|
||||||
@@ -149,7 +156,6 @@ public class MainActivity extends BaseActivity implements MainContact.MainView,
|
|||||||
mBaseFragmentPagerAdapter = new BaseFragmentPagerAdapter(mFragmentManager, mFragments);
|
mBaseFragmentPagerAdapter = new BaseFragmentPagerAdapter(mFragmentManager, mFragments);
|
||||||
|
|
||||||
mViewPager.setAdapter(mBaseFragmentPagerAdapter);
|
mViewPager.setAdapter(mBaseFragmentPagerAdapter);
|
||||||
mViewPager.setOffscreenPageLimit(4);
|
|
||||||
mViewPager.setCurrentItem(defaultCurrent);
|
mViewPager.setCurrentItem(defaultCurrent);
|
||||||
|
|
||||||
scaleCircleNavigator = new ScaleCircleNavigator(this);
|
scaleCircleNavigator = new ScaleCircleNavigator(this);
|
||||||
@@ -287,7 +293,21 @@ public class MainActivity extends BaseActivity implements MainContact.MainView,
|
|||||||
OpenApkUtils.getInstance().openAppWithoutArgs(JxwPackageConfig.JXW_LAUNCHER_PACKAGE_NAME, JxwPackageConfig.JXW_LAUNCHER_UPDATE_CLASS_NAME);
|
OpenApkUtils.getInstance().openAppWithoutArgs(JxwPackageConfig.JXW_LAUNCHER_PACKAGE_NAME, JxwPackageConfig.JXW_LAUNCHER_UPDATE_CLASS_NAME);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
cl_9.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
Intent intent = new Intent("Receiver_Refresh_Password_Action");
|
||||||
|
intent.setPackage("com.uiui.zy");
|
||||||
|
sendBroadcast(intent);
|
||||||
|
|
||||||
|
int is_activation = Settings.Global.getInt(getContentResolver(), CommonConfig.UIUI_ACTIVATION_KEY, 0);
|
||||||
|
if (is_activation == 1) {
|
||||||
|
startActivity(new Intent(MainActivity.this, ExitActivity.class));
|
||||||
|
} else {
|
||||||
|
Utils.exitDesktop(MainActivity.this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
// ComponentName cn = new ComponentName("com.jxw.mskt.video", "com.jxw.mskt.video.VideoDownload");
|
// ComponentName cn = new ComponentName("com.jxw.mskt.video", "com.jxw.mskt.video.VideoDownload");
|
||||||
// Intent intent = new Intent();
|
// Intent intent = new Intent();
|
||||||
// intent.setComponent(cn);
|
// intent.setComponent(cn);
|
||||||
@@ -307,6 +327,7 @@ public class MainActivity extends BaseActivity implements MainContact.MainView,
|
|||||||
@Override
|
@Override
|
||||||
public void initData() {
|
public void initData() {
|
||||||
registmNewAppReceiver();
|
registmNewAppReceiver();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -333,8 +354,16 @@ public class MainActivity extends BaseActivity implements MainContact.MainView,
|
|||||||
@Override
|
@Override
|
||||||
public void onWindowFocusChanged(boolean hasFocus) {
|
public void onWindowFocusChanged(boolean hasFocus) {
|
||||||
super.onWindowFocusChanged(hasFocus);
|
super.onWindowFocusChanged(hasFocus);
|
||||||
|
Log.e(TAG, "onWindowFocusChanged: hasFocus = " + hasFocus);
|
||||||
if (hasFocus) {//表示渲染结束
|
if (hasFocus) {//表示渲染结束
|
||||||
|
if (mViewPager != null) {
|
||||||
|
mViewPager.postDelayed(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
mViewPager.setOffscreenPageLimit(4);
|
||||||
|
}
|
||||||
|
}, 1987);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -440,19 +469,14 @@ public class MainActivity extends BaseActivity implements MainContact.MainView,
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void hide(View view) {
|
private void hide(View view) {
|
||||||
TranslateAnimation mShowAction = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0.0f,
|
TranslateAnimation mShowAction = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 1.0f);
|
||||||
Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF,
|
|
||||||
0.0f, Animation.RELATIVE_TO_SELF, 1.0f);
|
|
||||||
mShowAction.setDuration(300);
|
mShowAction.setDuration(300);
|
||||||
view.startAnimation(mShowAction);
|
view.startAnimation(mShowAction);
|
||||||
view.setVisibility(View.GONE);
|
view.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void show(View view) {
|
private void show(View view) {
|
||||||
TranslateAnimation mHiddenAction = new TranslateAnimation(Animation.RELATIVE_TO_SELF,
|
TranslateAnimation mHiddenAction = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 1.0f, Animation.RELATIVE_TO_SELF, 0.0f);
|
||||||
0.0f, Animation.RELATIVE_TO_SELF, 0.0f,
|
|
||||||
Animation.RELATIVE_TO_SELF, 1.0f, Animation.RELATIVE_TO_SELF,
|
|
||||||
0.0f);
|
|
||||||
mHiddenAction.setDuration(300);
|
mHiddenAction.setDuration(300);
|
||||||
view.startAnimation(mHiddenAction);
|
view.startAnimation(mHiddenAction);
|
||||||
view.setVisibility(View.VISIBLE);
|
view.setVisibility(View.VISIBLE);
|
||||||
@@ -611,8 +635,7 @@ public class MainActivity extends BaseActivity implements MainContact.MainView,
|
|||||||
public void onReceive(Context context, Intent intent) {
|
public void onReceive(Context context, Intent intent) {
|
||||||
String action = intent.getAction();
|
String action = intent.getAction();
|
||||||
Log.e(TAG, "onReceive: " + action);
|
Log.e(TAG, "onReceive: " + action);
|
||||||
if (Intent.ACTION_PACKAGE_ADDED.equals(action)
|
if (Intent.ACTION_PACKAGE_ADDED.equals(action) || Intent.ACTION_PACKAGE_REMOVED.equals(action)
|
||||||
|| Intent.ACTION_PACKAGE_REMOVED.equals(action)
|
|
||||||
// || Intent.ACTION_PACKAGE_CHANGED.equals(action)
|
// || Intent.ACTION_PACKAGE_CHANGED.equals(action)
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|||||||
57
app/src/main/java/com/uiui/zyos/adapter/HomeworkAdapter.java
Normal file
57
app/src/main/java/com/uiui/zyos/adapter/HomeworkAdapter.java
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
package com.uiui.zyos.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.uiui.zyos.R;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class HomeworkAdapter extends RecyclerView.Adapter<HomeworkAdapter.Holder> {
|
||||||
|
|
||||||
|
private Context mContext;
|
||||||
|
private List<String> mHomeworkList;
|
||||||
|
|
||||||
|
public void setHomeworkList(List<String> homeworkList) {
|
||||||
|
mHomeworkList = homeworkList;
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public Holder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
mContext = parent.getContext();
|
||||||
|
return new Holder(LayoutInflater.from(mContext).inflate(R.layout.item_homework, parent, false));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull Holder holder, int position) {
|
||||||
|
holder.tv_content.setText(mHomeworkList.get(position));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return mHomeworkList == null ? 0 : mHomeworkList.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
class Holder extends RecyclerView.ViewHolder {
|
||||||
|
ConstraintLayout root;
|
||||||
|
ImageView imageView;
|
||||||
|
TextView tv_content;
|
||||||
|
|
||||||
|
public Holder(@NonNull View itemView) {
|
||||||
|
super(itemView);
|
||||||
|
root = itemView.findViewById(R.id.root);
|
||||||
|
imageView = itemView.findViewById(R.id.imageView);
|
||||||
|
tv_content = itemView.findViewById(R.id.tv_content);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,6 +3,7 @@ package com.uiui.zyos.base;
|
|||||||
import android.app.Application;
|
import android.app.Application;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.IntentFilter;
|
import android.content.IntentFilter;
|
||||||
|
import android.os.Debug;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
@@ -30,28 +31,30 @@ public class BaseApplication extends Application {
|
|||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
|
Log.e(TAG, "onCreate: ");
|
||||||
if (!BuildConfig.DEBUG) {
|
if (!BuildConfig.DEBUG) {
|
||||||
// catchException();
|
// catchException();
|
||||||
}
|
}
|
||||||
|
// 在开始分析的地方调用,传入路径
|
||||||
|
// 如果是放到外部路径,需要添加权限
|
||||||
|
// 默认存储在/sdcard/Android/data/packagename/files
|
||||||
|
// Debug.startMethodTracing("App" + System.currentTimeMillis());
|
||||||
init();
|
init();
|
||||||
|
// 在结束的地方调用
|
||||||
|
// Debug.stopMethodTracing();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void init() {
|
private void init() {
|
||||||
|
Log.e(TAG, "init: ");
|
||||||
if (BuildConfig.DEBUG) {
|
if (BuildConfig.DEBUG) {
|
||||||
|
|
||||||
}
|
}
|
||||||
if (SystemUtils.isMainProcessName(this, android.os.Process.myPid())) {
|
if (SystemUtils.isMainProcessName(this, android.os.Process.myPid())) {
|
||||||
String rootDir = MMKV.initialize(this);
|
String rootDir = MMKV.initialize(this);
|
||||||
Log.e(TAG, "mmkv root: " + rootDir);
|
Log.e(TAG, "mmkv root: " + rootDir);
|
||||||
|
|
||||||
CrashReport.initCrashReport(getApplicationContext(), "d1cd982951", false);
|
|
||||||
|
|
||||||
AppManager.init(this);
|
AppManager.init(this);
|
||||||
Aria.init(this);
|
|
||||||
Aria.get(this).getDownloadConfig().setMaxTaskNum(1);
|
|
||||||
Aria.get(this).getDownloadConfig().setConvertSpeed(true);
|
|
||||||
PushManager.init(this);
|
PushManager.init(this);
|
||||||
aliyunPushInit();
|
|
||||||
|
|
||||||
RemoteManager.init(this);
|
RemoteManager.init(this);
|
||||||
RemoteManager.setListener(new RemoteManager.ConnectedListener() {
|
RemoteManager.setListener(new RemoteManager.ConnectedListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -66,22 +69,22 @@ public class BaseApplication extends Application {
|
|||||||
NetInterfaceManager.init(this);
|
NetInterfaceManager.init(this);
|
||||||
// startService(new Intent(this, MainService.class));
|
// startService(new Intent(this, MainService.class));
|
||||||
registAppReceive();
|
registAppReceive();
|
||||||
|
new Handler().postDelayed(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
slowInit();
|
||||||
|
}
|
||||||
|
}, 1234);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private APKinstallReceiver apKinstallReceiver;
|
private void slowInit() {
|
||||||
|
Log.e(TAG, "slowInit: ");
|
||||||
private void registAppReceive() {
|
Aria.init(this);
|
||||||
if (null == apKinstallReceiver) {
|
// Aria.get(this).getDownloadConfig().setMaxTaskNum(1);
|
||||||
apKinstallReceiver = new APKinstallReceiver();
|
// Aria.get(this).getDownloadConfig().setConvertSpeed(true);
|
||||||
}
|
aliyunPushInit();
|
||||||
IntentFilter filter = new IntentFilter();
|
CrashReport.initCrashReport(getApplicationContext(), "d1cd982951", false);
|
||||||
filter.setPriority(IntentFilter.SYSTEM_HIGH_PRIORITY);
|
|
||||||
filter.addAction(Intent.ACTION_PACKAGE_ADDED);
|
|
||||||
filter.addAction(Intent.ACTION_PACKAGE_REPLACED);
|
|
||||||
filter.addAction(Intent.ACTION_PACKAGE_REMOVED);
|
|
||||||
filter.addDataScheme("package");
|
|
||||||
registerReceiver(apKinstallReceiver, filter);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void aliyunPushInit() {
|
public void aliyunPushInit() {
|
||||||
@@ -102,16 +105,29 @@ public class BaseApplication extends Application {
|
|||||||
// });
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private APKinstallReceiver apKinstallReceiver;
|
||||||
|
|
||||||
|
private void registAppReceive() {
|
||||||
|
if (null == apKinstallReceiver) {
|
||||||
|
apKinstallReceiver = new APKinstallReceiver();
|
||||||
|
}
|
||||||
|
IntentFilter filter = new IntentFilter();
|
||||||
|
filter.setPriority(IntentFilter.SYSTEM_HIGH_PRIORITY);
|
||||||
|
filter.addAction(Intent.ACTION_PACKAGE_ADDED);
|
||||||
|
filter.addAction(Intent.ACTION_PACKAGE_REPLACED);
|
||||||
|
filter.addAction(Intent.ACTION_PACKAGE_REMOVED);
|
||||||
|
filter.addDataScheme("package");
|
||||||
|
registerReceiver(apKinstallReceiver, filter);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void catchException() {
|
private void catchException() {
|
||||||
Thread.setDefaultUncaughtExceptionHandler(
|
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
|
||||||
new Thread.UncaughtExceptionHandler() {
|
|
||||||
@Override
|
@Override
|
||||||
public void uncaughtException(Thread t, Throwable e) {
|
public void uncaughtException(Thread t, Throwable e) {
|
||||||
Log.e("捕获异常子线程:", Thread.currentThread().getName() +
|
Log.e("捕获异常子线程:", Thread.currentThread().getName() + "在:" + e.getStackTrace()[0].getClassName());
|
||||||
"在:" + e.getStackTrace()[0].getClassName());
|
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
);
|
|
||||||
//下面是新增方法!
|
//下面是新增方法!
|
||||||
new Handler(Looper.getMainLooper()).post(new Runnable() {
|
new Handler(Looper.getMainLooper()).post(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
179
app/src/main/java/com/uiui/zyos/fragment/ar/ARStudyFragment.java
Normal file
179
app/src/main/java/com/uiui/zyos/fragment/ar/ARStudyFragment.java
Normal file
@@ -0,0 +1,179 @@
|
|||||||
|
package com.uiui.zyos.fragment.ar;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.os.Debug;
|
||||||
|
import android.util.DisplayMetrics;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.uiui.zyos.R;
|
||||||
|
import com.uiui.zyos.adapter.HomeworkAdapter;
|
||||||
|
import com.uiui.zyos.base.BaseFragment;
|
||||||
|
import com.uiui.zyos.utils.ApkUtils;
|
||||||
|
import com.uiui.zyos.view.RecyclerViewSpacesItemDecoration;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import butterknife.BindView;
|
||||||
|
import butterknife.ButterKnife;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A simple {@link Fragment} subclass.
|
||||||
|
* Use the {@link ARStudyFragment#newInstance} factory method to
|
||||||
|
* create an instance of this fragment.
|
||||||
|
*/
|
||||||
|
public class ARStudyFragment extends BaseFragment {
|
||||||
|
private static final String TAG = ARStudyFragment.class.getSimpleName();
|
||||||
|
|
||||||
|
@BindView(R.id.iv_app)
|
||||||
|
ImageView iv_app;
|
||||||
|
@BindView(R.id.recyclerView)
|
||||||
|
RecyclerView recyclerView;
|
||||||
|
|
||||||
|
private View rootView;// 设置为全局的
|
||||||
|
private Activity mContext;
|
||||||
|
private HomeworkAdapter mHomeworkAdapter;
|
||||||
|
|
||||||
|
// TODO: Rename parameter arguments, choose names that match
|
||||||
|
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||||
|
private static final String ARG_PARAM1 = "param1";
|
||||||
|
private static final String ARG_PARAM2 = "param2";
|
||||||
|
|
||||||
|
// TODO: Rename and change types of parameters
|
||||||
|
private String mParam1;
|
||||||
|
private String mParam2;
|
||||||
|
|
||||||
|
public ARStudyFragment() {
|
||||||
|
// Required empty public constructor
|
||||||
|
Log.e(TAG, "EnglishFragment: ");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use this factory method to create a new instance of
|
||||||
|
* this fragment using the provided parameters.
|
||||||
|
*
|
||||||
|
* @param param1 Parameter 1.
|
||||||
|
* @param param2 Parameter 2.
|
||||||
|
* @return A new instance of fragment EnglishFragment.
|
||||||
|
*/
|
||||||
|
// TODO: Rename and change types and number of parameters
|
||||||
|
public static ARStudyFragment newInstance(String param1, String param2) {
|
||||||
|
ARStudyFragment fragment = new ARStudyFragment();
|
||||||
|
Bundle args = new Bundle();
|
||||||
|
args.putString(ARG_PARAM1, param1);
|
||||||
|
args.putString(ARG_PARAM2, param2);
|
||||||
|
fragment.setArguments(args);
|
||||||
|
return fragment;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
if (getArguments() != null) {
|
||||||
|
mParam1 = getArguments().getString(ARG_PARAM1);
|
||||||
|
mParam2 = getArguments().getString(ARG_PARAM2);
|
||||||
|
}
|
||||||
|
Log.e(TAG, "onCreate: ");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void fetchData() {
|
||||||
|
Log.e(TAG, "fetchData: ");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
|
// Inflate the layout for this fragment
|
||||||
|
Log.e(TAG, "onCreateView: ");
|
||||||
|
if (null != rootView) {
|
||||||
|
ViewGroup parent = (ViewGroup) rootView.getParent();
|
||||||
|
if (null != parent) {
|
||||||
|
parent.removeView(rootView);
|
||||||
|
}
|
||||||
|
} else { // 如ongoing果rootView为空 ,就实例化该视图
|
||||||
|
rootView = inflater.inflate(R.layout.fragment_ar_study, container, false);
|
||||||
|
mContext = (Activity) rootView.getContext();
|
||||||
|
ButterKnife.bind(this, rootView);
|
||||||
|
initView();
|
||||||
|
}
|
||||||
|
return rootView;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroyView() {
|
||||||
|
super.onDestroyView();
|
||||||
|
rootView = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setUserVisibleHint(boolean isVisibleToUser) {
|
||||||
|
super.setUserVisibleHint(isVisibleToUser);
|
||||||
|
Log.e(TAG, "setUserVisibleHint: isVisibleToUser = " + isVisibleToUser);
|
||||||
|
if (isVisibleToUser){
|
||||||
|
if (mUserVisibleHintCallback!=null) {
|
||||||
|
mUserVisibleHintCallback.onUserVisibleHint();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private UserVisibleHintCallback mUserVisibleHintCallback;
|
||||||
|
public interface UserVisibleHintCallback{
|
||||||
|
void onUserVisibleHint();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserVisibleHintCallback(UserVisibleHintCallback userVisibleHintCallback) {
|
||||||
|
mUserVisibleHintCallback = userVisibleHintCallback;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initView() {
|
||||||
|
WindowManager wm = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE);
|
||||||
|
DisplayMetrics dm = new DisplayMetrics();
|
||||||
|
wm.getDefaultDisplay().getRealMetrics(dm);
|
||||||
|
float density = dm.density; // 屏幕密度(0.75 / 1.0 / 1.5)
|
||||||
|
HashMap<String, Integer> stringIntegerHashMap = new HashMap<>();
|
||||||
|
stringIntegerHashMap.put(RecyclerViewSpacesItemDecoration.TOP_DECORATION, (int) (density * 10));//top间距
|
||||||
|
stringIntegerHashMap.put(RecyclerViewSpacesItemDecoration.BOTTOM_DECORATION, (int) (density * 10));//底部间距
|
||||||
|
// stringIntegerHashMap.put(RecyclerViewSpacesItemDecoration.LEFT_DECORATION, (int) (density * 20));//左间距
|
||||||
|
// stringIntegerHashMap.put(RecyclerViewSpacesItemDecoration.RIGHT_DECORATION, (int) (density * 20));//右间距
|
||||||
|
recyclerView.addItemDecoration(new RecyclerViewSpacesItemDecoration(stringIntegerHashMap));
|
||||||
|
|
||||||
|
mHomeworkAdapter = new HomeworkAdapter();
|
||||||
|
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(mContext);
|
||||||
|
linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
|
||||||
|
recyclerView.setLayoutManager(linearLayoutManager);
|
||||||
|
recyclerView.setAdapter(mHomeworkAdapter);
|
||||||
|
List<String> homeworkList = new ArrayList<>();
|
||||||
|
homeworkList.add("暂时没有作业");
|
||||||
|
mHomeworkAdapter.setHomeworkList(homeworkList);
|
||||||
|
|
||||||
|
iv_app.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
openArApk();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void openArApk() {
|
||||||
|
if (ApkUtils.isAvailable(mContext, "com.visiontalk.taskoptions") && ApkUtils.isAvailable(mContext, "com.visiontalk.honor")) {
|
||||||
|
ApkUtils.openPackage(mContext, "com.visiontalk.taskoptions");
|
||||||
|
} else if (ApkUtils.isAvailable(mContext, "com.visiontalk.taskoptions")) {
|
||||||
|
ApkUtils.openPackage(mContext, "com.visiontalk.taskoptions");
|
||||||
|
} else if (ApkUtils.isAvailable(mContext, "com.visiontalk.honor")) {
|
||||||
|
ApkUtils.openPackage(mContext, "com.visiontalk.honor");
|
||||||
|
} else {
|
||||||
|
Log.e(TAG, "openArApk: not installed");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -14,6 +14,7 @@ import android.widget.ImageView;
|
|||||||
|
|
||||||
import com.uiui.zyos.R;
|
import com.uiui.zyos.R;
|
||||||
import com.uiui.zyos.base.BaseFragment;
|
import com.uiui.zyos.base.BaseFragment;
|
||||||
|
import com.uiui.zyos.fragment.ar.ARStudyFragment;
|
||||||
import com.uiui.zyos.fragment.chinese.ChinesePresenter;
|
import com.uiui.zyos.fragment.chinese.ChinesePresenter;
|
||||||
import com.uiui.zyos.utils.OpenApkUtils;
|
import com.uiui.zyos.utils.OpenApkUtils;
|
||||||
|
|
||||||
@@ -113,6 +114,26 @@ public class PrecisionFragment extends BaseFragment {
|
|||||||
rootView = null;
|
rootView = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setUserVisibleHint(boolean isVisibleToUser) {
|
||||||
|
super.setUserVisibleHint(isVisibleToUser);
|
||||||
|
Log.e(TAG, "setUserVisibleHint: isVisibleToUser = " + isVisibleToUser);
|
||||||
|
if (isVisibleToUser){
|
||||||
|
if (mUserVisibleHintCallback!=null) {
|
||||||
|
mUserVisibleHintCallback.onUserVisibleHint();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private ARStudyFragment.UserVisibleHintCallback mUserVisibleHintCallback;
|
||||||
|
public interface UserVisibleHintCallback{
|
||||||
|
void onUserVisibleHint();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserVisibleHintCallback(ARStudyFragment.UserVisibleHintCallback userVisibleHintCallback) {
|
||||||
|
mUserVisibleHintCallback = userVisibleHintCallback;
|
||||||
|
}
|
||||||
|
|
||||||
private void initView() {
|
private void initView() {
|
||||||
iv_bunk.setOnClickListener(new View.OnClickListener() {
|
iv_bunk.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import com.flyco.tablayout.SlidingTabLayout;
|
|||||||
import com.uiui.zyos.R;
|
import com.uiui.zyos.R;
|
||||||
import com.uiui.zyos.base.BaseFragment;
|
import com.uiui.zyos.base.BaseFragment;
|
||||||
import com.uiui.zyos.base.viewpager.BaseFragmentPagerAdapter;
|
import com.uiui.zyos.base.viewpager.BaseFragmentPagerAdapter;
|
||||||
|
import com.uiui.zyos.fragment.ar.ARStudyFragment;
|
||||||
import com.uiui.zyos.fragment.biology.BiologyFragment;
|
import com.uiui.zyos.fragment.biology.BiologyFragment;
|
||||||
import com.uiui.zyos.fragment.chemical.ChemicalFragment;
|
import com.uiui.zyos.fragment.chemical.ChemicalFragment;
|
||||||
import com.uiui.zyos.fragment.chinese.ChineseFragment;
|
import com.uiui.zyos.fragment.chinese.ChineseFragment;
|
||||||
@@ -44,10 +45,13 @@ public class SubjectFragment extends BaseFragment {
|
|||||||
@BindView(R.id.viewPager)
|
@BindView(R.id.viewPager)
|
||||||
ViewPager mViewPager;
|
ViewPager mViewPager;
|
||||||
|
|
||||||
private String[] title = new String[]{"AI精准学", "语文", "数学", "英语", "物理", "化学", "生物", "综合",};
|
private String[] title = new String[]{
|
||||||
|
// "AR自主学",
|
||||||
|
"精准学", "语文", "数学", "英语", "物理", "化学", "生物", "综合",};
|
||||||
|
|
||||||
private View rootView;
|
private View rootView;
|
||||||
private FragmentActivity mContext;
|
private FragmentActivity mContext;
|
||||||
|
// private ARStudyFragment mARStudyFragment;
|
||||||
private PrecisionFragment mPrecisionFragment;
|
private PrecisionFragment mPrecisionFragment;
|
||||||
private ChineseFragment mChineseFragment;
|
private ChineseFragment mChineseFragment;
|
||||||
private MathFragment mMathFragment;
|
private MathFragment mMathFragment;
|
||||||
@@ -78,7 +82,36 @@ public class SubjectFragment extends BaseFragment {
|
|||||||
long time = System.currentTimeMillis();
|
long time = System.currentTimeMillis();
|
||||||
Log.e(TAG, "SubjectFragment: start " + time);
|
Log.e(TAG, "SubjectFragment: start " + time);
|
||||||
mFragments = new ArrayList<>();
|
mFragments = new ArrayList<>();
|
||||||
|
// mARStudyFragment = new ARStudyFragment();
|
||||||
|
// mARStudyFragment.setUserVisibleHintCallback(new ARStudyFragment.UserVisibleHintCallback() {
|
||||||
|
// @Override
|
||||||
|
// public void onUserVisibleHint() {
|
||||||
|
// if (mViewPager != null) {
|
||||||
|
// mViewPager.postDelayed(new Runnable() {
|
||||||
|
// @Override
|
||||||
|
// public void run() {
|
||||||
|
// mViewPager.setOffscreenPageLimit(11);
|
||||||
|
// }
|
||||||
|
// }, 2345);
|
||||||
|
// Log.e(TAG, "setUserVisibleHint: setOffscreenPageLimit");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// });
|
||||||
mPrecisionFragment = new PrecisionFragment();
|
mPrecisionFragment = new PrecisionFragment();
|
||||||
|
mPrecisionFragment.setUserVisibleHintCallback(new ARStudyFragment.UserVisibleHintCallback() {
|
||||||
|
@Override
|
||||||
|
public void onUserVisibleHint() {
|
||||||
|
if (mViewPager != null) {
|
||||||
|
mViewPager.postDelayed(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
mViewPager.setOffscreenPageLimit(10);
|
||||||
|
}
|
||||||
|
}, 1234);
|
||||||
|
Log.e(TAG, "setUserVisibleHint: setOffscreenPageLimit");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
mChineseFragment = new ChineseFragment();
|
mChineseFragment = new ChineseFragment();
|
||||||
mMathFragment = new MathFragment();
|
mMathFragment = new MathFragment();
|
||||||
mEnglishFragment = new EnglishFragment();
|
mEnglishFragment = new EnglishFragment();
|
||||||
@@ -86,6 +119,7 @@ public class SubjectFragment extends BaseFragment {
|
|||||||
mChemicalFragment = new ChemicalFragment();
|
mChemicalFragment = new ChemicalFragment();
|
||||||
mBiologyFragment = new BiologyFragment();
|
mBiologyFragment = new BiologyFragment();
|
||||||
mComplexFragment = new ComplexFragment();
|
mComplexFragment = new ComplexFragment();
|
||||||
|
// mFragments.add(mARStudyFragment);
|
||||||
mFragments.add(mPrecisionFragment);
|
mFragments.add(mPrecisionFragment);
|
||||||
mFragments.add(mChineseFragment);
|
mFragments.add(mChineseFragment);
|
||||||
mFragments.add(mMathFragment);
|
mFragments.add(mMathFragment);
|
||||||
@@ -127,8 +161,7 @@ public class SubjectFragment extends BaseFragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
Bundle savedInstanceState) {
|
|
||||||
// Inflate the layout for this fragment
|
// Inflate the layout for this fragment
|
||||||
Log.e(TAG, "onCreateView: ");
|
Log.e(TAG, "onCreateView: ");
|
||||||
if (null != rootView) {
|
if (null != rootView) {
|
||||||
@@ -156,6 +189,23 @@ public class SubjectFragment extends BaseFragment {
|
|||||||
Log.e(TAG, "fetchData: ");
|
Log.e(TAG, "fetchData: ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setUserVisibleHint(boolean isVisibleToUser) {
|
||||||
|
super.setUserVisibleHint(isVisibleToUser);
|
||||||
|
Log.e(TAG, "setUserVisibleHint: isVisibleToUser = " + isVisibleToUser);
|
||||||
|
if (isVisibleToUser) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onResume() {
|
||||||
|
Log.e(TAG, "onResume: ");
|
||||||
|
super.onResume();
|
||||||
|
}
|
||||||
|
|
||||||
public int getFragmentSize() {
|
public int getFragmentSize() {
|
||||||
Log.e(TAG, "getFragmentSize: ");
|
Log.e(TAG, "getFragmentSize: ");
|
||||||
return mFragments == null ? 0 : mFragments.size();
|
return mFragments == null ? 0 : mFragments.size();
|
||||||
@@ -175,7 +225,6 @@ public class SubjectFragment extends BaseFragment {
|
|||||||
mFragmentManager = getChildFragmentManager();
|
mFragmentManager = getChildFragmentManager();
|
||||||
mBaseFragmentPagerAdapter = new BaseFragmentPagerAdapter(mFragmentManager, mFragments);
|
mBaseFragmentPagerAdapter = new BaseFragmentPagerAdapter(mFragmentManager, mFragments);
|
||||||
mViewPager.setAdapter(mBaseFragmentPagerAdapter);
|
mViewPager.setAdapter(mBaseFragmentPagerAdapter);
|
||||||
mViewPager.setOffscreenPageLimit(10);
|
|
||||||
mViewPager.setOnPageChangeListener(mListener);
|
mViewPager.setOnPageChangeListener(mListener);
|
||||||
main_sliding_tab_layout.setViewPager(mViewPager, title);
|
main_sliding_tab_layout.setViewPager(mViewPager, title);
|
||||||
Log.e(TAG, "initView: end = " + (System.currentTimeMillis() - time));
|
Log.e(TAG, "initView: end = " + (System.currentTimeMillis() - time));
|
||||||
|
|||||||
@@ -81,18 +81,20 @@ public class UserFragment extends BaseFragment implements UserContact.UserView {
|
|||||||
TextView tv_activated;
|
TextView tv_activated;
|
||||||
@BindView(R.id.tv_activated2)
|
@BindView(R.id.tv_activated2)
|
||||||
TextView tv_activated2;
|
TextView tv_activated2;
|
||||||
|
@BindView(R.id.tv_applet)
|
||||||
|
TextView tv_applet;
|
||||||
@BindView(R.id.tv_duration)
|
@BindView(R.id.tv_duration)
|
||||||
TextView tv_duration;
|
TextView tv_duration;
|
||||||
@BindView(R.id.cl_activation)
|
// @BindView(R.id.cl_activation)
|
||||||
ConstraintLayout cl_activation;
|
// ConstraintLayout cl_activation;
|
||||||
@BindView(R.id.tv_date1)
|
@BindView(R.id.tv_date1)
|
||||||
TextView tv_date1;
|
TextView tv_date1;
|
||||||
@BindView(R.id.iv_applet_qrcode)
|
@BindView(R.id.iv_applet_qrcode)
|
||||||
NiceImageView iv_applet_qrcode;
|
NiceImageView iv_applet_qrcode;
|
||||||
@BindView(R.id.iv_device_qrcode)
|
@BindView(R.id.iv_device_qrcode)
|
||||||
NiceImageView iv_device_qrcode;
|
NiceImageView iv_device_qrcode;
|
||||||
@BindView(R.id.cl_app)
|
// @BindView(R.id.cl_app)
|
||||||
ConstraintLayout cl_app;
|
// ConstraintLayout cl_app;
|
||||||
@BindView(R.id.tv_date2)
|
@BindView(R.id.tv_date2)
|
||||||
TextView tv_date2;
|
TextView tv_date2;
|
||||||
@BindView(R.id.cl_more)
|
@BindView(R.id.cl_more)
|
||||||
@@ -198,9 +200,18 @@ public class UserFragment extends BaseFragment implements UserContact.UserView {
|
|||||||
OpenApkUtils.getInstance().openAppWithoutArgs(JxwPackageConfig.JXW_LAUNCHER_PACKAGE_NAME, JxwPackageConfig.JXW_LAUNCHER_UPDATE_CLASS_NAME);
|
OpenApkUtils.getInstance().openAppWithoutArgs(JxwPackageConfig.JXW_LAUNCHER_PACKAGE_NAME, JxwPackageConfig.JXW_LAUNCHER_UPDATE_CLASS_NAME);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
tv_activated.setOnClickListener(view -> {
|
tv_activated.setOnClickListener(new View.OnClickListener() {
|
||||||
// ApkUtils.openPackage(mContext, "com.uiui.zy", "com.uiui.zy.activity.main.MainActivity");
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
// ApkUtils.openPackage(mContext, "com.uiui.zy", "com.uiui.zy.activity.main.MainActivity");
|
||||||
OpenApkUtils.getInstance().openAppWithoutArgs(JxwPackageConfig.JXW_LAUNCHER_PACKAGE_NAME, JxwPackageConfig.JXW_LAUNCHER_UPDATE_CLASS_NAME);
|
OpenApkUtils.getInstance().openAppWithoutArgs(JxwPackageConfig.JXW_LAUNCHER_PACKAGE_NAME, JxwPackageConfig.JXW_LAUNCHER_UPDATE_CLASS_NAME);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
tv_applet.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
ApkUtils.openPackage(mContext, "com.uiui.zy", "com.uiui.zy.activity.main.MainActivity");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
iv_avatar.setOnClickListener(view -> ApkUtils.openPackage(mContext, "com.uiui.zy", "com.uiui.zy.activity.main.MainActivity"));
|
iv_avatar.setOnClickListener(view -> ApkUtils.openPackage(mContext, "com.uiui.zy", "com.uiui.zy.activity.main.MainActivity"));
|
||||||
registerOwnReceiver();
|
registerOwnReceiver();
|
||||||
@@ -220,8 +231,8 @@ public class UserFragment extends BaseFragment implements UserContact.UserView {
|
|||||||
if (logined == 1) {
|
if (logined == 1) {
|
||||||
cl_nodata.setVisibility(View.GONE);
|
cl_nodata.setVisibility(View.GONE);
|
||||||
cl_usedata.setVisibility(View.VISIBLE);
|
cl_usedata.setVisibility(View.VISIBLE);
|
||||||
cl_activation.setVisibility(View.GONE);
|
// cl_activation.setVisibility(View.GONE);
|
||||||
cl_app.setVisibility(View.VISIBLE);
|
// cl_app.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
setButtonVisibility();
|
setButtonVisibility();
|
||||||
tv_exit.setOnClickListener(new View.OnClickListener() {
|
tv_exit.setOnClickListener(new View.OnClickListener() {
|
||||||
@@ -320,14 +331,14 @@ public class UserFragment extends BaseFragment implements UserContact.UserView {
|
|||||||
int is_activation = Settings.Global.getInt(mContext.getContentResolver(), CommonConfig.UIUI_ACTIVATION_KEY, 0);
|
int is_activation = Settings.Global.getInt(mContext.getContentResolver(), CommonConfig.UIUI_ACTIVATION_KEY, 0);
|
||||||
Log.e(TAG, "setButtonVisibility: " + is_activation);
|
Log.e(TAG, "setButtonVisibility: " + is_activation);
|
||||||
if (is_activation != 1) {
|
if (is_activation != 1) {
|
||||||
tv_exit.setVisibility(View.VISIBLE);
|
// tv_exit.setVisibility(View.VISIBLE);
|
||||||
tv_activation.setVisibility(View.VISIBLE);
|
tv_activation.setVisibility(View.VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
int isReturnAndroid = Settings.Global.getInt(mContext.getContentResolver(), CommonConfig.UIUI_RETURN_ANDROID_KEY, 1);
|
int isReturnAndroid = Settings.Global.getInt(mContext.getContentResolver(), CommonConfig.UIUI_RETURN_ANDROID_KEY, 1);
|
||||||
if (isReturnAndroid == 0) {
|
if (isReturnAndroid == 0) {
|
||||||
tv_exit.setVisibility(View.INVISIBLE);
|
// tv_exit.setVisibility(View.INVISIBLE);
|
||||||
} else {
|
} else {
|
||||||
tv_exit.setVisibility(View.VISIBLE);
|
// tv_exit.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
tv_activation.setVisibility(View.GONE);
|
tv_activation.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
@@ -384,8 +395,8 @@ public class UserFragment extends BaseFragment implements UserContact.UserView {
|
|||||||
|
|
||||||
cl_nodata.setVisibility(View.GONE);
|
cl_nodata.setVisibility(View.GONE);
|
||||||
cl_usedata.setVisibility(View.VISIBLE);
|
cl_usedata.setVisibility(View.VISIBLE);
|
||||||
cl_activation.setVisibility(View.GONE);
|
// cl_activation.setVisibility(View.GONE);
|
||||||
cl_app.setVisibility(View.VISIBLE);
|
// cl_app.setVisibility(View.VISIBLE);
|
||||||
break;
|
break;
|
||||||
case 300: //设备没有绑定
|
case 300: //设备没有绑定
|
||||||
case 400://没有授权的设备
|
case 400://没有授权的设备
|
||||||
@@ -395,8 +406,8 @@ public class UserFragment extends BaseFragment implements UserContact.UserView {
|
|||||||
tv_grade.setText(getString(R.string.notset));
|
tv_grade.setText(getString(R.string.notset));
|
||||||
cl_nodata.setVisibility(View.VISIBLE);
|
cl_nodata.setVisibility(View.VISIBLE);
|
||||||
cl_usedata.setVisibility(View.GONE);
|
cl_usedata.setVisibility(View.GONE);
|
||||||
cl_activation.setVisibility(View.VISIBLE);
|
// cl_activation.setVisibility(View.VISIBLE);
|
||||||
cl_app.setVisibility(View.GONE);
|
// cl_app.setVisibility(View.GONE);
|
||||||
break;
|
break;
|
||||||
// ToastUtil.show(getString(R.string.device_unauthorized));
|
// ToastUtil.show(getString(R.string.device_unauthorized));
|
||||||
// Log.e(TAG, "setSnInfo: " + getString(R.string.device_unauthorized));
|
// Log.e(TAG, "setSnInfo: " + getString(R.string.device_unauthorized));
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ import android.content.Intent;
|
|||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
|
import com.uiui.zyos.service.main.MainService;
|
||||||
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import io.reactivex.rxjava3.core.Observable;
|
import io.reactivex.rxjava3.core.Observable;
|
||||||
@@ -14,7 +16,7 @@ import io.reactivex.rxjava3.core.Observer;
|
|||||||
import io.reactivex.rxjava3.disposables.Disposable;
|
import io.reactivex.rxjava3.disposables.Disposable;
|
||||||
|
|
||||||
public class BootReceiver extends BroadcastReceiver {
|
public class BootReceiver extends BroadcastReceiver {
|
||||||
private static String TAG = BootReceiver.class.getSimpleName();
|
private static final String TAG = BootReceiver.class.getSimpleName();
|
||||||
public static final String BOOT_COMPLETED = "zuoyeos.action.BOOT_COMPLETED";
|
public static final String BOOT_COMPLETED = "zuoyeos.action.BOOT_COMPLETED";
|
||||||
public static final String SOS = "zuoyeos.action.SOS";
|
public static final String SOS = "zuoyeos.action.SOS";
|
||||||
|
|
||||||
@@ -70,6 +72,7 @@ public class BootReceiver extends BroadcastReceiver {
|
|||||||
// Intent alarmIntent = new Intent(MessageReceiver.SET_ALARMCLOCK);
|
// Intent alarmIntent = new Intent(MessageReceiver.SET_ALARMCLOCK);
|
||||||
// context.sendBroadcast(alarmIntent);
|
// context.sendBroadcast(alarmIntent);
|
||||||
case Intent.ACTION_BOOT_COMPLETED:
|
case Intent.ACTION_BOOT_COMPLETED:
|
||||||
|
context.startService(new Intent(context, MainService.class));
|
||||||
break;
|
break;
|
||||||
// TODO: 2023/6/17 频繁唤醒耗电
|
// TODO: 2023/6/17 频繁唤醒耗电
|
||||||
// case Intent.ACTION_BATTERY_CHANGED:
|
// case Intent.ACTION_BATTERY_CHANGED:
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 4.3 KiB |
BIN
app/src/main/res/drawable-xhdpi/ar_box.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ar_box.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 333 KiB |
BIN
app/src/main/res/drawable-xhdpi/ar_homework_box.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ar_homework_box.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable-xhdpi/ar_study_module.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ar_study_module.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 93 KiB |
BIN
app/src/main/res/drawable-xhdpi/item_icon_homework.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/item_icon_homework.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.4 KiB |
11
app/src/main/res/drawable/item_homework_background.xml
Normal file
11
app/src/main/res/drawable/item_homework_background.xml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<!-- 内部颜色 -->
|
||||||
|
<solid android:color="#33000000" />
|
||||||
|
<!-- 圆角的幅度 -->
|
||||||
|
<corners
|
||||||
|
android:bottomLeftRadius="@dimen/dp_8"
|
||||||
|
android:bottomRightRadius="@dimen/dp_8"
|
||||||
|
android:topLeftRadius="@dimen/dp_8"
|
||||||
|
android:topRightRadius="@dimen/dp_8" />
|
||||||
|
</shape>
|
||||||
86
app/src/main/res/layout-land/fragment_ar_study.xml
Normal file
86
app/src/main/res/layout-land/fragment_ar_study.xml
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".fragment.ar.ARStudyFragment">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<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"
|
||||||
|
app:layout_constraintVertical_bias="0.35">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/constraintLayout3"
|
||||||
|
android:layout_width="@dimen/dp_359"
|
||||||
|
android:layout_height="@dimen/dp_210"
|
||||||
|
android:background="@drawable/ar_box"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_app"
|
||||||
|
android:layout_width="@dimen/dp_328"
|
||||||
|
android:layout_height="@dimen/dp_163"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:layout_marginTop="@dimen/dp_8"
|
||||||
|
android:src="@drawable/ar_study_module"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginStart="@dimen/dp_9"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/constraintLayout3"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/constraintLayout3"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/constraintLayout3">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="@dimen/dp_142"
|
||||||
|
android:layout_height="@dimen/dp_209"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:background="@drawable/ar_homework_box"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" >
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/recyclerView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginTop="@dimen/dp_28"
|
||||||
|
android:layout_marginBottom="@dimen/dp_8"
|
||||||
|
tools:listitem="@layout/item_homework"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
@@ -20,11 +20,10 @@
|
|||||||
android:visibility="visible"
|
android:visibility="visible"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:tl_indicator_color="#00000000"
|
app:tl_indicator_color="#FFFFFF"
|
||||||
app:tl_indicator_margin_left="2dp"
|
|
||||||
app:tl_indicator_margin_right="2dp"
|
|
||||||
app:tl_indicator_style="NORMAL"
|
app:tl_indicator_style="NORMAL"
|
||||||
app:tl_tab_space_equal="true"
|
app:tl_tab_space_equal="true"
|
||||||
|
app:tl_indicator_width_equal_title="true"
|
||||||
app:tl_textBold="SELECT"
|
app:tl_textBold="SELECT"
|
||||||
app:tl_textSelectSize="@dimen/sp_13"
|
app:tl_textSelectSize="@dimen/sp_13"
|
||||||
app:tl_textSize="@dimen/sp_11"
|
app:tl_textSize="@dimen/sp_11"
|
||||||
|
|||||||
@@ -73,9 +73,10 @@
|
|||||||
android:paddingTop="@dimen/dp_2"
|
android:paddingTop="@dimen/dp_2"
|
||||||
android:paddingEnd="@dimen/dp_8"
|
android:paddingEnd="@dimen/dp_8"
|
||||||
android:paddingBottom="@dimen/dp_2"
|
android:paddingBottom="@dimen/dp_2"
|
||||||
android:textSize="@dimen/sp_10"
|
|
||||||
android:text="退出系统"
|
android:text="退出系统"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_10"
|
||||||
|
android:visibility="gone"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@+id/constraintLayout5"
|
app:layout_constraintStart_toEndOf="@+id/constraintLayout5"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
@@ -146,7 +147,6 @@
|
|||||||
android:visibility="visible">
|
android:visibility="visible">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:visibility="gone"
|
|
||||||
android:id="@+id/tv_activated2"
|
android:id="@+id/tv_activated2"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="@dimen/dp_16"
|
android:layout_height="@dimen/dp_16"
|
||||||
@@ -157,6 +157,21 @@
|
|||||||
android:text="学习资源下载"
|
android:text="学习资源下载"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="@dimen/sp_6"
|
android:textSize="@dimen/sp_6"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_applet"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="@dimen/dp_16"
|
||||||
|
android:layout_marginTop="@dimen/dp_8"
|
||||||
|
android:layout_marginEnd="@dimen/dp_8"
|
||||||
|
android:background="@drawable/activation_bg"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="小程序绑定"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_6"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
@@ -216,10 +231,10 @@
|
|||||||
android:layout_marginEnd="@dimen/dp_8"
|
android:layout_marginEnd="@dimen/dp_8"
|
||||||
android:background="@drawable/activation_bg"
|
android:background="@drawable/activation_bg"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:visibility="gone"
|
|
||||||
android:text="学习资源下载"
|
android:text="学习资源下载"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="@dimen/sp_8"
|
android:textSize="@dimen/sp_8"
|
||||||
|
android:visibility="gone"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
@@ -267,12 +282,12 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dp_8"
|
android:layout_marginTop="@dimen/dp_8"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
tools:text="@string/today_study_time"
|
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="@dimen/sp_8"
|
android:textSize="@dimen/sp_8"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/textView5" />
|
app:layout_constraintTop_toBottomOf="@+id/textView5"
|
||||||
|
tools:text="@string/today_study_time" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
@@ -291,7 +306,7 @@
|
|||||||
android:id="@+id/cl_activation"
|
android:id="@+id/cl_activation"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:visibility="visible">
|
android:visibility="gone">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_date1"
|
android:id="@+id/tv_date1"
|
||||||
@@ -382,10 +397,10 @@
|
|||||||
android:id="@+id/iv_device_qrcode"
|
android:id="@+id/iv_device_qrcode"
|
||||||
android:layout_width="@dimen/dp_88"
|
android:layout_width="@dimen/dp_88"
|
||||||
android:layout_height="@dimen/dp_88"
|
android:layout_height="@dimen/dp_88"
|
||||||
android:src="@color/white"
|
|
||||||
android:layout_marginStart="@dimen/dp_16"
|
android:layout_marginStart="@dimen/dp_16"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@color/white"
|
||||||
app:corner_radius="@dimen/dp_8"
|
app:corner_radius="@dimen/dp_8"
|
||||||
app:layout_constraintStart_toEndOf="@+id/iv_progress"
|
app:layout_constraintStart_toEndOf="@+id/iv_progress"
|
||||||
app:layout_constraintTop_toTopOf="@+id/iv_applet_qrcode" />
|
app:layout_constraintTop_toTopOf="@+id/iv_applet_qrcode" />
|
||||||
@@ -408,7 +423,7 @@
|
|||||||
android:id="@+id/cl_app"
|
android:id="@+id/cl_app"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:visibility="gone">
|
android:visibility="visible">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_date2"
|
android:id="@+id/tv_date2"
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
android:id="@+id/iv_icon0"
|
android:id="@+id/iv_icon0"
|
||||||
android:layout_width="@dimen/dp_32"
|
android:layout_width="@dimen/dp_32"
|
||||||
android:layout_height="@dimen/dp_32"
|
android:layout_height="@dimen/dp_32"
|
||||||
android:layout_marginStart="@dimen/dp_8"
|
android:layout_marginStart="@dimen/dp_4"
|
||||||
android:layout_marginEnd="@dimen/dp_4"
|
android:layout_marginEnd="@dimen/dp_4"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
@@ -289,7 +289,7 @@
|
|||||||
android:layout_width="@dimen/dp_32"
|
android:layout_width="@dimen/dp_32"
|
||||||
android:layout_height="@dimen/dp_32"
|
android:layout_height="@dimen/dp_32"
|
||||||
android:layout_marginStart="@dimen/dp_4"
|
android:layout_marginStart="@dimen/dp_4"
|
||||||
android:layout_marginEnd="@dimen/dp_8"
|
android:layout_marginEnd="@dimen/dp_4"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
android:src="@drawable/icon_dict"
|
android:src="@drawable/icon_dict"
|
||||||
@@ -308,6 +308,38 @@
|
|||||||
app:layout_constraintStart_toStartOf="@+id/iv_icon7"
|
app:layout_constraintStart_toStartOf="@+id/iv_icon7"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/iv_icon7" />
|
app:layout_constraintTop_toBottomOf="@+id/iv_icon7" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/cl_9"
|
||||||
|
android:visibility="visible"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_icon9"
|
||||||
|
android:layout_width="@dimen/dp_32"
|
||||||
|
android:layout_height="@dimen/dp_32"
|
||||||
|
android:layout_marginStart="@dimen/dp_4"
|
||||||
|
android:layout_marginEnd="@dimen/dp_4"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/exit_icon"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_appname9"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="退出系统"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_7"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/iv_icon9"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/iv_icon9"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/iv_icon9" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|||||||
@@ -20,10 +20,9 @@
|
|||||||
android:visibility="visible"
|
android:visibility="visible"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:tl_indicator_color="#00000000"
|
app:tl_indicator_color="#FFFFFF"
|
||||||
app:tl_indicator_margin_left="2dp"
|
|
||||||
app:tl_indicator_margin_right="2dp"
|
|
||||||
app:tl_indicator_style="NORMAL"
|
app:tl_indicator_style="NORMAL"
|
||||||
|
app:tl_indicator_width_equal_title="true"
|
||||||
app:tl_tab_space_equal="true"
|
app:tl_tab_space_equal="true"
|
||||||
app:tl_textBold="SELECT"
|
app:tl_textBold="SELECT"
|
||||||
app:tl_textSelectSize="@dimen/sp_15"
|
app:tl_textSelectSize="@dimen/sp_15"
|
||||||
|
|||||||
@@ -73,9 +73,10 @@
|
|||||||
android:paddingTop="@dimen/dp_2"
|
android:paddingTop="@dimen/dp_2"
|
||||||
android:paddingEnd="@dimen/dp_8"
|
android:paddingEnd="@dimen/dp_8"
|
||||||
android:paddingBottom="@dimen/dp_2"
|
android:paddingBottom="@dimen/dp_2"
|
||||||
android:textSize="@dimen/sp_10"
|
|
||||||
android:text="退出系统"
|
android:text="退出系统"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_10"
|
||||||
|
android:visibility="gone"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@+id/constraintLayout5"
|
app:layout_constraintStart_toEndOf="@+id/constraintLayout5"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
@@ -155,6 +156,21 @@
|
|||||||
android:text="学习资源下载"
|
android:text="学习资源下载"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="@dimen/sp_5"
|
android:textSize="@dimen/sp_5"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_applet"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="@dimen/dp_16"
|
||||||
|
android:layout_marginTop="@dimen/dp_8"
|
||||||
|
android:layout_marginEnd="@dimen/dp_8"
|
||||||
|
android:background="@drawable/activation_bg"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="小程序绑定"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_5"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
@@ -289,7 +305,7 @@
|
|||||||
android:id="@+id/cl_activation"
|
android:id="@+id/cl_activation"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:visibility="visible">
|
android:visibility="gone">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_date1"
|
android:id="@+id/tv_date1"
|
||||||
@@ -406,7 +422,7 @@
|
|||||||
android:id="@+id/cl_app"
|
android:id="@+id/cl_app"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:visibility="gone">
|
android:visibility="visible">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_date2"
|
android:id="@+id/tv_date2"
|
||||||
@@ -458,8 +474,8 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_margin="@dimen/dp_8"
|
android:layout_margin="@dimen/dp_8"
|
||||||
android:scrollbars="vertical"
|
|
||||||
android:fadeScrollbars="false"
|
android:fadeScrollbars="false"
|
||||||
|
android:scrollbars="vertical"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_date2" />
|
app:layout_constraintTop_toBottomOf="@+id/tv_date2" />
|
||||||
|
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
android:id="@+id/iv_icon0"
|
android:id="@+id/iv_icon0"
|
||||||
android:layout_width="@dimen/dp_32"
|
android:layout_width="@dimen/dp_32"
|
||||||
android:layout_height="@dimen/dp_32"
|
android:layout_height="@dimen/dp_32"
|
||||||
android:layout_marginStart="@dimen/dp_8"
|
android:layout_marginStart="@dimen/dp_4"
|
||||||
android:layout_marginEnd="@dimen/dp_4"
|
android:layout_marginEnd="@dimen/dp_4"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
@@ -257,7 +257,7 @@
|
|||||||
android:layout_width="@dimen/dp_32"
|
android:layout_width="@dimen/dp_32"
|
||||||
android:layout_height="@dimen/dp_32"
|
android:layout_height="@dimen/dp_32"
|
||||||
android:layout_marginStart="@dimen/dp_4"
|
android:layout_marginStart="@dimen/dp_4"
|
||||||
android:layout_marginEnd="@dimen/dp_8"
|
android:layout_marginEnd="@dimen/dp_4"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
android:src="@drawable/icon_dict"
|
android:src="@drawable/icon_dict"
|
||||||
@@ -287,7 +287,7 @@
|
|||||||
android:layout_width="@dimen/dp_32"
|
android:layout_width="@dimen/dp_32"
|
||||||
android:layout_height="@dimen/dp_32"
|
android:layout_height="@dimen/dp_32"
|
||||||
android:layout_marginStart="@dimen/dp_4"
|
android:layout_marginStart="@dimen/dp_4"
|
||||||
android:layout_marginEnd="@dimen/dp_8"
|
android:layout_marginEnd="@dimen/dp_4"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
android:src="@drawable/jxw_update"
|
android:src="@drawable/jxw_update"
|
||||||
@@ -338,6 +338,37 @@
|
|||||||
app:layout_constraintTop_toBottomOf="@+id/iv_icon5" />
|
app:layout_constraintTop_toBottomOf="@+id/iv_icon5" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/cl_9"
|
||||||
|
android:visibility="visible"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_icon9"
|
||||||
|
android:layout_width="@dimen/dp_32"
|
||||||
|
android:layout_height="@dimen/dp_32"
|
||||||
|
android:layout_marginStart="@dimen/dp_4"
|
||||||
|
android:layout_marginEnd="@dimen/dp_4"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/exit_icon"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_appname9"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="退出系统"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_7"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/iv_icon9"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/iv_icon9"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/iv_icon9" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|||||||
47
app/src/main/res/layout/item_homework.xml
Normal file
47
app/src/main/res/layout/item_homework.xml
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
<?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="wrap_content">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/root"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_44"
|
||||||
|
android:layout_marginStart="@dimen/dp_8"
|
||||||
|
android:layout_marginEnd="@dimen/dp_8"
|
||||||
|
android:background="@drawable/item_homework_background"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/imageView"
|
||||||
|
android:layout_width="@dimen/dp_32"
|
||||||
|
android:layout_height="@dimen/dp_32"
|
||||||
|
android:layout_marginStart="@dimen/dp_8"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/item_icon_homework"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_content"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_8"
|
||||||
|
android:layout_marginEnd="@dimen/dp_8"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="暂时没有作业"
|
||||||
|
android:textColor="@color/gray"
|
||||||
|
android:textSize="@dimen/sp_10"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/imageView"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/imageView"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/imageView" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
Reference in New Issue
Block a user