Commit ac330f32 authored by Lucas Braz Cunha's avatar Lucas Braz Cunha

Issue AGILE#152: Added datePicker to scheduling acitivty

Signed-off-by: Lucas Braz Cunha's avatarLucas B. Cunha <lbc16@inf.ufpr.br>
parent 4d10ccda
......@@ -21,6 +21,7 @@ import android.view.MenuItem;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.Spinner;
import android.widget.TextView;
......@@ -54,6 +55,8 @@ public class SchedulingActivity extends AppCompatActivity implements Scheduling
private Spinner spnr_citizen;
private LinearLayout ll_fields;
//TODO: create class "ConfirmationDialog"
private ConfirmationDialog confirmationDialog;
......@@ -67,6 +70,8 @@ public class SchedulingActivity extends AppCompatActivity implements Scheduling
setSupportActionBar(toolbar);
getSupportActionBar().setTitle(null);
pb_scheduling = (ProgressBar) findViewById(R.id.pb_scheduling);
actionMenuView = (ActionMenuView) toolbar.findViewById(R.id.agendador_toolbar_menu);
menuBuilder = (MenuBuilder) actionMenuView.getMenu();
//noinspection RestrictedApi
......@@ -81,6 +86,10 @@ public class SchedulingActivity extends AppCompatActivity implements Scheduling
}
});
ll_fields = (LinearLayout) findViewById(R.id.ll_scheduling_fields);
//pb_scheduling.setVisibility(View.VISIBLE);
//ll_fields.setVisibility(View.INVISIBLE);
spnr_citizen = (Spinner) findViewById(R.id.spnr_scheduling_citizen);
......
......@@ -2,7 +2,6 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/relativelayout_account"
android:layout_width="match_parent"
android:layout_height="match_parent">
......
......@@ -23,4 +23,6 @@
app:headerLayout="@layout/nav_drawer_header"
app:menu="@menu/activity_home_drawer" />
</android.support.v4.widget.DrawerLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="59dp"
android:background="@color/colorGray">
android:background="@color/colorGray"
android:orientation="vertical">
<TextView
android:id="@+id/tv_homeact_welcome"
......@@ -23,15 +23,19 @@
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/tv_homeact_welcome"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:background="@color/colorWhite">
<LinearLayout
android:id="@+id/ll_scheduling_fields"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:baselineAligned="false"
android:orientation="vertical">
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
......@@ -41,13 +45,13 @@
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:textSize="16sp"
android:textStyle="normal|bold"
android:typeface="normal"/>
android:typeface="normal" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="14dp"
android:layout_gravity="left"
android:layout_gravity="start"
android:text="@string/scheduling_citizen"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:textSize="14sp"
......@@ -56,6 +60,7 @@
<Spinner
android:id="@+id/spnr_scheduling_citizen"
android:layout_marginEnd="35dp"
android:layout_marginStart="14dp"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
......@@ -63,7 +68,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="14dp"
android:layout_gravity="left"
android:layout_gravity="start"
android:text="@string/scheduling_sector"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:textSize="14sp"
......@@ -72,6 +77,7 @@
<Spinner
android:id="@+id/spnr_scheduling_sector"
android:layout_marginEnd="35dp"
android:layout_marginStart="14dp"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
......@@ -79,7 +85,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="14dp"
android:layout_gravity="left"
android:layout_gravity="start"
android:text="@string/scheduling_type"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:textSize="14sp"
......@@ -88,6 +94,7 @@
<Spinner
android:id="@+id/spnr_scheduling_type"
android:layout_marginEnd="35dp"
android:layout_marginStart="14dp"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
......@@ -95,7 +102,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="14dp"
android:layout_gravity="left"
android:layout_gravity="start"
android:text="@string/scheduling_location"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:textSize="14sp"
......@@ -104,11 +111,34 @@
<Spinner
android:id="@+id/spnr_scheduling_location"
android:layout_marginEnd="35dp"
android:layout_marginStart="14dp"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<DatePicker
android:id="@+id/dpicker_scheduling_date"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_marginBottom="15dp"
android:layout_marginEnd="54dp"
android:layout_marginStart="54dp"
android:layout_marginTop="21dp" />
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</LinearLayout>
\ No newline at end of file
<ProgressBar
android:id="@+id/pb_scheduling"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:indeterminate="true"
android:indeterminateTint="@color/colorGreen"
android:indeterminateTintMode="src_atop"
android:visibility="invisible" />
</RelativeLayout>
\ No newline at end of file
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