Commit f69d65068f4ca3bb5eba92d7e03e3b705d7636eb

Authored by kristinlaahneolsen
1 parent 5ba9c3c9

Gjorde noen endringer mtp brukervennlighet. La til informasjonsikon i toolbaren,…

… slik at brukere som ikke gjenkjenner ikon-bruken har noe å støtte seg til
Risiko/app/src/main/AndroidManifest.xml
... ... @@ -28,7 +28,8 @@
28 28 <activity android:name="activity.EditIncident" />
29 29 <activity android:name="activity.Log" />
30 30 <activity android:name="activity.EditEvaluation" />
31   - <activity android:name="activity.EvaluationLog"></activity>
  31 + <activity android:name="activity.EvaluationLog" />
  32 + <activity android:name="activity.Information"></activity>
32 33 </application>
33 34  
34 35 </manifest>
35 36 \ No newline at end of file
... ...
Risiko/app/src/main/java/activity/Activities.java
... ... @@ -88,6 +88,12 @@ public class Activities extends AppCompatActivity {
88 88 startActivity(intent);
89 89 return true;
90 90  
  91 + case R.id.action_info:
  92 + Intent intent2 = new Intent(this, Information.class);
  93 + startActivity(intent2);
  94 +
  95 + return true;
  96 +
91 97 default:
92 98 return super.onOptionsItemSelected(item);
93 99  
... ...
Risiko/app/src/main/java/activity/EditEvaluation.java
... ... @@ -204,6 +204,12 @@ public class EditEvaluation extends AppCompatActivity {
204 204 startActivity(intent);
205 205 return true;
206 206  
  207 + case R.id.action_info:
  208 + Intent intent2 = new Intent(this, Information.class);
  209 + startActivity(intent2);
  210 +
  211 + return true;
  212 +
207 213 default:
208 214 return super.onOptionsItemSelected(item);
209 215  
... ...
Risiko/app/src/main/java/activity/EditIncident.java
... ... @@ -166,6 +166,12 @@ public class EditIncident extends AppCompatActivity {
166 166 startActivity(intent);
167 167 return true;
168 168  
  169 + case R.id.action_info:
  170 + Intent intent2 = new Intent(this, Information.class);
  171 + startActivity(intent2);
  172 +
  173 + return true;
  174 +
169 175 default:
170 176 return super.onOptionsItemSelected(item);
171 177  
... ...
Risiko/app/src/main/java/activity/EvaluationLog.java
... ... @@ -98,6 +98,12 @@ public class EvaluationLog extends AppCompatActivity {
98 98 startActivity(intent);
99 99 return true;
100 100  
  101 + case R.id.action_info:
  102 + Intent intent2 = new Intent(this, Information.class);
  103 + startActivity(intent2);
  104 +
  105 + return true;
  106 +
101 107 default:
102 108 return super.onOptionsItemSelected(item);
103 109  
... ...
Risiko/app/src/main/java/activity/Evaluations.java
... ... @@ -246,6 +246,12 @@ public class Evaluations extends AppCompatActivity {
246 246 startActivity(intent);
247 247 return true;
248 248  
  249 + case R.id.action_info:
  250 + Intent intent2 = new Intent(this, Information.class);
  251 + startActivity(intent2);
  252 +
  253 + return true;
  254 +
249 255 default:
250 256 return super.onOptionsItemSelected(item);
251 257  
... ...
Risiko/app/src/main/java/activity/Incident.java
... ... @@ -219,6 +219,12 @@ public class Incident extends AppCompatActivity {
219 219 startActivity(intent);
220 220 return true;
221 221  
  222 + case R.id.action_info:
  223 + Intent intent2 = new Intent(this, Information.class);
  224 + startActivity(intent2);
  225 +
  226 + return true;
  227 +
222 228 default:
223 229 return super.onOptionsItemSelected(item);
224 230  
... ...
Risiko/app/src/main/java/activity/Information.java 0 → 100644
  1 +package activity;
  2 +
  3 +import android.content.Intent;
  4 +import android.support.v7.app.AppCompatActivity;
  5 +import android.os.Bundle;
  6 +import android.support.v7.widget.Toolbar;
  7 +import android.view.Menu;
  8 +import android.view.MenuItem;
  9 +import android.widget.Toast;
  10 +
  11 +import com.risiko.risiko.R;
  12 +
  13 +public class Information extends AppCompatActivity {
  14 +
  15 + @Override
  16 + protected void onCreate(Bundle savedInstanceState) {
  17 + super.onCreate(savedInstanceState);
  18 + setContentView(R.layout.activity_information);
  19 +
  20 + Toolbar myToolbar = (Toolbar) findViewById(R.id.my_toolbar);
  21 + setSupportActionBar(myToolbar);
  22 + }
  23 +
  24 + @Override
  25 + public boolean onCreateOptionsMenu (Menu menu) {
  26 + getMenuInflater().inflate(R.menu.main, menu);
  27 + return true;
  28 + }
  29 +
  30 + @Override
  31 + public boolean onOptionsItemSelected(MenuItem item) {
  32 + switch (item.getItemId()) {
  33 + case R.id.action_logout:
  34 + //TODO: LEGG TIL LOGG-UT-FUNKSJON
  35 + return true;
  36 +
  37 + case R.id.action_home:
  38 + Intent intent = new Intent(this, MainMenu.class);
  39 + startActivity(intent);
  40 +
  41 + return true;
  42 +
  43 + case R.id.action_info:
  44 +
  45 + return true;
  46 +
  47 + default:
  48 +
  49 + return super.onOptionsItemSelected(item);
  50 +
  51 + }
  52 + }
  53 +}
... ...
Risiko/app/src/main/java/activity/Log.java
... ... @@ -43,6 +43,12 @@ public class Log extends AppCompatActivity {
43 43 startActivity(intent);
44 44 return true;
45 45  
  46 + case R.id.action_info:
  47 + Intent intent2 = new Intent(this, Information.class);
  48 + startActivity(intent2);
  49 +
  50 + return true;
  51 +
46 52 default:
47 53 return super.onOptionsItemSelected(item);
48 54  
... ...
Risiko/app/src/main/java/activity/MainMenu.java
... ... @@ -59,6 +59,14 @@ public class MainMenu extends AppCompatActivity {
59 59 Toast.LENGTH_LONG).show();
60 60 return true;
61 61  
  62 + case R.id.action_info:
  63 + Intent intent = new Intent(this, Information.class);
  64 + startActivity(intent);
  65 +
  66 + return true;
  67 +
  68 +
  69 +
62 70 default:
63 71  
64 72 return super.onOptionsItemSelected(item);
... ...
Risiko/app/src/main/java/activity/NewEvaluation.java
... ... @@ -138,6 +138,12 @@ public class NewEvaluation extends AppCompatActivity {
138 138 startActivity(intent);
139 139 return true;
140 140  
  141 + case R.id.action_info:
  142 + Intent intent2 = new Intent(this, Information.class);
  143 + startActivity(intent2);
  144 +
  145 + return true;
  146 +
141 147 default:
142 148 return super.onOptionsItemSelected(item);
143 149  
... ...
Risiko/app/src/main/java/activity/NewIncident.java
... ... @@ -169,6 +169,12 @@ public class NewIncident extends AppCompatActivity {
169 169 startActivity(intent);
170 170 return true;
171 171  
  172 + case R.id.action_info:
  173 + Intent intent2 = new Intent(this, Information.class);
  174 + startActivity(intent2);
  175 +
  176 + return true;
  177 +
172 178 default:
173 179 return super.onOptionsItemSelected(item);
174 180  
... ...
Risiko/app/src/main/java/activity/SequenceOfActivities.java
... ... @@ -84,6 +84,12 @@ public class SequenceOfActivities extends AppCompatActivity {
84 84 startActivity(intent);
85 85 return true;
86 86  
  87 + case R.id.action_info:
  88 + Intent intent2 = new Intent(this, Information.class);
  89 + startActivity(intent2);
  90 +
  91 + return true;
  92 +
87 93 default:
88 94 return super.onOptionsItemSelected(item);
89 95  
... ...
Risiko/app/src/main/res/drawable/ic_delete_orange.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="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2L18,7L6,7v12zM8.46,11.88l1.41,-1.41L12,12.59l2.12,-2.12 1.41,1.41L13.41,14l2.12,2.12 -1.41,1.41L12,15.41l-2.12,2.12 -1.41,-1.41L10.59,14l-2.13,-2.12zM15.5,4l-1,-1h-5l-1,1L5,4v2h14L19,4z"/>
  9 +</vector>
... ...
Risiko/app/src/main/res/drawable/ic_edit_orange.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="M3,17.25V21h3.75L17.81,9.94l-3.75,-3.75L3,17.25zM20.71,7.04c0.39,-0.39 0.39,-1.02 0,-1.41l-2.34,-2.34c-0.39,-0.39 -1.02,-0.39 -1.41,0l-1.83,1.83 3.75,3.75 1.83,-1.83z"/>
  9 +</vector>
... ...
Risiko/app/src/main/res/drawable/ic_home_orange.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="M10,20v-6h4v6h5v-8h3L12,3 2,12h3v8z"/>
  9 +</vector>
... ...
Risiko/app/src/main/res/drawable/ic_info.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="#ffffff"
  8 + android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,17h-2v-6h2v6zM13,9h-2L11,7h2v2z"/>
  9 +</vector>
... ...
Risiko/app/src/main/res/drawable/ic_logout_orange.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,5.5c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM9.8,8.9L7,23h2.1l1.8,-8 2.1,2v6h2v-7.5l-2.1,-2 0.6,-3C14.8,12 16.8,13 19,13v-2c-1.9,0 -3.5,-1 -4.3,-2.4l-1,-1.6c-0.4,-0.6 -1,-1 -1.7,-1 -0.3,0 -0.5,0.1 -0.8,0.1L6,8.3V13h2V9.6l1.8,-0.7"/>
  9 +</vector>
... ...
Risiko/app/src/main/res/layout/activity_information.xml 0 → 100644
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3 + xmlns:app="http://schemas.android.com/apk/res-auto"
  4 + xmlns:tools="http://schemas.android.com/tools"
  5 + android:layout_width="match_parent"
  6 + android:layout_height="match_parent"
  7 + tools:context="com.risiko.risiko.activity.Information">
  8 +
  9 + <include layout="@layout/toolbar"/>
  10 +
  11 + <TextView
  12 + android:layout_width="wrap_content"
  13 + android:layout_height="wrap_content"
  14 + android:text="Symbolforklaring"
  15 + android:textStyle="bold"
  16 + android:textColor="@color/colorPrimaryDark"
  17 + android:textSize="25dp"
  18 + app:layout_constraintLeft_toLeftOf="parent"
  19 + app:layout_constraintRight_toRightOf="parent"
  20 + app:layout_constraintTop_toTopOf="parent"
  21 + android:layout_marginTop="70dp"
  22 + android:layout_marginBottom="10dp"/>
  23 +
  24 +
  25 + <android.support.constraint.ConstraintLayout
  26 + android:layout_width="match_parent"
  27 + android:layout_height="match_parent"
  28 + android:layout_marginTop="140dp"
  29 + android:layout_marginBottom="70dp"
  30 + android:layout_marginHorizontal="20dp">
  31 +
  32 +
  33 + <LinearLayout
  34 + android:layout_marginTop="120dp"
  35 + android:layout_marginBottom="20dp"
  36 + android:background="@color/colorWhite"
  37 + android:layout_width="match_parent"
  38 + android:layout_height="wrap_content"
  39 + android:orientation="vertical">
  40 +
  41 +
  42 + <!--Buttons is just used because it is simple to combine icons and texts this way-->
  43 + <Button
  44 + android:background="@color/colorWhite"
  45 + android:layout_width="match_parent"
  46 + android:layout_height="wrap_content"
  47 + android:text="Tilbake til hovedmeny "
  48 + android:padding="10dp"
  49 + android:layout_margin="10dp"
  50 + android:drawableLeft="@drawable/ic_home_orange"/>
  51 +
  52 + <Button
  53 + android:background="@color/colorWhite"
  54 + android:layout_width="match_parent"
  55 + android:layout_height="wrap_content"
  56 + android:text="Logg ut"
  57 + android:padding="10dp"
  58 + android:layout_margin="10dp"
  59 + android:drawableLeft="@drawable/ic_logout_orange"/>
  60 +
  61 + <Button
  62 + android:background="@color/colorWhite"
  63 + android:layout_width="match_parent"
  64 + android:layout_height="wrap_content"
  65 + android:text="Mulighet for sletting"
  66 + android:padding="10dp"
  67 + android:layout_margin="10dp"
  68 + android:drawableLeft="@drawable/ic_delete_orange"/>
  69 +
  70 + <Button
  71 + android:background="@color/colorWhite"
  72 + android:layout_width="match_parent"
  73 + android:layout_height="wrap_content"
  74 + android:text="Mulighet for redigering"
  75 + android:padding="10dp"
  76 + android:layout_margin="10dp"
  77 + android:drawableLeft="@drawable/ic_edit_orange"/>
  78 +
  79 + <Button
  80 + android:background="@color/colorWhite"
  81 + android:layout_width="match_parent"
  82 + android:layout_height="wrap_content"
  83 + android:text="Hendelseslogg/Innsynslogg tilgjengelig"
  84 + android:padding="10dp"
  85 + android:layout_margin="10dp"
  86 + android:drawableLeft="@drawable/ic_eye"/>
  87 +
  88 + </LinearLayout>
  89 + </android.support.constraint.ConstraintLayout>
  90 +
  91 +</android.support.constraint.ConstraintLayout>
... ...
Risiko/app/src/main/res/menu/main.xml
... ... @@ -2,14 +2,20 @@
2 2 xmlns:app="http://schemas.android.com/apk/res-auto">
3 3  
4 4 <item
  5 + android:id="@+id/action_info"
  6 + android:icon="@drawable/ic_info"
  7 + android:title="Info"
  8 + app:showAsAction="always"/>
  9 +
  10 + <item
5 11 android:id="@+id/action_home"
6 12 android:icon="@drawable/ic_home_24dp"
7 13 android:title="Hovedmeny"
8   - app:showAsAction="ifRoom"/>
  14 + app:showAsAction="always"/>
9 15  
10 16 <item android:id="@+id/action_logout"
11 17 android:icon="@drawable/ic_logout_24dp"
12 18 android:title="Logg ut"
13   - app:showAsAction="ifRoom"/>
  19 + app:showAsAction="always"/>
14 20  
15 21 </menu>
16 22 \ No newline at end of file
... ...
restApi/.idea/workspace.xml
1 1 <?xml version="1.0" encoding="UTF-8"?>
2 2 <project version="4">
3 3 <component name="ChangeListManager">
4   - <list default="true" id="0e20d303-9de8-4113-bfd9-019e72b304dc" name="Default" comment="" />
  4 + <list default="true" id="0e20d303-9de8-4113-bfd9-019e72b304dc" name="Default" comment="">
  5 + <change beforePath="" afterPath="$PROJECT_DIR$/../Risiko/app/src/main/res/drawable/ic_info.xml" />
  6 + <change beforePath="" afterPath="$PROJECT_DIR$/../Risiko/app/src/main/res/menu/info.xml" />
  7 + <change beforePath="$PROJECT_DIR$/../Risiko/app/src/main/java/activity/MainMenu.java" afterPath="$PROJECT_DIR$/../Risiko/app/src/main/java/activity/MainMenu.java" />
  8 + <change beforePath="$PROJECT_DIR$/../Risiko/app/src/main/res/menu/main.xml" afterPath="$PROJECT_DIR$/../Risiko/app/src/main/res/menu/main.xml" />
  9 + <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
  10 + </list>
5 11 <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
6 12 <option name="TRACKING_ENABLED" value="true" />
7 13 <option name="SHOW_DIALOG" value="false" />
... ... @@ -239,12 +245,12 @@
239 245 <workItem from="1541681303243" duration="9060000" />
240 246 <workItem from="1542189792461" duration="7537000" />
241 247 <workItem from="1542881688157" duration="372000" />
242   - <workItem from="1543226716067" duration="7767000" />
  248 + <workItem from="1543226716067" duration="8181000" />
243 249 </task>
244 250 <servers />
245 251 </component>
246 252 <component name="TimeTrackingManager">
247   - <option name="totallyTimeSpent" value="37458000" />
  253 + <option name="totallyTimeSpent" value="37872000" />
248 254 </component>
249 255 <component name="ToolWindowManager">
250 256 <frame x="0" y="0" width="1030" height="900" extended-state="6" />
... ...