修复日志初始分屏比例无法调节问题。原因是两个窗口都存在LogView控件时,会引起未知原因的无法调节问题。只要启动窗口把LogView控件移除就可以了。
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Mon Sep 22 08:19:44 HKT 2025
|
||||
#Fri Sep 26 11:39:46 GMT 2025
|
||||
stageCount=1
|
||||
libraryProject=libapputils
|
||||
baseVersion=15.9
|
||||
publishVersion=15.9.0
|
||||
buildCount=0
|
||||
buildCount=7
|
||||
baseBetaVersion=15.9.1
|
||||
|
||||
@@ -14,14 +14,14 @@
|
||||
android:theme="@style/MyUtilsTheme"
|
||||
android:supportsRtl="true"
|
||||
android:resizeableActivity="true"
|
||||
android:screenOrientation="unspecified"
|
||||
android:requestLegacyExternalStorage="true">
|
||||
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:label="@string/app_name"
|
||||
android:launchMode="singleTask"
|
||||
android:exported="true"
|
||||
android:resizeableActivity="true">
|
||||
android:exported="true">
|
||||
|
||||
<intent-filter>
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ final public class MainActivity extends Activity {
|
||||
public static final int REQUEST_QRCODEDECODE_ACTIVITY = 0;
|
||||
|
||||
Toolbar mToolbar;
|
||||
LogView mLogView;
|
||||
//LogView mLogView;
|
||||
//
|
||||
// @Override
|
||||
// public Activity getActivity() {
|
||||
@@ -40,8 +40,8 @@ final public class MainActivity extends Activity {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
|
||||
mLogView = findViewById(R.id.logview);
|
||||
mLogView.start();
|
||||
// mLogView = findViewById(R.id.logview);
|
||||
// mLogView.start();
|
||||
|
||||
// 初始化工具栏
|
||||
mToolbar = findViewById(R.id.toolbar);
|
||||
@@ -146,6 +146,20 @@ final public class MainActivity extends Activity {
|
||||
}
|
||||
|
||||
public void onTestLogActivity(View view) {
|
||||
/* 分屏代码有效
|
||||
// 1. 创建启动 SecondActivity 的 Intent
|
||||
Intent splitIntent = new Intent(MainActivity.this, LogActivity.class);
|
||||
|
||||
// 2. 添加分屏启动必需的两个标志(API 30 兼容)
|
||||
// FLAG_ACTIVITY_LAUNCH_ADJACENT:相邻分屏显示
|
||||
// FLAG_ACTIVITY_NEW_TASK:分屏需要新任务栈
|
||||
splitIntent.addFlags(Intent.FLAG_ACTIVITY_LAUNCH_ADJACENT
|
||||
| Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
|
||||
// 3. 启动分屏活动(若设备不支持分屏,会默认全屏启动)
|
||||
startActivity(splitIntent);
|
||||
*/
|
||||
|
||||
LogActivity.startLogActivity(this);
|
||||
}
|
||||
|
||||
@@ -275,7 +289,7 @@ final public class MainActivity extends Activity {
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
mLogView.start();
|
||||
//mLogView.start();
|
||||
}
|
||||
|
||||
/*@Override
|
||||
|
||||
@@ -54,13 +54,6 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<cc.winboll.studio.libappbase.LogView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:text="Button"
|
||||
android:id="@+id/logview"
|
||||
android:layout_weight="1.0"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Mon Sep 22 08:17:49 HKT 2025
|
||||
#Fri Sep 26 11:39:46 GMT 2025
|
||||
stageCount=1
|
||||
libraryProject=libapputils
|
||||
baseVersion=15.9
|
||||
publishVersion=15.9.0
|
||||
buildCount=0
|
||||
buildCount=7
|
||||
baseBetaVersion=15.9.1
|
||||
|
||||
Reference in New Issue
Block a user