jeudi 21 juin 2018

button click event from item and if condition multiply time

button click event if condition visibility and gone , but multiple click item multiple time view

if(stu==0){ myholder.linearmain.setVisibility ( View.VISIBLE ); SalesOrderDetail ( models.get ( position ).getId ( ) , myholder.linearmain , position ); stu = 1; log.e ( "stu" , "" + stu ); Toast.makeText ( context , "data" , Toast.LENGTH_SHORT ).show ( ); if ( isclick == 1) { isclick=1; Toast.makeText ( context , "click" , Toast.LENGTH_SHORT ).show ( ); //SalesOrderDetail ( models.get ( position ).getId ( ) , myholder.linearmain , position ); //log.e ( "stu" , "" + stu ); } else { isclick = 0; Toast.makeText ( context , "unclick" , Toast.LENGTH_SHORT ).show ( ); //Log.e ( "isc", "onClick: " +isclick ); } }else { myholder.linearmain.setVisibility ( View.GONE ); stu = 0; Toast.makeText ( context , "not data" , Toast.LENGTH_SHORT ).show ( ); }

Aucun commentaire:

Enregistrer un commentaire