Commit c6affb683efdb324795e03d4c4d8f39a48e59a80

Authored by kristinlaahneolsen
1 parent a09824ed

Ordnet på tema, hovedside og aktivitets- og hendelseslistene. Så at det ble noe …

…galt med toolbaren, så dette må fikses. La også merke til at appen kræsjnår man trykker seg videre inn på vurderinger. Usikker på om dette skjedde under merging
Risiko/app/src/main/AndroidManifest.xml
... ... @@ -8,7 +8,7 @@
8 8 android:label="@string/app_name"
9 9 android:roundIcon="@mipmap/ic_launcher_round"
10 10 android:supportsRtl="true"
11   - android:theme="@style/AppTheme">
  11 + android:theme="@style/risikoTheme">
12 12 <activity android:name="activity.Startside">
13 13 <intent-filter>
14 14 <action android:name="android.intent.action.MAIN" />
... ...
Risiko/app/src/main/java/activity/MainMenu.java
... ... @@ -3,7 +3,9 @@ package activity;
3 3 import android.content.Intent;
4 4 import android.support.v7.app.AppCompatActivity;
5 5 import android.os.Bundle;
  6 +import android.support.v7.widget.Toolbar;
6 7 import android.widget.Button;
  8 +import android.widget.TextView;
7 9  
8 10 import com.risiko.risiko.R;
9 11  
... ...
Risiko/app/src/main/res/drawable/ic_add.xml 0 → 100644
  1 +<vector xmlns:android="http://schemas.android.com/apk/res/android"
  2 + android:width="24dp"
  3 + android:height="24dp"
  4 + android:viewportWidth="24.0"
  5 + android:viewportHeight="24.0">
  6 + <path
  7 + android:fillColor="#f1754d"
  8 + android:pathData="M14,2L6,2c-1.1,0 -1.99,0.9 -1.99,2L4,20c0,1.1 0.89,2 1.99,2L18,22c1.1,0 2,-0.9 2,-2L20,8l-6,-6zM16,16h-3v3h-2v-3L8,16v-2h3v-3h2v3h3v2zM13,9L13,3.5L18.5,9L13,9z"/>
  9 +</vector>
... ...
Risiko/app/src/main/res/drawable/ic_arrow_right.xml
... ... @@ -4,6 +4,6 @@
4 4 android:viewportWidth="24.0"
5 5 android:viewportHeight="24.0">
6 6 <path
7   - android:fillColor="#36ab8a"
  7 + android:fillColor="#f1754d"
8 8 android:pathData="M8.59,16.34l4.58,-4.59 -4.58,-4.59L10,5.75l6,6 -6,6z"/>
9 9 </vector>
... ...
Risiko/app/src/main/res/drawable/ic_incident.xml 0 → 100644
  1 +<vector xmlns:android="http://schemas.android.com/apk/res/android"
  2 + android:width="24dp"
  3 + android:height="24dp"
  4 + android:viewportWidth="24.0"
  5 + android:viewportHeight="24.0">
  6 + <path
  7 + android:fillColor="#f1754d"
  8 + android:pathData="M13.5,0.67s0.74,2.65 0.74,4.8c0,2.06 -1.35,3.73 -3.41,3.73 -2.07,0 -3.63,-1.67 -3.63,-3.73l0.03,-0.36C5.21,7.51 4,10.62 4,14c0,4.42 3.58,8 8,8s8,-3.58 8,-8C20,8.61 17.41,3.8 13.5,0.67zM11.71,19c-1.78,0 -3.22,-1.4 -3.22,-3.14 0,-1.62 1.05,-2.76 2.81,-3.12 1.77,-0.36 3.6,-1.21 4.62,-2.58 0.39,1.29 0.59,2.65 0.59,4.04 0,2.65 -2.15,4.8 -4.8,4.8z"/>
  9 +</vector>
