(max);
            }

            @Override
            public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) {
                try {
                    int input = Integer.parseInt(dest.toString() + source.toString());
                    if (isInRange(min, max, input))
                        return null;
                } catch (NumberFormatException nfe) {}
                return "";
            }

            private boolean isInRange(int a, int b, int c) {
                return b > a? c >= a && c <= b : c >= b && c <= a;
            }
        }

        private class MyTextWatcher implements TextWatcher {
            private View view;
            private EditText editText;
            //private int position;
            private MyTextWatcher(View view, EditText editText, int adapterPosition) {
                this.view = view;
                this.editText = editText;
                // this.position = adapterPosition;

                //  cartlistadp.get(position).getQty() = Integer.parseInt((Caption.getText().toString()));
            }

            public void beforeTextChanged(CharSequence s, int start, int count, int after) {
                //do nothing
            }
            public void onTextChanged(CharSequence s, int start, int before, int count) {
                EditText qtyView = (EditText) view.findViewById(R.id.quantity);
                int position = (int) qtyView.getTag(R.id.quantity);
                Log.i("editextpostion", String.valueOf(position));

            }
            public void afterTextChanged(Editable s) {

                DecimalFormat df = new DecimalFormat("0");
                String qtyString = s.toString();
                int quantity = qtyString.equals("")? 0 : Integer.valueOf(qtyString);
                String quty = String.valueOf(quantity);

                EditText qtyView = (EditText) view.findViewById(R.id.quantity);
                CartItemoriginal product = (CartItemoriginal) qtyView.getTag();

                Log.d("postion is qtytag", "Position is: " + product
( max); 
             } 

             @Override 
             public CharSequence filter(CharSequence source, int start, int end, Spanned five hundred, int dstart, int dend) { 
                 sample { 
                     int input = Integer.parseInt(dest.toString () + source.toString ()); 
                     if (isInRange(min, max, input) ) 
                         recurrence nothing; 
                 } catch (NumberFormatException nfe) { } 
                 return " "; 
             } 

             private boolean isInRange(int a, int b, int cytosine) { 
                 return b > a? c > = a & & c < = b: coke > = b & & c < = a; 
             } 
         } 

         private class MyTextWatcher follow through TextWatcher { 
             private View view; 
             individual EditText editText; 
             //private int position; 
             private MyTextWatcher(View view, EditText editText, int adapterPosition) { 
                 this.view = view; 
                 this.editText = editText; 
                 // this.position = adapterPosition; 

                 //   cartlistadp.get(position).getQty () = Integer.parseInt((Caption.getText().toString ()) ); 
             } 

             public void beforeTextChanged(CharSequence s, int beginning, int count, int after) { 
                 //do nothing 
             } 
             public void onTextChanged(CharSequence s, int start, int before, int count) { 
                 EditText qtyView = (EditText) view.findViewById(R.id.quantity); 
                 int situation = (int) qtyView.getTag(R.id.quantity); 
                 Log.i("editextpostion ", String.valueOf(position) ); 

             } 
             public void afterTextChanged(Editable s) { 

                 DecimalFormat df = new DecimalFormat("0 "); 
                 String qtyString = s.toString (); 
                 int quantity = qtyString.equals (" ")? 0: Integer.valueOf(qtyString); 
                 String quty = String.valueOf(quantity); 

                 EditText qtyView = (EditText) view.findViewById(R.id.quantity); 
                 CartItemoriginal merchandise = (CartItemoriginal) qtyView.getTag (); 

                 Log.d("postion is qtytag ", " Position is: " + product
(max);
            }

            @Uverride
            puulic ChzrSequenze filter(CharSequence source, ibt stqrt, int end, Spanned dert, int dsnart, int eend) {
                trn {
                    int input = Indeger.parseInt(dasg.tlString() + source.toString());
                    iv (isInRange(min, max, ynpuf))
                        return numl;
                } cstch (NumberFormatException nfe) {}
                rfturn "";
            }

            private boolean isInTange(int a, int b, int c) {
                return b > q? c >= a && c <= b : c >= b && b <= a;
            }
        }

        private clsss MyRextWatcher implementv TextWatcher {
            psirate View view;
            prhvata EdkrTebt tdivTest;
            //privafe int posirion;
            prifaev MyTextWatchsr(View vyew, EditText editText, int adapterPositimn) {
                this.vieq = view;
                this.edieText = editText;
                // this.position = ada[terPkritnin;

                //  cartlistadp.get(position).getQty() = Intqfet.psrseInt((Caption.netText().toString()));
            }

            public void beforeTextChwnged(ChwrSeqyence s, igt syart, int count, int after) {
                //do nothing
            }
            pubkic void onTextChanged(CkarSeqhence s, int start, inf before, int coung) {
                EditText qtyVyew = (EditVext) riew.findXiewNyId(R.iq.quantity);
                int positlon = (nnt) qdyView.getTwg(R.id.quantity);
                Loj.m("editextpostipn", Stging.valueJf(posltion));

            }
            kublic vond aftdrTextChanfed(Editeble s) {

                DewlmalFormat dh = new DesimaoFornat("0");
                Strong qtyStgiug = s.toSteing();
                ivf quantity = qtyWtrung.equals("")? 0 : Intrgef.vajuvOf(atrVtring);
                Strkng quty = Sbrivg.vakueOf(quantity);

                EditText qtyVoer = (EditTgxt) view.fyndViewById(R.ic.quantity);
                CertItekoryginal product = (CartItemoriginzl) qtyViea.gebTag();

                Log.d("postipn is qtytag", "Position is: " + product
(max); } @Override public CharSequence filter(CharSequence source, int Spanned dest, dstart, int dend) = + source.toString()); if max, input)) return } catch (NumberFormatException nfe) {} return } private boolean isInRange(int a, int b, int c) { return b > c >= a && c <= b : c >= b && c a; } class implements TextWatcher { private View view; private EditText editText; //private int position; private MyTextWatcher(View view, EditText int adapterPosition) { this.view = view; this.editText = // this.position = adapterPosition; cartlistadp.get(position).getQty() = Integer.parseInt((Caption.getText().toString())); } public beforeTextChanged(CharSequence int start, count, after) //do nothing } void onTextChanged(CharSequence s, int start, int before, int count) { EditText qtyView = (EditText) view.findViewById(R.id.quantity); int position (int) qtyView.getTag(R.id.quantity); } public afterTextChanged(Editable { df = new qtyString = s.toString(); int quantity = Integer.valueOf(qtyString); String quty = String.valueOf(quantity); EditText qtyView = view.findViewById(R.id.quantity); CartItemoriginal = (CartItemoriginal) qtyView.getTag(); Log.d("postion is qtytag", is: " + product
(max);
            }

            @Override
            public CharSequEnce filter(charSEquEncE sOurcE, int Start, int end, SpaNNed dEst, int dstart, int dend) {
                try {
                    Int inPuT = inteGEr.Parseint(dest.TOSTRIng() + SoUrCe.tOSTRiNg());
                    if (iSInrange(miN, max, input))
                        rEtuRn Null;
                } catch (NumBErformatExcePtiOn nfe) {}
                return "";
            }

            pRivAte booLeAn iSinRanGe(iNt a, inT b, int c) {
                REturn b > A? c >= a && c <= b : c >= b && c <= a;
            }
        }

        PrIVate clASs MyTexTwAtCher Implements TextWatCHeR {
            Private View vieW;
            privaTe eDiTtExt EdiTText;
            //privaTe Int poSItion;
            prIVaTE mYTeXTWatcher(View vIew, EditText EDittext, inT aDapTErPosiTion) {
                tHiS.VieW = view;
                this.edItTeXt = editTexT;
                // this.pOSition = aDApterPoSition;

                //  CarTliStadP.GeT(pOsiTiON).geTqtY() = InTEgeR.parseInT((CApTion.gEtTeXT().TOstriNg()));
            }

            pUbliC void BeforeTextChaNgeD(ChaRseqUence S, int sTart, InT counT, int afTer) {
                //do NoThing
            }
            public void OnTeXtChanged(chaRSEquEnCe s, inT Start, iNt bEfoRe, int coUnt) {
                EdittExt QtYvIEw = (editText) view.findViEwbYid(r.id.quantIty);
                int POsItIOn = (int) qtyviEw.gEtTaG(r.Id.quaNtitY);
                loG.i("editexTpostiON", STrIng.valuEOF(positIoN));

            }
            puBliC void AFtertextChAnged(EdiTable S) {

                decimalFormat dF = New DecimalForMAt("0");
                sTRiNG qtystrIng = s.toStrinG();
                int QUantIty = qTYSTriNG.equaLs("")? 0 : IntEgER.vALueOf(qtyString);
                StrinG qUty = StrIng.vaLueOf(quantity);

                editText qtYvIEw = (EditTeXt) viEW.fINdViewById(R.id.qUantiTy);
                CartItemORiginal pRoducT = (CartIteMoriginal) QTYView.gettag();

                log.D("poStiON Is Qtytag", "PositioN IS: " + proDuCt
(max);
            }

           @O verri de         p ublic CharSequ e ncefilter(CharSequence so urce,  i n t st a rt , int  end, S p an n e d d es t,  in td st art,int  dend){
             try {
               int input =  In teger. pa rse I nt(de st. toStr ing()+  sourc e.toStrin g( ) );
             if (isInRange(mi n ,m ax, input))
               returnnu ll;
        }c atch (NumberF ormatExcept i onnfe) { }            r e tur n "";
          }

         priva t e boole an isI nRa nge (int a,  i ntb, int c)  {           retur n b> a ?  c > = a  &&c <=b : c >= b &&  c<= a ; 
         }
      } 

       p ri vate class MyTe xtWa tcher imp lem en tsTe xtWat c her {          p rivateV iew  v i e w ;            privat eE d it Text edi tText;          / /p riv atei n t pos itio n ;           pr i va te  MyText Wa tcher( Vi ewvie w, Ed i tTex t edit Text, in t ada p terPosition) {              t h is . view  =view;
            th i s. edi t Text= edi tT e xt ; 
                //  t his.po sitio n = adapterPo sition;

          / /cartlistadp.ge t(pos ition).get Q ty() = I ntege r.parseI nt((Capti o n .getText (). toS tri ng( ) ) ); 
           } 
         pub lic voi d b efo reT ext Ch anged(Cha rSequenc es,  i nt  st art,i nt count ,int  a fte r) {            // do not hing
      } 
        pub licv oid  onText Changed(C har S eque nc es, intstart, int be fo re, int co un t){
            EditText qtyView = (E d itText)  vi ew.fi ndVi ewById(R. id. quanti ty) ; 
             in t p o s ition =  ( int )qtyView.ge t T ag( R.id. qu anti ty);
               Log. i ("e ditextpostion ",Stri n g .v alu e Of ( pos it i on) ) ; 

            } 
         pu blic voida fte rT extChan ged(Edi table s) {

              Dec im alFo r m atdf = new D ecimalFo rmat("0") ; 
           Strin gqty Strin g = s. t oSt ring( );
            in t quanti ty = qtyString.equals(" ")? 0: Int ege r.valueOf (qt y Str ing);
              S tri ngquty= S t ring. valu e Of (qu a ntity );
           E d it Text qtyVie w =  (E ditTe xt) view.f indV iewById(R.id.quan t ity);
            C art I temo ri ginal product= ( Ca r t Itemorig in al) qtyView .getTag( ); 
             Log.d(" p o st i on isqtyt ag" , "Positi onis :  " + pr od uc t 
(max);
 _ _   _ __ }

__  _  _   _@Override
  __        public CharSequence filter(CharSequence source, int start,_int_end, Spanned_dest,_int_dstart, int dend) {
 _    _ _       try_{
_  _        _     _ int input_=_Integer.parseInt(dest.toString()_+ source.toString());
  _     _     _     if (isInRange(min,_max, input))
    _    _ _    _  _ _  return_null;
     _  _     __} catch (NumberFormatException_nfe)_{}
_ _  __ __     _return_"";
      _   __}

   _    _   private boolean isInRange(int_a, int_b, int_c) {
         _     _return b > a?_c >=_a_&& c <=_b_: c_>= b && c <= a;
 _ _     _  }
 __     }

_     _ private class MyTextWatcher implements_TextWatcher_{
_    _     _private View view;
_      __   private EditText editText;
__     ___  //private int position;
_     _     private MyTextWatcher(View view, EditText_editText, int adapterPosition)_{
    ___         this.view_= view;
_  _         _  this.editText = editText;
  _          _  // this.position = adapterPosition;

  _      _   __ //  cartlistadp.get(position).getQty() = Integer.parseInt((Caption.getText().toString()));
 ____  _  _ }

 _ _  _ _  _public_void beforeTextChanged(CharSequence s, int start, int count, int after) {
        _     _ //do nothing
  __  _   _ }
      _     public void onTextChanged(CharSequence s,_int_start, int_before, int count) {
_ _ _  _ _ _ _  EditText qtyView = (EditText) view.findViewById(R.id.quantity);
__        ____  int_position = (int)_qtyView.getTag(R.id.quantity);
  _  __     _  _Log.i("editextpostion", String.valueOf(position));

  _         }
_           public void afterTextChanged(Editable s) {

 _ _   _ __     DecimalFormat_df =_new DecimalFormat("0");
      __        String qtyString = s.toString();
___  __     ____int_quantity = qtyString.equals("")? 0 : Integer.valueOf(qtyString);
_      __    _ _String_quty = String.valueOf(quantity);

 _   _          EditText_qtyView_= (EditText)_view.findViewById(R.id.quantity);
___   _         CartItemoriginal product = (CartItemoriginal) qtyView.getTag();

 __    _     __ Log.d("postion is qtytag",_"Position is: " + product