diff --git a/powerbell/build.properties b/powerbell/build.properties index 2fed1875..ffec9c61 100644 --- a/powerbell/build.properties +++ b/powerbell/build.properties @@ -1,8 +1,8 @@ #Created by .winboll/winboll_app_build.gradle -#Wed Nov 19 09:09:24 HKT 2025 +#Wed Nov 19 11:20:40 GMT 2025 stageCount=4 libraryProject= baseVersion=15.11 publishVersion=15.11.3 -buildCount=0 +buildCount=11 baseBetaVersion=15.11.4 diff --git a/powerbell/src/main/AndroidManifest.xml b/powerbell/src/main/AndroidManifest.xml index af149d28..0844c9b2 100644 --- a/powerbell/src/main/AndroidManifest.xml +++ b/powerbell/src/main/AndroidManifest.xml @@ -1,13 +1,14 @@ - - - - - + + + + + + @@ -36,22 +37,22 @@ - + + - - + - - + - - + + + diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/unittest/BackgroundViewTestFragment.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/unittest/BackgroundViewTestFragment.java new file mode 100644 index 00000000..b6f0c576 --- /dev/null +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/unittest/BackgroundViewTestFragment.java @@ -0,0 +1,30 @@ +package cc.winboll.studio.powerbell.unittest; + +import android.os.Bundle; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import cc.winboll.studio.libappbase.ToastUtils; +import cc.winboll.studio.powerbell.R; + +/** + * @Author ZhanGSKen&豆包大模型 + * @Date 2025/11/19 18:16 + * @Describe BackgroundViewTestFragment + */ +public class BackgroundViewTestFragment extends BaseTestFragment { + + public static final String TAG = "BackgroundViewTestFragment"; + + View mainView; + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { + super.onCreateView(inflater, container, savedInstanceState); + mainView = inflater.inflate(R.layout.fragment_test_backgroundview, container, false); + + ToastUtils.show(String.format("%s onCreate", TAG)); + + return mainView; + } +} diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/unittest/BaseTestFragment.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/unittest/BaseTestFragment.java new file mode 100644 index 00000000..2dcd29fe --- /dev/null +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/unittest/BaseTestFragment.java @@ -0,0 +1,33 @@ +package cc.winboll.studio.powerbell.unittest; + +/** + * @Author ZhanGSKen&豆包大模型 + * @Date 2025/11/19 18:56 + * @Describe BaseTestFragment + */ +import android.os.Bundle; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import androidx.fragment.app.Fragment; +import cc.winboll.studio.libappbase.GlobalApplication; +import cc.winboll.studio.libappbase.ToastUtils; + +public class BaseTestFragment extends Fragment { + + public static final String TAG = "BaseTestFragment"; + + View mainView; + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { + // 非调试状态就结束本线程 + if (!GlobalApplication.isDebugging()) { + Thread.currentThread().destroy(); + } + + ToastUtils.show(String.format("%s onCreate", TAG)); + + return super.onCreateView(inflater, container, savedInstanceState); + } +} diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/unittest/MainUnitTestActivity.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/unittest/MainUnitTestActivity.java new file mode 100644 index 00000000..a5c91248 --- /dev/null +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/unittest/MainUnitTestActivity.java @@ -0,0 +1,39 @@ +package cc.winboll.studio.powerbell.unittest; + +import android.os.Bundle; +import android.widget.FrameLayout; +import androidx.appcompat.app.AppCompatActivity; +import cc.winboll.studio.libappbase.GlobalApplication; +import cc.winboll.studio.powerbell.R; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentTransaction; +import android.nfc.tech.TagTechnology; +import cc.winboll.studio.libappbase.ToastUtils; + +/** + * @Author ZhanGSKen&豆包大模型 + * @Date 2025/11/19 18:04 + * @Describe 单元测试启动主页窗口 + */ +public class MainUnitTestActivity extends AppCompatActivity { + + public static final String TAG = "MainUnitTestActivity"; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + // 非调试状态就退出 + if (!GlobalApplication.isDebugging()) { + finish(); + } + setContentView(R.layout.activity_mainunittest); + + FragmentManager fragmentManager = getSupportFragmentManager(); + FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction(); + fragmentTransaction.add(R.id.activitymainunittestFrameLayout1, new BackgroundViewTestFragment(), BackgroundViewTestFragment.TAG); + fragmentTransaction.commit(); + + ToastUtils.show(String.format("%s onCreate", TAG)); + } + +} diff --git a/powerbell/src/main/java/cc/winboll/studio/powerbell/views/BackgroundView.java b/powerbell/src/main/java/cc/winboll/studio/powerbell/views/BackgroundView.java new file mode 100644 index 00000000..3c34576e --- /dev/null +++ b/powerbell/src/main/java/cc/winboll/studio/powerbell/views/BackgroundView.java @@ -0,0 +1,50 @@ +package cc.winboll.studio.powerbell.views; + +import android.content.Context; +import android.util.AttributeSet; +import android.view.View; +import android.widget.LinearLayout; +import cc.winboll.studio.powerbell.R; + +/** + * @Author ZhanGSKen&豆包大模型 + * @Date 2025/11/19 18:01 + * @Describe 背景图片视图控件 + */ +public class BackgroundView extends LinearLayout { + + public static final String TAG = "BackgroundView"; + + Context mContext; + View mMianView; + + public BackgroundView(Context context) { + super(context); + this.mContext = context; + initView(); + } + + public BackgroundView(Context context, AttributeSet attrs) { + super(context, attrs); + this.mContext = context; + initView(); + } + + public BackgroundView(Context context, AttributeSet attrs, int defStyleAttr) { + super(context, attrs, defStyleAttr); + this.mContext = context; + initView(); + } + + public BackgroundView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { + super(context, attrs, defStyleAttr, defStyleRes); + this.mContext = context; + initView(); + } + + void initView() { + this.mMianView = inflate(this.mContext, R.layout.view_background, this); + //addView(this.mMianView); + } + +} diff --git a/powerbell/src/main/res/layout/activity_mainunittest.xml b/powerbell/src/main/res/layout/activity_mainunittest.xml new file mode 100644 index 00000000..f9adbc36 --- /dev/null +++ b/powerbell/src/main/res/layout/activity_mainunittest.xml @@ -0,0 +1,15 @@ + + + + + + + diff --git a/powerbell/src/main/res/layout/fragment_test_backgroundview.xml b/powerbell/src/main/res/layout/fragment_test_backgroundview.xml new file mode 100644 index 00000000..2cc148e7 --- /dev/null +++ b/powerbell/src/main/res/layout/fragment_test_backgroundview.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + diff --git a/powerbell/src/main/res/layout/view_background.xml b/powerbell/src/main/res/layout/view_background.xml new file mode 100644 index 00000000..a0b1058d --- /dev/null +++ b/powerbell/src/main/res/layout/view_background.xml @@ -0,0 +1,17 @@ + + + + + + +