... ...
Risiko/app/src/main/res/drawable/ic_list.xml 0 → 100644
  1 +<vector xmlns:android="http://schemas.android.com/apk/res/android"
  2 + android:width="24dp"
  3 + android:height="24dp"
  4 + android:viewportWidth="24.0"
  5 + android:viewportHeight="24.0">
  6 + <path
  7 + android:fillColor="#f1754d"
  8 + android:pathData="M4,10.5c-0.83,0 -1.5,0.67 -1.5,1.5s0.67,1.5 1.5,1.5 1.5,-0.67 1.5,-1.5 -0.67,-1.5 -1.5,-1.5zM4,4.5c-0.83,0 -1.5,0.67 -1.5,1.5S3.17,7.5 4,7.5 5.5,6.83 5.5,6 4.83,4.5 4,4.5zM4,16.5c-0.83,0 -1.5,0.68 -1.5,1.5s0.68,1.5 1.5,1.5 1.5,-0.68 1.5,-1.5 -0.67,-1.5 -1.5,-1.5zM7,19h14v-2L7,17v2zM7,13h14v-2L7,11v2zM7,5v2h14L21,5L7,5z"/>
  9 +</vector>
... ...
Risiko/app/src/main/res/drawable/ic_sequence.xml 0 → 100644
  1 +<vector xmlns:android="http://schemas.android.com/apk/res/android"
  2 + android:width="24dp"
  3 + android:height="24dp"
  4 + android:viewportWidth="24.0"
  5 + android:viewportHeight="24.0">
  6 + <path
  7 + android:fillColor="#f1754d"
  8 + android:pathData="M19,3h-4.18C14.4,1.84 13.3,1 12,1c-1.3,0 -2.4,0.84 -2.82,2L5,3c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2L21,5c0,-1.1 -0.9,-2 -2,-2zM12,3c0.55,0 1,0.45 1,1s-0.45,1 -1,1 -1,-0.45 -1,-1 0.45,-1 1,-1zM14,17L7,17v-2h7v2zM17,13L7,13v-2h10v2zM17,9L7,9L7,7h10v2z"/>
  9 +</vector>
... ...
Risiko/app/src/main/res/layout/activity_activities.xml
... ... @@ -11,6 +11,7 @@
11 11 android:text="Liste over aktivititeter"
12 12 android:textStyle="bold"
13 13 android:textSize="25dp"
  14 + android:textColor="@color/colorPrimaryDark"
14 15 app:layout_constraintLeft_toLeftOf="parent"
15 16 app:layout_constraintRight_toRightOf="parent"
16 17 app:layout_constraintTop_toTopOf="parent"
... ... @@ -20,7 +21,8 @@
20 21 <android.support.constraint.ConstraintLayout
21 22 android:layout_width="match_parent"
22 23 android:layout_height="match_parent"
23   - android:layout_marginTop="?attr/actionBarSize">
  24 + android:layout_marginVertical="70dp"
  25 + android:layout_marginHorizontal="20dp">
24 26  
25 27  
26 28 <android.support.v4.widget.SwipeRefreshLayout
... ... @@ -30,8 +32,9 @@
30 32 android:layout_height="match_parent">
31 33  
32 34  
33   -
34 35 <LinearLayout
  36 + android:layout_marginVertical="10dp"
  37 + android:background="@color/colorWhite"
35 38 android:layout_width="match_parent"
36 39 android:layout_height="match_parent"
37 40 android:orientation="vertical">
... ...
Risiko/app/src/main/res/layout/activity_incidents.xml
... ... @@ -10,29 +10,33 @@
10 10 android:layout_height="wrap_content"
11 11 android:text="Hendelser"
12 12 android:textStyle="bold"
  13 + android:textColor="@color/colorPrimaryDark"
13 14 android:textSize="25dp"
14 15 app:layout_constraintLeft_toLeftOf="parent"
15 16 app:layout_constraintRight_toRightOf="parent"
16 17 app:layout_constraintTop_toTopOf="parent"
17   - android:layout_marginTop="25dp"/>
  18 + android:layout_marginTop="25dp"
  19 + android:layout_marginBottom="10dp"/>
