This commit is contained in:
itgaojian163 2022-12-19 11:25:57 +08:00
parent aa96ad2c66
commit a78137b703
11 changed files with 159 additions and 120 deletions

1
.gitignore vendored
View File

@ -12,4 +12,3 @@
/captures /captures
.externalNativeBuild .externalNativeBuild
.cxx .cxx
local.properties

View File

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK" /> <component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK" />
</project> </project>

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android">
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
@ -18,13 +17,13 @@
android:allowBackup="true" android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules" android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules" android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher" android:icon="@drawable/app_logo"
android:label="@string/app_name" android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round" android:allowNativeHeapPointerTagging="false"
android:supportsRtl="true"
android:networkSecurityConfig="@xml/network_config" android:networkSecurityConfig="@xml/network_config"
android:theme="@style/Theme.Xztouch" android:roundIcon="@drawable/app_logo"
> android:supportsRtl="true"
android:theme="@style/Theme.Xztouch">
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"
android:configChanges="keyboardHidden|orientation|screenSize" android:configChanges="keyboardHidden|orientation|screenSize"

View File

@ -139,7 +139,7 @@ public class MainActivity extends Activity {
public void onBackPressed() { public void onBackPressed() {
} }
static /* synthetic */ int access$704(MainActivity mainActivity) { static int access$704(MainActivity mainActivity) {
int i = mainActivity.mCurrentVideoPosition + 1; int i = mainActivity.mCurrentVideoPosition + 1;
mainActivity.mCurrentVideoPosition = i; mainActivity.mCurrentVideoPosition = i;
return i; return i;
@ -176,7 +176,7 @@ public class MainActivity extends Activity {
private void initContentView() { private void initContentView() {
this.mRlContent = findViewById(R.id.rl_content); this.mRlContent = findViewById(R.id.rl_content);
this.mLlHint = findViewById(R.id.ll_hint); this.mLlHint = findViewById(R.id.ll_hint);
this.mIvSetting = findViewById(R.id.iv_setting); this.mIvSetting = findViewById(R.id.iv_setting);
this.mTvHint = findViewById(R.id.tv_hint); this.mTvHint = findViewById(R.id.tv_hint);
this.mIvBg = findViewById(R.id.iv_bg); this.mIvBg = findViewById(R.id.iv_bg);
@ -213,8 +213,8 @@ public class MainActivity extends Activity {
this.mWebDis.dispose(); this.mWebDis.dispose();
} }
this.mRlContent.removeAllViews(); this.mRlContent.removeAllViews();
((NetApi) RetrofitManager.getInstance() RetrofitManager.getInstance()
.create(NetApi.class)) .create(NetApi.class)
.getShowDataList(str) .getShowDataList(str)
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
@ -236,6 +236,11 @@ public class MainActivity extends Activity {
} else if (MainActivity.this.getRequestedOrientation() != ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) { } else if (MainActivity.this.getRequestedOrientation() != ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) {
MainActivity.this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); MainActivity.this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
} }
if (mVideoView != null && mVideoView.isPlaying()) {
mVideoView.pause();
mVideoView.release();
}
mRlContent.removeAllViews();
RequestManager with = Glide.with(MainActivity.this.mContext); RequestManager with = Glide.with(MainActivity.this.mContext);
with.load(MainActivity.this.mBaseUrl + BaseUrlApi.BASE_IMG_U + tempViewBean.getShowDeviceTemplateAppDTO().getShowTemplateBackground()) with.load(MainActivity.this.mBaseUrl + BaseUrlApi.BASE_IMG_U + tempViewBean.getShowDeviceTemplateAppDTO().getShowTemplateBackground())
.apply(new RequestOptions() .apply(new RequestOptions()
@ -307,21 +312,6 @@ public class MainActivity extends Activity {
}); });
// new MediaPlayer.OnErrorListener(typeFaceTextView, imageView, videoView) {
// private final /* synthetic */ TypeFaceTextView f$1;
// private final /* synthetic */ ImageView f$2;
// private final /* synthetic */ android.widget.VideoView f$3;
//
// {
// this.f$1 = r2;
// this.f$2 = r3;
// this.f$3 = r4;
// }
//
// public final boolean onError(MediaPlayer mediaPlayer, int i, int i2) {
// }
// }
videoView.setOnCompletionListener(mp -> { videoView.setOnCompletionListener(mp -> {
int i = mCurrentAudioPos + 1; int i = mCurrentAudioPos + 1;
mCurrentAudioPos = i; mCurrentAudioPos = i;
@ -778,20 +768,14 @@ public class MainActivity extends Activity {
if (MainActivity.this.mCurrentVideoPosition >= MainActivity.this.mVideoList.size()) { if (MainActivity.this.mCurrentVideoPosition >= MainActivity.this.mVideoList.size()) {
int unused = MainActivity.this.mCurrentVideoPosition = 0; int unused = MainActivity.this.mCurrentVideoPosition = 0;
} }
MainActivity.this.runOnUiThread(new Runnable() { MainActivity.this.runOnUiThread(() -> {
public final void run() { MainActivity.this.mVideoView.release();
//TODO MainActivity.AnonymousClass6.this.lambda$onPlayStateChanged$0$MainActivity$6(); MainActivity.this.mVideoTextView.setText(MainActivity.this.mVideoList.get(MainActivity.this.mCurrentVideoPosition).getDataItemContent());
} VideoView access$600 = MainActivity.this.mVideoView;
access$600.setUrl(MainActivity.this.mBaseUrl + BaseUrlApi.BASE_IMG_U + MainActivity.this.mVideoList.get(MainActivity.this.mCurrentVideoPosition).getDataItemFileId());
MainActivity.this.mVideoView.start();
}); });
} }
public /* synthetic */ void lambda$onPlayStateChanged$0$MainActivity$6() {
MainActivity.this.mVideoView.release();
MainActivity.this.mVideoTextView.setText(((TempViewBean.ShowDeviceTemplateAppDTOBean.ShowTemplateAreaAppDTOListBean.DataBean) MainActivity.this.mVideoList.get(MainActivity.this.mCurrentVideoPosition)).getDataItemContent());
VideoView access$600 = MainActivity.this.mVideoView;
access$600.setUrl(MainActivity.this.mBaseUrl + BaseUrlApi.BASE_IMG_U + ((TempViewBean.ShowDeviceTemplateAppDTOBean.ShowTemplateAreaAppDTOListBean.DataBean) MainActivity.this.mVideoList.get(MainActivity.this.mCurrentVideoPosition)).getDataItemFileId());
MainActivity.this.mVideoView.start();
}
}); });
this.mCurrentVideoPosition = 0; this.mCurrentVideoPosition = 0;
this.mVideoList = showTemplateAreaAppDTOListBean.getShowDeviceTemplateAreaDataAppDTOList(); this.mVideoList = showTemplateAreaAppDTOListBean.getShowDeviceTemplateAreaDataAppDTOList();
@ -887,31 +871,36 @@ public class MainActivity extends Activity {
deviceParamsBean.setDeviceIp(str2); deviceParamsBean.setDeviceIp(str2);
deviceParamsBean.setDeviceDirection(str7); deviceParamsBean.setDeviceDirection(str7);
deviceParamsBean.setDeviceResolvingPower(str6); deviceParamsBean.setDeviceResolvingPower(str6);
((NetApi) RetrofitManager.getInstance().create(NetApi.class)).doSaveParams(str + "/app/showdevice" + RetrofitManager.getInstance()
"/updateshowdevicebycoderelease/" + str3, RequestBody.create(MediaType.parse("application/json; " + .create(NetApi.class)
"charset=utf-8"), new Gson().toJson((Object) deviceParamsBean))).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(new Observer<BaseUserInfo>() { .doSaveParams(str + "/app/showdevice/updateshowdevicebycoderelease/" + str3,
public void onComplete() { RequestBody.create(MediaType.parse("application/json; " +
} "charset=utf-8"), new Gson().toJson(deviceParamsBean)))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<BaseUserInfo>() {
public void onComplete() {
}
public void onSubscribe(Disposable disposable) { public void onSubscribe(Disposable disposable) {
} }
public void onNext(BaseUserInfo baseUserInfo) { public void onNext(BaseUserInfo baseUserInfo) {
initDialog.dismiss(); initDialog.dismiss();
MainActivity.this.mSettingDialog.dismiss(); MainActivity.this.mSettingDialog.dismiss();
String unused = MainActivity.this.mBaseUrl = str; String unused = MainActivity.this.mBaseUrl = str;
String unused2 = MainActivity.this.mDeviceCode = str3; String unused2 = MainActivity.this.mDeviceCode = str3;
SPUtils.getInstance().put("baseUrl", MainActivity.this.mBaseUrl); SPUtils.getInstance().put("baseUrl", MainActivity.this.mBaseUrl);
SPUtils.getInstance().put("deviceCode", MainActivity.this.mDeviceCode); SPUtils.getInstance().put("deviceCode", MainActivity.this.mDeviceCode);
ToastUtils.show("保存成功"); ToastUtils.show("保存成功");
MainActivity.this.getShowData(); MainActivity.this.getShowData();
} }
public void onError(Throwable th) { public void onError(Throwable th) {
initDialog.dismiss(); initDialog.dismiss();
ExceptionHandler.handleException(th); ExceptionHandler.handleException(th);
} }
}); });
} }
/* access modifiers changed from: private */ /* access modifiers changed from: private */
@ -1063,8 +1052,8 @@ public class MainActivity extends Activity {
MainActivity.this.mVideoView.setMute(intent.getBooleanExtra("playSound", false)); MainActivity.this.mVideoView.setMute(intent.getBooleanExtra("playSound", false));
} }
} else if (PathConfig.ACTION_SETAPPCONFIG_INFO.equals(action)) { } else if (PathConfig.ACTION_SETAPPCONFIG_INFO.equals(action)) {
String unused = MainActivity.this.mBaseUrl = SPUtils.getInstance().getString("baseUrl"); MainActivity.this.mBaseUrl = SPUtils.getInstance().getString("baseUrl");
String unused2 = MainActivity.this.mDeviceCode = SPUtils.getInstance().getString("deviceCode"); MainActivity.this.mDeviceCode = SPUtils.getInstance().getString("deviceCode");
MainActivity.this.getShowData(); MainActivity.this.getShowData();
} else if (PathConfig.ACTION_SHUT_DOWN.equals(action)) { } else if (PathConfig.ACTION_SHUT_DOWN.equals(action)) {
MainActivity.this.shutDownDevice(intent.getStringExtra("openTime")); MainActivity.this.shutDownDevice(intent.getStringExtra("openTime"));

View File

@ -113,6 +113,20 @@ public class TempViewBean {
private int showTemplateWidth; private int showTemplateWidth;
private String templateId; private String templateId;
@Override
public String toString() {
return "ShowDeviceTemplateAppDTOBean{" +
"showDeviceTemplateId='" + showDeviceTemplateId + '\'' +
", showTemplateAreaAppDTOList=" + showTemplateAreaAppDTOList +
", showTemplateBackground='" + showTemplateBackground + '\'' +
", showTemplateDirection='" + showTemplateDirection + '\'' +
", showTemplateHeight=" + showTemplateHeight +
", showTemplateTitle='" + showTemplateTitle + '\'' +
", showTemplateWidth=" + showTemplateWidth +
", templateId='" + templateId + '\'' +
'}';
}
public String getShowDeviceTemplateId() { public String getShowDeviceTemplateId() {
return this.showDeviceTemplateId; return this.showDeviceTemplateId;
} }
@ -192,6 +206,25 @@ public class TempViewBean {
private String templateAreaType; private String templateAreaType;
private double templateAreaWidth; private double templateAreaWidth;
@Override
public String toString() {
return "ShowTemplateAreaAppDTOListBean{" +
"dataTypesettingCode='" + dataTypesettingCode + '\'' +
", dataTypesettingColor='" + dataTypesettingColor + '\'' +
", dataTypesettingRotation=" + dataTypesettingRotation +
", dataTypesettingSize=" + dataTypesettingSize +
", showDeviceTemplateAreaDataAppDTOList=" + showDeviceTemplateAreaDataAppDTOList +
", showTemplateAreaId='" + showTemplateAreaId + '\'' +
", templateAreaDown=" + templateAreaDown +
", templateAreaHeight=" + templateAreaHeight +
", templateAreaLeft=" + templateAreaLeft +
", templateAreaRight=" + templateAreaRight +
", templateAreaTop=" + templateAreaTop +
", templateAreaType='" + templateAreaType + '\'' +
", templateAreaWidth=" + templateAreaWidth +
'}';
}
public int getDataTypesettingSize() { public int getDataTypesettingSize() {
return this.dataTypesettingSize; return this.dataTypesettingSize;
} }
@ -305,6 +338,19 @@ public class TempViewBean {
private String showDeviceTemplateAreaDataId; private String showDeviceTemplateAreaDataId;
private int syncDataNumber; private int syncDataNumber;
@Override
public String toString() {
return "DataBean{" +
"dataItemContent='" + dataItemContent + '\'' +
", dataItemFileId='" + dataItemFileId + '\'' +
", dataItemFileType='" + dataItemFileType + '\'' +
", dataItemOrder='" + dataItemOrder + '\'' +
", dataItemPhotoId='" + dataItemPhotoId + '\'' +
", showDeviceTemplateAreaDataId='" + showDeviceTemplateAreaDataId + '\'' +
", syncDataNumber=" + syncDataNumber +
'}';
}
public String getShowDeviceTemplateAreaDataId() { public String getShowDeviceTemplateAreaDataId() {
return this.showDeviceTemplateAreaDataId; return this.showDeviceTemplateAreaDataId;
} }

View File

@ -168,11 +168,14 @@ public class ServerClient extends Service {
configBean.setBaseUrl(SPUtils.getInstance().getString("baseUrl")); configBean.setBaseUrl(SPUtils.getInstance().getString("baseUrl"));
configBean.setDeviceCode(SPUtils.getInstance().getString("deviceCode")); configBean.setDeviceCode(SPUtils.getInstance().getString("deviceCode"));
configBean.setDeviceIp(NetworkUtils.getIPAddress(true)); configBean.setDeviceIp(NetworkUtils.getIPAddress(true));
configBean.setHeight(SPUtils.getInstance().getString("width"));
configBean.setWidth(SPUtils.getInstance().getString("height"));
configBean.setScreenDirection(SPUtils.getInstance().getString("appType")); configBean.setScreenDirection(SPUtils.getInstance().getString("appType"));
configBean.setResolution(SPUtils.getInstance().getString("res"));
configBean.setPlaySound(SPUtils.getInstance().getBoolean("playSound")); configBean.setPlaySound(SPUtils.getInstance().getBoolean("playSound"));
configBean.setPwd(TextUtils.isEmpty(SPUtils.getInstance().getString("pwd")) ? BaseUrlApi.SETTING_PWD : configBean.setPwd(TextUtils.isEmpty(SPUtils.getInstance().getString("pwd")) ? BaseUrlApi.SETTING_PWD :
SPUtils.getInstance().getString("pwd")); SPUtils.getInstance().getString("pwd"));
String json = new Gson().toJson((Object) configBean); String json = new Gson().toJson(configBean);
asyncHttpServerResponse.code(200); asyncHttpServerResponse.code(200);
asyncHttpServerResponse.send(json); asyncHttpServerResponse.send(json);
} catch (Exception e) { } catch (Exception e) {

View File

@ -1,3 +1,3 @@
<resources> <resources>
<string name="app_name">xztouch</string> <string name="app_name">展览系统</string>
</resources> </resources>

View File

@ -9,7 +9,6 @@ import android.text.TextUtils;
import android.util.DisplayMetrics; import android.util.DisplayMetrics;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup;
import android.view.Window; import android.view.Window;
import android.view.WindowManager; import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodManager;
@ -69,10 +68,10 @@ public class BottomSettingView extends Dialog {
/* access modifiers changed from: protected */ /* access modifiers changed from: protected */
public void onCreate(Bundle bundle) { public void onCreate(Bundle bundle) {
super.onCreate(bundle); super.onCreate(bundle);
View inflate = LayoutInflater.from(this.context).inflate(R.layout.dialog_bottom_setting, (ViewGroup) null); View inflate = LayoutInflater.from(this.context).inflate(R.layout.dialog_bottom_setting, null);
this.view = inflate; this.view = inflate;
setContentView(inflate); setContentView(inflate);
this.mSpAppType = (AppCompatSpinner) this.view.findViewById(R.id.sp_system_platform); this.mSpAppType = this.view.findViewById(R.id.sp_system_platform);
final String[] stringArray = this.context.getResources().getStringArray(R.array.actionArray); final String[] stringArray = this.context.getResources().getStringArray(R.array.actionArray);
this.mSpAppType.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { this.mSpAppType.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
public void onNothingSelected(AdapterView<?> adapterView) { public void onNothingSelected(AdapterView<?> adapterView) {
@ -88,42 +87,22 @@ public class BottomSettingView extends Dialog {
} }
}); });
boolean playSound = UserLgUtils.getPlaySound(); boolean playSound = UserLgUtils.getPlaySound();
SwitchCompat switchCompat = (SwitchCompat) this.view.findViewById(R.id.sc_sound); SwitchCompat switchCompat = this.view.findViewById(R.id.sc_sound);
switchCompat.setChecked(playSound); switchCompat.setChecked(playSound);
// TODO switchCompat.setOnCheckedChangeListener($$Lambda$BottomSettingView$o6qnBhdEHyy6ciES43egOFSbzOI.INSTANCE); switchCompat.setOnCheckedChangeListener((buttonView, isChecked) -> UserLgUtils.setIsPlaySound(isChecked));
this.view.findViewById(R.id.tv_cancel).setOnClickListener(new View.OnClickListener() { this.view.findViewById(R.id.tv_cancel).setOnClickListener(BottomSettingView.this::lambda$onCreate$1$BottomSettingView);
public final void onClick(View view) { this.view.findViewById(R.id.tv_confirm).setOnClickListener(BottomSettingView.this::lambda$onCreate$2$BottomSettingView);
BottomSettingView.this.lambda$onCreate$1$BottomSettingView(view); this.view.findViewById(R.id.iv_system_setting).setOnClickListener(BottomSettingView.this::lambda$onCreate$3$BottomSettingView);
} this.view.findViewById(R.id.tv_close).setOnClickListener(BottomSettingView.this::lambda$onCreate$4$BottomSettingView);
}); this.view.findViewById(R.id.iv_update).setOnClickListener(BottomSettingView.this::lambda$onCreate$5$BottomSettingView);
this.view.findViewById(R.id.tv_confirm).setOnClickListener(new View.OnClickListener() { this.mEtIp = this.view.findViewById(R.id.et_device_ip);
public final void onClick(View view) { this.mEtWidth = this.view.findViewById(R.id.et_width);
BottomSettingView.this.lambda$onCreate$2$BottomSettingView(view); this.mEtHeight = this.view.findViewById(R.id.et_height);
} this.mEtResul = this.view.findViewById(R.id.et_resul);
});
this.view.findViewById(R.id.iv_system_setting).setOnClickListener(new View.OnClickListener() {
public final void onClick(View view) {
BottomSettingView.this.lambda$onCreate$3$BottomSettingView(view);
}
});
this.view.findViewById(R.id.tv_close).setOnClickListener(new View.OnClickListener() {
public final void onClick(View view) {
BottomSettingView.this.lambda$onCreate$4$BottomSettingView(view);
}
});
this.view.findViewById(R.id.iv_update).setOnClickListener(new View.OnClickListener() {
public final void onClick(View view) {
BottomSettingView.this.lambda$onCreate$5$BottomSettingView(view);
}
});
this.mEtIp = (EditText) this.view.findViewById(R.id.et_device_ip);
this.mEtWidth = (EditText) this.view.findViewById(R.id.et_width);
this.mEtHeight = (EditText) this.view.findViewById(R.id.et_height);
this.mEtResul = (EditText) this.view.findViewById(R.id.et_resul);
setCancelable(false); setCancelable(false);
setCanceledOnTouchOutside(false); setCanceledOnTouchOutside(false);
this.mEtDeviceCode = (EditText) this.view.findViewById(R.id.et_device_code); this.mEtDeviceCode = this.view.findViewById(R.id.et_device_code);
this.mEtUrl = (EditText) this.view.findViewById(R.id.et_service_url); this.mEtUrl = this.view.findViewById(R.id.et_service_url);
String string = SPUtils.getInstance().getString("baseUrl"); String string = SPUtils.getInstance().getString("baseUrl");
String string2 = SPUtils.getInstance().getString("deviceCode"); String string2 = SPUtils.getInstance().getString("deviceCode");
if (!TextUtils.isEmpty(string2)) { if (!TextUtils.isEmpty(string2)) {
@ -131,6 +110,8 @@ public class BottomSettingView extends Dialog {
} }
if (!TextUtils.isEmpty(string)) { if (!TextUtils.isEmpty(string)) {
this.mEtUrl.setText(string); this.mEtUrl.setText(string);
} else {
mEtUrl.setText("http://192.168.0.1/projcet");
} }
Window window = getWindow(); Window window = getWindow();
window.setGravity(80); window.setGravity(80);
@ -169,7 +150,8 @@ public class BottomSettingView extends Dialog {
editText.setFocusable(true); editText.setFocusable(true);
editText.setFocusableInTouchMode(true); editText.setFocusableInTouchMode(true);
editText.requestFocus(); editText.requestFocus();
((InputMethodManager) this.context.getSystemService(Context.INPUT_METHOD_SERVICE)).showSoftInput(editText, 0); ((InputMethodManager) this.context.getSystemService(Context.INPUT_METHOD_SERVICE)).showSoftInput(editText
, 0);
} }
} }

View File

@ -5,10 +5,10 @@ import android.content.res.TypedArray;
import android.graphics.Typeface; import android.graphics.Typeface;
import android.util.AttributeSet; import android.util.AttributeSet;
import com.tenlionsoft.baselib.R;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import com.tenlionsoft.baselib.R;
/** /**
* 作者: adam * 作者: adam
* 日期: 2020/6/3 - 4:58 PM * 日期: 2020/6/3 - 4:58 PM
@ -34,10 +34,12 @@ public class TypeFaceTextView extends androidx.appcompat.widget.AppCompatTextVie
if (type == 1) { if (type == 1) {
mTypeface = Typeface.createFromAsset(getContext().getAssets(), "fonts/zhangti.TTF"); mTypeface = Typeface.createFromAsset(getContext().getAssets(), "fonts/zhangti.TTF");
setTextSize(16); setTextSize(16);
} else if(type==2) { } else if (type == 2) {
mTypeface = Typeface.createFromAsset(getContext().getAssets(), "fonts/zhangti.TTF"); mTypeface = Typeface.createFromAsset(getContext().getAssets(), "fonts/zhangti.TTF");
setTextSize(18); setTextSize(18);
}else{ } else if (type == 3) {
mTypeface = Typeface.createFromAsset(getContext().getAssets(), "fonts/zhangti.TTF");
} else {
mTypeface = Typeface.DEFAULT; mTypeface = Typeface.DEFAULT;
} }
setTypeface(mTypeface); setTypeface(mTypeface);
@ -47,10 +49,10 @@ public class TypeFaceTextView extends androidx.appcompat.widget.AppCompatTextVie
if (type == 1) { if (type == 1) {
mTypeface = Typeface.createFromAsset(getContext().getAssets(), "fonts/zhangti.TTF"); mTypeface = Typeface.createFromAsset(getContext().getAssets(), "fonts/zhangti.TTF");
setTextSize(16); setTextSize(16);
} else if(type==2) { } else if (type == 2) {
mTypeface = Typeface.createFromAsset(getContext().getAssets(), "fonts/zhangti.TTF"); mTypeface = Typeface.createFromAsset(getContext().getAssets(), "fonts/zhangti.TTF");
setTextSize(18); setTextSize(18);
}else{ } else {
mTypeface = Typeface.DEFAULT; mTypeface = Typeface.DEFAULT;
} }
setTypeface(mTypeface); setTypeface(mTypeface);

View File

@ -32,7 +32,8 @@
android:focusable="true" android:focusable="true"
android:text="关闭应用" android:text="关闭应用"
android:textColor="@color/app_title_9f_no" android:textColor="@color/app_title_9f_no"
android:textSize="18sp" /> android:textSize="18sp"
app:text_type_cus="3" />
<ImageView <ImageView
android:id="@+id/iv_update" android:id="@+id/iv_update"
@ -80,7 +81,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="本       I P:" android:text="本       I P:"
android:textColor="@color/app_title_9f_no" android:textColor="@color/app_title_9f_no"
android:textSize="16sp" /> android:textSize="16sp"
app:text_type_cus="3" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -113,7 +115,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="屏 幕 宽 度:" android:text="屏 幕 宽 度:"
android:textColor="@color/app_title_9f_no" android:textColor="@color/app_title_9f_no"
android:textSize="16sp" /> android:textSize="16sp"
app:text_type_cus="3" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -146,7 +149,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="屏 幕 高 度:" android:text="屏 幕 高 度:"
android:textColor="@color/app_title_9f_no" android:textColor="@color/app_title_9f_no"
android:textSize="16sp" /> android:textSize="16sp"
app:text_type_cus="3" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -179,7 +183,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="设备分辨率:" android:text="设备分辨率:"
android:textColor="@color/app_title_9f_no" android:textColor="@color/app_title_9f_no"
android:textSize="16sp" /> android:textSize="16sp"
app:text_type_cus="3" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -242,7 +247,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="显 示 方 式:" android:text="显 示 方 式:"
android:textColor="@color/app_title_9f_no" android:textColor="@color/app_title_9f_no"
android:textSize="16sp" /> android:textSize="16sp"
app:text_type_cus="3" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -271,7 +277,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="视 频 声 音:" android:text="视 频 声 音:"
android:textColor="@color/app_title_9f_no" android:textColor="@color/app_title_9f_no"
android:textSize="16sp" /> android:textSize="16sp"
app:text_type_cus="3" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -290,7 +297,6 @@
android:textColor="@color/black" android:textColor="@color/black"
android:textOff="On" android:textOff="On"
android:textOn="Off" android:textOn="Off"
android:theme="@style/TextAppearance.AppCompat.Widget.Switch"
app:showText="true" app:showText="true"
app:switchPadding="5dp" app:switchPadding="5dp"
app:switchTextAppearance="@style/Text" /> app:switchTextAppearance="@style/Text" />
@ -308,7 +314,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="设    备    号:" android:text="设    备    号:"
android:textColor="@color/app_title_9f_no" android:textColor="@color/app_title_9f_no"
android:textSize="16sp" /> android:textSize="16sp"
app:text_type_cus="3" />
<EditText <EditText
android:id="@+id/et_device_code" android:id="@+id/et_device_code"
@ -333,7 +340,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="网 络 地 址:" android:text="网 络 地 址:"
android:textColor="@color/app_title_9f_no" android:textColor="@color/app_title_9f_no"
android:textSize="16sp" /> android:textSize="16sp"
app:text_type_cus="3" />
<EditText <EditText
android:id="@+id/et_service_url" android:id="@+id/et_service_url"
@ -369,7 +377,8 @@
android:paddingBottom="20dp" android:paddingBottom="20dp"
android:text="取消" android:text="取消"
android:textColor="@color/app_title_9f_no" android:textColor="@color/app_title_9f_no"
android:textSize="16sp" /> android:textSize="16sp"
app:text_type_cus="3" />
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView <com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
android:id="@+id/tv_confirm" android:id="@+id/tv_confirm"
@ -383,7 +392,8 @@
android:paddingBottom="20dp" android:paddingBottom="20dp"
android:text="保存" android:text="保存"
android:textColor="@color/app_title_9f_no" android:textColor="@color/app_title_9f_no"
android:textSize="16sp" /> android:textSize="16sp"
app:text_type_cus="3" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</androidx.core.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>

8
local.properties Normal file
View File

@ -0,0 +1,8 @@
## This file must *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Mon Oct 03 09:08:48 CST 2022
sdk.dir=/Users/adam/Library/Android/sdk