Merge branch 'appbase' into apputils
This commit is contained in:
commit
67d91aaf6c
@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Sat Mar 15 15:30:02 HKT 2025
|
||||
stageCount=3
|
||||
#Thu Mar 20 16:41:52 GMT 2025
|
||||
stageCount=6
|
||||
libraryProject=libappbase
|
||||
baseVersion=15.0
|
||||
publishVersion=15.0.2
|
||||
buildCount=0
|
||||
baseBetaVersion=15.0.3
|
||||
publishVersion=15.0.5
|
||||
buildCount=4
|
||||
baseBetaVersion=15.0.6
|
||||
|
@ -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
|
||||
|
@ -179,16 +179,16 @@
|
||||
|
||||
</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>
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
26
build.gradle
26
build.gradle
@ -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 {
|
||||
|
@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Sat Mar 15 15:29:07 HKT 2025
|
||||
stageCount=3
|
||||
#Thu Mar 20 16:41:52 GMT 2025
|
||||
stageCount=6
|
||||
libraryProject=libappbase
|
||||
baseVersion=15.0
|
||||
publishVersion=15.0.2
|
||||
buildCount=0
|
||||
baseBetaVersion=15.0.3
|
||||
publishVersion=15.0.5
|
||||
buildCount=4
|
||||
baseBetaVersion=15.0.6
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
// 计算每个子视图的宽度和高度
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
13
libappbase/src/main/res/drawable/bg_border_round.xml
Normal file
13
libappbase/src/main/res/drawable/bg_border_round.xml
Normal 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>
|
@ -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"
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
9
libappbase/src/main/res/values/dimens.xml
Normal file
9
libappbase/src/main/res/values/dimens.xml
Normal 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>
|
Loading…
x
Reference in New Issue
Block a user