18 20  
19 21  
20 22 <android.support.constraint.ConstraintLayout
21 23 android:layout_width="match_parent"
22 24 android:layout_height="match_parent"
23   - android:layout_marginTop="?attr/actionBarSize">
  25 + android:layout_marginVertical="70dp"
  26 + android:layout_marginHorizontal="20dp">
24 27  
25 28  
26 29 <android.support.v4.widget.SwipeRefreshLayout
27 30 xmlns:android="http://schemas.android.com/apk/res/android"
28 31 android:id="@+id/swiperefresh"
29 32 android:layout_width="match_parent"
30   - android:layout_height="match_parent">
  33 + android:layout_height="wrap_content">
31 34  
32 35  
33 36 <LinearLayout
  37 + android:background="@color/colorWhite"
34 38 android:layout_width="match_parent"
35   - android:layout_height="match_parent"
  39 + android:layout_height="wrap_content"
36 40 android:orientation="vertical">
37 41  
38 42 <ListView
... ...
Risiko/app/src/main/res/layout/activity_main_menu.xml
... ... @@ -15,35 +15,52 @@
15 15 <TextView
16 16 android:layout_width="wrap_content"
17 17 android:layout_height="wrap_content"
  18 + android:textColor="@color/colorPrimaryDark"
18 19 android:text="Hovedmeny"
19   - android:textSize="25dp"
  20 + android:textSize="30sp"
20 21 android:textStyle="bold"
21 22 android:layout_margin="35dp"/>
22 23  
23 24 <Button
  25 + android:background="@color/colorWhite"
24 26 android:id="@+id/btn_to_activitylist"
25   - android:layout_width="250dp"
  27 + android:layout_width="300dp"
26 28 android:layout_height="wrap_content"
27   - android:text="Liste over aktiviteter"/>
  29 + android:text="Liste over aktiviteter"
  30 + android:padding="10dp"
  31 + android:layout_margin="10dp"
  32 + android:drawableLeft="@drawable/ic_list" />
28 33  
29 34  
30 35 <Button
  36 + android:background="@color/colorWhite"
31 37 android:id="@+id/btn_to_sequense_of_activities"
32   - android:layout_width="250dp"
  38 + android:layout_width="300dp"
33 39 android:layout_height="wrap_content"
34   - android:text="Sekvens av aktiviteter"/>
  40 + android:text="Sekvens av aktiviteter"
  41 + android:padding="10dp"
  42 + android:layout_margin="10dp"
  43 + android:drawableLeft="@drawable/ic_sequence"/>
35 44  
36 45 <Button
  46 + android:background="@color/colorWhite"
37 47 android:id="@+id/btn_to_events"
38   - android:layout_width="250dp"
  48 + android:layout_width="300dp"
39 49 android:layout_height="wrap_content"
40   - android:text="Hendelser"/>
  50 + android:text="Hendelser"
  51 + android:padding="10dp"
  52 + android:layout_margin="10dp"
  53 + android:drawableLeft="@drawable/ic_incident"/>
41 54  
42 55 <Button
  56 + android:background="@color/colorWhite"
43 57 android:id="@+id/btn_to_new_event"
44   - android:layout_width="250dp"
  58 + android:layout_width="300dp"
45 59 android:layout_height="wrap_content"
46   - android:text="Ny hendelse"/>
  60 + android:text="Ny hendelse"
  61 + android:padding="10dp"
  62 + android:layout_margin="10dp"
  63 + android:drawableLeft="@drawable/ic_add"/>
47 64  
48 65 </LinearLayout>
49 66  
... ...
Risiko/app/src/main/res/layout/activitylist.xml
1 1 <?xml version="1.0" encoding="utf-8"?>
2   -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  2 +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 3 android:layout_width="match_parent"
4   - android:layout_height="match_parent"
  4 + android:layout_height="wrap_content"
