Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.

Paste

Pasted as Plain Text by Varsha ( 12 years ago )
JSONArray jb3 = jb2.getJSONArray("hours");
String hour = jb3.toString();
     
Log.i("My Hour Is:==",hour);

if (hour.equalsIgnoreCase("[]")) {
              txt_hour_one.setText("BLANK");
  ans = "BLANK";
}
 else {
  ans = jb3.getString(0);
  txt_hour_one.setText(ans);
  hour1 = ans;

  ans1 = jb3.getString(1);
  if (ans1.equalsIgnoreCase("")) {
      txt_hour_two.setText("Blank");
      hour2 = ans1;
  }
  txt_hour_two.setText(ans1);
  hour2 = ans1;
 }

  txt_hour_one.setText(hour1);
  txt_hour_two.setText(hour2);

 

Revise this Paste

Your Name: Code Language: