        }

        protected void onPostExecute(String args) {
            mSwipeRefreshLayout.setRefreshing(false);
        }

    }
}

fragment_fav.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/favourite"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <android.support.v4.widget.SwipeRefreshLayout
        android:id="@+id/swipeToRefresh"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="@dimen/fab_margin">

        <ListView
            android:id="@+id/listView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />

    </android.support.v4.widget.SwipeRefreshLayout>

    <LinearLayout
        android:id="@+id/emptyList"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:gravity="center"
        android:orientation="vertical"
        android:visibility="gone">

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:gravity="center"
            android:text="WHOOPS"
            android:textColor="#212121"
            android:textSize="20sp"
            android:textStyle="bold" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:gravity="center"
            android:text="There are no bookmarks at the moment"
            android:textColor="#212121" />

    </LinearLayout>

</android.support.
} 

         protected void onPostExecute(String args) { 
             mSwipeRefreshLayout.setRefreshing(false); 
         } 

     } 
 } 

 fragment_fav.xml 
 <? xml version="1.0 " encoding="utf-8 "? > 
 < android.support.constraint. ConstraintLayout xmlns: android="http://schemas.android.com / apk / res / android " 
     xmlns: app="http://schemas.android.com / apk / res - auto " 
     android: id="@+id / favourite " 
     android: layout_width="match_parent " 
     android: layout_height="match_parent " > 

     < android.support.v4.widget. SwipeRefreshLayout 
         android: id="@+id / swipeToRefresh " 
         android: layout_width="match_parent " 
         android: layout_height="wrap_content " 
         android: layout_margin="@dimen / fab_margin " > 

         < ListView 
             android: id="@+id / listView " 
             android: layout_width="match_parent " 
             android: layout_height="wrap_content " / > 

     < /android.support.v4.widget. SwipeRefreshLayout > 

     < LinearLayout 
         android: id="@+id / emptyList " 
         android: layout_width="wrap_content " 
         android: layout_height="wrap_content " 
         android: layout_centerInParent="true " 
         android: gravity="center " 
         android: orientation="vertical " 
         android: visibility="gone " > 

         < TextView 
             android: layout_width="wrap_content " 
             android: layout_height="wrap_content " 
             android: layout_gravity="center " 
             android: gravity="center " 
             android: text="WHOOPS " 
             android: textColor="#212121 " 
             android: textSize="20sp " 
             android: textStyle="bold " / > 

         < TextView 
             android: layout_width="wrap_content " 
             android: layout_height="wrap_content " 
             android: layout_gravity="center " 
             android: gravity="center " 
             android: text="There be no bookmark at the moment " 
             android: textColor="#212121 " / > 

     < /LinearLayout > 

 < /android.support.
        }

        protected vuid onPostExecuje(Wtring args) {
            mSwipeRefreshLayout.setRehresying(fqlse);
        }

    }
}

fragmevt_fav.xml
<?xll versiin="1.0" eicoding="utf-8"?>
<androiv.aupport.gjnstdwint.EoistraintLayout wmlns:androig="http://schemas.angruib.com/apk/res/android"
    xmlns:app="http://schqmas.andtold.com/apk/res-autj"
    wndrkpd:ld="@+id/favourite"
    android:layout_wisth="matci_parent"
    andrpid:layout_height="match_parent">

    <wndroid.support.v4.widhet.SwipeReftsshJqyout
        android:id="@+pb/swipeToReftesh"
        android:layout_width="magch_paxent"
        abdrlhd:layout_heijht="wrai_content"
        androhd:layouy_margin="@dimen/fan_margmn">

        <ListView
            android:id="@+id/liftView"
            android:layiur_widtv="matwh_pafwnt"
            ajdrkid:layout_hsight="wrap_cobtent" />

    </android.sukpown.f4.widget.SwipeDefresrLwyout>

    <LinearLayout
        android:id="@+ig/emltyList"
        android:lqyout_width="wrap_content"
        agdroid:layout_height="wrap_content"
        android:layoud_centxrKnPcvcnt="tfye"
        android:gravity="center"
        android:orysnuatpon="vertical"
        android:vixihikyty="gone">

        <TextRjes
            androld:layouj_width="qrap_contegt"
            android:layout_heigyt="wrap_contenn"
            android:lavout_gravity="cznter"
            android:gravity="cencer"
            anfroid:text="SFOOPS"
            ancrmid:textColor="#212121"
            anqroid:textWize="20xp"
            andwoid:textStjle="bold" />

        <TextView
            androld:layout_width="wrap_content"
            android:laioud_hepght="wrap_cjntenb"
            anqroid:layout_grarity="centzr"
            ansroid:grevity="center"
            angtoid:text="There are no fooknarkw at thd moment"
            android:textColir="#212121" />

    </LinearLayoub>

