version:
fix: update:更新主界面样式布局
This commit is contained in:
@@ -171,6 +171,7 @@
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.main.MainActivity"
|
||||
android:screenOrientation="userPortrait"
|
||||
android:excludeFromRecents="true"
|
||||
android:launchMode="singleTop" />
|
||||
<activity android:name=".activity.TopActivity" />
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.aoleyun.sn.activity.main;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.view.View;
|
||||
|
||||
import com.aoleyun.sn.base.BasePresenter;
|
||||
@@ -11,6 +12,8 @@ public class MainAContact {
|
||||
public interface Presenter extends BasePresenter<MainView> {
|
||||
/*获取设备锁定状态*/
|
||||
void getLockedState();
|
||||
/*获取设备二维码*/
|
||||
void getQRCode(boolean loocked);
|
||||
/*获取学生信息*/
|
||||
void getStudesInfo(boolean refresh);
|
||||
/*手动获取设备信息更新*/
|
||||
@@ -20,6 +23,8 @@ public class MainAContact {
|
||||
public interface MainView extends BaseView {
|
||||
/*获取设备锁定状态*/
|
||||
void setLockedState(boolean loocked);
|
||||
/*获取设备二维码*/
|
||||
void setQRCode(Bitmap qrcode);
|
||||
/*获取学生信息*/
|
||||
void setStudesInfo(StudentsInfo studesInfo);
|
||||
/*手动获取设备信息更新*/
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.aoleyun.sn.activity.main;
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.graphics.Bitmap;
|
||||
import android.provider.Settings;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
@@ -11,9 +12,12 @@ import com.aoleyun.sn.BuildConfig;
|
||||
import com.aoleyun.sn.bean.AppUpdateInfo;
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.bean.StudentsInfo;
|
||||
import com.aoleyun.sn.comm.CommonConfig;
|
||||
import com.aoleyun.sn.comm.JGYActions;
|
||||
import com.aoleyun.sn.network.NetInterfaceManager;
|
||||
import com.aoleyun.sn.utils.AES.CXAESUtil;
|
||||
import com.aoleyun.sn.utils.JGYUtils;
|
||||
import com.aoleyun.sn.utils.Utils;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParser;
|
||||
@@ -79,6 +83,14 @@ public class MainAPresenter implements MainAContact.Presenter {
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getQRCode(boolean loocked) {
|
||||
String encryptString = CXAESUtil.encrypt(CommonConfig.AES_KEY, Utils.getSerial());
|
||||
Log.e("getQRCode", "setImageAndText: " + encryptString);
|
||||
Bitmap bitmap = Utils.createQRImage(encryptString, 400, 400);
|
||||
mView.setQRCode(bitmap);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过sn获取用户信息
|
||||
*/
|
||||
|
||||
@@ -9,6 +9,7 @@ import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.ServiceConnection;
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.IBinder;
|
||||
import android.os.SystemClock;
|
||||
import android.provider.Settings;
|
||||
@@ -79,10 +80,12 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
|
||||
TextView tv_number;
|
||||
@BindView(R.id.tv_name)
|
||||
TextView tv_name;
|
||||
@BindView(R.id.tv_wifi)
|
||||
TextView tv_wifi;
|
||||
@BindView(R.id.chkupd)
|
||||
Button bt_checkupdate;
|
||||
@BindView(R.id.checkupdate)
|
||||
ConstraintLayout checkupdate;
|
||||
// @BindView(R.id.checkupdate)
|
||||
// ConstraintLayout checkupdate;
|
||||
@BindView(R.id.iv_back)
|
||||
ImageView back;
|
||||
@BindView(R.id.iv_locked)
|
||||
@@ -97,6 +100,8 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
|
||||
ConstraintLayout cl_imei;
|
||||
@BindView(R.id.tv_customversion)
|
||||
TextView tv_customversion;
|
||||
@BindView(R.id.iv_qrcode)
|
||||
ImageView iv_qrcode;
|
||||
|
||||
@OnClick({R.id.iv_back, R.id.tv_title, R.id.chkupd})
|
||||
public void onClick(View view) {
|
||||
@@ -155,6 +160,11 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
|
||||
mMainAPresenter.setLifecycle(lifecycleSubject);
|
||||
JGYUtils.startServices(MainActivity.this);
|
||||
getDevicesInfo();
|
||||
if (Utils.isWifiAvailable(MainActivity.this)) {
|
||||
tv_wifi.setText(Utils.obtainWifiInfo(MainActivity.this) + "dbm");
|
||||
}else {
|
||||
tv_wifi.setText("未连接");
|
||||
}
|
||||
setStoreUpdateListener(bt_checkupdate);
|
||||
}
|
||||
|
||||
@@ -305,6 +315,12 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
|
||||
setBatchText("", View.GONE);
|
||||
SysSettingUtils.setEnableSetting(this);
|
||||
}
|
||||
mMainAPresenter.getQRCode(loocked);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setQRCode(Bitmap qrcode) {
|
||||
iv_qrcode.setImageBitmap(qrcode);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -361,22 +377,22 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
|
||||
|
||||
public void setBatchText(String text, int visibility) {
|
||||
tv_batch.setText(text);
|
||||
tv_batch.setVisibility(visibility);
|
||||
// tv_batch.setVisibility(visibility);
|
||||
}
|
||||
|
||||
public void setClassText(String text, int visibility) {
|
||||
tv_class.setText(text);
|
||||
layout_class.setVisibility(visibility);
|
||||
// layout_class.setVisibility(visibility);
|
||||
}
|
||||
|
||||
public void setNumberText(String text, int visibility) {
|
||||
tv_number.setText(text);
|
||||
layout_number.setVisibility(visibility);
|
||||
// layout_number.setVisibility(visibility);
|
||||
}
|
||||
|
||||
public void setNameText(String text, int visibility) {
|
||||
tv_name.setText(text);
|
||||
layout_name.setVisibility(visibility);
|
||||
// layout_name.setVisibility(visibility);
|
||||
}
|
||||
|
||||
public void setHead(String url) {
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.aoleyun.sn.comm;
|
||||
|
||||
|
||||
public class CommonConfig {
|
||||
public static String AES_KEY = "0123456789ABCDEF";
|
||||
|
||||
/*爱华解锁标识*/
|
||||
public final static String AIHUA_UNLOCK = "Aihua_unlock_state";
|
||||
|
||||
|
||||
@@ -30,19 +30,22 @@ public class CXAESUtil {
|
||||
/**
|
||||
* 加密
|
||||
*
|
||||
* @param key
|
||||
* 密钥
|
||||
* @param src
|
||||
* 加密文本
|
||||
* @param key 密钥
|
||||
* @param src 加密文本
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static String encrypt(String key, String src) throws Exception {
|
||||
public static String encrypt(String key, String src) {
|
||||
// /src = Base64.encodeToString(src.getBytes(), Base64.DEFAULT);
|
||||
byte[] rawKey = toMakekey(key, keyLenght, defaultV).getBytes();// key.getBytes();
|
||||
byte[] result = encrypt(rawKey, src.getBytes("utf-8"));
|
||||
// result = Base64.encode(result, Base64.DEFAULT);
|
||||
return toHex(result);
|
||||
try {
|
||||
byte[] result = encrypt(rawKey, src.getBytes("utf-8"));
|
||||
// result = Base64.encode(result, Base64.DEFAULT);
|
||||
return toHex(result);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1475,6 +1475,7 @@ public class Utils {
|
||||
|
||||
/**
|
||||
* 获取电池容量
|
||||
*
|
||||
* @param context
|
||||
* @return
|
||||
*/
|
||||
@@ -1690,6 +1691,7 @@ public class Utils {
|
||||
|
||||
/**
|
||||
* 获取自定义版本号 或者版本号
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getCustomVersion() {
|
||||
@@ -1706,12 +1708,13 @@ public class Utils {
|
||||
|
||||
/**
|
||||
* 获取系统版本号
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getRomVersion() {
|
||||
if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.ZhanruiPlatform) {
|
||||
return getProperty("ro.build.id", "获取失败");
|
||||
}else if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.CubePlatform) {
|
||||
} else if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.CubePlatform) {
|
||||
return Utils.getProperty("ro.build.id", "获取失败");
|
||||
} else if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.MTKPlatform) {
|
||||
return Utils.getProperty("ro.build.id", "获取失败");
|
||||
@@ -1794,6 +1797,17 @@ public class Utils {
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isWifiAvailable(Context context) {
|
||||
ConnectivityManager conMan = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
NetworkInfo.State wifi = conMan.getNetworkInfo(ConnectivityManager.TYPE_WIFI).getState();
|
||||
if (NetworkInfo.State.CONNECTED == wifi) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static String getWifiAlias(Context context) {
|
||||
WifiManager wifiManager = (WifiManager) context.getSystemService(WIFI_SERVICE);
|
||||
WifiInfo wifiInfo = wifiManager.getConnectionInfo();
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.8 KiB |
@@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#ffffff"
|
||||
android:background="#F4F5F7"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context=".activity.main.MainActivity">
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/back"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@@ -55,244 +56,95 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_title"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/version"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_24"
|
||||
android:text="版本"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_head"
|
||||
android:layout_width="@dimen/dp_100"
|
||||
android:layout_height="@dimen/dp_100"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/head"
|
||||
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.096" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_batch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:text="暂无信息"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_head" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_64"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginRight="@dimen/dp_64"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:background="@drawable/background_main"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_batch">
|
||||
app:layout_constraintTop_toBottomOf="@+id/bannerLayout">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_head"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_32">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_sn"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/main_device"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_sn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="设备SN"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_sn"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_devsn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="设备SN"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_sn"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_sn" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_imei"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_30">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_imei"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/main_device"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_imei"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="IMEI"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_imei"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_imei2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="IMEI"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_imei"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_imei" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_32">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_mac"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/main_mac"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_mac"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="MAC地址"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_mac"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_devmac"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="MAC地址"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_class"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:layout_height="@dimen/dp_52"
|
||||
android:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_class"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/main_grade"
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:text="头像"
|
||||
android:textColor="#000000"
|
||||
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_class_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="组别"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_class"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_class"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="暂无信息"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
<ImageView
|
||||
android:id="@+id/iv_head"
|
||||
android:layout_width="@dimen/dp_48"
|
||||
android:layout_height="@dimen/dp_48"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/head"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.096" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_number"
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:layout_height="2px"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:background="@color/background_top" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_batch"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_number"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/main_school"
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:text="批次"
|
||||
android:textColor="#000000"
|
||||
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_number_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="编号"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_number"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_number"
|
||||
android:id="@+id/tv_batch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:text="暂无信息"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
@@ -304,36 +156,25 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_name"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/main_nickname"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:text="姓名"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_name"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:text="暂无信息"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
@@ -343,71 +184,217 @@
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/checkupdate"
|
||||
android:id="@+id/layout_number"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_32">
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_version"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/main_version"
|
||||
<TextView
|
||||
android:id="@+id/tv_number_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:text="编号"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView4"
|
||||
android:id="@+id/tv_number"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="版本"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_version"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/version"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="版本"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:text="暂无信息"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_class"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_class_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:text="组别"
|
||||
android:textColor="#000000"
|
||||
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_class"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:text="暂无信息"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_36">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_sn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:text="SN"
|
||||
android:textColor="#000000"
|
||||
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_devsn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:text="设备SN"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_sn"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_sn" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_imei"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_36">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_imei"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:text="IMEI"
|
||||
android:textColor="#000000"
|
||||
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_imei2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:text="IMEI"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_imei"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_imei" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_36">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_mac"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:text="MAC"
|
||||
android:textColor="#000000"
|
||||
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_devmac"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:text="MAC地址"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_wifi"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_36">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_wifi_signal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:text="WiFi信号"
|
||||
android:textColor="#000000"
|
||||
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_wifi"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:text="WiFi"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_wifi_signal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_wifi_signal" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_qrcode"
|
||||
android:layout_width="@dimen/dp_100"
|
||||
android:layout_height="@dimen/dp_100"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/chkupd"
|
||||
android:layout_width="@dimen/dp_200"
|
||||
android:layout_height="@dimen/dp_28"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/bt_checkupdate_selector"
|
||||
android:stateListAnimator="@null"
|
||||
android:text="检查更新"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ll_info" />
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/chkupd"
|
||||
android:layout_width="@dimen/dp_200"
|
||||
android:layout_height="@dimen/dp_28"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:background="@drawable/bt_checkupdate_selector"
|
||||
android:stateListAnimator="@null"
|
||||
android:text="检查更新"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ll_info" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_customversion"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:textColor="@color/background_top"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -56,7 +56,7 @@
|
||||
<!-- <item name="android:windowIsFloating">true</item> //是否浮现在activity之上-->
|
||||
<!-- <item name="android:windowIsTranslucent">true</item> //是否半透明-->
|
||||
<!-- <item name="android:windowNoTitle">true</item> //是否显示title-->
|
||||
<!-- <item name="android:background">@android:color/transparent</item> //设置dialog的背景-->
|
||||
<!-- <item name="android:background_main">@android:color/transparent</item> //设置dialog的背景-->
|
||||
<!-- <item name="android:windowBackground">@android:color/transparent</item>-->
|
||||
<!-- <item name="android:backgroundDimAmount">0.7</item> //就是用来控制灰度的值,当为1时,界面除了我们的dialog内容是高亮显示的,dialog以外的区域是黑色的,完全看不到其他内容-->
|
||||
<!-- <item name="android:backgroundDimEnabled">true</item>-->
|
||||
|
||||
Reference in New Issue
Block a user