Commit 9e4deaff3f94325772793d2ad53d5eca47d1ddfc

Authored by kristinlaahneolsen
1 parent d87500ec

Jobbet mer med tema for å få appen til å se mer innbydende ut, samt at brukergre…

…nsesnittet skal være mer intuitivt å bruke når det ser mer ryddig ut
Showing 31 changed files with 64 additions and 21 deletions   Show diff stats
Risiko/app/src/main/AndroidManifest.xml
... ... @@ -9,7 +9,7 @@
9 9 android:roundIcon="@mipmap/ic_launcher_round"
10 10 android:supportsRtl="true"
11 11 android:theme="@style/risikoTheme">
12   - <activity android:name="activity.Startside">
  12 + <activity android:name="activity.MainPage">
13 13 <intent-filter>
14 14 <action android:name="android.intent.action.MAIN" />
15 15  
... ...
Risiko/app/src/main/ic_launcher-web.png 0 → 100644

20.9 KB

Risiko/app/src/main/java/activity/Startside.java renamed to Risiko/app/src/main/java/activity/MainPage.java
... ... @@ -8,13 +8,13 @@ import android.widget.Button;
8 8  
9 9 import com.risiko.risiko.R;
10 10  
11   -public class Startside extends AppCompatActivity {
  11 +public class MainPage extends AppCompatActivity {
12 12 Button toMainMenu;
13 13  
14 14 @Override
15 15 protected void onCreate(Bundle savedInstanceState) {
16 16 super.onCreate(savedInstanceState);
17   - setContentView(R.layout.activity_startside);
  17 + setContentView(R.layout.activity_main_page);
18 18 toMainMenu = findViewById(R.id.btn_to_main_menu);
19 19 toMainMenu.setOnClickListener(new View.OnClickListener() {
20 20 @Override
... ...
Risiko/app/src/main/res/drawable/ic_add.xml
... ... @@ -5,5 +5,5 @@
5 5 android:viewportHeight="24.0">
6 6 <path
7 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"/>
  8 + android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM17,13h-4v4h-2v-4L7,13v-2h4L11,7h2v4h4v2z"/>
9 9 </vector>
... ...
Risiko/app/src/main/res/drawable/ic_healing.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="M17.73,12.02l3.98,-3.98c0.39,-0.39 0.39,-1.02 0,-1.41l-4.34,-4.34c-0.39,-0.39 -1.02,-0.39 -1.41,0l-3.98,3.98L8,2.29C7.8,2.1 7.55,2 7.29,2c-0.25,0 -0.51,0.1 -0.7,0.29L2.25,6.63c-0.39,0.39 -0.39,1.02 0,1.41l3.98,3.98L2.25,16c-0.39,0.39 -0.39,1.02 0,1.41l4.34,4.34c0.39,0.39 1.02,0.39 1.41,0l3.98,-3.98 3.98,3.98c0.2,0.2 0.45,0.29 0.71,0.29 0.26,0 0.51,-0.1 0.71,-0.29l4.34,-4.34c0.39,-0.39 0.39,-1.02 0,-1.41l-3.99,-3.98zM12,9c0.55,0 1,0.45 1,1s-0.45,1 -1,1 -1,-0.45 -1,-1 0.45,-1 1,-1zM7.29,10.96L3.66,7.34l3.63,-3.63 3.62,3.62 -3.62,3.63zM10,13c-0.55,0 -1,-0.45 -1,-1s0.45,-1 1,-1 1,0.45 1,1 -0.45,1 -1,1zM12,15c-0.55,0 -1,-0.45 -1,-1s0.45,-1 1,-1 1,0.45 1,1 -0.45,1 -1,1zM14,11c0.55,0 1,0.45 1,1s-0.45,1 -1,1 -1,-0.45 -1,-1 0.45,-1 1,-1zM16.66,20.34l-3.63,-3.62 3.63,-3.63 3.62,3.62 -3.62,3.63z"/>
  9 +</vector>
... ...
Risiko/app/src/main/res/layout/activity_activities.xml
... ... @@ -33,7 +33,6 @@
33 33  
34 34  
35 35 <LinearLayout
36   - android:layout_marginVertical="10dp"
37 36 android:background="@color/colorWhite"
38 37 android:layout_width="match_parent"
39 38 android:layout_height="match_parent"
... ...
Risiko/app/src/main/res/layout/activity_evaluations.xml
... ... @@ -10,25 +10,32 @@
10 10 android:id="@+id/tv_nameOfActivity"
11 11 android:layout_width="wrap_content"
12 12 android:layout_height="wrap_content"
13   - android:text="Overskrift på aktivitet"
  13 + android:text="@string/activity_headline"
  14 + android:textColor="@color/colorPrimaryDark"
14 15 android:textStyle="bold"
15 16 android:textSize="25dp"
16 17 app:layout_constraintLeft_toLeftOf="parent"
17 18 app:layout_constraintRight_toRightOf="parent"
18 19 app:layout_constraintTop_toTopOf="parent"
19   - android:layout_marginTop="25dp"/>
  20 + app:layout_constraintBottom_toTopOf="@+id/btn_add_new_evaluation"
  21 + android:layout_margin="25dp"/>
20 22  
21 23 <Button
  24 + android:layout_marginTop="10dp"
  25 + android:background="@color/colorWhite"
22 26 android:id="@+id/btn_add_new_evaluation"
23 27 android:layout_width="match_parent"
24 28 android:layout_height="wrap_content"
25 29 android:layout_marginHorizontal="25dp"
26 30 android:text="@string/add_evaluation"
  31 + android:drawableRight="@drawable/ic_add"
  32 + android:paddingHorizontal="40dp"
27 33 app:layout_constraintLeft_toLeftOf="parent"
28 34 app:layout_constraintRight_toRightOf="parent"
29 35 app:layout_constraintTop_toBottomOf="@id/tv_nameOfActivity"/>
30 36  
31 37 <TextView
  38 + android:layout_marginTop="10dp"
32 39 android:layout_width="wrap_content"
33 40 android:layout_height="wrap_content"
34 41 android:text="@string/all_evaluations"
... ... @@ -38,9 +45,12 @@
38 45 app:layout_constraintTop_toBottomOf="@id/btn_add_new_evaluation"/>
39 46  
40 47 <android.support.constraint.ConstraintLayout
  48 + android:layout_marginHorizontal="20dp"
  49 + android:layout_marginBottom="70dp"
  50 + android:background="@color/colorWhite"
41 51 android:layout_width="match_parent"
42 52 android:layout_height="match_parent"
43   - android:layout_marginTop="120dp">
  53 + android:layout_marginTop="150dp">
44 54  
45 55  
46 56 <android.support.v4.widget.SwipeRefreshLayout
... ...
Risiko/app/src/main/res/layout/activity_startside.xml renamed to Risiko/app/src/main/res/layout/activity_main_page.xml
... ... @@ -8,31 +8,48 @@
8 8  
9 9 <TextView
10 10 android:id="@+id/app_name"
11   - android:layout_marginTop="45dp"
  11 + android:layout_marginTop="75dp"
12 12 android:layout_width="wrap_content"
13 13 android:layout_height="wrap_content"
14   - android:text="Risiko"
15   - android:textSize="25dp"
  14 + android:text="@string/app_name"
  15 + android:textColor="@color/colorPrimaryDark"
  16 + android:textSize="45dp"
16 17 android:textStyle="bold"
17 18 app:layout_constraintTop_toTopOf="parent"
18 19 app:layout_constraintLeft_toLeftOf="parent"
19   - app:layout_constraintRight_toRightOf="parent"/>
  20 + app:layout_constraintRight_toRightOf="parent" />
  21 +
20 22  
21 23  
22 24 <TextView
23 25 android:id="@+id/app_description"
24 26 android:layout_width="wrap_content"
25 27 android:layout_height="wrap_content"
26   - android:text="App for risikovurdering"
  28 + android:text="@string/app_description"
  29 + android:textSize="20dp"
  30 + android:textStyle="italic"
27 31 app:layout_constraintLeft_toLeftOf="parent"
28 32 app:layout_constraintRight_toRightOf="parent"
29 33 app:layout_constraintTop_toBottomOf="@id/app_name" />
30 34  
  35 + <ImageView
  36 + android:layout_marginTop="30dp"
  37 + android:id="@+id/app_icon"
  38 + android:layout_width="70dp"
  39 + android:layout_height="70dp"
  40 + android:src="@drawable/ic_healing"
  41 + app:layout_constraintLeft_toLeftOf="parent"
  42 + app:layout_constraintRight_toRightOf="parent"
  43 + app:layout_constraintTop_toBottomOf="@+id/app_description"/>
  44 +
31 45 <Button
32 46 android:id="@+id/btn_to_main_menu"
33 47 android:layout_width="wrap_content"
34 48 android:layout_height="wrap_content"
35 49 android:text="Gå til hovedmeny"
  50 + android:textColor="@color/colorPrimaryDark"
  51 + android:background="@color/colorWhite"
  52 + android:padding="10dp"
36 53 app:layout_constraintLeft_toLeftOf="parent"
37 54 app:layout_constraintRight_toRightOf="parent"
38 55 app:layout_constraintBottom_toBottomOf="parent"
... ...
Risiko/app/src/main/res/layout/evaluationlist.xml
... ... @@ -35,6 +35,7 @@
35 35 android:id="@+id/tv_probability"
36 36 android:layout_width="wrap_content"
37 37 android:layout_height="wrap_content"
  38 + android:textColor="@color/colorPrimaryDark"
38 39 android:text="@string/sannsynlighet" />
39 40  
40 41 <TextView
... ... @@ -47,6 +48,7 @@
47 48 android:id="@+id/tv_consequence"
48 49 android:layout_width="wrap_content"
49 50 android:layout_height="wrap_content"
  51 + android:textColor="@color/colorPrimaryDark"
50 52 android:text="@string/konsekvens" />
51 53 </LinearLayout>
52 54  
... ...
Risiko/app/src/main/res/layout/popup_evaluation.xml
... ... @@ -14,7 +14,7 @@
14 14 android:textAlignment="center"
15 15 android:textAppearance="?android:attr/textAppearanceMedium"
16 16 android:textStyle="bold"
17   - android:background="@color/colorLightGreen"/>
  17 + android:background="@color/colorPrimaryDark"/>
18 18  
19 19 <TextView
20 20 android:layout_width="wrap_content"
... ...
Risiko/app/src/main/res/layout/popup_event.xml
... ... @@ -14,7 +14,7 @@
14 14 android:textAlignment="center"
15 15 android:textAppearance="?android:attr/textAppearanceMedium"
16 16 android:textStyle="bold"
17   - android:background="@color/colorLightGreen"/>
  17 + android:background="@color/colorPrimaryDark"/>
18 18  
19 19 <LinearLayout
20 20 android:layout_width="match_parent"
... ...
Risiko/app/src/main/res/layout/popup_report.xml
... ... @@ -8,7 +8,7 @@
8 8 android:id="@+id/pop_event_headline"
9 9 android:layout_width="match_parent"
10 10 android:layout_height="wrap_content"
11   - android:background="@color/colorLightGreen"
  11 + android:background="@color/colorPrimaryDark"
12 12 android:padding="10dp"
13 13 android:text="@string/report"
14 14 android:textAlignment="center"
... ...
Risiko/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
1 1 <?xml version="1.0" encoding="utf-8"?>
2 2 <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3   - <background android:drawable="@drawable/ic_launcher_background" />
4   - <foreground android:drawable="@drawable/ic_launcher_foreground" />
  3 + <background android:drawable="@color/ic_launcher_background"/>
  4 + <foreground android:drawable="@mipmap/ic_launcher_foreground"/>
5 5 </adaptive-icon>
6 6 \ No newline at end of file
... ...
Risiko/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
1 1 <?xml version="1.0" encoding="utf-8"?>
2 2 <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3   - <background android:drawable="@drawable/ic_launcher_background" />
4   - <foreground android:drawable="@drawable/ic_launcher_foreground" />
  3 + <background android:drawable="@color/ic_launcher_background"/>
  4 + <foreground android:drawable="@mipmap/ic_launcher_foreground"/>
5 5 </adaptive-icon>
6 6 \ No newline at end of file
... ...
Risiko/app/src/main/res/mipmap-hdpi/ic_launcher.png

2.98 KB | W: | H:

2.03 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
Risiko/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png

501 Bytes | W: | H:

1.72 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
Risiko/app/src/main/res/mipmap-hdpi/ic_launcher_round.png

4.91 KB | W: | H:

3.97 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
Risiko/app/src/main/res/mipmap-mdpi/ic_launcher.png

2.05 KB | W: | H:

1.4 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
Risiko/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png

326 Bytes | W: | H:

1.19 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
Risiko/app/src/main/res/mipmap-mdpi/ic_launcher_round.png

2.79 KB | W: | H:

2.56 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
Risiko/app/src/main/res/mipmap-xhdpi/ic_launcher.png

4.46 KB | W: | H:

2.75 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
Risiko/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png

635 Bytes | W: | H:

2.31 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
Risiko/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png

6.93 KB | W: | H:

5.63 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
Risiko/app/src/main/res/mipmap-xxhdpi/ic_launcher.png

6.31 KB | W: | H:

4 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
Risiko/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png

1.19 KB | W: | H:

4.54 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
Risiko/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png

10.4 KB | W: | H:

8.58 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
Risiko/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png

9.03 KB | W: | H:

5.79 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
Risiko/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png

1.89 KB | W: | H:

6.81 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
Risiko/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png

15.2 KB | W: | H:

12.3 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
Risiko/app/src/main/res/values/ic_launcher_background.xml 0 → 100644
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<resources>
  3 + <color name="ic_launcher_background">#F3FFED</color>
  4 +</resources>
0 5 \ No newline at end of file
... ...
Risiko/app/src/main/res/values/strings.xml
... ... @@ -2,7 +2,7 @@
2 2 <string name="app_name">Risiko</string>
3 3 <string name="sannsynlighet">Sannsynlighet</string>
4 4 <string name="konsekvens">Konsekvens</string>
5   - <string name="add_evaluation">Legg til vurdering +</string>
  5 + <string name="add_evaluation">Legg til vurdering</string>
6 6 <string name="all_evaluations">Alle vurderinger:</string>
7 7 <string name="ok" />
8 8 <string name="evaluation_headline">Tittel på vurdering</string>
... ... @@ -28,5 +28,7 @@
28 28 <string name="generate_report">Generer rapport</string>
29 29 <string name="report">Sekvensrapport</string>
30 30 <string name="comment">Kommentar</string>
  31 + <string name="app_description">App for risikovurdering</string>
  32 + <string name="activity_headline">Overskrift på aktivitet</string>
31 33  
32 34 </resources>
... ...