5 5 android:layout_margin="20dp"
6 6 android:orientation="horizontal">
7 7  
8   -
9 8 <TextView
  9 + android:layout_alignParentLeft="true"
10 10 android:id="@+id/tv_activityName"
11 11 android:layout_width="wrap_content"
12 12 android:layout_height="wrap_content"
... ... @@ -15,8 +15,9 @@
15 15 android:text="Test"/>
16 16  
17 17 <ImageView
  18 + android:layout_alignParentRight="true"
18 19 android:layout_width="35dp"
19 20 android:layout_height="35dp"
20 21 android:background="@drawable/ic_arrow_right"/>
21 22  
22   -</LinearLayout>
23 23 \ No newline at end of file
  24 +</RelativeLayout>
24 25 \ No newline at end of file
... ...
Risiko/app/src/main/res/layout/incidentlist.xml
1 1 <?xml version="1.0" encoding="utf-8"?>
2   -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  2 +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 3 android:layout_width="match_parent"
4   - android:layout_height="match_parent"
  4 + android:layout_height="wrap_content"
5 5 android:layout_margin="20dp"
6 6 android:orientation="horizontal">
7 7  
8 8 <TextView
  9 + android:layout_alignParentLeft="true"
9 10 android:id="@+id/tv_incidentHeadline"
10 11 android:layout_width="wrap_content"
11 12 android:layout_height="wrap_content"
... ... @@ -14,8 +15,9 @@
14 15 android:text="Test"/>
15 16  
16 17 <ImageView
  18 + android:layout_alignParentRight="true"
17 19 android:layout_width="35dp"
18 20 android:layout_height="35dp"
19 21 android:background="@drawable/ic_arrow_right"/>
20 22  
21   -</LinearLayout>
22 23 \ No newline at end of file
  24 +</RelativeLayout>
23 25 \ No newline at end of file
... ...
Risiko/app/src/main/res/layout/spinner_item.xml deleted
1   -<?xml version="1.0" encoding="utf-8"?>
2   -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3   - android:layout_width="match_parent"
4   - android:layout_height="match_parent">
5   -
6   - <TextView
7   - android:layout_width="wrap_content"
8   - android:layout_height="wrap_content"
9   - android:text="TEST"
10   - android:textSize="30dp"/>
11   -
12   -</LinearLayout>
Risiko/app/src/main/res/values/colors.xml
1 1 <?xml version="1.0" encoding="utf-8"?>
2 2 <resources>
3   - <color name="colorPrimary">#3F51B5</color>
4   - <color name="colorPrimaryDark">#303F9F</color>
5   - <color name="colorAccent">#FF4081</color>
  3 + <color name="colorPrimary">#000000</color>
  4 + <color name="colorPrimaryDark">#f1754d</color>
  5 + <color name="colorAccent">#ff606a</color>
6 6 <color name="colorLightGreen">#e2ffe2</color>
7 7 <color name="colorDarkGreen">#0f7c44</color>
8 8 <color name="colorLightGray">#E0E0E0</color>
  9 + <color name="colorWhite">#ffffff</color>
  10 + <color name="background_material_light">#e3e8e8e8</color>
9 11 </resources>
... ...
Risiko/app/src/main/res/values/styles.xml
... ... @@ -3,9 +3,14 @@
3 3 <!-- Base application theme. -->
4 4 <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
5 5 <!-- Customize your theme here. -->
6   - <item name="colorPrimary">@color/colorPrimary</item>
7   - <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
  6 + <item name="colorPrimary">@color/colorPrimaryDark</item>
  7 + <item name="colorPrimaryDark">@color/colorPrimary</item>
8 8 <item name="colorAccent">@color/colorAccent</item>
  9 + <item name="android:colorBackground">@color/background_material_light</item>
  10 + </style>
  11 +
  12 + <style name="risikoTheme" parent="AppTheme" >
  13 + <item name="colorPrimary">@color/colorWhite</item>
9 14 </style>
10 15  
11 16 </resources>
... ...