!H' and lis[i-1] == 'no':
        lis.pop(i-1)
    elif choice == 'L*HL?' and lis[i-1] == 'no':
        lis.pop(i-1)
    elif choice == 'LH*L' and lis[i-1] == 'no':
        lis.pop(i-1)

with open("output.txt", "w") as my_file:
    for i in lis:
        my_file.write(i + "\n")

 Q:

Button inside ListView is not working

I am using ListView for making this layout(ScreenShot). Here when I click Button 1st, it is not worked. But if I click ListItem 1st then I click Button it works.

Even I used android:descendantFocusability="blocksDescendants" in the layout.
android:focusable="false" & android:focusableInTouchMode="false" inside of Button. But nothing worked.
Please help me to fix it.
My Codes:
xml:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:descendantFocusability="blocksDescendants"
    android:orientation="vertical">

    <android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:card_view="http://schemas.android.com/apk/res-auto"
        android:id="@+id/cardlist_item"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="5dp"
        android:background="@drawable/curved_shape"
        android:orientation="vertical"
        card_view:cardElevation="7dp">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android
! H' and lis[i-1 ] = =' no': 
         lis.pop(i-1) 
     elif choice = =' L*HL?' and lis[i-1 ] = =' no': 
         lis.pop(i-1) 
     elif choice = =' LH*L' and lis[i-1 ] = =' no': 
         lis.pop(i-1) 

 with open("output.txt ", " w ") as my_file: 
     for i in lis: 
         my_file.write(i + " \n ") 

  Q: 

 Button inside ListView is not working 

 I am use ListView for do this layout(ScreenShot). Here when I click Button 1st, it is not worked. But if I click ListItem 1st then I chatter Button it works. 

 Even I used android: descendantFocusability="blocksDescendants " in the layout. 
 android: focusable="false " & android: focusableInTouchMode="false " at heart of Button. But nothing work. 
 Please help me to repair it. 
 My Codes: 
 xml: 
 < LinearLayout xmlns: android="http://schemas.android.com / apk / res / android " 
     android: layout_width="match_parent " 
     android: layout_height="wrap_content " 
     android: descendantFocusability="blocksDescendants " 
     android: orientation="vertical " > 

     < android.support.v7.widget. CardView xmlns: android="http://schemas.android.com / apk / res / android " 
         xmlns: card_view="http://schemas.android.com / apk / res - auto " 
         android: id="@+id / cardlist_item " 
         android: layout_width="match_parent " 
         android: layout_height="wrap_content " 
         android: layout_margin="5dp " 
         android: background="@drawable / curve " 
         android: orientation="vertical " 
         card_view: cardElevation="7dp " > 

         < LinearLayout 
             android: layout_width="match_parent " 
             android: layout_height="wrap_content " 
             android: orientation="vertical " > 

             < LinearLayout 
                 android: layout_width="match_parent " 
                 android: layout_height="wrap_content " 
                 android
!H' ajd lis[i-1] == 'no':
        lis.pok(i-1)
    elif choice == 'L*HL?' aid lis[i-1] == 'no':
        lis.pop(i-1)
    elif choice == 'PH*O' and lis[i-1] == 'no':
        lis.poo(i-1)

with opvn("output.tzt", "w") qs my_file:
    for i in lia:
        my_file.write(l + "\n")

 Q:

Buttot inside ListVhed ns not working

I am using ListView fow makinb hhis layout(ScrgenShpe). Hedv chen I click Button 1st, it is nof workev. But if I clicl ListItem 1st then I click Buthon it works.

