Compare commits

...

16 Commits

Author SHA1 Message Date
ZhanGSKen
e8921350fd <aes>APK 7.6.7 release Publish. 2025-03-09 11:28:39 +08:00
ZhanGSKen
3765154f60 优化百分比拉动seekbar控件 2025-03-09 11:27:27 +08:00
ZhanGSKen
8be7a931eb Merge branch 'appbase' into aes 2025-03-09 09:35:22 +08:00
ZhanGSKen
5623d2d341 <libappbase>Library Release 2.1.5 2025-03-09 09:15:47 +08:00
ZhanGSKen
3d9b203760 <appbase>APK 2.1.5 release Publish. 2025-03-09 09:15:24 +08:00
ZhanGSKen
498a8ae458 更新Gradle配置 2025-03-09 09:13:51 +08:00
ZhanGSKen
9b8d6ad46b <libappbase>Library Release 2.1.4 2025-03-08 04:46:49 +08:00
ZhanGSKen
482f289df3 <appbase>APK 2.1.4 release Publish. 2025-03-08 04:46:23 +08:00
ZhanGSKen
28ab4e2859 修复日志时间显示BUG 2025-03-08 04:45:18 +08:00
ZhanGSKen
c55183b10c <libaes>Library Release 7.6.6 2025-03-08 04:21:39 +08:00
ZhanGSKen
fd0cb05812 <libappbase>Library Release 2.1.3 2025-03-08 03:55:19 +08:00
ZhanGSKen
39b6c0ec89 <appbase>APK 2.1.3 release Publish. 2025-03-08 03:54:56 +08:00
ZhanGSKen
3b3ddbc8c9 更改类库引用方式。 2025-03-08 03:54:03 +08:00
ZhanGSKen
38aee09f87 <libappbase>Library Release 2.1.2 2025-03-08 03:38:53 +08:00
ZhanGSKen
89c4d00091 <appbase>APK 2.1.2 release Publish. 2025-03-08 03:38:29 +08:00
ZhanGSKen
4f57678012 更改类库引用方式 2025-03-08 03:37:30 +08:00
14 changed files with 225 additions and 103 deletions

View File

@@ -76,6 +76,6 @@ dependencies {
implementation 'androidx.fragment:fragment:1.1.0'
implementation 'com.google.android.material:material:1.4.0'
implementation 'cc.winboll.studio:libappbase:2.1.3'
implementation 'cc.winboll.studio:libapputils:9.4.2'
implementation 'cc.winboll.studio:libappbase:2.1.5'
implementation 'cc.winboll.studio:libapputils:9.4.4'
}

View File

@@ -1,8 +1,8 @@
#Created by .winboll/winboll_app_build.gradle
#Sat Mar 08 04:21:16 HKT 2025
stageCount=7
#Sun Mar 09 11:28:39 HKT 2025
stageCount=8
libraryProject=libaes
baseVersion=7.6
publishVersion=7.6.6
publishVersion=7.6.7
buildCount=0
baseBetaVersion=7.6.7
baseBetaVersion=7.6.8

View File

