Home > Mobile >  Could you tell me how to add this! Have a great god under the guidance?
Could you tell me how to add this! Have a great god under the guidance?

Time:10-10

{
ListView list;
SQLiteDatabase PTLM;

@ Override
Public View onCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{

Putongliangmadatabase data=https://bbs.csdn.net/topics/new putongliangmadatabase (getActivity ());
PTLM=data. GetWritableDatabase ();
Cursor Cursor=PTLM. Query (" putongliangma ", null, "putong2haoma",
New String [] {}, null, null, null);
While (cursor. MoveToNext ()) {

SimpleCursorAdapter adpter=new SimpleCursorAdapter (
GetActivity (), R.l ayout putong1_item, cursor, new String [] {putong2haoma ", "
"Putong2dangqian", "putong2shangchi putong2zuida", ""},
New int [] {R.i d.p utong1_haomax, R.i d.p utong1_dangqianx, R.i d.p utong1_shangchix, R.i d.p utong1_zuidax},
SimpleCursorAdapter. FLAG_REGISTER_CONTENT_OBSERVER);
List=(ListView) getView (). The findViewById (R.i d.p utong1_haomalist);
List. SetAdapter (adpter);
}
Return inflater. Inflate (R.l ayout putong1_fragment, null);




}


Public void PTLMTJ (View v) {
ArrayList List=new ArrayList<> (a);
ContentValues values=new ContentValues ();
For (int a=1; A. & lt;=12; +)
{
For (int b=1; B & lt;=12; B++)

{
If (a!=b)
{
If (a & lt; B)
{



List. The add (" \ r \ n "+ a +", "+ b);

}
}
}
}



Values. The put (" putong2haoma ", a List).
Values. The put (" putong2dangqian ", 0).
Values. The put (" putong2shangchi ", 0).
Values. The put (" putong2zuida ", 0).

}


}

CodePudding user response:

Values. The put (" putong2haoma ", a List). It is wrong to

CodePudding user response:

Contenvalues basic types of data can only be stored, like a string, int, cannot store object or List this stuff

CodePudding user response:

refer to the second floor the wind light cloud light v10 reply:
Contenvalues basic types of data, can only be stored as string, int, such as not such thing as a storage object or a List

Thank you very much! That you want to store a list of things to do?

CodePudding user response:

reference qq_28484955 reply: 3/f
Quote: refer to the second floor the wind light cloud light v10 reply:
Contenvalues basic types of data can only be stored, like a string, int, such as not such thing as a storage object or a List

Thank you very much! That you want to store a list of things to do?


To find a way to type into a String
  • Related