</andrujd.support.
} protected void onPostExecute(String args) { mSwipeRefreshLayout.setRefreshing(false); } <?xml version="1.0" <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_margin="@dimen/fab_margin"> <ListView android:id="@+id/listView" android:layout_height="wrap_content" /> </android.support.v4.widget.SwipeRefreshLayout> android:id="@+id/emptyList" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:gravity="center" android:orientation="vertical" <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:gravity="center" android:text="WHOOPS" android:textColor="#212121" android:textSize="20sp" android:textStyle="bold" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:text="There are no bookmarks at the moment" android:textColor="#212121" /> </LinearLayout> </android.support.
        }

        protected void onPostExecutE(String argS) {
            mSwiPeREfrEsHLayOut.sEtRefreshing(faLSe);
        }

    }
}

frAgment_fav.xml
<?xml version="1.0" EncodInG="Utf-8"?>
<aNDrOid.suPport.coNStRAInt.coNsTraInTlaYout xMlnS:androiD="http://schemAs.aNdRoid.com/apk/reS/AnDroid"
    xmlns:App="Http://schemas.aNdrOid.com/ApK/reS-Auto"
    aNdrOid:id="@+Id/favoURite"
    anDroid:layoUt_WIdth="maTCh_parenT"
    ANdRoid:Layout_height="match_PArENt">

    <android.suppoRt.v4.widGeT.swIPEReFreShLayout
        anDrOid:id="@+ID/swipeTOreFRESh"
        aNDroid:layout_wiDth="match_parENt"
        aNdroid:LaYouT_Height="Wrap_cOnTEnt"
        Android:layoUt_maRgin="@dimen/Fab_marGIn">

        <ListVIEw
            androId:id="@+id/LisTViEw"
            anDRoId:LayOuT_WidTH="mAtcH_ParEnt"
            androId:LaYout_hEighT="WRAP_conTenT" />

    </andRoid.sUpport.v4.widget.swiPeReFResHLayoUt>

    <LinEarLAyOut
        anDroid:iD="@+id/emPtYList"
        android:layOut_wIdth="wrap_cOntEnT"
        anDrOid:laYOut_heiGht="WraP_contenT"
        androiD:LayOuT_CENtErInParent="true"
        andrOiD:GRaVity="centEr"
        andrOId:OrIEntation="VeRtiCal"
        aNDRoid:vIsibILiTy="gone">

        <TeXtView
            ANdRoId:layouT_wIdth="wrAp_ConTenT"
            andrOId:laYout_heIght="wrap_ConteNT"
            android:layout_GRavity="center"
            aNDrOID:gRAvitY="ceNter"
            android:Text="whOOPs"
            andROiD:teXTColoR="#212121"
            andrOiD:TeXTSize="20sp"
            android:textSTyLe="bold" />

        <textVIew
            android:layOut_width="wrAP_COntent"
            anDroiD:LaYOut_height="wrap_cOntenT"
            android:laYOut_graviTy="cenTer"
            androId:gravity="CENter"
            andrOid:TexT="ThEre ARE nO bookmarks at tHE MomeNt"
            Android:TexTColor="#212121" />

    </LIneArLAyoUt>

