activity_edit_incident.xml 3.96 KB
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 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:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.risiko.risiko.activity.EditIncident">

    <include layout="@layout/toolbar"/>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:background="@color/colorWhite"
        android:padding="10dp"
        android:layout_marginTop="70dp"
        android:layout_marginHorizontal="15dp"
        android:layout_marginBottom="15dp">


        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="Endre hendelse"
            android:textColor="@color/colorPrimaryDark"
            android:textSize="25dp"
            android:textStyle="bold"
            app:layout_constraintTop_toTopOf="parent"/>

        <EditText
            android:id="@+id/et_edit_incident_date"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="Dato (2015-07-08):"
            android:inputType="date" />

        <EditText
            android:id="@+id/et_edit_incident_location"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="Sted:"
            android:inputType="text" />

        <EditText
            android:id="@+id/et_edit_incident_title"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="Tittel:"
            android:inputType="text" />

        <EditText
            android:id="@+id/et_edit_incident_description"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="Beskrivelse:"
            android:inputType="textMultiLine"
            android:maxLines="5"
            android:minLines="2" />

        <LinearLayout
            android:padding="10dp"
            android:background="@color/colorLightGray"
            android:layout_marginVertical="25dp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal">

            <TextView

                android:id="@+id/tv_associated_risk"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Tilknyttet risiko" />

            <Spinner
                android:id="@+id/spinner_associated_risk"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content" />

        </LinearLayout>


        <LinearLayout
            android:padding="10dp"
            android:background="@color/colorLightGray"
            android:layout_marginTop="5dp"
            android:layout_marginBottom="25dp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal">

            <TextView

                android:id="@+id/tv_read_access"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Kan leses av:" />

            <Spinner
                android:id="@+id/spinner_read_access"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content" />

        </LinearLayout>



        <Button
            android:id="@+id/btn_edit_incident"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:text="Lagre endring" />

    </LinearLayout>

</android.support.constraint.ConstraintLayout>