Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Code
- JSONObject[] arrJSONsimpleNote = null;
- arrJSONsimpleNote = gd.displaySimpleNote(Login.userId,strDate);
- for(int k = 0 ; k < arrJSONsimpleNote.length ; k++){
- strNoteTitle = arrJSONsimpleNote[k].get("Note_Title").toString();
- strNoteID = arrJSONsimpleNote[k].get("Note_Id").toString();
- tvSimpleNote = new TextView(Calender.this);
- tvSimpleNote.setText(strNoteTitle);
- tvSimpleNote.setTag(strNoteID);
- LinearLayout.LayoutParams llp = new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
- llp.setMargins(5,10,0,0);
- tvSimpleNote.setLayoutParams(llp);
- tvSimpleNote.setMaxLines(1);
- tvSimpleNote.setTextColor(Color.BLACK);
- tvSimpleNote.setWidth(150);
- tvSimpleNote.setTextSize(13);
- LlDateLayout.addView(tvSimpleNote);
- imgSeparator.setImageResource(R.drawable.seperator);
- LlDateLayout.addView(imgSeparator);
- tvSimpleNote.setOnClickListener(new OnClickListener() {
- public void onClick(View v1) {
- Intent intent = new Intent(Calender.this,NewCalendarNote.class);
- intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
- intent.putExtra("Flag", "DisplayNote");
- intent.putExtra("NoteId", v1.getTag().toString());
- intent.putExtra("strDate", strDate);
- startActivity(intent);
- }
- });
- }
- //XML
- <TableRow
- android:id="@+id/tblrow2"
- android:background="#f5f5f5" >
- <LinearLayout
- android:id="@+id/Llfirstday"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="vertical" >
- </LinearLayout>
- </TableRow>
Advertisement
Add Comment
Please, Sign In to add comment