Compare commits

...

29 Commits

Author SHA1 Message Date
ZhanGSKen
6daa3bbd0f <apputils>APK 15.0.8 release Publish. 2025-03-24 08:08:19 +08:00
ZhanGSKen
8a29735130 更新编译工具版本 2025-03-24 08:06:52 +08:00
ZhanGSKen
272dd15427 Merge remote-tracking branch 'origin/appbase' into apputils 2025-03-24 08:05:24 +08:00
ZhanGSKen
5411d5e590 <libappbase>Library Release 15.0.8 2025-03-24 08:04:42 +08:00
ZhanGSKen
facf0b001d <appbase>APK 15.0.8 release Publish. 2025-03-24 08:04:27 +08:00
ZhanGSKen
df58c0355c 更新编译工具版本 2025-03-24 08:03:17 +08:00
ZhanGSKen
7c7b159a80 更新编译工具版本 2025-03-24 07:57:04 +08:00
ZhanGSKen
da23546bb4 Merge branch 'appbase' into apputils 2025-03-24 07:48:04 +08:00
ZhanGSKen
e657e45218 <libappbase>Library Release 15.0.7 2025-03-24 07:45:34 +08:00
ZhanGSKen
c22946f0a5 <appbase>APK 15.0.7 release Publish. 2025-03-24 07:44:12 +08:00
ZhanGSKen
1363a7dcce <appbase>APK 15.0.6 release Publish. 2025-03-24 07:43:28 +08:00
ZhanGSKen
e0ca5725f1 保持与旧版Gradle插件的兼容 2025-03-24 07:39:20 +08:00
ZhanGSKen
3c4988532f 函数命名更新 2025-03-24 07:30:59 +08:00
ZhanGSKen
b0a34579fa 命名空间重构 2025-03-24 07:17:22 +08:00
ZhanGSKen
fe12cf7ffe 添加BB工具集示例源码 2025-03-23 17:12:03 +08:00
ZhanGSKen
3192ae55b1 设置 Gradle 类库引用方式为 API 传递依赖。 2025-03-23 13:26:28 +08:00
ZhanGSKen
67d91aaf6c Merge branch 'appbase' into apputils 2025-03-21 01:15:54 +08:00
ZhanGSKen
dd08747edb 更新WinBoll maven库下载顺序 2025-03-21 00:42:41 +08:00
ZhanGSKen
e91bf7d422 <libapputils>Library Release 15.0.7 2025-03-20 01:24:10 +08:00
ZhanGSKen
603640b3cb <libappbase>Library Release 15.0.5 2025-03-18 10:15:14 +08:00
ZhanGSKen
5b06ce9699 <appbase>APK 15.0.5 release Publish. 2025-03-18 10:14:53 +08:00
ZhanGSKen
363fc6c7c1 修复编译参数 2025-03-18 10:13:01 +08:00
ZhanGSKen
7f43f8b5c5 <libappbase>Library Release 15.0.4 2025-03-18 10:09:49 +08:00
ZhanGSKen
a117e6e110 <appbase>APK 15.0.4 release Publish. 2025-03-18 10:09:21 +08:00
ZhanGSKen
c1f576e343 分开APP应用主题设置与类库主题预定设置。 2025-03-18 10:08:31 +08:00
ZhanGSKen
1dad84b65e <libappbase>Library Release 15.0.3 2025-03-17 09:51:28 +08:00
ZhanGSKen
1ae377e665 <appbase>APK 15.0.3 release Publish. 2025-03-17 09:51:04 +08:00
ZhanGSKen
02fa0a4134 优化调试窗口 2025-03-17 09:40:03 +08:00
ZhanGSKen
a730aa3f92 优化日志UI 2025-03-17 09:37:12 +08:00
40 changed files with 426 additions and 187 deletions

View File

