日志窗口函数重构

This commit is contained in:
ZhanGSKen
2025-03-26 19:32:21 +08:00
parent 56a13b4a40
commit 2074f68ef3
6 changed files with 41 additions and 37 deletions

View File

@@ -71,7 +71,7 @@ public class MainActivity extends AppCompatActivity implements IWinBollActivity
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == cc.winboll.studio.appbase.R.id.item_log) {
onLogActivity();
WinBollActivityManager.getInstance(this).startLogActivity(this);
return true;
}
// 在switch语句中处理每个ID并在处理完后返回true未处理的情况返回false。
@@ -176,23 +176,5 @@ public class MainActivity extends AppCompatActivity implements IWinBollActivity
WinBollActivityManager.getInstance(this).startWinBollActivity(this, NewActivity.class);
}
public void onLogActivity() {
Intent intent = new Intent(MainActivity.this, LogActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_LAUNCH_ADJACENT);
// Define the bounds.
Rect bounds = new Rect(500, 300, 100, 0);
// Set the bounds as an activity option.
ActivityOptions options = ActivityOptions.makeBasic();
options.setLaunchBounds(bounds);
//Intent intent = new Intent(this, LpgActivity.class);
startActivity(intent, options.toBundle());
//WinBollActivityManager.getInstance(this).startWinBollActivity(this, intent, LogActivity.class);
}
}

View File

@@ -30,13 +30,6 @@
android:textAllCaps="false"
android:onClick="onCloseAllActivity"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="CloseAllActivity"
android:textAllCaps="false"
android:onClick="onCloseAllActivity"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"