update:2020.03.06

This commit is contained in:
2020-03-06 11:05:05 +08:00
parent cdd3d43ae3
commit 208b58f854
15 changed files with 393 additions and 139 deletions

View File

@@ -9,14 +9,15 @@ def releaseTime() {
}
android {
compileSdkVersion 29
compileSdkVersion 28
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.info.sn"
minSdkVersion 23
targetSdkVersion 29
versionCode 5
versionName "1.0.4"
targetSdkVersion 28
versionCode 10
versionName "1.1.0"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk {
//选择要添加的对应 cpu 类型的 .so 库。
@@ -28,7 +29,7 @@ android {
JPUSH_APPKEY : "edf9cec22731b8b2fed56ee6", //JPush 上注册的包名对应的 Appkey.
JPUSH_CHANNEL: "developer-default", //暂时填写默认值即可.
]
multiDexEnabled true
}
buildTypes {
release {
@@ -112,6 +113,7 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
// implementation 'com.android.support:multidex:1.0.3'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
@@ -127,7 +129,7 @@ dependencies {
implementation 'com.lzy.net:okrx:0.1.2'
implementation 'com.lzy.net:okserver:2.0.5'
implementation 'com.alibaba:fastjson:1.2.21'
implementation 'com.blankj:utilcode:1.26.0'
// implementation 'com.blankj:utilcode:1.26.0'
implementation 'com.arialyy.aria:core:3.7.10'
annotationProcessor 'com.arialyy.aria:compiler:3.7.10'
}

View File

@@ -33,7 +33,7 @@
<application
android:name=".MyApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher_home"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">

View File

@@ -1,9 +1,12 @@
package com.info.sn;
import androidx.appcompat.app.AppCompatActivity;
import androidx.constraintlayout.widget.ConstraintLayout;
import android.app.AlertDialog;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.ActivityInfo;
@@ -14,9 +17,15 @@ import android.os.Bundle;
import android.os.Environment;
import android.os.Handler;
import android.os.Message;
import android.os.SystemClock;
import android.text.TextUtils;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.hjq.permissions.OnPermission;
import com.hjq.permissions.Permission;
@@ -27,10 +36,15 @@ import com.info.sn.jpush.LocalBroadcastManager;
import com.info.sn.jpush.TagAliasOperatorHelper;
import com.info.sn.network.api.HTTPInterface;
import com.info.sn.service.MyDownloadService;
import com.info.sn.utils.ApkUtils;
import com.info.sn.utils.LogUtils;
import com.info.sn.utils.SPUtils;
import com.info.sn.utils.ToastUtil;
import com.info.sn.utils.Utils;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.callback.FileCallback;
import com.lzy.okgo.model.Progress;
import com.lzy.okgo.model.Response;
import java.io.File;
import java.util.List;
@@ -49,9 +63,12 @@ import static com.info.sn.jpush.TagAliasOperatorHelper.sequence;
public class MainActivity extends AppCompatActivity {
public static boolean isForeground = false;
private ImageView imageView;
private ImageView imageView, exit;
private TextView tv_note, tv_devsn, tv_username, tv_school, tv_grade, tv_version;
private ConstraintLayout layout;
private int DeviceInfo;
private long mExitTime;
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -78,19 +95,49 @@ public class MainActivity extends AppCompatActivity {
initData();
HTTPInterface.checkDevicesInfo(handler);
startService(new Intent(MainActivity.this, MyDownloadService.class));
}
private void initView() {
tv_note = (TextView) findViewById(R.id.tv_note);
imageView = (ImageView) findViewById(R.id.imageView);
tv_devsn = (TextView) findViewById(R.id.tv_devsn);
tv_devsn.setText("设备SN:" + Utils.getSerial());
tv_username = (TextView) findViewById(R.id.tv_username);
tv_school = (TextView) findViewById(R.id.tv_school);
tv_grade = (TextView) findViewById(R.id.tv_grade);
tv_note = findViewById(R.id.tv_note);
imageView = findViewById(R.id.imageView);
exit = findViewById(R.id.iv_exit);
exit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
exit();
}
});
layout = findViewById(R.id.layout);
layout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
continuousClick(COUNTS, DURATION);
}
});
tv_devsn = findViewById(R.id.tv_devsn);
tv_devsn.setText(Utils.getSerial());
tv_username = findViewById(R.id.tv_username);
tv_school = findViewById(R.id.tv_school);
tv_grade = findViewById(R.id.tv_grade);
tv_version = findViewById(R.id.version);
tv_version.setText("版本:"+ BuildConfig.VERSION_NAME);
tv_version.setText(BuildConfig.VERSION_NAME);
}
final static int COUNTS = 4;// 点击次数
final static long DURATION = 1000;// 规定有效时间
long[] mHits = new long[COUNTS];
private void continuousClick(int count, long time) {
//每次点击时,数组向前移动一位
System.arraycopy(mHits, 1, mHits, 0, mHits.length - 1);
//为数组最后一位赋值
mHits[mHits.length - 1] = SystemClock.uptimeMillis();
if (mHits[0] >= (SystemClock.uptimeMillis() - DURATION)) {
mHits = new long[COUNTS];//重新初始化数组
Toast.makeText(this, "正在检查更新", Toast.LENGTH_SHORT).show();
HTTPInterface.checkUpdateByPackage(handler, this.getPackageName(), String.valueOf(BuildConfig.VERSION_CODE));
}
}
private void initData() {
@@ -109,6 +156,25 @@ public class MainActivity extends AppCompatActivity {
}
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) {
exit();
return true;
}
return super.onKeyDown(keyCode, event);
}
public void exit() {
if ((System.currentTimeMillis() - mExitTime) > 2000) {
Toast.makeText(MainActivity.this, "再按一次退出程序", Toast.LENGTH_SHORT).show();
mExitTime = System.currentTimeMillis();
} else {
finish();
}
}
private void setImageAndText(ImageView imageView, String text) {
Bitmap bitmap = Utils.createQRImage(Utils.getSn(), 250, 250);
imageView.setImageBitmap(bitmap);
@@ -122,19 +188,25 @@ public class MainActivity extends AppCompatActivity {
if (name == null || name.equals("")) {
tv_username.setText("用户姓名:未设置");
} else {
tv_username.setText("用户姓名:" + name);
tv_username.setText(name);
}
if (school == null || school.equals("")) {
tv_school.setText("学校:未设置");
} else {
tv_school.setText("学校:" + school);
tv_school.setText(school);
}
if (grade == null || grade.equals("")) {
tv_grade.setText("年级:未设置");
} else {
tv_grade.setText("年级:" + getGrade(grade));
tv_grade.setText(getGrade(grade));
}
}
private void setUserInfo() {
tv_username.setText("未设置");
tv_school.setText("未设置");
tv_grade.setText("未设置");
tv_grade.setText("未设置");
}
private String getGrade(String grade) {
@@ -204,9 +276,78 @@ public class MainActivity extends AppCompatActivity {
SPUtils.put(MainActivity.this, "isLogined", 2);
setImageAndText(imageView, "未经验证的设备,请联系客服");
break;
case 200:
Bundle bundle = (Bundle) msg.obj;
getFile(bundle);
break;
case -200:
ToastUtil.show("已是最新版本");
break;
}
}
};
private void getFile(final Bundle bundle) {
final File path = new File(Environment.getExternalStoragePublicDirectory("Download") + "/Sninfo/");
path.mkdirs();
final File file = new File(Environment.getExternalStoragePublicDirectory("Download") + "/Sninfo/Update" + bundle.getString("versionCode") + ".apk");
if (file.exists() && file.isFile()) {
AlertDialog.Builder builder = new AlertDialog.Builder(this)
.setTitle("软件更新")
.setIcon(R.mipmap.ic_launcher)
.setCancelable(false)
.setMessage("发现新版本,点击确定更新\n" + "更新内容:" + bundle.getString("content"))
.setPositiveButton("确定", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
ApkUtils.installApk(MainActivity.this, file);
dialogInterface.dismiss();
}
});
AlertDialog ad = builder.create();
ad.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
ad.setCanceledOnTouchOutside(false); //点击外面区域不会让dialog消失
ad.show();
} else {
OkGo.<File>get(bundle.getString("url"))
.execute(new FileCallback("Sninfo/Update" + bundle.getString("versionCode") + ".apk") {
@Override
public void onSuccess(final Response<File> response) {
// Settings.System.putString(getApplicationContext().getContentResolver(), "qch_app_forbid", "com.baidu.video");
// ApkUtils.installApkInSilence(response.body().getAbsolutePath(), Launcher.this.getPackageName());
AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this)
.setTitle("软件更新")
.setIcon(R.mipmap.ic_launcher)
.setCancelable(false)
.setMessage("发现新版本,点击确定更新\n" + "更新内容:" + bundle.getString("content"))
.setPositiveButton("确定", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
ApkUtils.installApk(MainActivity.this, response.body());
dialogInterface.dismiss();
}
});
AlertDialog ad = builder.create();
ad.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
ad.setCanceledOnTouchOutside(false); //点击外面区域不会让dialog消失
ad.show();
Log.e("getFile", "download file successful,now installing");
}
@Override
public void onError(Response<File> response) {
super.onError(response);
Log.e("getFile", "File download Failure" + response.getException());
}
@Override
public void downloadProgress(Progress progress) {
super.downloadProgress(progress);
Log.e("getFile", "已下载:" + progress.currentSize + ",总大小:" + progress.totalSize + ",进度:" + progress.fraction + ",当前网速:" + progress.speed);
}
});
}
}
private String[] permission = new String[]{
// Permission.SYSTEM_ALERT_WINDOW,

View File

@@ -15,7 +15,7 @@ import android.util.Log;
import com.arialyy.annotations.Download;
import com.arialyy.aria.core.Aria;
import com.arialyy.aria.core.task.DownloadTask;
import com.blankj.utilcode.util.NetworkUtils;
//import com.blankj.utilcode.util.NetworkUtils;
import com.info.sn.network.api.HTTPInterface;
import com.info.sn.utils.ApkUtils;
import com.info.sn.utils.LogUtils;
@@ -33,7 +33,8 @@ import java.util.TreeMap;
import cn.jpush.android.api.CustomMessage;
public class MyApplication extends Application implements NetworkUtils.OnNetworkStatusChangedListener {
//public class MyApplication extends Application implements NetworkUtils.OnNetworkStatusChangedListener {
public class MyApplication extends Application {
public static Context context;
private static MyApplication app;
@@ -45,17 +46,22 @@ public class MyApplication extends Application implements NetworkUtils.OnNetwork
context = getApplicationContext();
ToastUtil.init(this);
OkGo.getInstance().init(this);
NetworkUtils.registerNetworkStatusChangedListener(this);
// NetworkUtils.registerNetworkStatusChangedListener(this);
Aria.init(this);
Aria.download(this).register();
Aria.download(this).resumeAllTask();
}
// protected void attachBaseContext(Context newBase) {
// super.attachBaseContext(newBase);
// MultiDex.install(this);
// }
@Override
public void onTerminate() {
super.onTerminate();
NetworkUtils.unregisterNetworkStatusChangedListener(this);
// NetworkUtils.unregisterNetworkStatusChangedListener(this);
}
@@ -134,7 +140,6 @@ public class MyApplication extends Application implements NetworkUtils.OnNetwork
private static final String JIGUANG_FORCE_UNINSTALLAPK = "10";
synchronized public void manageCustomMessage(CustomMessage customMessage) {
String sn_id = (String) SPUtils.get(context, "sn_id", "-1");
String member_id = (String) SPUtils.get(context, "member_id", "-1");
@@ -420,17 +425,17 @@ public class MyApplication extends Application implements NetworkUtils.OnNetwork
}
}
@Override
public void onDisconnected() {
LogUtils.e("onDisconnected", "网络断开");
}
@Override
public void onConnected(NetworkUtils.NetworkType networkType) {
Aria.download(this).resumeAllTask();
LogUtils.e("onConnected", "网络连接");
}
// @Override
// public void onDisconnected() {
// LogUtils.e("onDisconnected", "网络断开");
// }
//
// @Override
// public void onConnected(NetworkUtils.NetworkType networkType) {
// Aria.download(this).resumeAllTask();
// LogUtils.e("onConnected", "网络连接");
//
// }
//在这里处理任务执行中的状态,如进度进度条的刷新

View File

@@ -140,12 +140,11 @@ public class HTTPInterface {
bundle.putString("versionCode", newversion);
bundle.putString("content", content);
message.obj = bundle;
} else {
message.what = -200;
}
handler.sendMessage(message);
Log.e("checkUpdateByPackage", msg);
} else {
handler.sendEmptyMessage(-200);
Log.e("checkUpdateByPackage", msg);
}
} catch (Exception e) {

View File

@@ -101,7 +101,7 @@ public class MyDownloadService extends Service {
if (file.exists() && file.isFile()) {
AlertDialog.Builder builder = new AlertDialog.Builder(this)
.setTitle("软件更新")
.setIcon(R.mipmap.ic_launcher_home)
.setIcon(R.mipmap.ic_launcher)
.setCancelable(false)
.setMessage("发现新版本,点击确定更新\n" + "更新内容:" + bundle.getString("content"))
.setPositiveButton("确定", new DialogInterface.OnClickListener() {
@@ -124,7 +124,7 @@ public class MyDownloadService extends Service {
// ApkUtils.installApkInSilence(response.body().getAbsolutePath(), Launcher.this.getPackageName());
AlertDialog.Builder builder = new AlertDialog.Builder(MyDownloadService.this)
.setTitle("软件更新")
.setIcon(R.mipmap.ic_launcher_home)
.setIcon(R.mipmap.ic_launcher)
.setCancelable(false)
.setMessage("发现新版本,点击确定更新\n" + "更新内容:" + bundle.getString("content"))
.setPositiveButton("确定", new DialogInterface.OnClickListener() {

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -4,21 +4,70 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#d9d9d9"
android:background="#ffffff"
tools:context=".MainActivity">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_30"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/iv_exit"
android:layout_width="@dimen/dp_15"
android:layout_height="@dimen/dp_15"
android:layout_marginLeft="@dimen/dp_5"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/bt_return"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="设备信息"
android:textColor="#4b4b4b"
android:textSize="@dimen/sp_14"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<ImageView
android:id="@+id/imageView3"
android:layout_width="@dimen/dp_120"
android:layout_height="@dimen/dp_120"
android:adjustViewBounds="true"
android:scaleType="fitCenter"
android:src="@drawable/logo"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/constraintLayout">
</ImageView>
<ImageView
android:id="@+id/imageView"
android:layout_width="@dimen/dp_160"
android:layout_height="@dimen/dp_160"
android:layout_width="@dimen/dp_120"
android:layout_height="@dimen/dp_120"
android:adjustViewBounds="true"
android:scaleType="fitCenter"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.27">
app:layout_constraintTop_toBottomOf="@+id/imageView3"
app:layout_constraintVertical_bias="0.02">
</ImageView>
@@ -27,20 +76,19 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="请扫描绑定设备"
android:textColor="#8c8b8b"
android:textColor="#4b4b4b"
android:textSize="@dimen/sp_12"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView"
app:layout_constraintVertical_bias="0.026" />
app:layout_constraintVertical_bias="0.02" />
<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="@dimen/dp_280"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_10"
android:background="@drawable/background"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
@@ -48,143 +96,202 @@
app:layout_constraintTop_toBottomOf="@+id/tv_note">
<TextView
android:id="@+id/textView3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_10"
android:layout_marginBottom="@dimen/dp_10"
android:gravity="center_horizontal"
android:text="设备信息"
android:textSize="@dimen/sp_18"
android:textStyle="bold" />
<RelativeLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_30">
<TextView
android:id="@+id/tv_devsn"
android:layout_width="match_parent"
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_5"
android:layout_marginLeft="@dimen/dp_5"
android:layout_marginEnd="@dimen/dp_5"
android:layout_marginRight="@dimen/dp_5"
android:layout_marginBottom="@dimen/dp_5"
android:text="设备SN:"
android:textSize="@dimen/sp_12" />
android:text="设备SN"
android:textColor="#4b4b4b"
android:textSize="@dimen/sp_12"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_alignParentBottom="true"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:src="#797979">
<TextView
android:id="@+id/tv_devsn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:text="设备SN"
android:textSize="@dimen/sp_11"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<!-- <ImageView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="1dp"-->
<!-- android:layout_alignParentBottom="true"-->
<!-- android:layout_marginLeft="@dimen/dp_10"-->
<!-- android:layout_marginRight="@dimen/dp_10"-->
<!-- android:src="#797979">-->
</ImageView>
</RelativeLayout>
<!-- </ImageView>-->
</androidx.constraintlayout.widget.ConstraintLayout>
<RelativeLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_30"
android:layout_marginTop="@dimen/dp_5">
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="用户姓名"
android:textColor="#4b4b4b"
android:textSize="@dimen/sp_12"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_username"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_5"
android:layout_marginLeft="@dimen/dp_5"
android:layout_marginEnd="@dimen/dp_5"
android:layout_marginRight="@dimen/dp_5"
android:layout_marginBottom="@dimen/dp_5"
android:text="用户姓名:未绑定"
android:textSize="@dimen/sp_12" />
android:gravity="right"
android:text=" "
android:textSize="@dimen/sp_11"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<!-- <ImageView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="1dp"-->
<!-- android:layout_alignParentBottom="true"-->
<!-- android:layout_marginLeft="@dimen/dp_10"-->
<!-- android:layout_marginRight="@dimen/dp_10"-->
<!-- android:src="#797979">-->
<ImageView
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_alignParentBottom="true"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:src="#797979">
</ImageView>
</RelativeLayout>
<!-- </ImageView>-->
</androidx.constraintlayout.widget.ConstraintLayout>
<RelativeLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_30"
android:layout_marginTop="@dimen/dp_5">
<TextView
android:id="@+id/tv_school"
android:layout_width="match_parent"
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_5"
android:layout_marginLeft="@dimen/dp_5"
android:layout_marginEnd="@dimen/dp_5"
android:layout_marginRight="@dimen/dp_5"
android:layout_marginBottom="@dimen/dp_5"
android:text="学校:未绑定"
android:textSize="@dimen/sp_12" />
android:text="学校"
android:textColor="#4b4b4b"
android:textSize="@dimen/sp_12"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_alignParentBottom="true"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:src="#797979">
<TextView
android:id="@+id/tv_school"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:text=" "
android:textSize="@dimen/sp_11"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<!-- <ImageView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="1dp"-->
<!-- android:layout_alignParentBottom="true"-->
<!-- android:layout_marginLeft="@dimen/dp_10"-->
<!-- android:layout_marginRight="@dimen/dp_10"-->
<!-- android:src="#797979">-->
</ImageView>
</RelativeLayout>
<!-- </ImageView>-->
</androidx.constraintlayout.widget.ConstraintLayout>
<RelativeLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_30"
android:layout_marginTop="@dimen/dp_5">
<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="年级"
android:textColor="#4b4b4b"
android:textSize="@dimen/sp_12"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_grade"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:text=" "
android:textSize="@dimen/sp_11"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<!-- <ImageView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="1dp"-->
<!-- android:layout_alignParentBottom="true"-->
<!-- android:layout_marginLeft="@dimen/dp_10"-->
<!-- android:layout_marginRight="@dimen/dp_10"-->
<!-- android:src="#8c8b8b">-->
<!-- </ImageView>-->
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/layout"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_30"
android:layout_marginTop="@dimen/dp_5"
android:layout_marginBottom="@dimen/dp_10">
<TextView
android:id="@+id/tv_grade"
android:layout_width="match_parent"
android:id="@+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_5"
android:layout_marginLeft="@dimen/dp_5"
android:layout_marginEnd="@dimen/dp_5"
android:layout_marginRight="@dimen/dp_5"
android:layout_marginBottom="@dimen/dp_5"
android:text="年级:未绑定"
android:textSize="@dimen/sp_12" />
android:text="版本"
android:textColor="#4b4b4b"
android:textSize="@dimen/sp_12"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:text=" "
android:textSize="@dimen/sp_11"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<!-- <ImageView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="1dp"-->
<!-- android:layout_alignParentBottom="true"-->
<!-- android:layout_marginLeft="@dimen/dp_10"-->
<!-- android:layout_marginRight="@dimen/dp_10"-->
<!-- android:layout_alignParentBottom="true"-->
<!-- android:src="#8c8b8b">-->
<!-- </ImageView>-->
</RelativeLayout>
<!-- android:src="#8c8b8b"></ImageView>-->
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
<TextView
android:id="@+id/version"
android:id="@+id/textView7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_4"
android:text="版本"
android:textColor="#8c8b8b"
android:layout_marginTop="@dimen/dp_5"
android:text="连续点击版本号,自动下载新版本"
android:textColor="#E14B88"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/linearLayout" />
</androidx.constraintlayout.widget.ConstraintLayout>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB