Commit e74560b2 authored by Jessica Suszek's avatar Jessica Suszek

Basic add plans - works

parent 97e23cd6
......@@ -65,13 +65,14 @@ public class MyPlanActivity extends AppCompatActivity {
for(int i=0; i<plans.length(); i++){
JSONObject plan = plans.getJSONObject(i);
String destination = plan.getString("destination");
String startDate = plan.getString("startDate");
String endDate = plan.getString("endDate");
String destination = plan.getString("destination");
//String startDate = plan.getString("startDate");
// String endDate = plan.getString("endDate");
String description = plan.getString("description");
result.append(destination+ " " +startDate+" "+endDate+" "+description+ "" +
"\n" );
//
// result.append(destination + " " + startDate +" "+ endDate +" "+ description + "" +
// "\n" );
result.append(destination + " " +description + " " + "\n" );
}
result.append("===\n");
......
......@@ -11,17 +11,6 @@
tools:context="travelpals.travelpals.MyPlanActivity">
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="date"
android:ems="10"
android:layout_below="@+id/startDate"
android:layout_alignStart="@+id/startDate"
android:layout_marginTop="21dp"
android:id="@+id/endDate"
android:text="endDate" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......@@ -32,27 +21,6 @@
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="date"
android:ems="10"
android:id="@+id/startDate"
android:text="startDate"
android:layout_marginTop="29dp"
android:layout_below="@+id/destination"
android:layout_alignStart="@+id/destination" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="text"
android:text="description"
android:ems="10"
android:id="@+id/description"
android:layout_centerVertical="true"
android:layout_alignStart="@+id/endDate" />
<Button
android:text="Add Plan"
android:layout_width="wrap_content"
......@@ -69,13 +37,43 @@
android:layout_alignEnd="@+id/button"
android:id="@+id/button3" />
<EditText
<TextView
android:text="result"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="textMultiLine"
android:ems="10"
android:layout_marginTop="37dp"
android:id="@+id/result"
android:layout_below="@+id/button3"
android:layout_alignStart="@+id/description" />
android:layout_alignStart="@+id/button3" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="date"
android:ems="10"
android:id="@+id/startDate"
android:text="startDate"
android:layout_below="@+id/destination"
android:layout_alignStart="@+id/destination" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="date"
android:ems="10"
android:id="@+id/endDate"
android:text="endDate"
android:layout_below="@+id/startDate"
android:layout_alignStart="@+id/startDate" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="text"
android:text="description"
android:ems="10"
android:id="@+id/description"
android:layout_below="@+id/endDate"
android:layout_alignStart="@+id/endDate" />
</RelativeLayout>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment