Skip to content

Commit 80e1f53

Browse files
committed
Added banner type recyclerview
1 parent 8881a00 commit 80e1f53

3 files changed

Lines changed: 63 additions & 2 deletions

File tree

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<RelativeLayout
3+
android:id="@+id/parent_list_map"
4+
xmlns:android="http://schemas.android.com/apk/res/android"
5+
android:layout_width="match_parent"
6+
android:layout_height="wrap_content"
7+
android:background="@android:color/white">
8+
9+
<ImageView
10+
android:id="@+id/img_user"
11+
android:layout_width="match_parent"
12+
android:layout_height="200dp"
13+
android:scaleType="centerCrop"
14+
android:background="#16000000"/>
15+
16+
17+
<LinearLayout
18+
android:layout_width="match_parent"
19+
android:layout_height="wrap_content"
20+
android:layout_alignBottom="@+id/img_user"
21+
android:layout_alignParentLeft="true"
22+
android:layout_alignParentStart="true"
23+
android:orientation="vertical"
24+
android:paddingBottom="10dp"
25+
android:paddingLeft="10dp"
26+
android:paddingRight="10dp"
27+
android:paddingTop="16dp"
28+
android:background="#66000000">
29+
30+
<TextView
31+
android:id="@+id/item_txt_title"
32+
android:layout_width="match_parent"
33+
android:layout_height="wrap_content"
34+
android:singleLine="true"
35+
android:textColor="@android:color/white"
36+
android:textSize="16sp"
37+
android:textStyle="bold"/>
38+
39+
40+
<TextView
41+
android:id="@+id/item_txt_message"
42+
android:layout_width="match_parent"
43+
android:layout_height="wrap_content"
44+
android:layout_marginTop="5dp"
45+
android:singleLine="true"
46+
android:textColor="@android:color/white"
47+
android:textSize="14sp"/>
48+
49+
50+
</LinearLayout>
51+
52+
</RelativeLayout>

root/res/layout/item_recycler_list.xml.ftl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<#include "item_recycler_google_play.xml.ftl"/>
44

5-
<#else>
5+
<#elseif features == 'simple'>
66

77
<#if layoutmanager == 'grid'>
88
<#include "item_recycler_simple_grid.xml.ftl"/>
@@ -11,4 +11,13 @@
1111
<#include "item_recycler_simple_list.xml.ftl"/>
1212
</#if>
1313

14+
<#elseif features == 'banner'>
15+
16+
<#if layoutmanager == 'grid'>
17+
<#include "item_recycler_simple_grid.xml.ftl"/>
18+
19+
<#else>
20+
<#include "item_recycler_banner_list.xml.ftl"/>
21+
</#if>
22+
1423
</#if>

template.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626

2727
<parameter id="features" name="RecyclerView Style" type="enum" default="simple" help="Choose your own RecyclerView style">
2828
<option id="simple">Simple RecyclerView</option>
29+
<option id="banner">Banner RecyclerView</option>
2930
<option id="header">Header Recyclerview</option>
3031
<option id="footer">Footer Recyclerview</option>
3132
<option id="headerandfooter">Header and Footer Recyclerview</option>
3233
<option id="googleplay">GooglePlay like Recyclerview</option>
33-
3434
</parameter>
3535

3636
<parameter id="isItemClick" name="Need ItemClick" type="boolean" default="true" help="If true, recyclerview list item will be clickable"/>

0 commit comments

Comments
 (0)