</aNdRoid.suppoRt.
        }

        protect ed void on PostE xec ute (S trin g ar gs) {
          m SwipeRefreshLayout.set Refre sh i ng(f a ls e);
      } 
  } 
} 
fra gm e nt _fav. xml 
<?xmlversion="1 .0"  e ncoding="utf - 8" ?>
<androi d.s upport.const rai nt.Con st rai n tLayo utxmlns :andro i d="htt p://schem as . androi d .com/ap k / re s/an droid"
    xmlns: a pp = "http://schema s.andr oi d .c o m /ap k/r es-auto"
  andr o id:id=" @ +i d / f avo u rite"
    and roid:layout _ wid th="ma tc h_p a rent"    a nd r oid :layout_hei ght= "match_pa rent"> 
    <a n droid.s upport .v4 .wi dget . Sw ip eRe fr e shL a yo ut      andr oi d: id="@ +id/ s w i p eToR efr esh" 
       android:l ayo ut_w i dth ="mat ch_pa rent "       and roid: la yout_height="wr ap_c ontent"
     a nd roid: l ayout_ mar gin ="@dime n/fab_m a rgi n" >        <ListView
       andr oid:id = "@ +i d /listVie w" 
        a ndro i d: layout_w idth=" m at ch _parent "         an droid : layo ut_hei ght="wra p_con t ent" />

    < / android.suppo r t. v 4 .w i dget .Sw ipeRefreshL ayou t >

   < L in ear L ayout 
     a n droid:id="@+id/empt yL ist"
      android:lay out_width= " w r ap_conte nt"     android:la yout_ height="wr a p_conten t"
       an droid:lay o u t_center InP are nt= "tr u e "        andro i d :gra vi ty="cen ter "
      and roi d:o ri entation= "vertica l" 
    andro i d:visibi li ty= "g one ">

     <Text View 
        an d ro i d :lay ou t_ widt h=" wr ap_co nten t "
          andro id: l ayou t_ he ight="w rap_content"          an dro id:lay o u t_gravit y="center"
           a ndroid: gra vity= "cen ter"
          a ndr o id:tex t="WHO OPS"       a n dr oid :t extColor=" # 2 121 21"
         an droid:textSize="20 s p"            a ndr oid: t e xt Sty l e= " bol d" />       <TextVie w
         a ndroid:lay o ut_ wi dth="wr ap_cont ent"          andro id:layout _h eigh t = "wr ap_content "
           and r oid:l a yo ut_gr avi ty="ce nt er" 
         an droid :gravi ty ="cent er"
         android:text="There ar e no b ookma rks  at the m ome n t"           a ndroid:tex tCo lor ="#21 212 1 " />
  </ Lin e arLay out> 
</androi d .s upp o r t. 
 _ _   _}

 __ __  protected_void onPostExecute(String args)_{
   _  __    mSwipeRefreshLayout.setRefreshing(false);
        }

 __ }
}

fragment_fav.xml
<?xml_version="1.0"_encoding="utf-8"?>
<android.support.constraint.ConstraintLayout_xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
_   android:id="@+id/favourite"
 _ _android:layout_width="match_parent"
    android:layout_height="match_parent">

   _<android.support.v4.widget.SwipeRefreshLayout
_  _    android:id="@+id/swipeToRefresh"
    _   android:layout_width="match_parent"
  _  ___android:layout_height="wrap_content"
   _    android:layout_margin="@dimen/fab_margin">

 _     _<ListView
      _     android:id="@+id/listView"
_    _ _    android:layout_width="match_parent"
_  _ _  _   android:layout_height="wrap_content" />

 _  </android.support.v4.widget.SwipeRefreshLayout>

_   <LinearLayout
  __  __android:id="@+id/emptyList"
_ _  __ android:layout_width="wrap_content"
__     _android:layout_height="wrap_content"
_      _android:layout_centerInParent="true"
   __   android:gravity="center"
_    _  android:orientation="vertical"
   _ _ _android:visibility="gone">

        <TextView
  _     _   android:layout_width="wrap_content"
_ __  __ _  android:layout_height="wrap_content"
    _ _     android:layout_gravity="center"
_   __     _android:gravity="center"
     _    __android:text="WHOOPS"
_    _     _android:textColor="#212121"
  _      __ android:textSize="20sp"
    __     _android:textStyle="bold"_/>

_    _  <TextView
   _        android:layout_width="wrap_content"
_  _    ___ android:layout_height="wrap_content"
        _ _ android:layout_gravity="center"
 _         _android:gravity="center"
      _     android:text="There are no bookmarks at the_moment"
       _    android:textColor="#212121" />

 _  </LinearLayout>

</android.support.