Compare commits

...

3 Commits

Author SHA1 Message Date
934d54963a 添加日志窗口打开功能 2025-05-30 09:42:36 +08:00
c105123e7b 0922 2025-05-30 09:22:42 +08:00
d8c534bbc8 更新适配系统介绍 2025-05-30 09:00:59 +08:00
10 changed files with 66 additions and 55 deletions

View File

@ -1,8 +1,8 @@
#Created by .winboll/winboll_app_build.gradle #Created by .winboll/winboll_app_build.gradle
#Tue May 20 03:28:00 GMT 2025 #Fri May 30 01:41:12 GMT 2025
stageCount=2 stageCount=2
libraryProject=libappbase libraryProject=libappbase
baseVersion=15.8 baseVersion=15.8
publishVersion=15.8.1 publishVersion=15.8.1
buildCount=1 buildCount=12
baseBetaVersion=15.8.2 baseBetaVersion=15.8.2

View File

@ -40,7 +40,6 @@ public class MainActivity extends WinBoLLActivity implements IWinBoLLActivity {
} }
Toolbar mToolbar; Toolbar mToolbar;
LogView mLogView;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
@ -53,14 +52,11 @@ public class MainActivity extends WinBoLLActivity implements IWinBoLLActivity {
CheckBox cbIsDebugMode = findViewById(R.id.activitymainCheckBox1); CheckBox cbIsDebugMode = findViewById(R.id.activitymainCheckBox1);
cbIsDebugMode.setChecked(GlobalApplication.isDebuging()); cbIsDebugMode.setChecked(GlobalApplication.isDebuging());
mLogView = findViewById(R.id.logview);
mLogView.start();
} }
@Override @Override
public boolean onCreateOptionsMenu(Menu menu) { public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.toolbar_main, menu); getMenuInflater().inflate(R.menu.toolbar_main, menu);
getMenuInflater().inflate(R.menu.toolbar_appbase, menu);
return super.onCreateOptionsMenu(menu); return super.onCreateOptionsMenu(menu);
} }
@ -176,8 +172,7 @@ public class MainActivity extends WinBoLLActivity implements IWinBoLLActivity {
@Override @Override
protected void onResume() { protected void onResume() {
super.onResume(); super.onResume();
mLogView.start();
} }
} }

View File

@ -66,16 +66,11 @@ public class New2Activity extends WinBoLLActivity implements IWinBoLLActivity {
@Override @Override
public boolean onCreateOptionsMenu(Menu menu) { public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.toolbar_main, menu); getMenuInflater().inflate(R.menu.toolbar_main, menu);
getMenuInflater().inflate(R.menu.toolbar_appbase, menu);
return super.onCreateOptionsMenu(menu); return super.onCreateOptionsMenu(menu);
} }
@Override @Override
public boolean onOptionsItemSelected(MenuItem item) { public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == cc.winboll.studio.appbase.R.id.item_log) {
//GlobalApplication.getWinBoLLActivityManager().startLogActivity(this);
return true;
}
// 在switch语句中处理每个ID并在处理完后返回true未处理的情况返回false // 在switch语句中处理每个ID并在处理完后返回true未处理的情况返回false
return super.onOptionsItemSelected(item); return super.onOptionsItemSelected(item);
} }

View File

@ -64,16 +64,11 @@ public class NewActivity extends WinBoLLActivity implements IWinBoLLActivity {
@Override @Override
public boolean onCreateOptionsMenu(Menu menu) { public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.toolbar_main, menu); getMenuInflater().inflate(R.menu.toolbar_main, menu);
getMenuInflater().inflate(R.menu.toolbar_appbase, menu);
return super.onCreateOptionsMenu(menu); return super.onCreateOptionsMenu(menu);
} }
@Override @Override
public boolean onOptionsItemSelected(MenuItem item) { public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == cc.winboll.studio.appbase.R.id.item_log) {
//GlobalApplication.getWinBoLLActivityManager().startLogActivity(this);
return true;
}
// 在switch语句中处理每个ID并在处理完后返回true未处理的情况返回false // 在switch语句中处理每个ID并在处理完后返回true未处理的情况返回false
return super.onOptionsItemSelected(item); return super.onOptionsItemSelected(item);
} }

View File

@ -6,6 +6,9 @@ package cc.winboll.studio.appbase.activities;
* @Describe WinBoLL 窗口基础类 * @Describe WinBoLL 窗口基础类
*/ */
import android.app.Activity; import android.app.Activity;
import android.view.MenuItem;
import cc.winboll.studio.appbase.R;
import cc.winboll.studio.libappbase.GlobalApplication;
import cc.winboll.studio.libappbase.winboll.IWinBoLLActivity; import cc.winboll.studio.libappbase.winboll.IWinBoLLActivity;
public class WinBoLLActivity extends Activity implements IWinBoLLActivity { public class WinBoLLActivity extends Activity implements IWinBoLLActivity {
@ -21,4 +24,16 @@ public class WinBoLLActivity extends Activity implements IWinBoLLActivity {
public String getTag() { public String getTag() {
return TAG; return TAG;
} }
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == R.id.item_log) {
GlobalApplication.getWinBoLLActivityManager().startLogActivity(this);
return true;
}
// 在switch语句中处理每个ID并在处理完后返回true未处理的情况返回false
return super.onOptionsItemSelected(item);
}
} }

View File

@ -32,13 +32,19 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Hello, WinBoLL!"/> android:text="安卓R对应的是Android 11其API级别是30。以下是Android 11中一些重要的API相关特性
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Android版本10的代号是“Q”API级别是29。 Android 10开始谷歌不再公开使用甜品作为版本代号但内部仍保留了大量与“Q”相关的元素。Android 10本身并没有严格对应某个特定的Java版本但在开发Android 10应用时通常可以使用Java 8或更高版本。 Java 8为Android开发带来了诸如Lambda表达式、方法引用等新特性能提高开发效率和代码可读性与Android 10开发适配良好。Java 9及更高版本也可用于Android 10开发能使用一些新的语言特性和API但可能需要注意兼容性和配置问题。"/>
\n- 隐私保护方面:引入单次授权,让用户可以选择授予应用对位置信息、麦克风和摄像头的临时访问权限。还增加了数据访问审核功能,能让开发者深入了解应用在何处访问私密数据。
\n- 系统功能方面提供了ControlsProviderService API用于向连接的外部设备提供控件这些控件显示于Android电源菜单中的设备控件下。媒体控件也得到更新显示于快捷设置旁来自多个应用的会话排列在一个可滑动的轮播界面中。
\n- 硬件支持方面提供了一些API以支持瀑布屏通过将窗口布局属性  layoutInDisplayCutoutMode  设为  LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS 可允许窗口延伸到屏幕各个边缘上的刘海和瀑布区域。对于合页式屏幕配置的设备提供了具有  TYPE_HINGE_ANGLE  的新传感器以及新的  SensorEvent 用于监控合页角度。
\n- 安全方面:对生物识别身份验证机制进行了更新,引入了  BiometricManager.Authenticators  接口,定义了  BIOMETRIC_STRONG  BIOMETRIC_WEAK  DEVICE_CREDENTIAL  等身份验证类型。还在  BiometricPrompt  类中提供了对“每次使用时进行身份验证”密钥的更多支持。
\n- 性能和质量方面支持无线调试通过Android调试桥adb从工作站以无线方式部署和调试应用避免了常见的USB连接问题。"/>
<HorizontalScrollView <HorizontalScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
@ -211,11 +217,5 @@
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>
<cc.winboll.studio.libappbase.LogView
android:layout_width="match_parent"
android:layout_height="300dp"
android:id="@+id/logview"/>
</LinearLayout> </LinearLayout>

View File

@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" <menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/item_log"
android:title="LOG"
android:icon="@drawable/ic_winboll_log"/>
</menu> </menu>

View File

@ -1,8 +1,8 @@
#Created by .winboll/winboll_app_build.gradle #Created by .winboll/winboll_app_build.gradle
#Tue May 20 03:28:00 GMT 2025 #Fri May 30 01:41:12 GMT 2025
stageCount=2 stageCount=2
libraryProject=libappbase libraryProject=libappbase
baseVersion=15.8 baseVersion=15.8
publishVersion=15.8.1 publishVersion=15.8.1
buildCount=1 buildCount=12
baseBetaVersion=15.8.2 baseBetaVersion=15.8.2

View File

@ -24,7 +24,9 @@ public class WinBoLLActivityManager {
public static final String TAG = "IWinBoLLActivityManager"; public static final String TAG = "IWinBoLLActivityManager";
public static final String EXTRA_TAG = "EXTRA_TAG";
public enum WinBoLLUI_TYPE { Aplication, Service } public enum WinBoLLUI_TYPE { Aplication, Service }
Context mContext; Context mContext;
@ -112,6 +114,33 @@ public class WinBoLLActivityManager {
LogUtils.d(TAG, e, Thread.currentThread().getStackTrace()); LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
} }
} }
public <T extends IWinBoLLActivity> void startLogActivity(Context context) {
// 如果窗口已存在就重启窗口
String tag = LogActivity.TAG;
if (isActive(tag)) {
resumeActivity(context, tag);
return;
}
// 新建一个任务窗口
Intent intent = new Intent(context, LogActivity.class);
//打开多任务窗口 flags
// Define the bounds.
// Rect bounds = new Rect(0, 0, 800, 200);
// // Set the bounds as an activity option.
// ActivityOptions options = ActivityOptions.makeBasic();
// options.setLaunchBounds(bounds);
intent.addFlags(Intent.FLAG_ACTIVITY_LAUNCH_ADJACENT);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT);
intent.addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
intent.putExtra(EXTRA_TAG, tag);
//context.startActivity(intent, options.toBundle());
context.startActivity(intent);
}
/** /**
* 判断 tag绑定的 MyActivity是否存在 * 判断 tag绑定的 MyActivity是否存在

View File

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/item_minimal"
android:title="MINIMAL"
android:icon="@drawable/ic_winboll_point"/>
<item
android:id="@+id/item_about"
android:title="ABOUT"
android:icon="@drawable/ic_winboll_logo"/>
<item
android:id="@+id/item_help"
android:title="HELP"
android:icon="@drawable/ic_winboll_help"/>
<item
android:id="@+id/item_log"
android:title="LOG"
android:icon="@drawable/ic_winboll_log"/>
</menu>