Home > Mobile >  Why android development with this error?
Why android development with this error?

Time:03-05


Why click on the button event will flash back below?


Public void ptsanmjs (View v)
{
ContentValues Values=new ContentValues ();
ArrayList A=new ArrayList<> (a);
ArrayList B=new ArrayList<> (a);

Cursor cur=db. Query (" kaijianghaoma ", null, "haoma", new String [] {}, null, null, "qihao asc");
Cursor shuju=ptsanm. Query (" putongsanma ", null, "putong3haoma", new String [] {}, null, null, null);
While (shuju. MoveToNext ())
{
Int name=shuju. GetColumnIndex (" putong3haoma ");

String STR=shuju. Get String (name);
B.a dd (STR);
}

While (cur. MoveToNext ())
{
Int cname=cur. GetColumnIndex (haoma "");

String st=cur. Get String (cname);
A.a dd (st); }

ArrayList E=new ArrayList (a);
For (String s1: b)
{
int cnt=0;
Int cnt2=0;
The List list1=new ArrayList (arrays.aslist (s1. The split () ", "));


For (String s2: a)
{

The List list2=new ArrayList (arrays.aslist (s2. The split () ", "));
The List list3=new ArrayList (list1);
List3. RetainAll (list2);
If (list3. The size ()==0)



{

cnt++;
}
The else
{

CNT=0;
}
If (CNT & gt; Cnt2)
{
Cnt2=CNT;
E.a dd (cnt2);
}

}

Int f=0;
for (int i=0; I & lt; E.s considering (); I++)
{

F +=um participant et (I);

}
Int=f/g e.s considering ();

Values. The put (" putong3zdpingjun ", g);
Values. The put (" putong3zuida cnt2);
Values. The put (" putong3dangqian ", CNT);
Putongsanma ptsanm. Update (", "Values," putong3haoma=?" , new String [] {s1});


}
}
  • Related