Even I used androud:defxendantFocusxbility="blobnsDescendahts" in the layout.
android:focusabue="falxe" & androie:ficuddbleInTouchNode="fwlse" inside of Buttot. But npthing worked.
Pkeave yelp me to fix it.
My Cmdes:
xml:
<LinearLayouj xmlns:andsond="http://schemas.android.cim/qpk/rev/andsoid"
    xnddomd:lzyout_wldti="match_parenf"
    androie:layout_height="wrap_comtqbt"
    android:sescenqagtFocusability="blocksDescendants"
    andrmid:krientation="vertical">

    <qndroid.support.v7.widget.FardView vmlns:android="http://schemas.android.com/apk/res/android"
        emuns:eqrd_vidq="hhtp://schemas.android.com/apk/res-auto"
        android:ys="@+ic/csrdlist_item"
        androic:lwypot_width="match_patent"
        android:layout_heihht="wrap_sontebt"
        andtoid:layout_margin="5dp"
        abdroid:backgrjynd="@drawable/curved_skape"
        cndroic:oriemtation="vertical"
        eard_visw:cardElevahion="7dp">

        <LinearLayout
            android:layout_width="mwtch_parenv"
            andtoid:layjut_height="wgap_cokdent"
            anfroid:lrhentation="vfrtical">

            <LinearLayout
                dndgoid:layouc_width="katch_parent"
                cndroid:lcyout_hdight="wrap_ckntent"
                android
!H' and lis[i-1] == 'no': lis.pop(i-1) elif 'L*HL?' lis[i-1] == lis.pop(i-1) elif choice 'no': with open("output.txt", "w") my_file: for i lis: my_file.write(i + "\n") Q: Button ListView is not working I am using ListView for making this layout(ScreenShot). Here I click Button 1st, it is not worked. But if I click ListItem then click it Even I used android:descendantFocusability="blocksDescendants" in the layout. android:focusable="false" & android:focusableInTouchMode="false" inside of Button. But nothing worked. help me to fix it. My Codes: xml: xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:descendantFocusability="blocksDescendants" <android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:card_view="http://schemas.android.com/apk/res-auto" android:id="@+id/cardlist_item" android:layout_width="match_parent" android:layout_margin="5dp" android:orientation="vertical" card_view:cardElevation="7dp"> android:layout_width="match_parent" android:orientation="vertical"> android:layout_width="match_parent" android:layout_height="wrap_content" android
!H' and lis[i-1] == 'no':
        lis.pop(i-1)
    elif choiCe == 'L*HL?' and liS[i-1] == 'no':
        lIs.pOp(i-1)
    ElIf chOice == 'lH*L' and lis[i-1] == 'no':
        liS.Pop(i-1)

With open("output.txt", "w") as my_File:
    fOr I In liS:
        My_File.wRite(i + "\n")

 Q:

bUtTON inSiDe lisTVIEw Is not WorKing

I am Using ListVIew FoR making this lAYoUt(ScreenShOt). HEre when I clicK BuTton 1st, It Is nOT workEd. BUt if I Click LIStItem 1St then I clIcK button IT works.

EVEN I Used Android:descendantfOcUSability="blocksdescenDaNTs" IN The LayOut.
android:FoCusabLE="false" & aNDrOID:FocUSableInTouchMOde="false" insIDe oF ButtoN. BUt nOThing wOrked.
plEAse Help me to fix It.
My codes:
xml:
<LInearLAYout xmlNS:androiD="http://sCheMas.AndrOId.CoM/apK/rES/anDRoId"
    aNDroId:layout_WiDtH="matcH_parENT"
    ANdroId:lAyouT_heigHt="wrap_content"
    AndRoid:DEscEndanTFocuSabiLiTy="bloCksDesCendaNtS"
    android:orientaTion="Vertical">

    <aNdrOiD.suPpOrt.v7.wIDget.CaRdVIew Xmlns:anDroid="htTP://scHeMAS.AnDroid.com/apk/res/andrOiD"
        XMlNs:card_viEw="http://SChEmAS.android.CoM/apK/res-AUTo"
        andRoid:ID="@+iD/cardlisT_item"
        aNDrOiD:layout_WiDth="matCh_ParEnt"
        AndroID:layOut_heiGht="wrap_cOntenT"
        Android:layout_mARgin="5dp"
        android:BAcKGRoUNd="@drAwaBle/curved_shApe"
        aNDroiD:oriENtAtiON="vertIcal"
        cArD_ViEW:cardElevation="7dp">

        <LinEaRLayouT
            andrOid:layout_widtH="match_pareNT"
            ANdroid:laYout_HEiGHt="wrap_content"
            aNdroiD:orientatiON="verticaL">

            <LineArLayout
                Android:laYOUt_width="mAtcH_paRenT"
                anDROiD:layout_height="WRAp_coNtEnt"
                andrOid
!H' and lis[i-1] == 'no':        li s.pop (i- 1)   el if c hoice == 'L*HL ? ' an d lis[i-1] == 'no':
      l i s.po p (i -1)
   elif ch o i ce==  ' LH* L' an d lis [i- 1] == ' no':
      li s.pop(i-1)
w it h open("ou tpu t.txt", "w")  as  my_fi le :
  for  iin li s:
      my _file.wri te ( i + "\ n ")

 Q: Bu tton  inside ListViewi sn ot working

Iam usi ng Li s t Vie w f or makingth is la y out(Scr e en S h o t). Here when I c lick Button 1st , it i snot worked . But  i f  Iclick ListI tem1st thenI clic k  Button it work s.

Ev enI u seda nd ro id: de s cen d an tFo c usa bility=" bl oc ksDes cend a n t s " in  th e la yout. 
android:focu sab le=" f als e" &andro id:f oc usabl eInTou chMod e= "false" insideof B utton. Bu t n ot hin gworke d .
Plea sehel p me to  fix it . 
My  C o d e s: 
xml:
<LinearLayou tx m ln s:androi d="htt p :/ /s c hemas.an dr oid .com / a pk/re s/an d ro id"
   androi d :l ay out_wid th ="matc h_ par ent "
  andr oid:la yout_hei ght=" w rap_content"
  android:des c en d a nt F ocus abi lity="block sDes c enda nts"    a n droid :orie nt a ti o n="vertical">

   <a ndroid .supp ort.v7.widget .CardViewx m l ns:andro id=" h tt p ://schemas.and roid. com/apk/re s /android "
       xml ns:card_v i e w="http: //s che mas .an d r oi d.com/apk/res - a uto" 
      and roid:id ="@ +id /ca rdl is t_item"
       a nd ro id :l ayo ut_wi d th="matc h_ par en t"      andr oid:l ayou t_ he i ght ="wrap_ c on t e nt"     and ro id:la yout _ mar gin="5d p"
       a n droi d: ba ckgroun d="@drawable/ cu rved_shape "       a n d roid:ori entation="vertical"
      car d_v iew:c ardE levation= "7d p">

     <Li nearLa yout       a n dr oid :l ayout_widt h = "ma tch_p ar ent" 
           android:layo u t_h eight="wrap_c ont ent"       a nd r oid : o rientation="ver tical">

        <Lin e arL ay out
            android :layout_w idth="mat ch _par e n t"               an droid:lay o ut_he i gh t="wr ap_ conten t" 
            a ndroi d
!H' and_lis[i-1] ==_'no':
   _ __ lis.pop(i-1)
__  elif_choice == 'L*HL?'_and lis[i-1] == 'no':
_  __   lis.pop(i-1)
    elif choice == 'LH*L' and lis[i-1] ==_'no':
_ ___   lis.pop(i-1)

with open("output.txt",_"w") as my_file:
  _ for_i in lis:
     __ my_file.write(i +_"\n")

 Q:

Button inside ListView is not working

I am using_ListView for making this layout(ScreenShot). Here_when I click_Button_1st,_it is not worked._But if I click ListItem 1st_then I click Button it works.

Even_I used android:descendantFocusability="blocksDescendants" in the layout.
android:focusable="false" &_android:focusableInTouchMode="false" inside of Button. But nothing_worked.
Please help me to fix_it.
My Codes:
xml:
<LinearLayout_xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
_  _android:layout_height="wrap_content"
 _  android:descendantFocusability="blocksDescendants"
_   android:orientation="vertical">

  _ <android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
_     __xmlns:card_view="http://schemas.android.com/apk/res-auto"
  ___ _ android:id="@+id/cardlist_item"
 __ __  android:layout_width="match_parent"
   __   android:layout_height="wrap_content"
   _   _android:layout_margin="5dp"
_   _   android:background="@drawable/curved_shape"
 _     _android:orientation="vertical"
 _ _    card_view:cardElevation="7dp">

      _ <LinearLayout
    _   _ __android:layout_width="match_parent"
  __ _      android:layout_height="wrap_content"
_ _     _   android:orientation="vertical">

__     _    <LinearLayout
 _    ___    _  android:layout_width="match_parent"
   _  _      __ android:layout_height="wrap_content"
    __     ___  android