Skip to content

Instantly share code, notes, and snippets.

@yccheok
Created December 11, 2022 15:06
Show Gist options
  • Save yccheok/eff96ca88462efb9ce842f5743b92156 to your computer and use it in GitHub Desktop.
Save yccheok/eff96ca88462efb9ce842f5743b92156 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android">
<com.google.android.gms.ads.nativead.NativeAdView
android:background="#ffffff"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_centerInParent="true"
android:id="@+id/native_ad_view"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_height="62dp"
android:layout_width="match_parent"
android:layout_centerInParent="true"
android:background="@drawable/gnt_outline_shape"
>
<LinearLayout
android:layout_marginTop="2dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:id="@+id/background"
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
>
<ImageView
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:adjustViewBounds="true" />
<Space
android:layout_width="4dp"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="vertical">
<TextView
android:maxLines="2"
android:id="@+id/primary"
android:textStyle="bold"
android:textSize="15sp"
android:textColor="#DE000000"
android:layout_height="wrap_content"
android:layout_width="match_parent" />
<TextView
android:maxLines="1"
android:id="@+id/secondary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="12sp"
android:textColor="#8A000000" />
</LinearLayout>
<Space
android:layout_width="2dp"
android:layout_height="wrap_content" />
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/cta"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="#4285f4"
android:textColor="#FFFFFF"
android:padding="2dp" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:layout_gravity="bottom|right"
android:layout_width="15dp"
android:layout_height="15dp"
android:gravity="center"
android:text="Ad"
android:textSize="10sp"
android:textColor="#000000"
android:background="#FFEB3B" />
</com.google.android.gms.ads.nativead.NativeAdView>
</merge>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment