Skip to content

Commit

Permalink
fix: native view border
Browse files Browse the repository at this point in the history
  • Loading branch information
FenilInfyom committed Apr 12, 2024
1 parent e273db9 commit 541640e
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 36 deletions.
26 changes: 26 additions & 0 deletions adsSdk/src/main/res/drawable/border_bg.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">

<item>
<shape android:shape="rectangle">
<solid android:color="#6D6C6C" />
<corners android:radius="10dp" /> <padding
android:top="4dp" android:bottom="4dp"
android:left="4dp"
android:right="4dp" />
</shape>
</item>

<item android:drawable="@drawable/ads_space">
<padding
android:top="1dp" android:bottom="1dp"
android:left="1dp"
android:right="1dp" />
</item>

<item>
<shape android:shape="rectangle">
<solid android:color="@color/white" />
<corners android:radius="4dp" /> </shape>
</item>
</layer-list>
9 changes: 3 additions & 6 deletions adsSdk/src/main/res/layout/ad_100.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
app:cardCornerRadius="10dp"
app:cardElevation="3dp"
app:cardUseCompatPadding="true">
android:background="@drawable/border_bg">

<com.google.android.gms.ads.nativead.NativeAdView
android:id="@+id/unified"
Expand Down Expand Up @@ -202,4 +199,4 @@
</RelativeLayout>

</com.google.android.gms.ads.nativead.NativeAdView>
</androidx.cardview.widget.CardView>
</RelativeLayout>
9 changes: 3 additions & 6 deletions adsSdk/src/main/res/layout/ad_150.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="10dp"
app:cardElevation="3dp"
app:cardUseCompatPadding="true">
android:background="@drawable/border_bg">

<com.google.android.gms.ads.nativead.NativeAdView
android:id="@+id/ads_100"
Expand Down Expand Up @@ -145,4 +142,4 @@
</LinearLayout>
</com.google.android.gms.ads.nativead.NativeAdView>

</androidx.cardview.widget.CardView>
</RelativeLayout>
9 changes: 3 additions & 6 deletions adsSdk/src/main/res/layout/ad_300.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="10dp"
app:cardElevation="3dp"
app:cardUseCompatPadding="true">
android:background="@drawable/border_bg">

<com.google.android.gms.ads.nativead.NativeAdView
android:id="@+id/unified"
Expand Down Expand Up @@ -127,4 +124,4 @@
android:textStyle="bold" />
</com.google.android.gms.ads.nativead.NativeAdView>

</androidx.cardview.widget.CardView>
</RelativeLayout>
9 changes: 3 additions & 6 deletions adsSdk/src/main/res/layout/ad_350.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="10dp"
app:cardElevation="3dp"
app:cardUseCompatPadding="true">
android:background="@drawable/border_bg">

<com.google.android.gms.ads.nativead.NativeAdView
android:layout_width="match_parent"
Expand Down Expand Up @@ -175,4 +172,4 @@

</com.google.android.gms.ads.nativead.NativeAdView>

</androidx.cardview.widget.CardView>
</RelativeLayout>
9 changes: 3 additions & 6 deletions adsSdk/src/main/res/layout/ad_40.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="10dp"
app:cardElevation="3dp"
app:cardUseCompatPadding="true">
android:background="@drawable/border_bg">

<com.google.android.gms.ads.nativead.NativeAdView
android:id="@+id/unified"
Expand Down Expand Up @@ -117,4 +114,4 @@

</LinearLayout>
</com.google.android.gms.ads.nativead.NativeAdView>
</androidx.cardview.widget.CardView>
</RelativeLayout>
9 changes: 3 additions & 6 deletions adsSdk/src/main/res/layout/ad_50.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="10dp"
app:cardElevation="3dp"
app:cardUseCompatPadding="true">
android:background="@drawable/border_bg">

<com.google.android.gms.ads.nativead.NativeAdView
android:layout_height="100dp"
Expand Down Expand Up @@ -127,4 +124,4 @@
</LinearLayout>

</com.google.android.gms.ads.nativead.NativeAdView>
</androidx.cardview.widget.CardView>
</RelativeLayout>

0 comments on commit 541640e

Please sign in to comment.