@@ -18,8 +18,8 @@ def genVersionName(def versionName){
}
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
compileSdkVersion 32
buildToolsVersion "32.0.0"
defaultConfig {
applicationId "cc.winboll.studio.appbase"

View File

@@ -1,8 +1,8 @@
#Created by .winboll/winboll_app_build.gradle
#Sat Mar 15 15:30:02 HKT 2025
stageCount=3
#Mon Mar 24 08:04:35 HKT 2025
stageCount=9
libraryProject=libappbase
baseVersion=15.0
publishVersion=15.0.2
publishVersion=15.0.8
buildCount=0
baseBetaVersion=15.0.3
baseBetaVersion=15.0.9

View File

@@ -7,7 +7,7 @@
android:name=".App"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/MyAppTheme"
android:theme="@style/MyAPPBaseTheme"
android:resizeableActivity="true">
<activity
@@ -49,6 +49,12 @@
android:name=".services.MainService"
android:exported="true"/>
<service android:name="cc.winboll.studio.appbase.services.TestDemoBindService"
android:exported="true"/>
<service android:name="cc.winboll.studio.appbase.services.TestDemoService"
android:exported="true"/>
<service android:name=".services.AssistantService"/>
<receiver android:name="cc.winboll.studio.appbase.receivers.MainReceiver">
@@ -81,13 +87,13 @@
</receiver>
<receiver android:name=".widgets.APPNewsWidgetClickListener">
<receiver android:name=".receivers.APPNewsWidgetClickListener">
<intent-filter>
<action android:name="cc.winboll.studio.appbase.widgets.APPNewsWidgetClickListener.ACTION_PRE"/>
<action android:name="cc.winboll.studio.appbase.receivers.APPNewsWidgetClickListener.ACTION_PRE"/>
<action android:name="cc.winboll.studio.appbase.widgets.APPNewsWidgetClickListener.ACTION_NEXT"/>
<action android:name="cc.winboll.studio.appbase.receivers.APPNewsWidgetClickListener.ACTION_NEXT"/>
</intent-filter>
@@ -97,12 +103,6 @@
android:name="android.max_aspect"
android:value="4.0"/>
<service android:name="cc.winboll.studio.appbase.services.TestDemoBindService"
android:exported="true"/>
<service android:name="cc.winboll.studio.appbase.services.TestDemoService"
android:exported="true"/>
</application>
</manifest>

View File

@@ -89,7 +89,7 @@ public class MainActivity extends Activity {
startService(intentService);
}
public void onTestSOS(View view) {
public void onTestDemoServiceSOS(View view) {
Intent intent = new Intent(this, TestDemoService.class);
stopService(intent);
if (App.isDebuging()) {

View File

@@ -7,7 +7,7 @@ package cc.winboll.studio.appbase;
import android.content.Context;
import android.service.quicksettings.Tile;
import android.service.quicksettings.TileService;
import cc.winboll.studio.appbase.beans.MainServiceBean;
import cc.winboll.studio.appbase.models.MainServiceBean;
import cc.winboll.studio.appbase.services.MainService;
public class MyTileService extends TileService {

View File

@@ -1,4 +1,4 @@
package cc.winboll.studio.appbase.beans;
package cc.winboll.studio.appbase.models;
/**
* @Author ZhanGSKen@AliYun.Com

View File

@@ -1,4 +1,4 @@
package cc.winboll.studio.appbase.beans;
package cc.winboll.studio.appbase.models;
/**
* @Author ZhanGSKen@AliYun.Com

View File

@@ -1,4 +1,4 @@
package cc.winboll.studio.appbase.beans;
package cc.winboll.studio.appbase.models;
/**
* @Author ZhanGSKen@AliYun.Com

View File

@@ -1,4 +1,4 @@
package cc.winboll.studio.appbase.beans;
package cc.winboll.studio.appbase.models;
/**
* @Author ZhanGSKen@AliYun.Com

View File

@@ -1,13 +1,13 @@
package cc.winboll.studio.appbase.widgets;
package cc.winboll.studio.appbase.receivers;
/**
* @Author ZhanGSKen@AliYun.Com
* @Date 2025/02/15 17:20:46
* @Describe WidgetButtonClickListener
* @Date 2025/03/24 07:11:44
*/
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import cc.winboll.studio.appbase.widgets.APPNewsWidget;
import cc.winboll.studio.libappbase.LogUtils;
public class APPNewsWidgetClickListener extends BroadcastReceiver {

View File

@@ -10,7 +10,7 @@ import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import cc.winboll.studio.appbase.beans.WinBollNewsBean;
import cc.winboll.studio.appbase.models.WinBollNewsBean;
import cc.winboll.studio.appbase.services.MainService;
import cc.winboll.studio.appbase.widgets.APPNewsWidget;
import cc.winboll.studio.libappbase.AppUtils;

View File

@@ -11,7 +11,7 @@ import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.IBinder;
import cc.winboll.studio.appbase.beans.MainServiceBean;
import cc.winboll.studio.appbase.models.MainServiceBean;
import cc.winboll.studio.appbase.services.AssistantService;
import cc.winboll.studio.appbase.services.MainService;
import cc.winboll.studio.libappbase.LogUtils;

View File

@@ -18,7 +18,7 @@ import android.content.ServiceConnection;
import android.os.Binder;
import android.os.IBinder;
import cc.winboll.studio.appbase.MyTileService;
import cc.winboll.studio.appbase.beans.MainServiceBean;
import cc.winboll.studio.appbase.models.MainServiceBean;
import cc.winboll.studio.appbase.handlers.MainServiceHandler;
import cc.winboll.studio.appbase.receivers.MainReceiver;
import cc.winboll.studio.appbase.services.AssistantService;

View File

@@ -10,7 +10,7 @@ import android.content.Context;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;
import cc.winboll.studio.appbase.beans.TestDemoBindServiceBean;
import cc.winboll.studio.appbase.models.TestDemoBindServiceBean;
import cc.winboll.studio.libappbase.LogUtils;
import cc.winboll.studio.libappbase.sos.WinBoll;
import cc.winboll.studio.appbase.App;

View File

@@ -10,7 +10,7 @@ import android.content.Context;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;
import cc.winboll.studio.appbase.beans.TestDemoServiceBean;
import cc.winboll.studio.appbase.models.TestDemoServiceBean;
import cc.winboll.studio.libappbase.LogUtils;
import cc.winboll.studio.libappbase.sos.WinBoll;

View File

@@ -12,15 +12,16 @@ import android.content.Context;
import android.content.Intent;
import android.widget.RemoteViews;
import cc.winboll.studio.appbase.R;
import cc.winboll.studio.appbase.beans.WinBollNewsBean;
import cc.winboll.studio.appbase.models.WinBollNewsBean;
import cc.winboll.studio.appbase.receivers.APPNewsWidgetClickListener;
import cc.winboll.studio.libappbase.AppUtils;
import cc.winboll.studio.libappbase.LogUtils;
import cc.winboll.studio.libappbase.sos.APPModel;
import cc.winboll.studio.libappbase.sos.WinBoll;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import cc.winboll.studio.libappbase.sos.APPModel;
import cc.winboll.studio.libappbase.sos.WinBoll;
public class APPNewsWidget extends AppWidgetProvider {

View File

@@ -72,6 +72,26 @@
android:layout_height="wrap_content"
android:gravity="right">
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="StartCenter"
android:textAllCaps="false"
android:onClick="onStartCenter"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="StopCenter"
android:textAllCaps="false"
android:onClick="onStopCenter"/>
</LinearLayout>
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
@@ -105,54 +125,41 @@
</LinearLayout>
</HorizontalScrollView>
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="SartTestDemoBindService"
android:textAllCaps="false"
android:onClick="onSartTestDemoBindService"/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="StopTestDemoBindService"
android:textAllCaps="false"
android:onClick="onStopTestDemoBindService"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="SartTestDemoBindService"
android:textAllCaps="false"
android:onClick="onSartTestDemoBindService"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="StopTestDemoBindServiceNoSettings"
android:textAllCaps="false"
android:onClick="onStopTestDemoBindServiceNoSettings"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="StopTestDemoBindService"
android:textAllCaps="false"
android:onClick="onStopTestDemoBindService"/>
</LinearLayout>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="StopTestDemoBindServiceNoSettings"
android:textAllCaps="false"
android:onClick="onStopTestDemoBindServiceNoSettings"/>
</LinearLayout>
</HorizontalScrollView>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="StartCenter"
android:textAllCaps="false"
android:onClick="onStartCenter"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="StopCenter"
android:textAllCaps="false"
android:onClick="onStopCenter"/>
<Button
android:layout_width="wrap_content"
@@ -171,24 +178,24 @@
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TestSOS"
android:text="TestDemoServiceSOS"
android:textAllCaps="false"
android:onClick="onTestSOS"/>
android:onClick="onTestDemoServiceSOS"/>
</LinearLayout>
</ScrollView>
<cc.winboll.studio.libappbase.LogView
android:layout_height="500dp"
android:layout_width="match_parent"
android:id="@+id/activitymainLogView1"/>
</LinearLayout>
</LinearLayout>
</ScrollView>
<cc.winboll.studio.libappbase.LogView
android:layout_height="300dp"
android:layout_width="match_parent"
android:id="@+id/activitymainLogView1"/>
</LinearLayout>

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#005800FF</color>
<color name="colorPrimaryDark">#005800FF</color>
<color name="colorAccent">#005800FF</color>
<color name="colorPrimary">#FF00B322</color>
<color name="colorPrimaryDark">#FF005C12</color>
<color name="colorAccent">#FF8DFFA2</color>
<color name="colorText">#FFFFFB8D</color>
</resources>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="MyAppTheme" parent="APPBaseTheme">
<style name="MyAPPBaseTheme" parent="APPBaseTheme">
<item name="attrColorPrimary">@color/colorPrimary</item>
<item name="themeGlobalCrashActivity">@style/MyGlobalCrashActivityTheme</item>
</style>

View File

@@ -18,8 +18,8 @@ def genVersionName(def versionName){
}
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
compileSdkVersion 32
buildToolsVersion "32.0.0"
defaultConfig {
applicationId "cc.winboll.studio.apputils"
@@ -46,22 +46,4 @@ android {
dependencies {
api project(':libapputils')
api fileTree(dir: 'libs', include: ['*.jar'])
// 二维码类库
implementation 'com.google.zxing:core:3.4.1'
implementation 'com.journeyapps:zxing-android-embedded:3.6.0'
// 网络连接类库
//implementation 'com.squareup.okhttp3:okhttp:4.4.1'
// Html 解析
//implementation 'org.jsoup:jsoup:1.13.1'
// SSH
//implementation 'com.jcraft:jsch:0.1.55'
// 应用介绍页类库
//implementation 'io.github.medyo:android-about-page:2.0.0'
implementation 'cc.winboll.studio:libappbase:15.0.5'
}

View File

@@ -1,8 +1,8 @@
#Created by .winboll/winboll_app_build.gradle
#Thu Mar 20 01:23:48 HKT 2025
stageCount=8
#Mon Mar 24 08:08:19 HKT 2025
stageCount=9
libraryProject=libapputils
baseVersion=15.0
publishVersion=15.0.7
publishVersion=15.0.8
buildCount=0
baseBetaVersion=15.0.8
baseBetaVersion=15.0.9

View File

@@ -29,6 +29,8 @@
<activity android:name=".TestStringToQrCodeViewActivity"/>
<activity android:name=".TestBBMorseCodeActivity"/>
</application>
</manifest>
</manifest>

View File

@@ -0,0 +1,47 @@
package cc.winboll.studio.apputils;
/**
* @Author ZhanGSKen@AliYun.Com
* @Date 2025/03/23 16:14:45
*/
import android.app.Activity;
import android.os.Bundle;
import android.widget.Toolbar;
import cc.winboll.studio.libapputils.app.IWinBollActivity;
import cc.winboll.studio.libapputils.bean.APPInfo;
public class TestBBMorseCodeActivity extends Activity implements IWinBollActivity {
public static final String TAG = "TestBBMorseCodeActivity";
@Override
public APPInfo getAppInfo() {
return null;
}
@Override
public String getTag() {
return TAG;
}
@Override
public Toolbar initToolBar() {
return findViewById(R.id.activityteststringtoqrcodeviewToolbar1);
}
@Override
public boolean isEnableDisplayHomeAsUp() {
return true;
}
@Override
public boolean isAddWinBollToolBar() {
return true;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_testbbmorsecode);
}
}

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
</LinearLayout>

View File

@@ -1,6 +1,12 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
// Nexus Maven 库地址
// "WinBoll Release"
maven { url "https://nexus.winboll.cc/repository/maven-public/" }
// "WinBoll Snapshot"
maven { url "https://nexus.winboll.cc/repository/maven-snapshots/" }
maven { url 'https://maven.aliyun.com/repository/public/' }
maven { url 'https://maven.aliyun.com/repository/google/' }
maven { url 'https://maven.aliyun.com/repository/gradle-plugin/' }
@@ -9,13 +15,6 @@ buildscript {
maven { url "https://jitpack.io" }
mavenCentral()
google()
// Nexus Maven 库地址
// "WinBoll Release"
maven { url "https://nexus.winboll.cc/repository/maven-public/" }
// "WinBoll Snapshot"
maven { url "https://nexus.winboll.cc/repository/maven-snapshots/" }
mavenLocal()
}
dependencies {
@@ -27,6 +26,12 @@ buildscript {
allprojects {
repositories {
// Nexus Maven 库地址
// "WinBoll Release"
maven { url "https://nexus.winboll.cc/repository/maven-public/" }
// "WinBoll Snapshot"
maven { url "https://nexus.winboll.cc/repository/maven-snapshots/" }
maven { url 'https://maven.aliyun.com/repository/public/' }
maven { url 'https://maven.aliyun.com/repository/google/' }
maven { url 'https://maven.aliyun.com/repository/gradle-plugin/' }
@@ -35,13 +40,6 @@ allprojects {
maven { url "https://jitpack.io" }
mavenCentral()
google()
// Nexus Maven 库地址
// "WinBoll Release"
maven { url "https://nexus.winboll.cc/repository/maven-public/" }
// "WinBoll Snapshot"
maven { url "https://nexus.winboll.cc/repository/maven-snapshots/" }
mavenLocal()
}
ext {

View File

@@ -17,3 +17,5 @@ org.gradle.jvmargs=-Xmx2048m
android.useAndroidX=false
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=false
# 保持与旧版Gradle插件的兼容
android.disableAutomaticComponentCreation=true

View File

@@ -17,3 +17,5 @@ org.gradle.jvmargs=-Xmx2048m
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
# 保持与旧版Gradle插件的兼容
android.disableAutomaticComponentCreation=true

View File

@@ -4,8 +4,8 @@ apply from: '../.winboll/winboll_lib_build.gradle'
apply from: '../.winboll/winboll_lint_build.gradle'
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
compileSdkVersion 32
buildToolsVersion "32.0.0"
defaultConfig {
minSdkVersion 26

View File

@@ -1,8 +1,8 @@
#Created by .winboll/winboll_app_build.gradle
#Sat Mar 15 15:29:07 HKT 2025
stageCount=3
#Mon Mar 24 08:04:27 HKT 2025
stageCount=9
libraryProject=libappbase
baseVersion=15.0
publishVersion=15.0.2
publishVersion=15.0.8
buildCount=0
baseBetaVersion=15.0.3
baseBetaVersion=15.0.9

View File

@@ -190,6 +190,7 @@ public class LogView extends RelativeLayout {
// 加载标签表
mListViewTags = findViewById(cc.winboll.studio.libappbase.R.id.tags_listview);
mListViewTags.setVerticalOffset(10);
mTAGListAdapter = new TAGListAdapter(mContext, mapTAGList);
mListViewTags.setAdapter(mTAGListAdapter);

View File

@@ -12,7 +12,9 @@ import android.widget.ListView;
import cc.winboll.studio.libappbase.LogUtils;
public class HorizontalListView extends ListView {
public static final String TAG = "HorizontalListView";
int verticalOffset = 0;
public HorizontalListView(Context context) {
super(context);
@@ -25,25 +27,10 @@ public class HorizontalListView extends ListView {
public HorizontalListView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
// @Override
// protected void onLayout(boolean changed, int l, int t, int r, int b) {
// super.onLayout(changed, l, t, r, b);
// int childCount = getChildCount();
// int left = getPaddingLeft();
// // 获取HorizontalListView的高度
// int viewHeight = getMeasuredHeight() - getPaddingTop() - getPaddingBottom();
// for (int i = 0; i < childCount; i++) {
// View child = getChildAt(i);
// int width = child.getMeasuredWidth();
// int height = child.getMeasuredHeight();
// // 计算子项在垂直方向上的居中偏移量
// int verticalOffset = (viewHeight - height) / 2;
// // 设置子视图的位置,实现水平布局并垂直居中
// child.layout(left, getPaddingTop() + verticalOffset, left + width, getPaddingTop() + verticalOffset + height);
// left += width;
// }
// }
//
public void setVerticalOffset(int verticalOffset) {
this.verticalOffset = verticalOffset;
}
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
@@ -52,7 +39,7 @@ public class HorizontalListView extends ListView {
int left = getPaddingLeft();
int viewHeight = getMeasuredHeight() - getPaddingTop() - getPaddingBottom();
LogUtils.d(TAG, String.format("HorizontalListView的高度 %d", viewHeight));
int verticalOffset = 20;
for (int i = 0; i < childCount; i++) {
View child = getChildAt(i);
// 计算每个子视图的宽度和高度
@@ -60,7 +47,7 @@ public class HorizontalListView extends ListView {
int height = child.getMeasuredHeight();
//LogUtils.d(TAG, String.format("child : width %d , height %d", width, height));
// 设置子视图的位置,实现水平布局
child.layout(left, verticalOffset, left + width, verticalOffset + height);
left += width;
}
@@ -68,15 +55,11 @@ public class HorizontalListView extends ListView {
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int newHeightMeasureSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
//super.onMeasure(widthMeasureSpec, newHeightMeasureSpec);
int newWidthMeasureSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
//LogUtils.d(TAG, String.format("newWidthMeasureSpec %d, newHeightMeasureSpec %d", newWidthMeasureSpec, newHeightMeasureSpec));
super.onMeasure(newWidthMeasureSpec, newHeightMeasureSpec);
// ViewGroup.LayoutParams params = getLayoutParams();
// params.width = getMeasuredWidth();
}
}

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<stroke
android:width="1dp"
android:color="#000000" /> <!-- 这里可调整边框宽度和颜色 -->
<solid android:color="@android:color/transparent" />
<corners
android:bottomLeftRadius="6dip"
android:bottomRightRadius="6dip"
android:topLeftRadius="6dip"
android:topRightRadius="6dip" />
</shape>

View File

@@ -10,8 +10,8 @@
<shape android:shape="rectangle" >
<gradient
android:angle="270"
android:endColor="#0F000000"
android:startColor="#0F000000" />
android:endColor="@color/colorAccent"
android:startColor="@color/colorAccent" />
<corners
android:bottomLeftRadius="6dip"
android:bottomRightRadius="6dip"

View File

@@ -5,18 +5,18 @@
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="#FFEEEEEE">
android:background="@drawable/bg_border_round">
<TextView
android:layout_width="wrap_content"
android:layout_height="24dp"
android:layout_marginLeft="5dp"
android:id="@+id/viewlogtagTextView1"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="@dimen/button_height"
android:layout_marginLeft="5dp"
android:id="@+id/viewlogtagTextView1"/>
<CheckBox
android:layout_width="wrap_content"
android:layout_height="24dp"
android:id="@+id/viewlogtagCheckBox1"/>
<CheckBox
android:layout_width="wrap_content"
android:layout_height="@dimen/button_height"
android:id="@+id/viewlogtagCheckBox1"/>
</LinearLayout>

View File

@@ -72,27 +72,29 @@
android:layout_below="@+id/viewlogRelativeLayoutToolbar"
android:id="@+id/viewlogLinearLayout1"
android:gravity="center_vertical"
android:background="#FFC0F4C2">
android:background="@drawable/bg_shadow">
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="@dimen/button_height"
android:text="ALL"
android:id="@+id/viewlogCheckBox1"/>
android:id="@+id/viewlogCheckBox1"
android:background="@drawable/bg_border_round"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"/>
<HorizontalScrollView
android:layout_width="0dp"
android:layout_height="match_parent"
android:background="@drawable/bg_border"
android:scrollbars="none"
android:layout_weight="1.0"
android:background="#FF97F2E3">
android:padding="5dp"
android:layout_weight="1.0">
<cc.winboll.studio.libappbase.views.HorizontalListView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@drawable/view_border"
android:id="@+id/tags_listview"
android:paddingLeft="10dp"/>
android:id="@+id/tags_listview"/>
</HorizontalScrollView>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- 定义一个名为text_size_normal的尺寸值为16sp -->
<dimen name="text_size_normal">16sp</dimen>
<!-- 定义一个名为margin_small的尺寸值为8dp -->
<dimen name="margin_small">8dp</dimen>
<!-- 定义一个名为image_width的尺寸值为200dp -->
<dimen name="button_height">24dp</dimen>
</resources>

View File

@@ -4,8 +4,8 @@ apply from: '../.winboll/winboll_lib_build.gradle'
apply from: '../.winboll/winboll_lint_build.gradle'
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
compileSdkVersion 32
buildToolsVersion "32.0.0"
defaultConfig {
minSdkVersion 26
@@ -23,20 +23,20 @@ dependencies {
api fileTree(dir: 'libs', include: ['*.jar'])
// 二维码类库
implementation 'com.google.zxing:core:3.4.1'
implementation 'com.journeyapps:zxing-android-embedded:3.6.0'
api 'com.google.zxing:core:3.4.1'
api 'com.journeyapps:zxing-android-embedded:3.6.0'
// 网络连接类库
//implementation 'com.squareup.okhttp3:okhttp:4.4.1'
//api 'com.squareup.okhttp3:okhttp:4.4.1'
// Html 解析
//implementation 'org.jsoup:jsoup:1.13.1'
//api 'org.jsoup:jsoup:1.13.1'
// SSH
//implementation 'com.jcraft:jsch:0.1.55'
//api 'com.jcraft:jsch:0.1.55'
// 应用介绍页类库
//implementation 'io.github.medyo:android-about-page:2.0.0'
//api 'io.github.medyo:android-about-page:2.0.0'
implementation 'cc.winboll.studio:libappbase:15.0.5'
api 'cc.winboll.studio:libappbase:15.0.5'
}

View File

@@ -1,8 +1,8 @@
#Created by .winboll/winboll_app_build.gradle
#Thu Mar 20 01:23:48 HKT 2025
stageCount=8
#Mon Mar 24 08:08:19 HKT 2025
stageCount=9
libraryProject=libapputils
baseVersion=15.0
publishVersion=15.0.7
publishVersion=15.0.8
buildCount=0
baseBetaVersion=15.0.8
baseBetaVersion=15.0.9

View File

@@ -0,0 +1,180 @@
package cc.winboll.studio.libapputils.util;
/**
* @Author ZhanGSKen@AliYun.Com
* @Date 2025/03/23 16:17:54
* @Describe 哔哔振动响铃工具集
*/
import android.content.Context;
import android.media.MediaPlayer;
import android.os.Build;
import android.os.Handler;
import android.os.Vibrator;
import android.os.VibratorManager;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class BBMorseCodeUtils {
public static final String TAG = "BBMorseCodeUtils";
// private static final int DOT_DURATION = 100; // 点时长 (ms)
// private static final int DASH_DURATION = 300; // 划时长 (ms)
// private static final int SYMBOL_GAP = 100; // 符号间隔 (ms)
// private static final int CHARACTER_GAP = 300; // 字符间隔 (ms)
// private static final int WORD_GAP = 700; // 单词间隔 (ms)
//
// private final Context context;
// private final Handler handler = new Handler();
// private boolean isPlaying = false;
//
// public BBMorseCodeUtils(Context context) {
// this.context = context.getApplicationContext();
// }
//
// public void playMorseCode(String morseCode, boolean vibrateEnabled, boolean ringEnabled) {
// if (isPlaying) return;
// isPlaying = true;
//
// List<List<String>> words = parseMorseCode(morseCode);
// startSequence(words, vibrateEnabled, ringEnabled);
// }
//
// private void startSequence(final List<List<String>> words, final boolean vibrateEnabled, final boolean ringEnabled) {
// final int[] wordIndex = {0};
// final int[] charIndex = {0};
// final int[] symbolIndex = {0};
//
// Runnable sequenceRunner = new Runnable() {
// @Override
// public void run() {
// if (wordIndex[0] >= words.size()) {
// stop();
// return;
// }
//
// List<String> characters = words.get(wordIndex[0]);
// if (charIndex[0] >= characters.size()) {
// charIndex[0] = 0;
// symbolIndex[0] = 0;
// wordIndex[0]++;
// handler.postDelayed(this, WORD_GAP);
// return;
// }
//
// String character = characters.get(charIndex[0]);
// if (symbolIndex[0] >= character.length()) {
// symbolIndex[0] = 0;
// charIndex[0]++;
// handler.postDelayed(this, CHARACTER_GAP);
// return;
// }
//
// char symbol = character.charAt(symbolIndex[0]);
// symbolIndex[0]++;
//
// long duration = (symbol == '.') ? DOT_DURATION : DASH_DURATION;
//
// // 执行振动
// if (vibrateEnabled) {
// vibrate(duration);
// }
//
// // 播放声音
// if (ringEnabled) {
// playSound(symbol, duration);
// }
//
// // 安排下一个符号
// handler.postDelayed(this, duration + SYMBOL_GAP);
// }
// };
//
// handler.post(sequenceRunner);
// }
//
// private void vibrate(long duration) {
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
// VibratorManager vibratorManager = context.getSystemService(VibratorManager.class);
// Vibrator vibrator = vibratorManager.getDefaultVibrator();
// vibrator.vibrate(duration);
// } else {
// Vibrator vibrator = context.getSystemService(Vibrator.class);
// if (vibrator != null && vibrator.hasVibrator()) {
// vibrator.vibrate(duration);
// }
// }
// }
//
// private void playSound(char symbol, long duration) {
// int soundRes = (symbol == '.') ? R.raw.morse_dot : R.raw.morse_dash;
// MediaPlayer mediaPlayer = MediaPlayer.create(context, soundRes);
//
// mediaPlayer.setOnPreparedListener(> {
// mp.start();
// handler.postDelayed(mp::stop, duration);
// });
//
// mediaPlayer.setOnCompletionListener(> {
// mp.release();
// });
// }
//
// private List<List<String>> parseMorseCode(String code) {
// List<List<String>> words = new ArrayList<>();
// String[] wordParts = code.split("/");
//
// for (String word : wordParts) {
// String[] chars = word.trim().split("\\s+");
// words.add(new ArrayList<>(Arrays.asList(chars)));
// }
// return words;
// }
//
// public void stop() {
// isPlaying = false;
// handler.removeCallbacksAndMessages(null);
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
// VibratorManager vibratorManager = context.getSystemService(VibratorManager.class);
// Vibrator vibrator = vibratorManager.getDefaultVibrator();
// vibrator.cancel();
// } else {
// Vibrator vibrator = context.getSystemService(Vibrator.class);
// if (vibrator != null) {
// vibrator.cancel();
// }
// }
// }
}
// 使用说明:
//
// 1. 在AndroidManifest.xml中添加权限
//
// xml
//
// <uses-permission android:name="android.permission.VIBRATE"/>
//  
//
// 2. 在res/raw目录下添加两个声音文件
//
// - morse_dot.wav短音
//
// - morse_dash.wav长音
//
// 3. 使用示例:
//
// java
//
// MorsePlayer morsePlayer = new MorsePlayer(this);
//morsePlayer.playMorseCode(".... . / .- --", true, true);
//
// 停止播放
// morsePlayer.stop();
// MorsePlayer morsePlayer = new MorsePlayer(this);
//morsePlayer.playMorseCode(".... . / .- --", true, true);
//
//// 停止播放
//// morsePlayer.stop();
//