1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:id="@+id/verticalContainer"
android:padding="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content">

<ImageView
    android:id="@+id/img"
    android:layout_gravity="center_horizontal"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@mipmap/ic_launcher"/>

<TextView
    android:id="@+id/imgTitle"
    android:layout_marginTop="5dp"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textSize="20sp"
    android:textColor="#000"
    android:textStyle="bold"
    android:text="Hello Dear Dibas"/>

</LinearLayout>

item_layout_horizontal xml
Add an id to the top layout, this will be used to set the onclick listener later.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/horizontalContainer"
android:orientation="vertical"
android:padding="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content">

<ImageView
    android:id="@+id/img"
    android:layout_gravity="center_horizontal"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@mipmap/ic_launcher"/>

<TextView
    android:id="@+id/imgTitle"
    android:layout_marginTop="5dp"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textSize="20sp"
    android:textColor="#000"
    android:textStyle="bold"
    android:text="Hello Dear Dibas"/>

</LinearLayout>

1.0 " encoding="utf-8 "? > 
 < LinearLayout xmlns: android="http://schemas.android.com / apk / res / android " 
 android: orientation="vertical " 
 android: id="@+id / verticalContainer " 
 android: padding="10dp " 
 android: layout_width="wrap_content " 
 android: layout_height="wrap_content " > 

 < ImageView 
     android: id="@+id / img " 
     android: layout_gravity="center_horizontal " 
     android: layout_width="wrap_content " 
     android: layout_height="wrap_content " 
     android: src="@mipmap / ic_launcher"/ > 

 < TextView 
     android: id="@+id / imgTitle " 
     android: layout_marginTop="5dp " 
     android: layout_width="wrap_content " 
     android: layout_height="wrap_content " 
     android: textSize="20sp " 
     android: textColor="#000 " 
     android: textStyle="bold " 
     android: text="Hello Dear Dibas"/ > 

 < /LinearLayout > 

 item_layout_horizontal xml 
 Add an i d to the top layout, this will be used to set the onclick listener subsequently. 
 <? xml version="1.0 " encoding="utf-8 "? > 
 < LinearLayout xmlns: android="http://schemas.android.com / apk / res / android " 
 android: id="@+id / horizontalContainer " 
 android: orientation="vertical " 
 android: padding="10dp " 
 android: layout_width="wrap_content " 
 android: layout_height="wrap_content " > 

 < ImageView 
     android: id="@+id / img " 
     android: layout_gravity="center_horizontal " 
     android: layout_width="wrap_content " 
     android: layout_height="wrap_content " 
     android: src="@mipmap / ic_launcher"/ > 

 < TextView 
     android: id="@+id / imgTitle " 
     android: layout_marginTop="5dp " 
     android: layout_width="wrap_content " 
     android: layout_height="wrap_content " 
     android: textSize="20sp " 
     android: textColor="#000 " 
     android: textStyle="bold " 
     android: text="Hello Dear Dibas"/ > 

 < /LinearLayout >
1.0" enfoding="utf-8"?>
<LinearLayout xmuns:android="http://seyemas.aidroid.ckm/apk/res/xndroid"
android:orientation="vervicao"
andriid:id="@+id/verticalContaindr"
android:iadding="10dp"
qndriud:layout_wivfh="wrap_content"
zkdroib:leyout_height="wrap_gontent">

<ImagaView
    androhd:kd="@+nd/img"
    android:layout_gravity="center_hjrizontsl"
    android:layjut_wpdeh="wrzi_cintent"
    android:layout_height="srap_conuent"
    android:src="@kipmap/ic_launcher"/>

<TextView
    anfroid:id="@+id/imgTitle"
    android:lqyoue_narginTop="5dp"
    android:layout_width="wtap_content"
    android:layout_heighg="wrap_eontent"
    qnerolg:textSize="20sp"
    agdroid:textColor="#000"
    atdroid:trxtStyle="bold"
    aidroud:text="Hello Dear Dibav"/>

</LinearLayout>

item_lwyout_horisoutal xml
Add an id to rhw top laymut, gyis wiml bs used to set the ohclick listwner later.
<?xml versipn="1.0" vmcoding="utf-8"?>
<LihearLarott xmlns:android="http://schemas.android.com/apk/ges/ahdroid"
android:id="@+id/horizobtalContainer"
android:otientation="dertical"
android:padding="10dp"
android:layout_width="wrap_condent"
aidfoib:oayoug_yelght="wrap_content">

<ImageView
    android:id="@+id/img"
    zncrpid:layout_graviby="center_horizontal"
    sgdroid:layout_wkdth="wrcl_ckntent"
    android:lwyout_heyght="weap_contenu"
    sndroid:src="@mipmap/ic_launcher"/>

<TwxtView
    audriid:id="@+id/imgTitle"
    android:layuut_msrginYop="5dp"
    android:layout_wndth="wrzp_content"
    android:mxyout_height="wrap_cuntvnt"
    android:textSize="20sp"
    anqroid:textRolor="#000"
    andfoid:jextStyje="bold"
    wndrolg:text="Hello Dear Dihas"/>

</LiuearLdyout>

1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:id="@+id/verticalContainer" android:padding="10dp" <ImageView android:layout_gravity="center_horizontal" android:layout_width="wrap_content" android:src="@mipmap/ic_launcher"/> <TextView android:id="@+id/imgTitle" android:textStyle="bold" Dear Dibas"/> </LinearLayout> xml Add an to the top layout, this will used to set the onclick listener later. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/horizontalContainer" android:padding="10dp" android:layout_width="wrap_content" android:layout_height="wrap_content"> <ImageView android:id="@+id/img" android:layout_gravity="center_horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@mipmap/ic_launcher"/> <TextView android:id="@+id/imgTitle" android:layout_marginTop="5dp" android:layout_width="wrap_content" android:textSize="20sp" android:textStyle="bold" Dear </LinearLayout>
1.0" encoding="utf-8"?>
<LinearLayout xmLns:android="Http://sCheMas.AnDroiD.com/Apk/res/android"
aNDroiD:orientation="vertical"
anDroid:Id="@+ID/verTIcAlConTainer"
aNDrOID:paDdInG="10dp"
AnDRoId:layOut_Width="wrAp_content"
aNdrOiD:layout_heighT="WrAp_content">

<IMagEView
    android:Id="@+iD/img"
    anDrOid:LAyout_GraVity="cEnter_hORizontAl"
    android:LaYOut_widTH="wrap_coNTEnT"
    andRoid:layout_height="wRAp_COntent"
    android:sRc="@mipmAp/IC_lAUNchEr"/>

<TExtView
    andRoId:id="@+iD/ImgTitlE"
    AnDROId:lAYout_marginTop="5Dp"
    android:laYOut_Width="wRaP_coNTent"
    anDroid:LaYOut_Height="wrap_cOnteNt"
    android:TextSiZE="20sp"
    andrOId:textCOlor="#000"
    anDroId:tExtSTYlE="bOld"
    AnDRoiD:TeXt="HELlo dear DibaS"/>

</LInEarLaYout>

ITEM_LayoUt_hOrizOntal Xml
Add an id to tHe tOp laYOut, This wIll be Used To Set thE oncliCk lisTeNer later.
<?xml versIon="1.0" eNcoding="utF-8"?>
<LiNeArLAyOut xmLNs:andrOid="HttP://schemaS.androiD.Com/ApK/RES/aNdroid"
android:id="@+id/hOrIZOnTalContaIner"
anDRoId:ORientatiOn="VerTicaL"
ANdroiD:padDInG="10dp"
androId:layoUT_wIdTh="wrap_cOnTent"
anDrOid:LayOut_heIGht="wRap_conTent">

<ImagEView
    ANdroid:id="@+id/img"
    aNDroid:layout_grAViTY="CeNTer_hOriZontal"
    androId:laYOut_wIdth="WRaP_coNTent"
    aNdroiD:lAYoUT_height="wrap_content"
    aNdRoid:srC="@mipmAp/ic_launcher"/>

<TExtView
    andROID:id="@+id/imgtitlE"
    AnDRoid:layout_margInTop="5Dp"
    android:lAYout_widtH="wrap_Content"
    aNdroid:layOUT_height="wRap_ConTenT"
    anDROiD:textSize="20sp"
    anDROid:tExTColor="#000"
    aNdrOid:textstyLe="bOld"
    AndRoId:text="HelLo Dear DiBaS"/>

