Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions feature/ads/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="ads_by_admob" translatable="false">Ads by AdMob:</string>
</resources>
21 changes: 13 additions & 8 deletions feature/ads/src/playstore/res/layout/native_small_ad_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,25 @@
android:visibility="gone"
tools:visibility="visible">

<!-- <TextView-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:text="Ad"-->
<!-- android:textSize="15sp" />-->

<TextView
android:id="@+id/adTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/ads_by_admob"
android:textSize="12sp"
android:layout_marginHorizontal="2dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<ImageView
android:id="@+id/nativeAdSmallImage"
android:layout_width="0dp"
android:layout_height="0dp"
android:contentDescription="@null"
android:layout_marginTop="2dp"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintTop_toBottomOf="@+id/adTextView"
tools:background="#0000ff" />

<TextView
Expand All @@ -37,9 +41,10 @@
android:layout_marginHorizontal="@dimen/ad_banner_horizontal_margin"
android:textSize="15sp"
android:textStyle="bold"
android:layout_marginTop="2dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/nativeAdSmallImage"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintTop_toBottomOf="@+id/adTextView"
tools:text="Ad Title" />

<TextView
Expand Down
2 changes: 1 addition & 1 deletion feature/ads/src/playstore/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
<item>C9C5D8A36DEA8198DBA016A7DB56B989</item>
<item>CB6E1AB0A31C323FB3334D10A1F74492</item>
</string-array>
</resources>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import com.shifthackz.aisdv1.domain.feature.ad.AdFeature
fun AdMobBanner(
modifier: Modifier = Modifier,
adFeature: AdFeature,
adFactory: (Context) -> AdFeature.Ad
adFactory: (Context) -> AdFeature.Ad,
) {
val ad = adFactory(LocalContext.current)
if (ad.isEmpty) return
Expand Down