@@ -44,8 +44,8 @@ android {
}
dependencies {
implementation project(':libappbase')
implementation fileTree(dir: 'libs', include: ['*.jar'])
api project(':libappbase')
api fileTree(dir: 'libs', include: ['*.jar'])
// SSH
implementation 'com.jcraft:jsch:0.1.55'
@@ -60,7 +60,6 @@ dependencies {
implementation 'com.github.getActivity:ToastUtils:10.5'
// 网络连接类库
implementation 'com.squareup.okhttp3:okhttp:4.4.1'
// Android 类库
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.viewpager:viewpager:1.0.0'

View File

@@ -1,8 +1,8 @@
#Created by .winboll/winboll_app_build.gradle
#Sat Mar 08 02:31:11 HKT 2025
stageCount=2
#Sun Mar 09 09:15:39 HKT 2025
stageCount=6
libraryProject=libappbase
baseVersion=2.1
publishVersion=2.1.1
publishVersion=2.1.5
buildCount=0
baseBetaVersion=2.1.2
baseBetaVersion=2.1.6

View File

@@ -1,12 +1,6 @@
// 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/' }
@@ -15,6 +9,13 @@ 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 {
@@ -26,19 +27,6 @@ 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://mirrors.tencent.com/repository/maven/tencent_public/"
}
maven {
url "https://mirrors.tencent.com/repository/maven/tencent_public_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/' }
@@ -47,6 +35,13 @@ 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

@@ -51,6 +51,6 @@ dependencies {
implementation 'androidx.fragment:fragment:1.1.0'
implementation 'com.google.android.material:material:1.4.0'
implementation 'cc.winboll.studio:libappbase:2.1.3'
implementation 'cc.winboll.studio:libapputils:9.4.2'
implementation 'cc.winboll.studio:libappbase:2.1.5'
implementation 'cc.winboll.studio:libapputils:9.4.4'
}

View File

@@ -1,8 +1,8 @@
#Created by .winboll/winboll_app_build.gradle
#Sat Mar 08 04:21:16 HKT 2025
stageCount=7
#Sun Mar 09 11:28:39 HKT 2025
stageCount=8
libraryProject=libaes
baseVersion=7.6
publishVersion=7.6.6
publishVersion=7.6.7
buildCount=0
baseBetaVersion=7.6.7
baseBetaVersion=7.6.8

View File

@@ -19,10 +19,13 @@ import cc.winboll.studio.libaes.R;
import cc.winboll.studio.libaes.views.AOHPCTCSeekBar;
import java.util.ArrayList;
import java.util.List;
import cc.winboll.studio.libappbase.LogView;
public class TestViewPageFragment extends Fragment implements ViewPager.OnPageChangeListener, View.OnClickListener {
public static final String TAG = "TestViewPageFragment";
LogView mLogView;
private ViewPager viewPager;
private List<View> views; //用来存放放进ViewPager里面的布局
@@ -36,6 +39,9 @@ public class TestViewPageFragment extends Fragment implements ViewPager.OnPageCh
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
mView = inflater.inflate(R.layout.fragment_viewpage, container, false);
mLogView = mView.findViewById(R.id.logview);
mLogView.start();
//viewPager = findViewById(R.id.activitymainViewPager1);
initData();
@@ -60,6 +66,7 @@ public class TestViewPageFragment extends Fragment implements ViewPager.OnPageCh
initPoint();//初始化页面下方的点
viewPager.setOnPageChangeListener(this);
initAOHPCTCSeekBar();
initAOHPCTCSeekBar2();
}
//初始化所要显示的布局
@@ -187,7 +194,9 @@ public class TestViewPageFragment extends Fragment implements ViewPager.OnPageCh
void initAOHPCTCSeekBar() {
AOHPCTCSeekBar seekbar = mView.findViewById(R.id.fragmentviewpageAOHPCTCSeekBar1);
seekbar.setThumb(getActivity().getDrawable(R.drawable.ic_launcher));
seekbar.setThumbOffset(10);
//seekbar.setThumbOffset(200);
//seekbar.setThumbOffset(1);
seekbar.setBlurRightDP(50);
seekbar.setOnOHPCListener(new AOHPCTCSeekBar.OnOHPCListener() {
@Override
@@ -196,4 +205,19 @@ public class TestViewPageFragment extends Fragment implements ViewPager.OnPageCh
}
});
}
void initAOHPCTCSeekBar2() {
AOHPCTCSeekBar seekbar = mView.findViewById(R.id.fragmentviewpageAOHPCTCSeekBar2);
seekbar.setThumb(getActivity().getDrawable(R.drawable.ic_call));
//seekbar.setThumbOffset(200);
//seekbar.setThumbOffset(1);
seekbar.setBlurRightDP(50);
seekbar.setOnOHPCListener(new AOHPCTCSeekBar.OnOHPCListener() {
@Override
public void onOHPCommit() {
Toast.makeText(getActivity(), "onOHPCommit 2", Toast.LENGTH_SHORT).show();
}
});
}
}

View File

@@ -6,18 +6,28 @@ package cc.winboll.studio.libaes.views;
* @Describe AOneHundredPercantClickToCommitSeekBar
*/
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.SeekBar;
import cc.winboll.studio.libappbase.LogUtils;
public class AOHPCTCSeekBar extends SeekBar {
public static final String TAG = "AOHPCTCSeekBar";
Context mContext;
int thumbWidth = 1;
int progressBarWidth = 1;
// 设置按钮模糊右边边缘像素
int blurRightDP = 1;
// 可开始拉动的起始位置(百分比值)
static final int ENABLE_POST_PERCENT_X = 20;
//static final int ENABLE_POST_PERCENT_X = 20;
//int seekablePosition;
// 最小拉动值,滑块拉动值要超过这个值,确定事件才会提交。
static final int TO_MIN_VALUE = 15;
//static final int TO_MIN_VALUE = 15;
// 外部接口对象,确定事件提交会调用该对象的方法
OnOHPCListener mOnOHPCListener;
// 是否从起点拉动的标志
@@ -25,6 +35,10 @@ public class AOHPCTCSeekBar extends SeekBar {
// 拉动的滑动值
int mnTo = 0;
public void setBlurRightDP(int blurRight) {
this.blurRightDP = blurRight;
}
public void setOnOHPCListener(OnOHPCListener listener) {
mOnOHPCListener = listener;
}
@@ -35,10 +49,12 @@ public class AOHPCTCSeekBar extends SeekBar {
public AOHPCTCSeekBar(Context context) {
super(context);
initView(context);
}
public AOHPCTCSeekBar(Context context, AttributeSet attrs) {
super(context, attrs);
initView(context);
//LogUtils.d(TAG, "AOHPCTCSeekBar(...)");
@@ -61,12 +77,23 @@ public class AOHPCTCSeekBar extends SeekBar {
public AOHPCTCSeekBar(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
initView(context);
}
void initView(Context context) {
LogUtils.d(TAG, "initView(...)");
mContext = context;
// Drawable thumbDrawable = getThumb();
// if (thumbDrawable!= null) {
// int iconWidth = thumbDrawable.getIntrinsicWidth();
// LogUtils.d(TAG, String.format("iconWidth %d", iconWidth));
// seekablePosition = iconWidth;
// }
}
@Override
protected void onFinishInflate() {
super.onFinishInflate();
}
@Override
@@ -74,33 +101,52 @@ public class AOHPCTCSeekBar extends SeekBar {
if (event.getAction() == MotionEvent.ACTION_DOWN) {
//LogUtils.d(TAG, "ACTION_DOWN");
// 有效的拖动起始位置(ENABLE_POST_PERCENT_X)%
int nEnablePostX = ((getRight() - getLeft()) * ENABLE_POST_PERCENT_X / 100) + getLeft();
if ((getLeft() < event.getX())
&& (event.getX() < nEnablePostX)) {
//LogUtils.d(TAG, "event.getX() is " + Float.toString(event.getX()));
//int nEnablePostX = ((getRight() - getLeft()) * ENABLE_POST_PERCENT_X / 100) + getLeft();
//int nEnablePostX = ((getRight() - getLeft()) * seekablePosition / 100) + getLeft();
/*LogUtils.d(TAG, "event.getX() is " + Float.toString(event.getX()));
LogUtils.d(TAG, String.format("thumbWidth %d progressBarWidth %d", thumbWidth, progressBarWidth));
LogUtils.d(TAG, String.format("mIsStartTo %s", mIsStartTo));
*/
if (thumbWidth + blurRightDP > event.getX() && event.getX() > 0) {
mIsStartTo = true;
return super.dispatchTouchEvent(event);
}
if (!mIsStartTo) {
resetView();
return false;
return true;
//return super.dispatchTouchEvent(event);
}
// if (!mIsStartTo) {
// resetView();
// return false;
// }
} else if (event.getAction() == MotionEvent.ACTION_MOVE) {
//LogUtils.d(TAG, "ACTION_MOVE");
/*LogUtils.d(TAG, "event.getX() is " + Float.toString(event.getX()));
LogUtils.d(TAG, String.format("thumbWidth %d progressBarWidth %d", thumbWidth, progressBarWidth));
LogUtils.d(TAG, String.format("mIsStartTo %s", mIsStartTo));
*/
if (mIsStartTo) {
mnTo++;
return super.dispatchTouchEvent(event);
} else {
return false;
}
} else if (event.getAction() == MotionEvent.ACTION_UP) {
} else if (event.getAction() == MotionEvent.ACTION_UP
|| event.getAction() == MotionEvent.ACTION_CANCEL) {
//LogUtils.d(TAG, Integer.toString(getProgress()));
// 提交100%确定事件
if ((getProgress() == 100) && (mnTo > TO_MIN_VALUE)) {
//LogUtils.d(TAG, "Commit mnTo is " + Integer.toString(mnTo));
mOnOHPCListener.onOHPCommit();
//resetView();
//return true;
}
resetView();
// if (getProgress() == progressBarWidth) {
// //((getProgress() == 100) && (mnTo > TO_MIN_VALUE)) {
// //LogUtils.d(TAG, "Commit mnTo is " + Integer.toString(mnTo));
// mOnOHPCListener.onOHPCommit();
// resetView();
// //return true;
// } else {
// resetView();
// mIsStartTo = false;
// }
//
if (getProgress() == progressBarWidth) {
mOnOHPCListener.onOHPCommit();
}
mIsStartTo = false;
resetView();
return false;
}
//LogUtils.d(TAG, "dispatchTouchEvent End");
@@ -114,4 +160,31 @@ public class AOHPCTCSeekBar extends SeekBar {
mnTo = 0;
mIsStartTo = false;
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
int width = MeasureSpec.getSize(widthMeasureSpec);
int height = MeasureSpec.getSize(heightMeasureSpec);
LogUtils.d(TAG, String.format("width %d height %d", width, height));
// 使用width和height进行后续操作
// 获取SeekBar的图标
Drawable thumbDrawable = getThumb();
if (thumbDrawable != null) {
// 获取图标宽度
thumbWidth = thumbDrawable.getIntrinsicWidth();
// 获取进度条宽度
progressBarWidth = width;//getWidth();// - getPaddingLeft() - getPaddingRight();
// 计算百分比
//float percentage = (float) thumbWidth / progressBarWidth * 100;
LogUtils.d(TAG, String.format("thumbWidth %d progressBarWidth %d", thumbWidth, progressBarWidth));
//LogUtils.d(TAG, String.format("Thumb width / ProgressBar width percentage: %f", percentage));
//seekablePosition = (int)percentage;
setThumbOffset(0);
setMax(progressBarWidth);
}
}
}

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24"
android:viewportWidth="24">
<path
android:fillColor="#ff000000"
android:pathData="M6.62,10.79C8.06,13.62 10.38,15.94 13.21,17.38L15.41,15.18C15.69,14.9 16.08,14.82 16.43,14.93C17.55,15.3 18.75,15.5 20,15.5A1,1 0,0 1,21 16.5V20A1,1 0,0 1,20 21A17,17 0,0 1,3 4A1,1 0,0 1,4 3H7.5A1,1 0,0 1,8.5 4C8.5,5.25 8.7,6.45 9.07,7.57C9.18,7.92 9.1,8.31 8.82,8.59L6.62,10.79Z"/>
</vector>

View File

@@ -2,7 +2,7 @@
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical">
@@ -12,49 +12,69 @@
android:layout_height="wrap_content"
android:text="AOHPCTCSeekBar"/>
<cc.winboll.studio.libaes.views.AOHPCTCSeekBar
android:layout_width="300dp"
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/fragmentviewpageAOHPCTCSeekBar1"/>
android:gravity="center">
<androidx.viewpager.widget.ViewPager
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1.0"
android:id="@+id/fragmentviewpageViewPager1"/>
<cc.winboll.studio.libaes.views.AOHPCTCSeekBar
android:layout_width="300dp"
android:layout_height="wrap_content"
android:id="@+id/fragmentviewpageAOHPCTCSeekBar1"
android:padding="10dp"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="60dp"
android:orientation="horizontal"
android:gravity="center"
android:id="@+id/fragmentviewpageLinearLayout1">
<cc.winboll.studio.libaes.views.AOHPCTCSeekBar
android:layout_width="300dp"
android:layout_height="wrap_content"
android:id="@+id/fragmentviewpageAOHPCTCSeekBar2"
android:padding="10dp"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
tools:ignore="ContentDescription"/>
</LinearLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
tools:ignore="ContentDescription"/>
<androidx.viewpager.widget.ViewPager
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1.0"
android:id="@+id/fragmentviewpageViewPager1"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
tools:ignore="ContentDescription"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="60dp"
android:orientation="horizontal"
android:gravity="center"
android:id="@+id/fragmentviewpageLinearLayout1">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
tools:ignore="ContentDescription"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
tools:ignore="ContentDescription"/>
</LinearLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
tools:ignore="ContentDescription"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
tools:ignore="ContentDescription"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
tools:ignore="ContentDescription"/>
</LinearLayout>
<cc.winboll.studio.libappbase.LogView
android:layout_width="match_parent"
android:layout_height="300dp"
android:id="@+id/logview"/>
</LinearLayout>

View File

@@ -20,7 +20,7 @@ android {
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
api fileTree(dir: 'libs', include: ['*.jar'])
// SSH
implementation 'com.jcraft:jsch:0.1.55'

View File

@@ -1,8 +1,8 @@
#Created by .winboll/winboll_app_build.gradle
#Sat Mar 08 02:31:02 HKT 2025
stageCount=2
#Sun Mar 09 09:15:24 HKT 2025
stageCount=6
libraryProject=libappbase
baseVersion=2.1
publishVersion=2.1.1
publishVersion=2.1.5
buildCount=0
baseBetaVersion=2.1.2
baseBetaVersion=2.1.6

View File

@@ -38,7 +38,7 @@ public class LogUtils {
static volatile boolean _IsInited = false;
static Context _mContext;
// 日志显示时间格式
static SimpleDateFormat mSimpleDateFormat = new SimpleDateFormat("[yyyyMMdd_HHmmSS]", Locale.getDefault());
static SimpleDateFormat mSimpleDateFormat = new SimpleDateFormat("[yyyyMMdd_HHmmss_SSS]", Locale.getDefault());
// 应用日志文件夹
static File _mfLogCacheDir;
static File _mfLogDataDir;