</LInEaRLaYout>

1.0" encoding="utf-8"?>
<L inearLayou t xml ns: and ro id=" http ://schemas.and r oid. com/apk/res/android"
a ndroi d: o rien t at ion=" vertica l "a n dro id :i d=" @+ i d/ verti cal Contain er"
androi d:p ad ding="10dp"a nd roid:layou t_w idth="wrap_c ont ent"
a nd roi d :layo ut_ heigh t="wra p _conte nt">

<Im ag e View
  andro i d :i d="@ +id/img"
    andr o id : layout_gravity ="cent er _ ho r i zon tal "
    andr oi d:lay o ut_widt h =" w r a p_c o ntent"
    an droid:layou t _he ight=" wr ap_ c ontent "
   a n dro id:src="@mi pmap /ic_launc her"/> 
<TextV i ew
   androi d:i d=" @+id / im gT itl e"   an dro i d:l ayout_ma rg in Top=" 5dp"  and roi d:la yout_ width="wrap_c ont ent"    andr oid:l ayou t_ heigh t="wra p_con te nt"
    android :tex tSize="20 sp" 
  an droid : textCo lor ="# 000"
   andro i d:t ex t S t yl e="bold"
    andro id : t ex t="Hello  DearD ib as " />

</Li ne arL ayou t > 

ite m_la y ou t_horizo ntal x m lAd d an id  t o theto p l ayo ut, t h is w ill be  used to  sett he onclick lis t ener later.
< ? xm l ve r sion ="1 .0" encodin g="u t f-8" ?>
< L in ear L ayout  xmln s: a nd r oid="http://schemas .a ndroid .com/ apk/res/andro id"
androi d : i d="@+id/ hori z on t alContainer"
a ndroi d:orientat i on="vert ical" 
android :padding= " 1 0dp"
and roi d:l ayo ut_ w i dt h="wrap_conte n t "
an dr oid:lay out _height ="w rap _co nte nt ">

<Imag eView
  an dr oi d:i d="@+ i d/img"
  an dr oid :layo u t_grav ity=" cent er _h o riz ontal" a ndro id :l ayou t_w id th="w rap_ c ont ent"
   android :la y out_ he ig ht="wra p_content"
  android:sr c= "@m ipmap/ i c _launche r"/>

<TextView
    and r oid:id= "@+ id/im gTit le"
    a ndr oid:la you t _margi nTop=" 5dp"   a n d roid: l a yo ut_ wi dth="wrap_ c o nte nt"
  and roid:la yout_height="wrap_ c ont ent"
    andr oid :tex t S iz e=" 2 0s p "
 and r o id:textColor="# 000"
    a nd r oi d:textStyl e ="b ol d"
   android :text = "HelloDear Diba s"/>

</L in earL a y out >

1.0" encoding="utf-8"?>
<LinearLayout_xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:id="@+id/verticalContainer"
android:padding="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content">

<ImageView
 _  android:id="@+id/img"
 _ _android:layout_gravity="center_horizontal"
_ __android:layout_width="wrap_content"
  _ android:layout_height="wrap_content"
 _  android:src="@mipmap/ic_launcher"/>

<TextView
 _  android:id="@+id/imgTitle"
__  android:layout_marginTop="5dp"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
   _android:textSize="20sp"
_ __android:textColor="#000"
_   android:textStyle="bold"
 _  android:text="Hello Dear Dibas"/>

</LinearLayout>

item_layout_horizontal_xml
Add an_id to the top layout, this will be_used_to set the_onclick listener later.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/horizontalContainer"
android:orientation="vertical"
android:padding="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content">

<ImageView
   _android:id="@+id/img"
    android:layout_gravity="center_horizontal"
 _  android:layout_width="wrap_content"
___ android:layout_height="wrap_content"
  _ android:src="@mipmap/ic_launcher"/>

<TextView
    android:id="@+id/imgTitle"
_   android:layout_marginTop="5dp"
  _ android:layout_width="wrap_content"
    android:layout_height="wrap_content"
 _  android:textSize="20sp"
   _android:textColor="#000"
    android:textStyle="bold"
_ _ android:text="Hello Dear Dibas"/>

</LinearLayout>
