Compare commits

..

24 Commits

Author SHA1 Message Date
ZhanGSKen
b13a3d4866 <aes>APK 7.6.10 release Publish. 2025-03-09 13:56:19 +08:00
ZhanGSKen
57973b7210 修改百分比拉动控件除了图标以外的区域的响应逻辑 2025-03-09 13:55:25 +08:00
ZhanGSKen
f30470e46f <libaes>Library Release 7.6.9 2025-03-09 13:47:14 +08:00
ZhanGSKen
7c6dc87cf4 <aes>APK 7.6.9 release Publish. 2025-03-09 13:45:52 +08:00
ZhanGSKen
4756226a56 提高百分比拉动进度条与ViewPager兼容度 2025-03-09 13:44:44 +08:00
ZhanGSKen
334da43001 <libaes>Library Release 7.6.8 2025-03-09 11:30:22 +08:00
ZhanGSKen
d83abd7c83 <aes>APK 7.6.8 release Publish. 2025-03-09 11:30:09 +08:00
ZhanGSKen
cd24504131 <libaes>Library Release 7.6.7 2025-03-09 11:28:58 +08:00
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
15 changed files with 185 additions and 145 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 13:56:19 HKT 2025
stageCount=11
libraryProject=libaes
baseVersion=7.6
publishVersion=7.6.6
publishVersion=7.6.10
buildCount=0
baseBetaVersion=7.6.7
baseBetaVersion=7.6.11

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 13:56:19 HKT 2025
stageCount=11
libraryProject=libaes
baseVersion=7.6
publishVersion=7.6.6
publishVersion=7.6.10
buildCount=0
baseBetaVersion=7.6.7
baseBetaVersion=7.6.11

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();
}
//初始化所要显示的布局
@@ -185,9 +192,11 @@ public class TestViewPageFragment extends Fragment implements ViewPager.OnPageCh
}
void initAOHPCTCSeekBar() {
AOHPCTCSeekBar seekbar = mView.findViewById(R.id.fragmentviewpageAOHPCTCSeekBar1);
AOHPCTCSeekBar seekbar = views.get(3).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 = views.get(3).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,24 +6,30 @@ 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";
// 可开始拉动的起始位置(百分比值)
static final int ENABLE_POST_PERCENT_X = 20;
// 最小拉动值,滑块拉动值要超过这个值,确定事件才会提交。
static final int TO_MIN_VALUE = 15;
volatile int thumbWidth = 1;
volatile int progressBarWidth = 1;
// 设置按钮模糊右边边缘像素
volatile int blurRightDP = 1;
// 是否从起点拉动的标志
volatile boolean isStartSeek = false;
// 外部接口对象,确定事件提交会调用该对象的方法
OnOHPCListener mOnOHPCListener;
// 是否从起点拉动的标志
boolean mIsStartTo = false;
// 拉动的滑动值
int mnTo = 0;
public void setBlurRightDP(int blurRight) {
this.blurRightDP = blurRight;
}
public void setOnOHPCListener(OnOHPCListener listener) {
mOnOHPCListener = listener;
@@ -35,83 +41,69 @@ public class AOHPCTCSeekBar extends SeekBar {
public AOHPCTCSeekBar(Context context) {
super(context);
initView(context);
}
public AOHPCTCSeekBar(Context context, AttributeSet attrs) {
super(context, attrs);
//LogUtils.d(TAG, "AOHPCTCSeekBar(...)");
// 获得TypedArray
//TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.AToolbar);
// 获得attrs.xml里面的属性值,格式为:名称_属性名,后面是默认值
//int colorBackgroud = a.getColor(R.styleable.ACard_backgroudColor, context.getColor(R.color.colorACardBackgroung));
//int centerColor = a.getColor(R.styleable.AToolbar_centerColor, context.getColor(R.color.colorAToolbarCenterColor));
//int endColor = a.getColor(R.styleable.AToolbar_endColor, context.getColor(R.color.colorAToolbarEndColor));
//float tSize = a.getDimension(R.styleable.CustomView_tSize, 35);
//p.setColor(tColor);
//p.setTextSize(tSize);
//Drawable drawable = context.getDrawable(R.drawable.frame_atoolbar);
//setBackground(context.getDrawable(R.drawable.acard_frame_main));
// 返回一个绑定资源结束的信号给资源
//a.recycle();
initView(context);
}
public AOHPCTCSeekBar(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
initView(context);
}
@Override
protected void onFinishInflate() {
super.onFinishInflate();
void initView(Context context) {
}
@Override
public boolean dispatchTouchEvent(MotionEvent event) {
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()));
mIsStartTo = true;
return super.dispatchTouchEvent(event);
}
if (!mIsStartTo) {
resetView();
return false;
if (thumbWidth + blurRightDP > event.getX() && event.getX() > 0) {
getParent().requestDisallowInterceptTouchEvent(true);
isStartSeek = true;
}
} else if (event.getAction() == MotionEvent.ACTION_MOVE) {
//LogUtils.d(TAG, "ACTION_MOVE");
if (mIsStartTo) {
mnTo++;
if (isStartSeek) {
super.dispatchTouchEvent(event);
}
} else if (event.getAction() == MotionEvent.ACTION_UP) {
//LogUtils.d(TAG, Integer.toString(getProgress()));
// 提交100%确定事件
if ((getProgress() == 100) && (mnTo > TO_MIN_VALUE)) {
//LogUtils.d(TAG, "Commit mnTo is " + Integer.toString(mnTo));
} else if (event.getAction() == MotionEvent.ACTION_UP
|| event.getAction() == MotionEvent.ACTION_CANCEL) {
getParent().requestDisallowInterceptTouchEvent(false);
if (getProgress() == progressBarWidth) {
mOnOHPCListener.onOHPCommit();
//resetView();
//return true;
}
resetView();
return false;
// 重置控件状态
setProgress(0);
isStartSeek = false;
}
//LogUtils.d(TAG, "dispatchTouchEvent End");
return super.dispatchTouchEvent(event);
return true;
}
// 重置控件状态
//
void resetView() {
setProgress(0);
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));
// 获取SeekBar的图标宽度
Drawable thumbDrawable = getThumb();
if (thumbDrawable != null) {
// 获取图标宽度
thumbWidth = thumbDrawable.getIntrinsicWidth();
}
// 获取进度条宽度
progressBarWidth = width;
//LogUtils.d(TAG, String.format("thumbWidth %d progressBarWidth %d", thumbWidth, progressBarWidth));
// 设置图标位置
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,49 @@
android:layout_height="wrap_content"
android:text="AOHPCTCSeekBar"/>
<cc.winboll.studio.libaes.views.AOHPCTCSeekBar
android:layout_width="300dp"
android:layout_height="wrap_content"
android:id="@+id/fragmentviewpageAOHPCTCSeekBar1"/>
<androidx.viewpager.widget.ViewPager
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1.0"
android:id="@+id/fragmentviewpageViewPager1"/>
<androidx.viewpager.widget.ViewPager
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1.0"
android:id="@+id/fragmentviewpageViewPager1"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="60dp"
android:orientation="horizontal"
android:gravity="center"
android:id="@+id/fragmentviewpageLinearLayout1">
<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"/>
<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"/>
<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>
</LinearLayout>
<cc.winboll.studio.libappbase.LogView
android:layout_width="match_parent"
android:layout_height="300dp"
android:id="@+id/logview"/>
</LinearLayout>

View File

@@ -11,6 +11,25 @@
android:layout_height="wrap_content"
android:text="AOHPCTCSeekBar"/>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center">
<cc.winboll.studio.libaes.views.AOHPCTCSeekBar
android:layout_width="300dp"
android:layout_height="wrap_content"
android:id="@+id/fragmentviewpageAOHPCTCSeekBar1"
android:padding="10dp"/>
<cc.winboll.studio.libaes.views.AOHPCTCSeekBar
android:layout_width="300dp"
android:layout_height="wrap_content"
android:id="@+id/fragmentviewpageAOHPCTCSeekBar2"
android:padding="10dp"/>
</LinearLayout>
</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;