native_ad_item.xml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <?xml version="1.0" encoding="utf-8"?><!--
  2. ~ Copyright © 2018-2020 TopOn. All rights reserved.
  3. ~ https://www.toponad.com
  4. ~ Licensed under the TopOn SDK License Agreement
  5. ~ https://github.com/toponteam/TopOn-Android-SDK/blob/master/LICENSE
  6. -->
  7. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  8. android:layout_width="match_parent"
  9. android:layout_height="wrap_content"
  10. android:background="#ffffff"
  11. android:orientation="vertical">
  12. <!--<TextView-->
  13. <!--android:id="@+id/native_ad_install_btn"-->
  14. <!--android:layout_width="wrap_content"-->
  15. <!--android:layout_height="wrap_content"-->
  16. <!--android:layout_alignEnd="@+id/native_ad_content_image_area"-->
  17. <!--android:layout_alignRight="@+id/native_ad_content_image_area"-->
  18. <!--android:layout_below="@+id/native_ad_title"-->
  19. <!--android:background="#888888"-->
  20. <!--android:paddingBottom="5dp"-->
  21. <!--android:paddingLeft="15dp"-->
  22. <!--android:paddingRight="15dp"-->
  23. <!--android:paddingTop="5dp"-->
  24. <!--android:textColor="@android:color/white"-->
  25. <!--android:textSize="11dp"-->
  26. <!--android:visibility="gone"/>-->
  27. <FrameLayout
  28. android:id="@+id/native_ad_image"
  29. android:layout_width="45dp"
  30. android:layout_height="45dp"
  31. android:layout_alignParentBottom="true"
  32. android:layout_marginTop="10dp"
  33. android:layout_marginRight="10dp"
  34. android:scaleType="fitCenter"></FrameLayout>
  35. <TextView
  36. android:id="@+id/native_ad_install_btn"
  37. android:layout_width="wrap_content"
  38. android:layout_height="wrap_content"
  39. android:layout_alignTop="@id/native_ad_image"
  40. android:layout_alignBottom="@id/native_ad_image"
  41. android:layout_alignParentRight="true"
  42. android:layout_marginLeft="10dp"
  43. android:background="#2095F1"
  44. android:gravity="center"
  45. android:paddingLeft="20dp"
  46. android:paddingRight="20dp"
  47. android:textColor="#ffffff" />
  48. <TextView
  49. android:id="@+id/native_ad_title"
  50. android:layout_width="wrap_content"
  51. android:layout_height="wrap_content"
  52. android:layout_alignTop="@id/native_ad_image"
  53. android:layout_toLeftOf="@id/native_ad_install_btn"
  54. android:layout_toRightOf="@id/native_ad_image"
  55. android:ellipsize="end"
  56. android:maxLines="1"
  57. android:textColor="#000000"
  58. android:textSize="15dp"
  59. android:textStyle="bold" />
  60. <TextView
  61. android:id="@+id/native_ad_desc"
  62. android:layout_width="match_parent"
  63. android:layout_height="wrap_content"
  64. android:layout_alignBottom="@id/native_ad_image"
  65. android:layout_toLeftOf="@id/native_ad_install_btn"
  66. android:layout_toRightOf="@id/native_ad_image"
  67. android:ellipsize="end"
  68. android:maxLines="1"
  69. android:textColor="#777777"
  70. android:textSize="12dp" />
  71. <LinearLayout
  72. android:id="@+id/native_ad_version_area"
  73. android:layout_width="match_parent"
  74. android:layout_height="wrap_content"
  75. android:layout_above="@id/native_ad_image"
  76. android:orientation="horizontal">
  77. <TextView
  78. android:id="@+id/native_ad_version"
  79. android:layout_width="wrap_content"
  80. android:layout_height="wrap_content"
  81. android:autoLink="all"
  82. android:ellipsize="end"
  83. android:includeFontPadding="false"
  84. android:maxLines="1"
  85. android:padding="4dp"
  86. android:text="Version"
  87. android:textColor="#000000"
  88. android:textSize="15dp"
  89. android:textStyle="bold" />
  90. </LinearLayout>
  91. <FrameLayout
  92. android:id="@+id/native_ad_content_image_area"
  93. android:layout_width="match_parent"
  94. android:layout_height="match_parent"
  95. android:layout_above="@id/native_ad_version_area"></FrameLayout>
  96. <com.anythink.nativead.api.ATNativeImageView
  97. android:id="@+id/native_ad_logo"
  98. android:layout_width="40dp"
  99. android:layout_height="20dp"
  100. android:layout_alignParentRight="true"
  101. android:layout_marginTop="2dp"
  102. android:layout_marginRight="2dp"
  103. android:visibility="gone" />
  104. <ImageView
  105. android:id="@+id/native_self_adlogo"
  106. android:layout_width="10dp"
  107. android:layout_height="10dp"
  108. android:layout_marginLeft="2dp"
  109. android:src="@drawable/ad_logo" />
  110. <TextView
  111. android:id="@+id/native_ad_from"
  112. android:layout_width="wrap_content"
  113. android:layout_height="wrap_content"
  114. android:layout_alignTop="@id/native_ad_logo"
  115. android:layout_marginLeft="2dp"
  116. android:layout_marginRight="2dp"
  117. android:layout_toLeftOf="@id/native_self_adlogo"
  118. android:background="#888888"
  119. android:gravity="center"
  120. android:paddingLeft="2dp"
  121. android:paddingRight="2dp"
  122. android:textColor="#ffffff"
  123. android:textSize="6dp" />
  124. </RelativeLayout>