添加横幅广告类的调试框架
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
#Created by .winboll/winboll_app_build.gradle
|
#Created by .winboll/winboll_app_build.gradle
|
||||||
#Thu Nov 13 05:16:31 HKT 2025
|
#Mon Nov 17 13:13:22 GMT 2025
|
||||||
stageCount=1
|
stageCount=1
|
||||||
libraryProject=libappbase
|
libraryProject=libappbase
|
||||||
baseVersion=15.11
|
baseVersion=15.11
|
||||||
publishVersion=15.11.0
|
publishVersion=15.11.0
|
||||||
buildCount=0
|
buildCount=6
|
||||||
baseBetaVersion=15.11.1
|
baseBetaVersion=15.11.1
|
||||||
|
|||||||
@@ -11,51 +11,67 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/toolbar"/>
|
android:id="@+id/toolbar"/>
|
||||||
|
|
||||||
<LinearLayout
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1.0">
|
||||||
android:orientation="vertical"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:spacing="12dp">
|
|
||||||
|
|
||||||
<Button
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="应用崩溃测试"
|
android:orientation="vertical"
|
||||||
android:textSize="16sp"
|
android:gravity="center_vertical"
|
||||||
android:textColor="@android:color/white"
|
android:spacing="12dp">
|
||||||
android:background="#81C7F5"
|
|
||||||
android:paddingVertical="12dp"
|
|
||||||
android:layout_marginHorizontal="24dp"
|
|
||||||
android:onClick="onCrashTest"
|
|
||||||
android:layout_margin="10dp"/>
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="应用日志测试"
|
android:text="应用崩溃测试"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:background="#81C7F5"
|
android:background="#81C7F5"
|
||||||
android:paddingVertical="12dp"
|
android:paddingVertical="12dp"
|
||||||
android:layout_marginHorizontal="24dp"
|
android:layout_marginHorizontal="24dp"
|
||||||
android:onClick="onLogTest"
|
android:onClick="onCrashTest"
|
||||||
android:layout_margin="10dp"/>
|
android:layout_margin="10dp"/>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="应用吐司测试"
|
android:text="应用日志测试"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:background="#81C7F5"
|
android:background="#81C7F5"
|
||||||
android:paddingVertical="12dp"
|
android:paddingVertical="12dp"
|
||||||
android:layout_marginHorizontal="24dp"
|
android:layout_marginHorizontal="24dp"
|
||||||
android:onClick="onToastUtilsTest"
|
android:onClick="onLogTest"
|
||||||
android:layout_margin="10dp"/>
|
android:layout_margin="10dp"/>
|
||||||
|
|
||||||
</LinearLayout>
|
<Button
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="应用吐司测试"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:background="#81C7F5"
|
||||||
|
android:paddingVertical="12dp"
|
||||||
|
android:layout_marginHorizontal="24dp"
|
||||||
|
android:onClick="onToastUtilsTest"
|
||||||
|
android:layout_margin="10dp"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="ADs Demo"/>
|
||||||
|
|
||||||
|
<cc.winboll.studio.libappbase.ads.ADsBannerView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="500dp"
|
||||||
|
android:id="@+id/adsbanner"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#Created by .winboll/winboll_app_build.gradle
|
#Created by .winboll/winboll_app_build.gradle
|
||||||
#Thu Nov 13 05:16:16 HKT 2025
|
#Mon Nov 17 13:13:22 GMT 2025
|
||||||
stageCount=1
|
stageCount=1
|
||||||
libraryProject=libappbase
|
libraryProject=libappbase
|
||||||
baseVersion=15.11
|
baseVersion=15.11
|
||||||
publishVersion=15.11.0
|
publishVersion=15.11.0
|
||||||
buildCount=0
|
buildCount=6
|
||||||
baseBetaVersion=15.11.1
|
baseBetaVersion=15.11.1
|
||||||
|
|||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package cc.winboll.studio.libappbase.ads;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.util.AttributeSet;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
import cc.winboll.studio.libappbase.R;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author ZhanGSKen&豆包大模型<zhangsken@qq.com>
|
||||||
|
* @Date 2025/11/17 20:48
|
||||||
|
* @Describe WinBoLL 横幅广告类
|
||||||
|
*/
|
||||||
|
public class ADsBannerView extends LinearLayout {
|
||||||
|
|
||||||
|
public static final String TAG = "ADsBannerView";
|
||||||
|
|
||||||
|
Context mContext;
|
||||||
|
View mMianView;
|
||||||
|
|
||||||
|
public ADsBannerView(Context context) {
|
||||||
|
super(context);
|
||||||
|
this.mContext = context;
|
||||||
|
initView();
|
||||||
|
}
|
||||||
|
|
||||||
|
public ADsBannerView(Context context, AttributeSet attrs) {
|
||||||
|
super(context, attrs);
|
||||||
|
this.mContext = context;
|
||||||
|
initView();
|
||||||
|
}
|
||||||
|
|
||||||
|
public ADsBannerView(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||||
|
super(context, attrs, defStyleAttr);
|
||||||
|
this.mContext = context;
|
||||||
|
initView();
|
||||||
|
}
|
||||||
|
|
||||||
|
public ADsBannerView(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_adsbanner, null);
|
||||||
|
addView(this.mMianView);
|
||||||
|
}
|
||||||
|
}
|
||||||
15
libappbase/src/main/res/layout/view_adsbanner.xml
Normal file
15
libappbase/src/main/res/layout/view_adsbanner.xml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<?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:id="@+id/ads_container"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="WinBoLL ADs"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
Reference in New Issue
Block a user