Эх сурвалжийг харах

Merge branch 'master' into APIv1Sync

seavenois 9 жил өмнө
parent
commit
e54a1470ec
65 өөрчлөгдсөн 5454 нэмэгдсэн , 2198 устгасан
  1. 1 1
      app/build.gradle
  2. 1 3
      app/src/main/AndroidManifest.xml
  3. 415 0
      app/src/main/assets/changelog_en.html
  4. 415 0
      app/src/main/assets/changelog_es.html
  5. 415 0
      app/src/main/assets/changelog_eu.html
  6. 3 3
      app/src/main/java/com/ivalentin/margolariak/ActivityFutureLayout.java
  7. 9 13
      app/src/main/java/com/ivalentin/margolariak/ActivityLayout.java
  8. 2 2
      app/src/main/java/com/ivalentin/margolariak/ActivityPastLayout.java
  9. 174 40
      app/src/main/java/com/ivalentin/margolariak/AlarmReceiver.java
  10. 5 5
      app/src/main/java/com/ivalentin/margolariak/AlbumLayout.java
  11. 9 8
      app/src/main/java/com/ivalentin/margolariak/BlogLayout.java
  12. 896 220
      app/src/main/java/com/ivalentin/margolariak/GM.java
  13. 13 4
      app/src/main/java/com/ivalentin/margolariak/GalleryLayout.java
  14. 55 79
      app/src/main/java/com/ivalentin/margolariak/HomeLayout.java
  15. 5 4
      app/src/main/java/com/ivalentin/margolariak/HomeSectionLocation.java
  16. 4 4
      app/src/main/java/com/ivalentin/margolariak/LablancaLayout.java
  17. 96 34
      app/src/main/java/com/ivalentin/margolariak/LocationLayout.java
  18. 240 238
      app/src/main/java/com/ivalentin/margolariak/MainActivity.java
  19. 4 4
      app/src/main/java/com/ivalentin/margolariak/PhotoLayout.java
  20. 4 4
      app/src/main/java/com/ivalentin/margolariak/PostComment.java
  21. 2 2
      app/src/main/java/com/ivalentin/margolariak/PostLayout.java
  22. 101 0
      app/src/main/java/com/ivalentin/margolariak/ReceiveLocation.java
  23. 9 9
      app/src/main/java/com/ivalentin/margolariak/ScheduleLayout.java
  24. 250 78
      app/src/main/java/com/ivalentin/margolariak/SettingsActivity.java
  25. 6 6
      app/src/main/java/com/ivalentin/margolariak/SettingsLayout.java
  26. 17 15
      app/src/main/java/com/ivalentin/margolariak/Sync.java
  27. 9 1
      app/src/main/res/drawable/entry.xml
  28. 13 0
      app/src/main/res/drawable/gradient_v_white.xml
  29. 15 0
      app/src/main/res/drawable/row_home_image.xml
  30. 14 5
      app/src/main/res/drawable/section.xml
  31. 18 0
      app/src/main/res/drawable/section_large.xml
  32. 16 0
      app/src/main/res/drawable/section_title.xml
  33. 49 43
      app/src/main/res/layout/activity_main.xml
  34. 340 0
      app/src/main/res/layout/activity_settings.xml
  35. 69 0
      app/src/main/res/layout/dialog_changelog.xml
  36. 23 8
      app/src/main/res/layout/dialog_notification.xml
  37. 39 17
      app/src/main/res/layout/dialog_sync.xml
  38. 47 25
      app/src/main/res/layout/fragment_layout_activities.xml
  39. 109 119
      app/src/main/res/layout/fragment_layout_activity_future.xml
  40. 87 80
      app/src/main/res/layout/fragment_layout_activity_past.xml
  41. 55 29
      app/src/main/res/layout/fragment_layout_album.xml
  42. 60 46
      app/src/main/res/layout/fragment_layout_blog.xml
  43. 31 20
      app/src/main/res/layout/fragment_layout_gallery.xml
  44. 185 137
      app/src/main/res/layout/fragment_layout_home.xml
  45. 15 8
      app/src/main/res/layout/fragment_layout_lablanca_nofestivals.xml
  46. 18 14
      app/src/main/res/layout/fragment_layout_location.xml
  47. 169 146
      app/src/main/res/layout/fragment_layout_photo.xml
  48. 183 147
      app/src/main/res/layout/fragment_layout_post.xml
  49. 53 61
      app/src/main/res/layout/row_activity_future.xml
  50. 54 37
      app/src/main/res/layout/row_activity_past.xml
  51. 25 14
      app/src/main/res/layout/row_album.xml
  52. 54 19
      app/src/main/res/layout/row_blog.xml
  53. 48 36
      app/src/main/res/layout/row_gallery.xml
  54. 60 35
      app/src/main/res/layout/row_home_activities.xml
  55. 44 21
      app/src/main/res/layout/row_home_blog.xml
  56. 2 3
      app/src/main/res/layout/row_home_schedule.xml
  57. 17 16
      app/src/main/res/values-en/strings.xml
  58. 18 17
      app/src/main/res/values-eu-rES/strings.xml
  59. 10 0
      app/src/main/res/values-v21/styles.xml
  60. 12 8
      app/src/main/res/values/color.xml
  61. 17 15
      app/src/main/res/values/strings.xml
  62. 7 0
      app/src/main/res/values/styles.xml
  63. 0 4
      app/src/main/res/xml/preferences.xml
  64. 1 1
      build.gradle
  65. 317 290
      build/intermediates/dex-cache/cache.xml

+ 1 - 1
app/build.gradle

@@ -19,7 +19,7 @@ android {
     }
 
     dexOptions {
-        incremental = true
+        //incremental = true
         preDexLibraries = false
         javaMaxHeapSize "2g"
     }

+ 1 - 3
app/src/main/AndroidManifest.xml

@@ -24,7 +24,7 @@
         android:allowBackup="true"
         android:icon="@drawable/ic_launcher"
         android:label="@string/app_name"
-        android:theme="@style/AppTheme"
+        android:theme="@style/Theme.AppBaseTheme"
         android:supportsRtl="true"
         android:isGame="false"
         android:fullBackupContent="@xml/backup"
@@ -43,7 +43,6 @@
         
         <activity
             android:name="com.ivalentin.margolariak.MainActivity"
-            android:theme="@style/Theme.NoTitle"
             android:windowSoftInputMode="stateHidden|adjustResize"
             android:configChanges="orientation"
             android:screenOrientation="portrait"
@@ -57,7 +56,6 @@
 
         <activity
             android:name=".SettingsActivity"
-            android:theme="@style/Theme.NoTitle"
             android:windowSoftInputMode="stateHidden|adjustResize"
             android:configChanges="orientation"
             android:screenOrientation="portrait"

+ 415 - 0
app/src/main/assets/changelog_en.html

@@ -0,0 +1,415 @@
+<html>
+<head>
+    <style>
+        span.version {font-weight: bold; color: #0078ff; font-size: 110%;}
+        span.date {font-style: italic; font-size: 80%;}
+        ul.version {padding-left: 1em;}
+        li.version {margin-bottom: 3em;}
+        ul.change {padding-left: 2em;}
+        li.change {margin-top: 1em; margin-bottom: 0.3em;}
+    </style>
+</head>
+<body>
+<ul class="version">
+
+    <!-- ----- v3 ----- -->
+    <li class="version">
+            <span class="version">
+                v3
+            </span>
+            <span class="date">
+                &nbsp;(SID)
+            </span>
+        <ul class="change">
+            <li class="change">
+                Redise&ntilde;o de la aplicaci&oacute;n.
+            </li>
+            <li class="change">
+                Sincronizaci&oacute;n inteligente: Menor consumo de bater&iacute;a y datos (hasta un 60&#37; menos).
+            </li>
+            <li class="change">
+                Desaparece el men&uacute; deslizable.
+            </li>
+            <li class="change">
+                Formato de la informaci&oacute; uniforme en toda la app.
+            </li>
+            <li class="change">
+                Desaparece la secci&oacute;n &#34;Cerca de m&iacute;&#34;. Se integra en &#34;La Blanca&#34;.
+            </li>
+            <li>
+                Carga de im&aacute;genes m&aacute;s r&aacute;pida.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v2.0.5 ----- -->
+    <li class="version">
+                <span class="version">
+                    v2.0.5
+                </span>
+                <span class="date">
+                    &nbsp;(2016-10-09)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Corregido un error potencial al descargar im&aacute;genes desde el servidor.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v2.0.4 ----- -->
+    <li class="version">
+                <span class="version">
+                    v2.0.4
+                </span>
+                <span class="date">
+                    &nbsp;(2016-08-26)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Mejoras en la interfaz.
+            </li>
+            <li class="change">
+                Menor consumo de datos.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v2.0.3 ----- -->
+    <li class="version">
+                <span class="version">
+                    v2.0.3
+                </span>
+                <span class="date">
+                    &nbsp;(2016-08-01)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Mejoras en la vista de proximos eventos de Fiestas.
+            </li>
+            <li class="change">
+                Mejoras en la secci&oacute;n de fiestas.
+            </li>
+            <li class="change">
+                El programa de Fiestas se abre en el d&iacute;a actual.
+            </li>
+            <li class="change">
+                Inicio de aplicaci&oacute;n m&aacute;s r&aacute;pido.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v2.0.2 ----- -->
+    <li class="version">
+                <span class="version">
+                    v2.0.2
+                </span>
+                <span class="date">
+                    &nbsp;(2016-07-20)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Mejoras en la sincronizaci&oacute;n con el servidor.
+            </li>
+            <li class="change">
+                Mejoras en la interfaz.
+            </li>
+            <li class="change">
+                Menor consumo de datos.
+            </li>
+            <li class="change">
+                Prevenci&oacute; de errores potenciales.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v2.0.1 ----- -->
+    <li class="version">
+                <span class="version">
+                    v2.0.1
+                </span>
+                <span class="date">
+                    &nbsp;(2016-07-15)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Correccion de fechas erroneas.
+            </li>
+            <li class="change">
+                Mejoras en la interfaz.
+            </li>
+            <li class="change">
+                Mejoras en la vista del programa.
+            </li>
+            <li class="change">
+                Prevenci&oacute; de errores potenciales.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v2.0-RC3 ----- -->
+    <li class="version">
+                <span class="version">
+                    v2.0-RC3
+                </span>
+                <span class="date">
+                    &nbsp;(2016-07-11)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Correcciones menores.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v2.0-RC2 ----- -->
+    <li class="version">
+                <span class="version">
+                    v2.0-RC2
+                </span>
+                <span class="date">
+                    &nbsp;(2016-07-10)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Mejoras para pantallas peque&ntilde;as.
+            </li>
+            <li class="change">
+                Correcciones menores.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v2.0-RC1 ----- -->
+    <li class="version">
+                <span class="version">
+                    v2.0-RC1
+                </span>
+                <span class="date">
+                    &nbsp;(2016-07-10)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Mejora del rendimiento durante la sincronizaci&oacute;n.
+            </li>
+            <li class="change">
+                Correcciones menores.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v2.0-alpha04 ----- -->
+    <li class="version">
+                <span class="version">
+                    v2.0-alpha04
+                </span>
+                <span class="date">
+                    &nbsp;(2016-07-08)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Mejoras en la interfaz.
+            </li>
+            <li class="change">
+                Mejoras en la presentaci&oacute;n de los programas.
+            </li>
+            <li class="change">
+                Mejora del rendimiento durante la sincronizaci&oacute;n.
+            </li>
+            <li class="change">
+                Correcciones menores.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v2.0-alpha03 ----- -->
+    <li class="version">
+                <span class="version">
+                    v2.0-alpha03
+                </span>
+                <span class="date">
+                    &nbsp;(2016-06-28)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Menor consumo de datos.
+            </li>
+            <li class="change">
+                Integraci&oacute;n con el sitio web.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v2.0-alpha02 ----- -->
+    <li class="version">
+                <span class="version">
+                    v2.0-alpha02
+                </span>
+                <span class="date">
+                    &nbsp;(2016-06-25)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Las imagenes importantes se cargan antes que las no importantes.
+            </li>
+            <li class="change">
+                Mejoras visuales en la galer&iacute;a.
+            </li>
+            <li class="change">
+                Corregido un error potencial al iniciar la aplicaci&oacute;n.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v2.0 ----- -->
+    <li class="version">
+                <span class="version">
+                    v2.0
+                </span>
+                <span class="date">
+                    &nbsp;(2016-06-24)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Redise&ntilde;o de la aplicaci&oacute;n.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v1.5 ----- -->
+    <li class="version">
+                <span class="version">
+                    v1.5
+                </span>
+                <span class="date">
+                    &nbsp;(2015-08-03)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Corregido un error en los eventos margolaris.
+            </li>
+            <li class="change">
+                Mejoras en la interfaz.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v1.4 ----- -->
+    <li class="version">
+                <span class="version">
+                    v1.4
+                </span>
+                <span class="date">
+                    &nbsp;(2015-07-23)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Mejoras en los mapas.
+            </li>
+            <li class="change">
+                Mejoras en la interfaz.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v1.3 ----- -->
+    <li class="version">
+                <span class="version">
+                    v1.3
+                </span>
+                <span class="date">
+                    &nbsp;(2015-07-19)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Menor consumo de bater&iacute;a.
+            </li>
+            <li class="change">
+                Menor consumo de datos.
+            </li>
+            <li class="change">
+                Mejoras en la interfaz.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v1.2 ----- -->
+    <li class="version">
+                <span class="version">
+                    v1.2
+                </span>
+                <span class="date">
+                    &nbsp;(2015-07-18)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Menor consumo de bater&iacute;a.
+            </li>
+            <li class="change">
+                Menor consumo de datos.
+            </li>
+            <li class="change">
+                Mejoras en la interfaz.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v1.1 ----- -->
+    <li class="version">
+                <span class="version">
+                    v1.1
+                </span>
+                <span class="date">
+                    &nbsp;(2015-07-16)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Menor consumo de bater&iacute;a.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v1.0 ----- -->
+    <li class="version">
+                <span class="version">
+                    v1.0
+                </span>
+                <span class="date">
+                    &nbsp;(2015-06-29)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Lanzamiento.
+            </li>
+        </ul>
+    </li>
+
+</ul>
+</body>
+</html>
+
+<!--Template
+
+
+<ul class="version">
+            <li class="version">
+                <span class="version">
+                    v
+                </span>
+                <span class="date">
+                    &nbsp;()
+                </span>
+                <ul class="change">
+                    <li class="change">
+
+                    </li>
+                    <li class="change">
+
+                    </li>
+                    <li class="change">
+
+                    </li>
+                </ul>
+            </li>
+        </ul>
+-->

+ 415 - 0
app/src/main/assets/changelog_es.html

@@ -0,0 +1,415 @@
+<html>
+    <head>
+        <style>
+            span.version {font-weight: bold; color: #0078ff; font-size: 110%;}
+            span.date {font-style: italic; font-size: 80%;}
+            ul.version {padding-left: 1em;}
+            li.version {margin-bottom: 3em;}
+            ul.change {padding-left: 2em;}
+            li.change {margin-top: 1em; margin-bottom: 0.3em;}
+        </style>
+    </head>
+    <body>
+        <ul class="version">
+
+            <!-- ----- v3 ----- -->
+            <li class="version">
+                <span class="version">
+                    v3
+                </span>
+                <span class="date">
+                    &nbsp;(SID)
+                </span>
+                <ul class="change">
+                    <li class="change">
+                        Redise&ntilde;o de la aplicaci&oacute;n.
+                    </li>
+                    <li class="change">
+                        Sincronizaci&oacute;n inteligente: Menor consumo de bater&iacute;a y datos (hasta un 60&#37; menos).
+                    </li>
+                    <li class="change">
+                        Desaparece el men&uacute; deslizable.
+                    </li>
+                    <li class="change">
+                        Formato de la informaci&oacute; uniforme en toda la app.
+                    </li>
+                    <li class="change">
+                        Desaparece la secci&oacute;n &#34;Cerca de m&iacute;&#34;. Se integra en &#34;La Blanca&#34;.
+                    </li>
+                    <li>
+                        Carga de im&aacute;genes m&aacute;s r&aacute;pida.
+                    </li>
+                </ul>
+            </li>
+
+            <!-- ----- v2.0.5 ----- -->
+            <li class="version">
+                <span class="version">
+                    v2.0.5
+                </span>
+                <span class="date">
+                    &nbsp;(2016-10-09)
+                </span>
+                <ul class="change">
+                    <li class="change">
+                        Corregido un error potencial al descargar im&aacute;genes desde el servidor.
+                    </li>
+                </ul>
+            </li>
+
+            <!-- ----- v2.0.4 ----- -->
+            <li class="version">
+                <span class="version">
+                    v2.0.4
+                </span>
+                <span class="date">
+                    &nbsp;(2016-08-26)
+                </span>
+                <ul class="change">
+                    <li class="change">
+                        Mejoras en la interfaz.
+                    </li>
+                    <li class="change">
+                        Menor consumo de datos.
+                    </li>
+                </ul>
+            </li>
+
+            <!-- ----- v2.0.3 ----- -->
+           <li class="version">
+                <span class="version">
+                    v2.0.3
+                </span>
+                <span class="date">
+                    &nbsp;(2016-08-01)
+                </span>
+                <ul class="change">
+                    <li class="change">
+                        Mejoras en la vista de proximos eventos de Fiestas.
+                    </li>
+                    <li class="change">
+                        Mejoras en la secci&oacute;n de fiestas.
+                    </li>
+                    <li class="change">
+                        El programa de Fiestas se abre en el d&iacute;a actual.
+                    </li>
+                    <li class="change">
+                        Inicio de aplicaci&oacute;n m&aacute;s r&aacute;pido.
+                    </li>
+                </ul>
+            </li>
+
+            <!-- ----- v2.0.2 ----- -->
+            <li class="version">
+                <span class="version">
+                    v2.0.2
+                </span>
+                <span class="date">
+                    &nbsp;(2016-07-20)
+                </span>
+                <ul class="change">
+                    <li class="change">
+                        Mejoras en la sincronizaci&oacute;n con el servidor.
+                    </li>
+                    <li class="change">
+                        Mejoras en la interfaz.
+                    </li>
+                    <li class="change">
+                        Menor consumo de datos.
+                    </li>
+                    <li class="change">
+                        Prevenci&oacute; de errores potenciales.
+                    </li>
+                </ul>
+            </li>
+
+            <!-- ----- v2.0.1 ----- -->
+            <li class="version">
+                <span class="version">
+                    v2.0.1
+                </span>
+                <span class="date">
+                    &nbsp;(2016-07-15)
+                </span>
+                <ul class="change">
+                    <li class="change">
+                        Correccion de fechas erroneas.
+                    </li>
+                    <li class="change">
+                        Mejoras en la interfaz.
+                    </li>
+                    <li class="change">
+                        Mejoras en la vista del programa.
+                    </li>
+                    <li class="change">
+                        Prevenci&oacute; de errores potenciales.
+                    </li>
+                </ul>
+            </li>
+
+            <!-- ----- v2.0-RC3 ----- -->
+            <li class="version">
+                <span class="version">
+                    v2.0-RC3
+                </span>
+                <span class="date">
+                    &nbsp;(2016-07-11)
+                </span>
+                <ul class="change">
+                    <li class="change">
+                        Correcciones menores.
+                    </li>
+                </ul>
+            </li>
+
+            <!-- ----- v2.0-RC2 ----- -->
+            <li class="version">
+                <span class="version">
+                    v2.0-RC2
+                </span>
+                <span class="date">
+                    &nbsp;(2016-07-10)
+                </span>
+                <ul class="change">
+                    <li class="change">
+                        Mejoras para pantallas peque&ntilde;as.
+                    </li>
+                    <li class="change">
+                        Correcciones menores.
+                    </li>
+                </ul>
+            </li>
+
+            <!-- ----- v2.0-RC1 ----- -->
+            <li class="version">
+                <span class="version">
+                    v2.0-RC1
+                </span>
+                <span class="date">
+                    &nbsp;(2016-07-10)
+                </span>
+                <ul class="change">
+                    <li class="change">
+                        Mejora del rendimiento durante la sincronizaci&oacute;n.
+                    </li>
+                    <li class="change">
+                        Correcciones menores.
+                    </li>
+                </ul>
+            </li>
+
+            <!-- ----- v2.0-alpha04 ----- -->
+            <li class="version">
+                <span class="version">
+                    v2.0-alpha04
+                </span>
+                <span class="date">
+                    &nbsp;(2016-07-08)
+                </span>
+                <ul class="change">
+                    <li class="change">
+                        Mejoras en la interfaz.
+                    </li>
+                    <li class="change">
+                        Mejoras en la presentaci&oacute;n de los programas.
+                    </li>
+                    <li class="change">
+                        Mejora del rendimiento durante la sincronizaci&oacute;n.
+                    </li>
+                    <li class="change">
+                        Correcciones menores.
+                    </li>
+                </ul>
+            </li>
+
+            <!-- ----- v2.0-alpha03 ----- -->
+            <li class="version">
+                <span class="version">
+                    v2.0-alpha03
+                </span>
+                <span class="date">
+                    &nbsp;(2016-06-28)
+                </span>
+                <ul class="change">
+                    <li class="change">
+                        Menor consumo de datos.
+                    </li>
+                    <li class="change">
+                        Integraci&oacute;n con el sitio web.
+                    </li>
+                </ul>
+            </li>
+
+            <!-- ----- v2.0-alpha02 ----- -->
+            <li class="version">
+                <span class="version">
+                    v2.0-alpha02
+                </span>
+                <span class="date">
+                    &nbsp;(2016-06-25)
+                </span>
+                <ul class="change">
+                    <li class="change">
+                        Las imagenes importantes se cargan antes que las no importantes.
+                    </li>
+                    <li class="change">
+                        Mejoras visuales en la galer&iacute;a.
+                    </li>
+                    <li class="change">
+                        Corregido un error potencial al iniciar la aplicaci&oacute;n.
+                    </li>
+                </ul>
+            </li>
+
+            <!-- ----- v2.0 ----- -->
+            <li class="version">
+                <span class="version">
+                    v2.0
+                </span>
+                <span class="date">
+                    &nbsp;(2016-06-24)
+                </span>
+                <ul class="change">
+                    <li class="change">
+                        Redise&ntilde;o de la aplicaci&oacute;n.
+                    </li>
+                </ul>
+            </li>
+
+            <!-- ----- v1.5 ----- -->
+            <li class="version">
+                <span class="version">
+                    v1.5
+                </span>
+                <span class="date">
+                    &nbsp;(2015-08-03)
+                </span>
+                <ul class="change">
+                    <li class="change">
+                        Corregido un error en los eventos margolaris.
+                    </li>
+                    <li class="change">
+                        Mejoras en la interfaz.
+                    </li>
+                </ul>
+            </li>
+
+            <!-- ----- v1.4 ----- -->
+            <li class="version">
+                <span class="version">
+                    v1.4
+                </span>
+                <span class="date">
+                    &nbsp;(2015-07-23)
+                </span>
+                <ul class="change">
+                    <li class="change">
+                        Mejoras en los mapas.
+                    </li>
+                    <li class="change">
+                        Mejoras en la interfaz.
+                    </li>
+                </ul>
+            </li>
+
+            <!-- ----- v1.3 ----- -->
+            <li class="version">
+                <span class="version">
+                    v1.3
+                </span>
+                <span class="date">
+                    &nbsp;(2015-07-19)
+                </span>
+                <ul class="change">
+                    <li class="change">
+                        Menor consumo de bater&iacute;a.
+                    </li>
+                    <li class="change">
+                        Menor consumo de datos.
+                    </li>
+                    <li class="change">
+                        Mejoras en la interfaz.
+                    </li>
+                </ul>
+            </li>
+
+            <!-- ----- v1.2 ----- -->
+            <li class="version">
+                <span class="version">
+                    v1.2
+                </span>
+                <span class="date">
+                    &nbsp;(2015-07-18)
+                </span>
+                <ul class="change">
+                    <li class="change">
+                        Menor consumo de bater&iacute;a.
+                    </li>
+                    <li class="change">
+                        Menor consumo de datos.
+                    </li>
+                    <li class="change">
+                        Mejoras en la interfaz.
+                    </li>
+                </ul>
+            </li>
+
+            <!-- ----- v1.1 ----- -->
+            <li class="version">
+                <span class="version">
+                    v1.1
+                </span>
+                <span class="date">
+                    &nbsp;(2015-07-16)
+                </span>
+                <ul class="change">
+                    <li class="change">
+                        Menor consumo de bater&iacute;a.
+                    </li>
+                </ul>
+            </li>
+
+            <!-- ----- v1.0 ----- -->
+            <li class="version">
+                <span class="version">
+                    v1.0
+                </span>
+                <span class="date">
+                    &nbsp;(2015-06-29)
+                </span>
+                <ul class="change">
+                    <li class="change">
+                        Lanzamiento.
+                    </li>
+                </ul>
+            </li>
+
+        </ul>
+    </body>
+</html>
+
+<!--Template
+
+
+<ul class="version">
+            <li class="version">
+                <span class="version">
+                    v
+                </span>
+                <span class="date">
+                    &nbsp;()
+                </span>
+                <ul class="change">
+                    <li class="change">
+
+                    </li>
+                    <li class="change">
+
+                    </li>
+                    <li class="change">
+
+                    </li>
+                </ul>
+            </li>
+        </ul>
+-->

+ 415 - 0
app/src/main/assets/changelog_eu.html

@@ -0,0 +1,415 @@
+<html>
+<head>
+    <style>
+        span.version {font-weight: bold; color: #0078ff; font-size: 110%;}
+        span.date {font-style: italic; font-size: 80%;}
+        ul.version {padding-left: 1em;}
+        li.version {margin-bottom: 3em;}
+        ul.change {padding-left: 2em;}
+        li.change {margin-top: 1em; margin-bottom: 0.3em;}
+    </style>
+</head>
+<body>
+<ul class="version">
+
+    <!-- ----- v3 ----- -->
+    <li class="version">
+                <span class="version">
+                    v3
+                </span>
+                <span class="date">
+                    &nbsp;(SID)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Redise&ntilde;o de la aplicaci&oacute;n.
+            </li>
+            <li class="change">
+                Sincronizaci&oacute;n inteligente: Menor consumo de bater&iacute;a y datos (hasta un 60&#37; menos).
+            </li>
+            <li class="change">
+                Desaparece el men&uacute; deslizable.
+            </li>
+            <li class="change">
+                Formato de la informaci&oacute; uniforme en toda la app.
+            </li>
+            <li class="change">
+                Desaparece la secci&oacute;n &#34;Cerca de m&iacute;&#34;. Se integra en &#34;La Blanca&#34;.
+            </li>
+            <li>
+                Carga de im&aacute;genes m&aacute;s r&aacute;pida.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v2.0.5 ----- -->
+    <li class="version">
+                <span class="version">
+                    v2.0.5
+                </span>
+                <span class="date">
+                    &nbsp;(2016-10-09)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Corregido un error potencial al descargar im&aacute;genes desde el servidor.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v2.0.4 ----- -->
+    <li class="version">
+                <span class="version">
+                    v2.0.4
+                </span>
+                <span class="date">
+                    &nbsp;(2016-08-26)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Mejoras en la interfaz.
+            </li>
+            <li class="change">
+                Menor consumo de datos.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v2.0.3 ----- -->
+    <li class="version">
+                <span class="version">
+                    v2.0.3
+                </span>
+                <span class="date">
+                    &nbsp;(2016-08-01)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Mejoras en la vista de proximos eventos de Fiestas.
+            </li>
+            <li class="change">
+                Mejoras en la secci&oacute;n de fiestas.
+            </li>
+            <li class="change">
+                El programa de Fiestas se abre en el d&iacute;a actual.
+            </li>
+            <li class="change">
+                Inicio de aplicaci&oacute;n m&aacute;s r&aacute;pido.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v2.0.2 ----- -->
+    <li class="version">
+                <span class="version">
+                    v2.0.2
+                </span>
+                <span class="date">
+                    &nbsp;(2016-07-20)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Mejoras en la sincronizaci&oacute;n con el servidor.
+            </li>
+            <li class="change">
+                Mejoras en la interfaz.
+            </li>
+            <li class="change">
+                Menor consumo de datos.
+            </li>
+            <li class="change">
+                Prevenci&oacute; de errores potenciales.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v2.0.1 ----- -->
+    <li class="version">
+                <span class="version">
+                    v2.0.1
+                </span>
+                <span class="date">
+                    &nbsp;(2016-07-15)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Correccion de fechas erroneas.
+            </li>
+            <li class="change">
+                Mejoras en la interfaz.
+            </li>
+            <li class="change">
+                Mejoras en la vista del programa.
+            </li>
+            <li class="change">
+                Prevenci&oacute; de errores potenciales.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v2.0-RC3 ----- -->
+    <li class="version">
+                <span class="version">
+                    v2.0-RC3
+                </span>
+                <span class="date">
+                    &nbsp;(2016-07-11)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Correcciones menores.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v2.0-RC2 ----- -->
+    <li class="version">
+                <span class="version">
+                    v2.0-RC2
+                </span>
+                <span class="date">
+                    &nbsp;(2016-07-10)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Mejoras para pantallas peque&ntilde;as.
+            </li>
+            <li class="change">
+                Correcciones menores.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v2.0-RC1 ----- -->
+    <li class="version">
+                <span class="version">
+                    v2.0-RC1
+                </span>
+                <span class="date">
+                    &nbsp;(2016-07-10)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Mejora del rendimiento durante la sincronizaci&oacute;n.
+            </li>
+            <li class="change">
+                Correcciones menores.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v2.0-alpha04 ----- -->
+    <li class="version">
+                <span class="version">
+                    v2.0-alpha04
+                </span>
+                <span class="date">
+                    &nbsp;(2016-07-08)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Mejoras en la interfaz.
+            </li>
+            <li class="change">
+                Mejoras en la presentaci&oacute;n de los programas.
+            </li>
+            <li class="change">
+                Mejora del rendimiento durante la sincronizaci&oacute;n.
+            </li>
+            <li class="change">
+                Correcciones menores.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v2.0-alpha03 ----- -->
+    <li class="version">
+                <span class="version">
+                    v2.0-alpha03
+                </span>
+                <span class="date">
+                    &nbsp;(2016-06-28)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Menor consumo de datos.
+            </li>
+            <li class="change">
+                Integraci&oacute;n con el sitio web.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v2.0-alpha02 ----- -->
+    <li class="version">
+                <span class="version">
+                    v2.0-alpha02
+                </span>
+                <span class="date">
+                    &nbsp;(2016-06-25)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Las imagenes importantes se cargan antes que las no importantes.
+            </li>
+            <li class="change">
+                Mejoras visuales en la galer&iacute;a.
+            </li>
+            <li class="change">
+                Corregido un error potencial al iniciar la aplicaci&oacute;n.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v2.0 ----- -->
+    <li class="version">
+                <span class="version">
+                    v2.0
+                </span>
+                <span class="date">
+                    &nbsp;(2016-06-24)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Redise&ntilde;o de la aplicaci&oacute;n.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v1.5 ----- -->
+    <li class="version">
+                <span class="version">
+                    v1.5
+                </span>
+                <span class="date">
+                    &nbsp;(2015-08-03)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Corregido un error en los eventos margolaris.
+            </li>
+            <li class="change">
+                Mejoras en la interfaz.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v1.4 ----- -->
+    <li class="version">
+                <span class="version">
+                    v1.4
+                </span>
+                <span class="date">
+                    &nbsp;(2015-07-23)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Mejoras en los mapas.
+            </li>
+            <li class="change">
+                Mejoras en la interfaz.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v1.3 ----- -->
+    <li class="version">
+                <span class="version">
+                    v1.3
+                </span>
+                <span class="date">
+                    &nbsp;(2015-07-19)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Menor consumo de bater&iacute;a.
+            </li>
+            <li class="change">
+                Menor consumo de datos.
+            </li>
+            <li class="change">
+                Mejoras en la interfaz.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v1.2 ----- -->
+    <li class="version">
+                <span class="version">
+                    v1.2
+                </span>
+                <span class="date">
+                    &nbsp;(2015-07-18)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Menor consumo de bater&iacute;a.
+            </li>
+            <li class="change">
+                Menor consumo de datos.
+            </li>
+            <li class="change">
+                Mejoras en la interfaz.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v1.1 ----- -->
+    <li class="version">
+                <span class="version">
+                    v1.1
+                </span>
+                <span class="date">
+                    &nbsp;(2015-07-16)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Menor consumo de bater&iacute;a.
+            </li>
+        </ul>
+    </li>
+
+    <!-- ----- v1.0 ----- -->
+    <li class="version">
+                <span class="version">
+                    v1.0
+                </span>
+                <span class="date">
+                    &nbsp;(2015-06-29)
+                </span>
+        <ul class="change">
+            <li class="change">
+                Lanzamiento.
+            </li>
+        </ul>
+    </li>
+
+</ul>
+</body>
+</html>
+
+<!--Template
+
+
+<ul class="version">
+            <li class="version">
+                <span class="version">
+                    v
+                </span>
+                <span class="date">
+                    &nbsp;()
+                </span>
+                <ul class="change">
+                    <li class="change">
+
+                    </li>
+                    <li class="change">
+
+                    </li>
+                    <li class="change">
+
+                    </li>
+                </ul>
+            </li>
+        </ul>
+-->

+ 3 - 3
app/src/main/java/com/ivalentin/margolariak/ActivityFutureLayout.java

@@ -78,7 +78,7 @@ public class ActivityFutureLayout extends Fragment implements OnMapReadyCallback
         }
 
         //Get data from database
-        SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB_NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
+        SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB.NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
         final Cursor cursor;
 		String lang = GM.getLang();
 
@@ -135,7 +135,7 @@ public class ActivityFutureLayout extends Fragment implements OnMapReadyCallback
                 fpath = new File(this.getActivity().getFilesDir().toString() + "/img/actividades/preview/");
                 //noinspection ResultOfMethodCallIgnored
                 fpath.mkdirs();
-                new DownloadImage(GM.SERVER + "/img/actividades/preview/" + image, this.getActivity().getFilesDir().toString() + "/img/actividades/preview/" + image, images[i], GM.IMG_PREVIEW).execute();
+                new DownloadImage(GM.API.SERVER + "/img/actividades/preview/" + image, this.getActivity().getFilesDir().toString() + "/img/actividades/preview/" + image, images[i], GM.IMG.SIZE.PREVIEW).execute();
             }
             images[i].setVisibility(View.VISIBLE);
             i ++;
@@ -244,7 +244,7 @@ public class ActivityFutureLayout extends Fragment implements OnMapReadyCallback
         Button btClose = (Button) dialog.findViewById(R.id.bt_schedule_close);
 
         //Get info about the event
-        SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB_NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
+        SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB.NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
         String lang = GM.getLang();
         Cursor cursor = db.rawQuery("SELECT activity_itinerary.id, activity_itinerary.name_" + lang + ", description_" + lang + ", place, start, end, place.name_" + lang + ", address_" + lang + ", lat, lon FROM activity_itinerary, place WHERE place = place.id AND activity_itinerary.id = " + id + ";", null);
         if (cursor.getCount() > 0){

+ 9 - 13
app/src/main/java/com/ivalentin/margolariak/ActivityLayout.java

@@ -72,7 +72,7 @@ public class ActivityLayout extends Fragment{
         //An inflater
         LayoutInflater factory = LayoutInflater.from(getActivity());
 
-        SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB_NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
+        SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB.NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
         final Cursor cursor;
         String lang = GM.getLang();
 
@@ -87,9 +87,10 @@ public class ActivityLayout extends Fragment{
                 //Create a new row
                 entry = (LinearLayout) factory.inflate(R.layout.row_activity_future, null);
 
-                //Set margins
+                //Set margins TODO: I dont know why it doesnt read margins from the xml
                 LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
-                layoutParams.setMargins(10, 10, 10, 25);
+                int margin = (int) (9 * getActivity().getResources().getDisplayMetrics().density);
+                layoutParams.setMargins(margin, margin, margin, margin);
                 entry.setLayoutParams(layoutParams);
 
                 //Set title
@@ -106,9 +107,6 @@ public class ActivityLayout extends Fragment{
 
                 //Set text
                 String text = Html.fromHtml(cursor.getString(4)).toString();
-                if (text.length() > 180) {
-                    text = text.substring(0, 180) + "...";
-                }
                 TextView tvText = (TextView) entry.findViewById(R.id.tv_row_activity_future_text);
                 tvText.setText(text);
 
@@ -139,7 +137,7 @@ public class ActivityLayout extends Fragment{
                         File fpath;
                         fpath = new File(this.getActivity().getFilesDir().toString() + "/img/actividades/miniature/");
                         fpath.mkdirs();
-                        new DownloadImage(GM.SERVER + "/img/actividades/miniature/" + image, this.getActivity().getFilesDir().toString() + "/img/actividades/miniature/" + image, iv, GM.IMG_MINIATURE).execute();
+                        new DownloadImage(GM.API.SERVER + "/img/actividades/miniature/" + image, this.getActivity().getFilesDir().toString() + "/img/actividades/miniature/" + image, iv, GM.IMG.SIZE.MINIATURE).execute();
                     }
                 }
                 cursorImage.close();
@@ -181,9 +179,10 @@ public class ActivityLayout extends Fragment{
             //Create a new row
             entry = (LinearLayout) factory.inflate(R.layout.row_activity_past, null);
 
-            //Set margins
+            //Set margins TODO: I dont know why it doesnt read margins from the xml
             LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
-            layoutParams.setMargins(10, 10, 10, 25);
+            int margin = (int) (9 * getActivity().getResources().getDisplayMetrics().density);
+            layoutParams.setMargins(margin, margin, margin, margin);
             entry.setLayoutParams(layoutParams);
 
             //Set title
@@ -202,9 +201,6 @@ public class ActivityLayout extends Fragment{
                     text = Html.fromHtml(cursorPast.getString(5)).toString();
                 }
             }
-            if (text.length() > 130) {
-                text = text.substring(0, 130) + "...";
-            }
             TextView tvText = (TextView) entry.findViewById(R.id.tv_row_activity_past_text);
             tvText.setText(text);
 
@@ -235,7 +231,7 @@ public class ActivityLayout extends Fragment{
                     File fpath;
                     fpath = new File(this.getActivity().getFilesDir().toString() + "/img/actividades/miniature/");
                     fpath.mkdirs();
-                    new DownloadImage(GM.SERVER + "/img/actividades/miniature/" + image, this.getActivity().getFilesDir().toString() + "/img/actividades/miniature/" + image, iv, GM.IMG_MINIATURE).execute();
+                    new DownloadImage(GM.API.SERVER + "/img/actividades/miniature/" + image, this.getActivity().getFilesDir().toString() + "/img/actividades/miniature/" + image, iv, GM.IMG.SIZE.MINIATURE).execute();
                 }
             }
             cursorImage.close();

+ 2 - 2
app/src/main/java/com/ivalentin/margolariak/ActivityPastLayout.java

@@ -47,7 +47,7 @@ public class ActivityPastLayout extends Fragment {
         }
 
         //Get data from database
-        SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB_NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
+        SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB.NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
         final Cursor cursor;
         String lang = GM.getLang();
         cursor = db.rawQuery("SELECT id, title_" + lang+ " AS title, text_" + lang + " AS text, date, city, after_" + lang + " AS after FROM activity WHERE id = " + id + ";", null);
@@ -107,7 +107,7 @@ public class ActivityPastLayout extends Fragment {
                 File fpath;
                 fpath = new File(this.getActivity().getFilesDir().toString() + "/img/actividades/preview/");
                 fpath.mkdirs();
-                new DownloadImage(GM.SERVER + "/img/actividades/preview/" + image, this.getActivity().getFilesDir().toString() + "/img/actividades/preview/" + image, images[i], GM.IMG_PREVIEW).execute();
+                new DownloadImage(GM.API.SERVER + "/img/actividades/preview/" + image, this.getActivity().getFilesDir().toString() + "/img/actividades/preview/" + image, images[i], GM.IMG.SIZE.PREVIEW).execute();
              }
             images[i].setVisibility(View.VISIBLE);
             i ++;

+ 174 - 40
app/src/main/java/com/ivalentin/margolariak/AlarmReceiver.java

@@ -1,5 +1,6 @@
 package com.ivalentin.margolariak;
 
+import android.app.Activity;
 import android.app.AlarmManager;
 import android.app.NotificationManager;
 import android.app.PendingIntent;
@@ -8,6 +9,8 @@ import android.content.Context;
 import android.content.Intent;
 import android.content.SharedPreferences;
 import android.content.pm.PackageManager;
+import android.database.Cursor;
+import android.database.sqlite.SQLiteDatabase;
 import android.graphics.BitmapFactory;
 import android.media.RingtoneManager;
 import android.support.v4.app.NotificationCompat;
@@ -37,38 +40,81 @@ public class AlarmReceiver extends BroadcastReceiver {
     @Override
 	@SuppressWarnings("deprecation")
     public void onReceive(Context context, Intent intent) {
-        
-    	Log.d("Alarm", "Received");
-		    	
+
 		//Open the preferences to be available several times later.
-		SharedPreferences settings = context.getSharedPreferences(GM.PREF, Context.MODE_PRIVATE);
+		SharedPreferences preferences = context.getSharedPreferences(GM.PREFERENCES.PREFERNCES, Context.MODE_PRIVATE);
 		
 		FetchURL fu;
 		
 		//Check if the user wants to receive notifications
-		if (settings.getInt(GM.PREF_NOTIFICATION , GM.DEFAULT_PREF_NOTIFICATION) == 1){
+		if (preferences.getBoolean(GM.PREFERENCES.KEY.NOTIFICATIONS, GM.PREFERENCES.DEFAULT.NOTIFICATIONS)){
 
 			//Get the file
 			try{
 				fu = new FetchURL();
-				fu.Run(GM.SERVER + "/app/notifications.php");
-				Log.d("Alarm", "Fetched notifications");
+				fu.Run(GM.API.SERVER + GM.API.NOTIFICATION.PATH);
+				Log.d("NOTIFICATIONS", "Fetched notifications");
 
 				//Parse info
 				String o = fu.getOutput().toString();
-				while (o.contains("<notification>")){
-					//Get non-language-dependant fields
-					String notification = o.substring(o.indexOf("<notification>") + 14, o.indexOf("</notification>"));
-					String id = notification.substring(notification.indexOf("<id>") + 4, notification.indexOf("</id>"));
-					String action = notification.substring(notification.indexOf("<action>") + 8, notification.indexOf("</action>"));
 
-					//Is the notification seen already?
-					if(!settings.getBoolean(GM.NOTIFICATION_SEEN_ + id, false)){
+				//Open database
+				SQLiteDatabase db = context.openOrCreateDatabase(GM.DB.NAME, Activity.MODE_PRIVATE, null);
+				if (db.isReadOnly()){
+					Log.e("NOTIFICATIONS", "Database is locked and in read only mode.");
+					return;
+				}
+				Cursor cursor;
+
+				//Variables for parsing
+				String not, title_es, title_en, title_eu, text_es, text_en, text_eu, dtime, action;
+				int id, gm, duration;
+
+				//Variables for showinfg the notification
+				String lang = GM.getLang();
+				String title, text;
+
+				int counter = 0;
+				while (counter < 10 && o.contains("\"}")){
+
+					//Get the notifications
+					not = o.substring(o.indexOf("{\"") + 2, o.indexOf("\"}"));
+
+					//Extract data
+					id = Integer.valueOf(not.substring(not.indexOf("\"id\":") + 6, not.indexOf("\",")));
+					title_es = not.substring(not.indexOf("\"title_es\":") + 12, not.indexOf("\"", not.indexOf("\"title_es\":") + 13));
+					title_en = not.substring(not.indexOf("\"title_en\":") + 12, not.indexOf("\"", not.indexOf("\"title_en\":") + 13));
+					title_eu = not.substring(not.indexOf("\"title_eu\":") + 12, not.indexOf("\"", not.indexOf("\"title_eu\":") + 13));
+					text_es = not.substring(not.indexOf("\"text_es\":") + 11, not.indexOf("\"", not.indexOf("\"text_es\":") + 12));
+					text_en = not.substring(not.indexOf("\"text_en\":") + 11, not.indexOf("\"", not.indexOf("\"text_en\":") + 12));
+					text_eu = not.substring(not.indexOf("\"text_eu\":") + 11, not.indexOf("\"", not.indexOf("\"text_eu\":") + 12));
+					dtime = not.substring(not.indexOf("\"dtime\":") + 9, not.indexOf("\"", not.indexOf("\"dtime\":") + 10));
+					action = not.substring(not.indexOf("\"action\":") + 10, not.indexOf("\"", not.indexOf("\"action\":") + 11));
+					gm = Integer.valueOf(not.substring(not.indexOf("\"gm\":") + 6, not.indexOf("\"", not.indexOf("\"gm\":") + 7)));
+					duration = Integer.valueOf(not.substring(not.indexOf("\"duration\":") + 12, not.indexOf("\"", not.indexOf("\"duration\":") + 13)));
 
-						String lang = GM.getLang();
-						String title = notification.substring(notification.indexOf("<title_" + lang + ">") + 10, notification.indexOf("</title_" + lang + ">"));
-						String text = notification.substring(notification.indexOf("<text_" + lang + ">") + 9, notification.indexOf("</text_" + lang + ">"));
 
+					//Compare with the database
+					cursor = db.rawQuery("SELECT id FROM notification WHERE id = " + id + ";", null);
+					if (cursor.getCount() == 0) {
+						db.execSQL("INSERT INTO notification (id, title_es, title_en, title_eu, text_es, text_en, text_eu, dtime, internal, duration, action) VALUES " +
+								"(" + id + ", \"" + title_es + "\", \"" + title_en + "\", \"" + title_eu + "\", \"" + text_es + "\", \"" + text_en + "\", \"" + text_eu + "\", \"" + dtime + "\", " + gm + ", " + duration + ", \"" + action + "\");");
+
+						//TODO: Show notification;
+						switch (lang) {
+							case "en":
+								title = title_en;
+								text = text_en;
+								break;
+							case "eu":
+								title = title_eu;
+								text = text_eu;
+								break;
+							default:
+								title = title_es;
+								text = text_es;
+								break;
+						}
 
 						//Get the notification manager ready
 						NotificationManager mNotificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
@@ -83,7 +129,7 @@ public class AlarmReceiver extends BroadcastReceiver {
 								.setContentTitle(title)
 								.setAutoCancel(true)
 								.setLargeIcon(BitmapFactory.decodeResource(context.getResources(), R.drawable.ic_launcher))
-								.setVibrate((new long[] { 400, 400, 400}))
+								.setVibrate((new long[]{400, 400, 400}))
 								.setColor(context.getResources().getColor(R.color.background_notification))
 								.setSubText(context.getString(R.string.app_name))
 								.setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION))
@@ -94,9 +140,9 @@ public class AlarmReceiver extends BroadcastReceiver {
 						resultIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP);
 
 						//Set extras depending on type.
-						resultIntent.putExtra(GM.EXTRA_TEXT, text);
-						resultIntent.putExtra(GM.EXTRA_TITLE, title);
-						resultIntent.putExtra(GM.EXTRA_ACTION, action);
+						resultIntent.putExtra(GM.EXTRA.TEXT, text);
+						resultIntent.putExtra(GM.EXTRA.TITLE, title);
+						resultIntent.putExtra(GM.EXTRA.ACTION, action);
 
 						//Add the intent to the notification.
 						stackBuilder = TaskStackBuilder.create(context);
@@ -108,18 +154,100 @@ public class AlarmReceiver extends BroadcastReceiver {
 						mBuilder.setContentIntent(resultPendingIntent);
 
 						//Actually send the notification.
-						mNotificationManager.notify(Integer.parseInt(id), mBuilder.build());
+						mNotificationManager.notify(id, mBuilder.build());
 
-						//Mark as notified
-						SharedPreferences.Editor editor = settings.edit();
-						editor.putBoolean(GM.NOTIFICATION_SEEN_ + id, true);
-						editor.apply();
 					}
-				o = o.substring(o.indexOf("</notification>") + 15);
+					cursor.close();
+
+
+					o = o.substring(o.indexOf("\"}") + 3);
+					counter ++;
 				}
+				db.close();
+
+
+
+
+				//Parse info
+				/*String o = fu.getOutput().toString();
+				while (o.contains("<notification>")){
+					//Get non-language-dependant fields
+					String notification = o.substring(o.indexOf("<notification>") + 14, o.indexOf("</notification>"));
+					String id = notification.substring(notification.indexOf("<id>") + 4, notification.indexOf("</id>"));
+					String action = notification.substring(notification.indexOf("<action>") + 8, notification.indexOf("</action>"));
+
+					//Is the notification seen already?
+					//TODO: Create a db table for this
+
+					//Get data from database
+					SQLiteDatabase db = SQLiteDatabase.openDatabase(context.getDatabasePath(GM.DB.NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
+					final Cursor cursor;
+					cursor = db.rawQuery("SELECT id, seen FROM notification WHERE id = " + id + ";", null);
+					if (cursor.getCount() == 0){
+
+					}
+					else {
+
+						if (cursor.getInt(1) == 0) {
+
+
+							String lang = GM.getLang();
+							String title = notification.substring(notification.indexOf("<title_" + lang + ">") + 10, notification.indexOf("</title_" + lang + ">"));
+							String text = notification.substring(notification.indexOf("<text_" + lang + ">") + 9, notification.indexOf("</text_" + lang + ">"));
+
+
+							//Get the notification manager ready
+							NotificationManager mNotificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
+
+							//Variables to create intents for each notification
+							Intent resultIntent;
+							TaskStackBuilder stackBuilder;
+
+							//Send the notification.
+							NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context)
+									.setSmallIcon(R.drawable.ic_notification)
+									.setContentTitle(title)
+									.setAutoCancel(true)
+									.setLargeIcon(BitmapFactory.decodeResource(context.getResources(), R.drawable.ic_launcher))
+									.setVibrate((new long[]{400, 400, 400}))
+									.setColor(context.getResources().getColor(R.color.background_notification))
+									.setSubText(context.getString(R.string.app_name))
+									.setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION))
+									.setContentText(text);
+
+							// Creates an intent for an Activity to be launched from the notification.
+							resultIntent = new Intent(context, MainActivity.class);
+							resultIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP);
+
+							//Set extras depending on type.
+							resultIntent.putExtra(GM.EXTRA.TEXT, text);
+							resultIntent.putExtra(GM.EXTRA.TITLE, title);
+							resultIntent.putExtra(GM.EXTRA.ACTION, action);
+
+							//Add the intent to the notification.
+							stackBuilder = TaskStackBuilder.create(context);
+							stackBuilder.addParentStack(MainActivity.class);
+
+							// Adds the Intent that starts the Activity to the top of the stack.
+							stackBuilder.addNextIntent(resultIntent);
+							PendingIntent resultPendingIntent = stackBuilder.getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT);
+							mBuilder.setContentIntent(resultPendingIntent);
+
+							//Actually send the notification.
+							mNotificationManager.notify(Integer.parseInt(id), mBuilder.build());
+
+							//Mark as notified
+							db.execSQL("UPDATE notification SET seen = 1 WHERE id = " + id);
+						}
+					}
+				o = o.substring(o.indexOf("</notification>") + 15);
+				}*/
+			}
+			catch(NumberFormatException ex) {
+				Log.e("NOTIFICATION", "Error parsing remote file: " + ex.toString());
 			}
-			catch(Exception ex) {
-				Log.e("Notification error", "Error fetching remote file: " + ex.toString());
+			catch (Exception ex){
+				Log.e("NOTIFICATION", "Error fetching notifications: " + ex.toString());
 			}
     	}
 
@@ -133,17 +261,23 @@ public class AlarmReceiver extends BroadcastReceiver {
      * @param context The context of the app
      */
     public void setAlarm(Context context) {
-        AlarmManager alarmMgr = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE);
-        Intent intent = new Intent(context, AlarmReceiver.class);
-        PendingIntent alarmIntent = PendingIntent.getBroadcast(context, 0, intent, 0);
-        
-        //Set the alarm cycle.
-        alarmMgr.setInexactRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, GM.PERIOD_SYNC, GM.PERIOD_SYNC, alarmIntent);
-        
-        // Enable SampleBootReceiver to automatically restart the alarm when the device is rebooted.
-        ComponentName receiver = new ComponentName(context, BootReceiver.class);
-        PackageManager pm = context.getPackageManager();
-        pm.setComponentEnabledSetting(receiver, PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP);           
+		//Only do this if the preference is enabled
+		SharedPreferences prefs = context.getSharedPreferences(GM.PREFERENCES.PREFERNCES, Context.MODE_PRIVATE);
+		if (prefs.getBoolean(GM.PREFERENCES.KEY.SYNC, GM.PREFERENCES.DEFAULT.SYNC)) {
+
+			AlarmManager alarmMgr = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
+			Intent intent = new Intent(context, AlarmReceiver.class);
+			PendingIntent alarmIntent = PendingIntent.getBroadcast(context, 0, intent, 0);
+
+			//Set the alarm cycle.
+			//TODO: Set the most appropiate interval
+			alarmMgr.setInexactRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, GM.PERIOD_SYNC.FESTIVALS, GM.PERIOD_SYNC.FESTIVALS, alarmIntent);
+
+			// Enable SampleBootReceiver to automatically restart the alarm when the device is rebooted.
+			ComponentName receiver = new ComponentName(context, BootReceiver.class);
+			PackageManager pm = context.getPackageManager();
+			pm.setComponentEnabledSetting(receiver, PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP);
+		}
     }
 
 }

+ 5 - 5
app/src/main/java/com/ivalentin/margolariak/AlbumLayout.java

@@ -49,7 +49,7 @@ public class AlbumLayout extends Fragment {
         }
 
         //Get data from database
-        SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB_NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
+        SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB.NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
         final Cursor cursor;
 		String lang = GM.getLang();
         cursor = db.rawQuery("SELECT id, title_" + lang + " AS title, description_" + lang + " AS description FROM album WHERE id = " + id + ";", null);
@@ -117,7 +117,7 @@ public class AlbumLayout extends Fragment {
                 //If the image exists, set it.
 				try{
 					File file = new File(this.getActivity().getFilesDir().toString() + "/img/galeria/preview/" + image);
-					ivLeft.setImageBitmap(GM.decodeSampledBitmapFromFile(file.getAbsolutePath(), GM.IMG_PREVIEW));
+					ivLeft.setImageBitmap(GM.decodeSampledBitmapFromFile(file.getAbsolutePath(), GM.IMG.SIZE.PREVIEW));
 				}
 				catch (Exception ex){
 					Log.e("Bitmap error", "Not loading image " + image + ": " + ex.toString());
@@ -128,7 +128,7 @@ public class AlbumLayout extends Fragment {
                 File fpath;
                 fpath = new File(this.getActivity().getFilesDir().toString() + "/img/galeria/preview/");
                 fpath.mkdirs();
-				new DownloadImage(GM.SERVER + "/img/galeria/preview/" + image, this.getActivity().getFilesDir().toString() + "/img/galeria/preview/" + image, ivLeft, GM.IMG_PREVIEW).execute();
+				new DownloadImage(GM.API.SERVER + "/img/galeria/preview/" + image, this.getActivity().getFilesDir().toString() + "/img/galeria/preview/" + image, ivLeft, GM.IMG.SIZE.PREVIEW).execute();
             }
 
 			//Count comments
@@ -187,7 +187,7 @@ public class AlbumLayout extends Fragment {
                     //If the image exists, set it.
 					try {
 						File file = new File(this.getActivity().getFilesDir().toString() + "/img/galeria/preview/" + image);
-						ivRight.setImageBitmap(GM.decodeSampledBitmapFromFile(file.getAbsolutePath(), GM.IMG_PREVIEW));
+						ivRight.setImageBitmap(GM.decodeSampledBitmapFromFile(file.getAbsolutePath(), GM.IMG.SIZE.PREVIEW));
 					}
 					catch (Exception ex){
 						Log.e("Bitmap error", "Not loading image " + image + ": " + ex.toString());
@@ -198,7 +198,7 @@ public class AlbumLayout extends Fragment {
                     File fpath;
                     fpath = new File(this.getActivity().getFilesDir().toString() + "/img/galeria/preview/");
                     fpath.mkdirs();
-					new DownloadImage(GM.SERVER + "/img/galeria/preview/" + image, this.getActivity().getFilesDir().toString() + "/img/galeria/preview/" + image, ivRight, GM.IMG_PREVIEW).execute();
+					new DownloadImage(GM.API.SERVER + "/img/galeria/preview/" + image, this.getActivity().getFilesDir().toString() + "/img/galeria/preview/" + image, ivRight, GM.IMG.SIZE.PREVIEW).execute();
                 }
 
 				//Count comments

+ 9 - 8
app/src/main/java/com/ivalentin/margolariak/BlogLayout.java

@@ -60,7 +60,7 @@ public class BlogLayout extends Fragment{
         ((MainActivity) getActivity()).setSectionTitle(view.getContext().getString(R.string.menu_blog));
 
         //Get total posts
-        SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB_NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
+        SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB.NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
         Cursor cursor = db.rawQuery("SELECT id FROM post;", null);
         totalPost = cursor.getCount();
         cursor.close();
@@ -142,7 +142,7 @@ public class BlogLayout extends Fragment{
         //An inflater
         LayoutInflater factory = LayoutInflater.from(getActivity());
 
-        SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB_NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
+        SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB.NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
         final Cursor cursor;
         String lang = GM.getLang();
 
@@ -158,9 +158,10 @@ public class BlogLayout extends Fragment{
             //Create a new row
             entry = (LinearLayout) factory.inflate(R.layout.row_blog, null);
 
-            //Set margins
+            //Set margins TODO: I dont know why it doesnt read margins from the xml
             LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
-            layoutParams.setMargins(10, 10, 10, 25);
+            int margin = (int) (9 * getActivity().getResources().getDisplayMetrics().density);
+            layoutParams.setMargins(margin, margin, margin, margin);
             entry.setLayoutParams(layoutParams);
 
             //Set title
@@ -169,9 +170,6 @@ public class BlogLayout extends Fragment{
 
             //Set text
             String text = Html.fromHtml(cursor.getString(2)).toString();
-            if (text.length() > 180){
-                text = text.substring(0, 180) + "...";
-            }
             TextView tvText = (TextView) entry.findViewById(R.id.tv_row_blog_text);
             tvText.setText(text);
 
@@ -203,9 +201,12 @@ public class BlogLayout extends Fragment{
                     File fpath;
                     fpath = new File(this.getActivity().getFilesDir().toString() + "/img/blog/miniature/");
                     fpath.mkdirs();
-                    new DownloadImage(GM.SERVER + "/img/blog/miniature/" + image, this.getActivity().getFilesDir().toString() + "/img/blog/miniature/" + image, iv, GM.IMG_MINIATURE).execute();
+                    new DownloadImage(GM.API.SERVER + "/img/blog/miniature/" + image, this.getActivity().getFilesDir().toString() + "/img/blog/miniature/" + image, iv, GM.IMG.SIZE.MINIATURE).execute();
                 }
             }
+            else{
+                iv.setVisibility(View.GONE);
+            }
             cursorImage.close();
 
             //Count comments

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 896 - 220
app/src/main/java/com/ivalentin/margolariak/GM.java


+ 13 - 4
app/src/main/java/com/ivalentin/margolariak/GalleryLayout.java

@@ -18,6 +18,7 @@ import android.widget.LinearLayout;
 import android.widget.TextView;
 
 import java.io.File;
+import java.util.Random;
 
 /**
  * Fragment of the gallery section.
@@ -71,7 +72,7 @@ public class GalleryLayout extends Fragment{
         //An inflater
         LayoutInflater factory = LayoutInflater.from(getActivity());
 
-        SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB_NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
+        SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB.NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
         final Cursor cursor;
 		String lang = GM.getLang();
 
@@ -84,9 +85,10 @@ public class GalleryLayout extends Fragment{
             //Create a new row
             entry = (LinearLayout) factory.inflate(R.layout.row_gallery, null);
 
-            //Set margins
+            //Set margins TODO: I dont know why it doesnt read margins from the xml
             LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
-            layoutParams.setMargins(10, 10, 10, 25);
+			int margin = (int) (9 * getActivity().getResources().getDisplayMetrics().density);
+            layoutParams.setMargins(margin, margin, margin, margin);
             entry.setLayoutParams(layoutParams);
 
             //Set title
@@ -109,6 +111,7 @@ public class GalleryLayout extends Fragment{
 
             //Loop
             int i = 0;
+            Random r;
             while (cursorImage.moveToNext()){
                 String image = cursorImage.getString(1);
 
@@ -125,8 +128,14 @@ public class GalleryLayout extends Fragment{
                     File fpath;
                     fpath = new File(this.getActivity().getFilesDir().toString() + "/img/galeria/miniature/");
                     fpath.mkdirs();
-                    new DownloadImage(GM.SERVER + "/img/galeria/miniature/" + image, this.getActivity().getFilesDir().toString() + "/img/galeria/miniature/" + image, preview[i], GM.IMG_MINIATURE).execute();
+                    new DownloadImage(GM.API.SERVER + "/img/galeria/miniature/" + image, this.getActivity().getFilesDir().toString() + "/img/galeria/miniature/" + image, preview[i], GM.IMG.SIZE.MINIATURE).execute();
                 }
+
+                //Rotate the image
+                r = new Random();
+                int rot = r.nextInt(31) - 15;
+                preview[i].setRotation(rot);
+
                 i ++;
             }
 

+ 55 - 79
app/src/main/java/com/ivalentin/margolariak/HomeLayout.java

@@ -8,6 +8,7 @@ import java.util.Locale;
 
 import android.annotation.SuppressLint;
 import android.Manifest;
+import android.app.Activity;
 import android.content.Context;
 import android.content.Intent;
 import android.content.SharedPreferences;
@@ -55,8 +56,6 @@ public class HomeLayout extends Fragment implements LocationListener {
 
 	@Override
 	public boolean onOptionsItemSelected(MenuItem item) {
-		// TODO Auto-generated method stub
-		Log.e("MENU", "FROM HOME");
 		return false;
 	}
 
@@ -81,42 +80,15 @@ public class HomeLayout extends Fragment implements LocationListener {
 		//Load the layout.
 		view = inflater.inflate(R.layout.fragment_layout_home, null);
 
-		//Variable to know if I need a location manager
-		//boolean requestLocation = false;
-
-		//Show tutorial if its the first time
-		/*final SharedPreferences preferences = view.getContext().getSharedPreferences(GM.PREF, Context.MODE_PRIVATE);
-		if (!preferences.getBoolean(GM.PREF_TUTORIAL, false)) {
-			final RelativeLayout llTutorial = (RelativeLayout) getActivity().findViewById(R.id.rl_tutorial);
-			llTutorial.setVisibility(View.VISIBLE);
-			llTutorial.setOnTouchListener(new View.OnTouchListener() {
-				@Override
-				public boolean onTouch(View v, MotionEvent event) {
-					return true;
-				}
-			});
-			Button btTutorial = (Button) getActivity().findViewById(R.id.bt_tutorial);
-			btTutorial.setOnClickListener(new OnClickListener() {
-				@Override
-				public void onClick(View v) {
-					llTutorial.setVisibility(View.GONE);
-					SharedPreferences.Editor editor = preferences.edit();
-					editor.putBoolean(GM.PREF_TUTORIAL, true);
-					editor.apply();
-				}
-			});
-		}*/
-
 		//Request location permissions if not set
 		if (ActivityCompat.checkSelfPermission(view.getContext(), android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(view.getContext(), android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
-			ActivityCompat.requestPermissions(this.getActivity(), new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, GM.PERMISSION_LOCATION);
+			ActivityCompat.requestPermissions(this.getActivity(), new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, GM.PERMISSION.LOCATION);
 		}
 
 		//Set Location manager
-		//TODO: Only do this if location is required
 		locationManager = (LocationManager) view.getContext().getSystemService(Context.LOCATION_SERVICE);
 		if (!(ActivityCompat.checkSelfPermission(view.getContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(view.getContext(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED)) {
-			locationManager.requestLocationUpdates(locationManager.getBestProvider(new Criteria(), true), GM.LOCATION_ACCURACY_TIME, GM.LOCATION_ACCURACY_SPACE, this);
+			locationManager.requestLocationUpdates(locationManager.getBestProvider(new Criteria(), true), GM.LOCATION.ACCURACY.TIME, GM.LOCATION.ACCURACY.SPACE, this);
 			onLocationChanged(locationManager.getLastKnownLocation(LocationManager.PASSIVE_PROVIDER));
 		}
 
@@ -160,12 +132,12 @@ public class HomeLayout extends Fragment implements LocationListener {
 	private int setUpSchedule(int gm, View view) {
 		int count = 0;
 
-		SharedPreferences preferences = view.getContext().getSharedPreferences(GM.PREF, Context.MODE_PRIVATE);
-		if (preferences.getInt(GM.PREF_DB_FESTIVALS, 0) == 0) {
+		SharedPreferences data = view.getContext().getSharedPreferences(GM.DATA.DATA, Context.MODE_PRIVATE);
+		if (!data.getBoolean(GM.DATA.KEY.LABLANCA, GM.DATA.DEFAULT.LABLANCA)) {
 			return count;
 		}
 
-		SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB_NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
+		SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB.NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
 		Calendar calendar = Calendar.getInstance();
 		Calendar calendarEnd;
 		DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.US);
@@ -226,7 +198,7 @@ public class HomeLayout extends Fragment implements LocationListener {
 			tvRowPlace.setText(cursorNow.getString(6));
 
 			//Set icon
-			if (gm == GM.SECTION_LABLANCA_GM_SCHEDULE) {
+			if (gm == GM.SECTION.GM_SCHEDULE) {
 				ImageView pinPoint = (ImageView) entry.findViewById(R.id.iv_row_home_schedule_pinpoint);
 				pinPoint.setImageResource(getResources().getIdentifier("com.ivalentin.gm:drawable/pinpoint_gm", null, null));
 			}
@@ -270,7 +242,7 @@ public class HomeLayout extends Fragment implements LocationListener {
 			tvRowPlace.setText(cursorNext.getString(6));
 
 			//Set icon
-			if (gm == GM.SECTION_LABLANCA_GM_SCHEDULE) {
+			if (gm == GM.SECTION.GM_SCHEDULE) {
 				ImageView pinPoint = (ImageView) entry.findViewById(R.id.iv_row_home_schedule_pinpoint);
 				pinPoint.setImageResource(getResources().getIdentifier("com.ivalentin.gm:drawable/pinpoint_gm", null, null));
 			}
@@ -293,7 +265,7 @@ public class HomeLayout extends Fragment implements LocationListener {
 				section.setOnClickListener(new OnClickListener() {
 					@Override
 					public void onClick(View v) {
-						((MainActivity) getActivity()).loadSection(GM.SECTION_LABLANCA_GM_SCHEDULE);
+						((MainActivity) getActivity()).loadSection(GM.SECTION.GM_SCHEDULE);
 					}
 				});
 
@@ -301,7 +273,7 @@ public class HomeLayout extends Fragment implements LocationListener {
 				section.setOnClickListener(new OnClickListener() {
 					@Override
 					public void onClick(View v) {
-						((MainActivity) getActivity()).loadSection(GM.SECTION_LABLANCA_SCHEDULE);
+						((MainActivity) getActivity()).loadSection(GM.SECTION.SCHEDULE);
 					}
 				});
 			}
@@ -418,9 +390,9 @@ public class HomeLayout extends Fragment implements LocationListener {
 	 */
 	@SuppressWarnings("ResultOfMethodCallIgnored")
 	private boolean setUpLablanca(View view) {
-		SharedPreferences preferences = view.getContext().getSharedPreferences(GM.PREF, Context.MODE_PRIVATE);
+		SharedPreferences preferences = view.getContext().getSharedPreferences(GM.DATA.DATA, Context.MODE_PRIVATE);
 		Boolean set = false;
-		if (preferences.getInt(GM.PREF_DB_FESTIVALS, 0) == 1) {
+		if (preferences.getBoolean(GM.DATA.KEY.LABLANCA, GM.DATA.DEFAULT.LABLANCA)) {
 			LinearLayout llSection = (LinearLayout) view.findViewById(R.id.ll_home_section_lablanca);
 			TextView tvText = (TextView) view.findViewById(R.id.tv_home_section_lablanca_text);
 			ImageView ivImage = (ImageView) view.findViewById(R.id.iv_home_section_lablanca_image);
@@ -429,12 +401,12 @@ public class HomeLayout extends Fragment implements LocationListener {
 			llSection.setOnClickListener(new OnClickListener() {
 				@Override
 				public void onClick(View v) {
-					((MainActivity) getActivity()).loadSection(GM.SECTION_LABLANCA);
+					((MainActivity) getActivity()).loadSection(GM.SECTION.LABLANCA);
 				}
 			});
 
 			//Get data from the database of the future activities
-			SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB_NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
+			SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB.NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
 			int year = Calendar.getInstance().get(Calendar.YEAR);
 			String lang = GM.getLang();
 			Cursor cursor = db.rawQuery("SELECT text_" + lang + ", img FROM festival WHERE year = " + year + ";", null);
@@ -475,7 +447,7 @@ public class HomeLayout extends Fragment implements LocationListener {
 						File fpath;
 						fpath = new File(this.getActivity().getFilesDir().toString() + "/img/fiestas/preview/");
 						fpath.mkdirs();
-						new DownloadImage(GM.SERVER + "/img/fiestas/preview/" + image, this.getActivity().getFilesDir().toString() + "/img/fiestas/preview/" + image, ivImage, GM.IMG_PREVIEW).execute();
+						new DownloadImage(GM.API.SERVER + "/img/fiestas/preview/" + image, this.getActivity().getFilesDir().toString() + "/img/fiestas/preview/" + image, ivImage, GM.IMG.SIZE.PREVIEW).execute();
 					}
 				}
 				else {
@@ -496,11 +468,25 @@ public class HomeLayout extends Fragment implements LocationListener {
 	 * @return True if the section has been shown, false otherwise.
 	 */
 	private boolean setUpLocation(Location location, View view) {
-		SharedPreferences preferences = view.getContext().getSharedPreferences(GM.PREF, Context.MODE_PRIVATE);
-		if (!preferences.getString(GM.PREF_GM_LOCATION, GM.DEFAULT_PREF_GM_LOCATION).equals(GM.DEFAULT_PREF_GM_LOCATION)) {
-			try {
-				Double lat = Double.longBitsToDouble(preferences.getLong(GM.PREF_GM_LATITUDE, 0));
-				Double lon = Double.longBitsToDouble(preferences.getLong(GM.PREF_GM_LONGITUDE, 0));
+		try {
+
+			Double lat, lon;
+
+			SQLiteDatabase db = getActivity().openOrCreateDatabase(GM.DB.NAME, Activity.MODE_PRIVATE, null);
+			Cursor cursor;
+			cursor = db.rawQuery("SELECT lat, lon FROM location WHERE dtime >= Datetime('now', '-10 minutes') ORDER BY dtime DESC LIMIT 1;", null);
+			if (cursor.getCount() == 0){
+				cursor.close();
+				db.close();
+				return false;
+			}
+			else {
+				cursor.moveToFirst();
+				lat = cursor.getDouble(0);
+				lon = cursor.getDouble(1);
+				cursor.close();
+				db.close();
+
 				Double distance = Distance.calculateDistance(lat, lon, location.getLatitude(), location.getLongitude());
 				TextView text = (TextView) view.findViewById(R.id.tv_home_section_location_distance);
 				if (distance <= 2) {
@@ -509,13 +495,14 @@ public class HomeLayout extends Fragment implements LocationListener {
 				} else {
 					text.setText(String.format(getString(R.string.home_section_location_text_long), String.format(Locale.US, "%.02f", distance)));
 				}
+
 				return true;
 			}
-			catch (Exception ex){
-				Log.e("Location", "Couldn't set up home location section: " + ex.toString());
-			}
-
 		}
+		catch (Exception ex){
+			Log.e("Location", "Couldn't set up home location section: " + ex.toString());
+		}
+
 		return false;
 	}
 
@@ -536,7 +523,7 @@ public class HomeLayout extends Fragment implements LocationListener {
 		llGallery.setOnClickListener(new OnClickListener() {
 			@Override
 			public void onClick(View v) {
-				((MainActivity) getActivity()).loadSection(GM.SECTION_GALLERY);
+				((MainActivity) getActivity()).loadSection(GM.SECTION.GALLERY);
 			}
 		});
 
@@ -548,7 +535,7 @@ public class HomeLayout extends Fragment implements LocationListener {
 		ivPhoto[3] = (ImageView) view.findViewById(R.id.iv_home_section_gallery_3);
 
 		//Get data from the database of the future activities
-		SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB_NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
+		SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB.NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
 		Cursor cursor = db.rawQuery("SELECT id, album, file, uploaded FROM photo, photo_album WHERE id = photo ORDER BY uploaded DESC LIMIT 4;", null);
 
 		while (cursor.moveToNext()) {
@@ -571,7 +558,7 @@ public class HomeLayout extends Fragment implements LocationListener {
 				File fpath;
 				fpath = new File(this.getActivity().getFilesDir().toString() + "/img/galeria/preview/");
 				fpath.mkdirs();
-				new DownloadImage(GM.SERVER + "/img/galeria/preview/" + image, this.getActivity().getFilesDir().toString() + "/img/galeria/preview/" + image, ivPhoto[counter], GM.IMG_PREVIEW).execute();
+				new DownloadImage(GM.API.SERVER + "/img/galeria/preview/" + image, this.getActivity().getFilesDir().toString() + "/img/galeria/preview/" + image, ivPhoto[counter], GM.IMG.SIZE.PREVIEW).execute();
 			}
 
 			//Set listeners for images
@@ -622,7 +609,7 @@ public class HomeLayout extends Fragment implements LocationListener {
 		String lang = GM.getLang();
 
 		//Get data from the database of the future activities
-		SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB_NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
+		SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB.NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
 		Cursor cursor = db.rawQuery("SELECT id, date, city, title_" + lang + " AS title, text_" + lang + " AS text, price, after_" + lang + " AS after FROM activity WHERE date < date('now') ORDER BY date DESC LIMIT 2;", null);
 
 		//Show section
@@ -633,7 +620,7 @@ public class HomeLayout extends Fragment implements LocationListener {
 		llActivitiesPast.setOnClickListener(new OnClickListener() {
 			@Override
 			public void onClick(View v) {
-				((MainActivity) getActivity()).loadSection(GM.SECTION_ACTIVITIES);
+				((MainActivity) getActivity()).loadSection(GM.SECTION.ACTIVITIES);
 			}
 		});
 
@@ -650,7 +637,7 @@ public class HomeLayout extends Fragment implements LocationListener {
 
 			//Set margins
 			LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
-			layoutParams.setMargins(10, 10, 10, 25);
+			layoutParams.setMargins(GM.UI.ENTRY_MARGIN, GM.UI.ENTRY_MARGIN, GM.UI.ENTRY_MARGIN, GM.UI.ENTRY_MARGIN);
 			entry.setLayoutParams(layoutParams);
 
 			//Set title
@@ -673,9 +660,7 @@ public class HomeLayout extends Fragment implements LocationListener {
 			} else {
 				text = Html.fromHtml(cursor.getString(6)).toString();
 			}
-			if (text.length() > 100) {
-				text = text.substring(0, 100) + "...";
-			}
+
 			TextView tvText = (TextView) entry.findViewById(R.id.tv_row_home_activity_text);
 			tvText.setText(text);
 
@@ -706,7 +691,7 @@ public class HomeLayout extends Fragment implements LocationListener {
 					File fpath;
 					fpath = new File(this.getActivity().getFilesDir().toString() + "/img/actividades/miniature/");
 					fpath.mkdirs();
-					new DownloadImage(GM.SERVER + "/img/actividades/miniature/" + image, this.getActivity().getFilesDir().toString() + "/img/actividades/miniature/" + image, iv, GM.IMG_MINIATURE).execute();
+					new DownloadImage(GM.API.SERVER + "/img/actividades/miniature/" + image, this.getActivity().getFilesDir().toString() + "/img/actividades/miniature/" + image, iv, GM.IMG.SIZE.MINIATURE).execute();
 				}
 			}
 			cursorImage.close();
@@ -765,7 +750,7 @@ public class HomeLayout extends Fragment implements LocationListener {
 		LayoutInflater factory = LayoutInflater.from(getActivity());
 
 		//Get data from the database of the future activities
-		SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB_NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
+		SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB.NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
 		Cursor cursor = db.rawQuery("SELECT id, date, city, title_" + lang + " AS title, text_" + lang + " AS text, price FROM activity WHERE date >= date('now') ORDER BY date LIMIT 2;", null);
 
 		//If there are future activities...
@@ -779,7 +764,7 @@ public class HomeLayout extends Fragment implements LocationListener {
 			llActivitiesFuture.setOnClickListener(new OnClickListener() {
 				@Override
 				public void onClick(View v) {
-					((MainActivity) getActivity()).loadSection(GM.SECTION_ACTIVITIES);
+					((MainActivity) getActivity()).loadSection(GM.SECTION.ACTIVITIES);
 				}
 			});
 
@@ -790,7 +775,7 @@ public class HomeLayout extends Fragment implements LocationListener {
 
 				//Set margins
 				LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
-				layoutParams.setMargins(10, 10, 10, 25);
+				layoutParams.setMargins(GM.UI.ENTRY_MARGIN, GM.UI.ENTRY_MARGIN, GM.UI.ENTRY_MARGIN, GM.UI.ENTRY_MARGIN);
 				entry.setLayoutParams(layoutParams);
 
 				//Set title
@@ -807,9 +792,6 @@ public class HomeLayout extends Fragment implements LocationListener {
 
 				//Set text
 				String text = Html.fromHtml(cursor.getString(4)).toString();
-				if (text.length() > 100) {
-					text = text.substring(0, 100) + "...";
-				}
 				TextView tvText = (TextView) entry.findViewById(R.id.tv_row_home_activity_text);
 				tvText.setText(text);
 
@@ -840,7 +822,7 @@ public class HomeLayout extends Fragment implements LocationListener {
 						File fpath;
 						fpath = new File(this.getActivity().getFilesDir().toString() + "/img/actividades/miniature/");
 						fpath.mkdirs();
-						new DownloadImage(GM.SERVER + "/img/actividades/miniature/" + image, this.getActivity().getFilesDir().toString() + "/img/actividades/miniature/" + image, iv, GM.IMG_MINIATURE).execute();
+						new DownloadImage(GM.API.SERVER + "/img/actividades/miniature/" + image, this.getActivity().getFilesDir().toString() + "/img/actividades/miniature/" + image, iv, GM.IMG.SIZE.MINIATURE).execute();
 					}
 				}
 
@@ -895,7 +877,7 @@ public class HomeLayout extends Fragment implements LocationListener {
 		llBlog.setOnClickListener(new OnClickListener() {
 			@Override
 			public void onClick(View v) {
-				((MainActivity) getActivity()).loadSection(GM.SECTION_BLOG);
+				((MainActivity) getActivity()).loadSection(GM.SECTION.BLOG);
 			}
 		});
 
@@ -906,7 +888,7 @@ public class HomeLayout extends Fragment implements LocationListener {
 		//An inflater
 		LayoutInflater factory = LayoutInflater.from(getActivity());
 
-		SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB_NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
+		SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB.NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
 		final Cursor cursor;
 
 		//Get data from the database
@@ -920,7 +902,7 @@ public class HomeLayout extends Fragment implements LocationListener {
 
 			//Set margins
 			LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
-			layoutParams.setMargins(10, 10, 10, 25);
+			layoutParams.setMargins(GM.UI.ENTRY_MARGIN, GM.UI.ENTRY_MARGIN, GM.UI.ENTRY_MARGIN, GM.UI.ENTRY_MARGIN);
 			entry.setLayoutParams(layoutParams);
 
 			//Set title
@@ -929,9 +911,6 @@ public class HomeLayout extends Fragment implements LocationListener {
 
 			//Set text
 			String text = Html.fromHtml(cursor.getString(2)).toString();
-			if (text.length() > 100) {
-				text = text.substring(0, 100) + "...";
-			}
 			TextView tvText = (TextView) entry.findViewById(R.id.tv_row_home_blog_text);
 			tvText.setText(text);
 
@@ -962,7 +941,7 @@ public class HomeLayout extends Fragment implements LocationListener {
 					File fpath;
 					fpath = new File(this.getActivity().getFilesDir().toString() + "/img/blog/miniature/");
 					fpath.mkdirs();
-					new DownloadImage(GM.SERVER + "/img/blog/miniature/" + image, this.getActivity().getFilesDir().toString() + "/img/blog/miniature/" + image, iv, GM.IMG_MINIATURE).execute();
+					new DownloadImage(GM.API.SERVER + "/img/blog/miniature/" + image, this.getActivity().getFilesDir().toString() + "/img/blog/miniature/" + image, iv, GM.IMG.SIZE.MINIATURE).execute();
 				}
 			}
 
@@ -1064,7 +1043,6 @@ public class HomeLayout extends Fragment implements LocationListener {
 	 */
 	@Override
 	public void onPause() {
-		//TODO: Only do this if location is required
 		if (!(ActivityCompat.checkSelfPermission(view.getContext(), android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(view.getContext(), android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED)) {
 			locationManager.removeUpdates(this);
 		}
@@ -1078,7 +1056,6 @@ public class HomeLayout extends Fragment implements LocationListener {
 	 */
 	@Override
 	public void onDestroy() {
-		//TODO: Only do this if location is required
 		try {
 			if (!(ActivityCompat.checkSelfPermission(view.getContext(), android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(view.getContext(), android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED)) {
 				locationManager.removeUpdates(this);
@@ -1098,7 +1075,6 @@ public class HomeLayout extends Fragment implements LocationListener {
 	 */
 	@Override
 	public void onResume(){
-		//TODO: Only do this if location is required
 		if (!(ActivityCompat.checkSelfPermission(view.getContext(), android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(view.getContext(), android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED)) {
 			locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1000, 0, this);
 		}

+ 5 - 4
app/src/main/java/com/ivalentin/margolariak/HomeSectionLocation.java

@@ -50,7 +50,7 @@ class HomeSectionLocation extends AsyncTask<Void, Void, Void> {
 		try {
 
 			FetchURL fu = new FetchURL();
-			fu.Run(GM.SERVER + "/app/location.php");
+			fu.Run(GM.API.SERVER + "/app/location.php");
 			//All the info
 			o = fu.getOutput().toString();
 
@@ -77,12 +77,13 @@ class HomeSectionLocation extends AsyncTask<Void, Void, Void> {
 	protected void onPostExecute(Void v) {
 		if (isLocationReported){
 
-			SharedPreferences preferences = view.getContext().getSharedPreferences(GM.PREF, Context.MODE_PRIVATE);
+			//TODO: Do this on a db table
+			/*SharedPreferences preferences = view.getContext().getSharedPreferences(GM.PREFERENCES.PREFERNCES, Context.MODE_PRIVATE);
 			SharedPreferences.Editor editor = preferences.edit();
 			editor.putLong(GM.PREF_GM_LATITUDE, Double.doubleToLongBits(coord.latitude));
 			editor.putLong(GM.PREF_GM_LONGITUDE, Double.doubleToLongBits(coord.longitude));
 			editor.putString(GM.PREF_GM_LOCATION, new SimpleDateFormat("yyyyMMddHHmmss", Locale.US).format(Calendar.getInstance().getTime()));
-			editor.apply();
+			editor.apply();*/
 
 			//Show menu entry
 			//LinearLayout menuEntry = (LinearLayout) activity.findViewById(R.id.rl_menu_location);
@@ -94,7 +95,7 @@ class HomeSectionLocation extends AsyncTask<Void, Void, Void> {
 			section.setOnClickListener(new View.OnClickListener(){
 				@Override
 				public void onClick(View v) {
-					((MainActivity) v.getContext()).loadSection(GM.SECTION_LOCATION);
+					((MainActivity) v.getContext()).loadSection(GM.SECTION.LOCATION);
 				}
 			});
 

+ 4 - 4
app/src/main/java/com/ivalentin/margolariak/LablancaLayout.java

@@ -58,7 +58,7 @@ public class LablancaLayout extends Fragment {
 		//Get database info from the database
 		String lang = GM.getLang();
 		int year = Calendar.getInstance().get(Calendar.YEAR);
-		SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB_NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
+		SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB.NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
 		Cursor cursor = db.rawQuery("SELECT text_" + lang + ", img FROM festival WHERE year = " + year + ";", null);
 		cursor.moveToFirst();
 
@@ -91,7 +91,7 @@ public class LablancaLayout extends Fragment {
 				File fpath;
 				fpath = new File(this.getActivity().getFilesDir().toString() + "/img/fiestas/preview/");
 				fpath.mkdirs();
-				new DownloadImage(GM.SERVER + "/img/fiestas/preview/" + image, this.getActivity().getFilesDir().toString() + "/img/fiestas/preview/" + image, headerImage, GM.IMG_PREVIEW).execute();
+				new DownloadImage(GM.API.SERVER + "/img/fiestas/preview/" + image, this.getActivity().getFilesDir().toString() + "/img/fiestas/preview/" + image, headerImage, GM.IMG.SIZE.PREVIEW).execute();
 			}
 		}
 		else{
@@ -189,14 +189,14 @@ public class LablancaLayout extends Fragment {
 		gmSchedule.setOnClickListener(new View.OnClickListener() {
 			@Override
 			public void onClick(View v) {
-				((MainActivity) getActivity()).loadSection(GM.SECTION_LABLANCA_GM_SCHEDULE);
+				((MainActivity) getActivity()).loadSection(GM.SECTION.GM_SCHEDULE);
 			}
 		});
 
 		citySchedule.setOnClickListener(new View.OnClickListener() {
 			@Override
 			public void onClick(View v) {
-				((MainActivity) getActivity()).loadSection(GM.SECTION_LABLANCA_SCHEDULE);
+				((MainActivity) getActivity()).loadSection(GM.SECTION.SCHEDULE);
 			}
 		});
 

+ 96 - 34
app/src/main/java/com/ivalentin/margolariak/LocationLayout.java

@@ -9,17 +9,21 @@ import com.google.android.gms.maps.MapsInitializer;
 import com.google.android.gms.maps.OnMapReadyCallback;
 import com.google.android.gms.maps.model.BitmapDescriptorFactory;
 import com.google.android.gms.maps.model.LatLng;
+import com.google.android.gms.maps.model.Marker;
 import com.google.android.gms.maps.model.MarkerOptions;
 
+import android.app.Activity;
 import android.content.Context;
-import android.content.SharedPreferences;
 import android.content.pm.PackageManager;
+import android.database.Cursor;
+import android.database.sqlite.SQLiteDatabase;
 import android.location.Criteria;
 import android.location.Location;
 import android.location.LocationListener;
 import android.location.LocationManager;
 import android.os.Bundle;
 import android.app.Fragment;
+import android.os.Handler;
 import android.support.v4.app.ActivityCompat;
 import android.util.Log;
 import android.view.LayoutInflater;
@@ -42,7 +46,7 @@ public class LocationLayout extends Fragment implements OnMapReadyCallback, Loca
 
 	//The map view
 	private MapView mapView;
-	private MarkerOptions moGm;
+	GoogleMap gMap;
 
 	private LocationManager locationManager;
 
@@ -52,6 +56,35 @@ public class LocationLayout extends Fragment implements OnMapReadyCallback, Loca
 	//The main View
 	private View v;
 
+	private double lat, lon;
+
+	//Map marker
+	Marker gmMarker;
+	MarkerOptions moGm = new MarkerOptions();
+
+	private final Handler markerHandler = new Handler();
+
+	private final Runnable resetMarker = new Runnable() {
+		@Override
+		public void run() {
+
+			if (gmMarker != null) {
+				gmMarker.remove();
+				if (refreshLocation()) {
+					gmMarker.setPosition(new LatLng(lat, lon));
+					gmLocation = new LatLng(lat, lon);
+					//moGm = new MarkerOptions();
+					moGm.title(v.getContext().getString(R.string.app_name));
+					moGm.position(gmLocation);
+					moGm.icon(BitmapDescriptorFactory.fromResource(R.drawable.pinpoint_gm));
+					gmMarker = gMap.addMarker(moGm);
+				}
+			}
+			markerHandler.postDelayed(resetMarker, GM.LOCATION.INTERVAL);
+		}
+	};
+
+
 	/**
 	 * Run when the fragment is inflated.
 	 *
@@ -70,12 +103,18 @@ public class LocationLayout extends Fragment implements OnMapReadyCallback, Loca
 		//Set up
 		locationManager = (LocationManager) v.getContext().getSystemService(Context.LOCATION_SERVICE);
 		if (!(ActivityCompat.checkSelfPermission(v.getContext(), android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(v.getContext(), android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED)){
-			locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, GM.LOCATION_ACCURACY_TIME, GM.LOCATION_ACCURACY_SPACE, this);
+			locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, GM.LOCATION.ACCURACY.TIME, GM.LOCATION.ACCURACY.SPACE, this);
 		}
 
 		//Set the title
 		((MainActivity) getActivity()).setSectionTitle(v.getContext().getString(R.string.menu_location));
 
+		//Refresh the location.
+		refreshLocation();
+
+		//Periodically check map
+		markerHandler.post(resetMarker);
+
 		mapView = (MapView) v.findViewById(R.id.mapview);
 		mapView.onCreate(savedInstanceState);
 
@@ -98,9 +137,11 @@ public class LocationLayout extends Fragment implements OnMapReadyCallback, Loca
 			mapView.onResume();
 		}
 		if (!(ActivityCompat.checkSelfPermission(v.getContext(), android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(v.getContext(), android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED)){
-			locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, GM.LOCATION_ACCURACY_TIME, GM.LOCATION_ACCURACY_SPACE, this);
+			locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, GM.LOCATION.ACCURACY.TIME, GM.LOCATION.ACCURACY.SPACE, this);
 		}
 		super.onResume();
+
+		markerHandler.post(resetMarker);
 	}
 
 	/**
@@ -114,6 +155,8 @@ public class LocationLayout extends Fragment implements OnMapReadyCallback, Loca
 			locationManager.removeUpdates(this);
 		}
 		super.onPause();
+
+		markerHandler.removeCallbacks(resetMarker);
 	}
 
 	/**
@@ -128,10 +171,13 @@ public class LocationLayout extends Fragment implements OnMapReadyCallback, Loca
 		if (!(ActivityCompat.checkSelfPermission(v.getContext(), android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(v.getContext(), android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED)) {
 			locationManager.removeUpdates(this);
 		}
+
 		if (mapView != null){
 			mapView.onResume();
 			mapView.onDestroy();
 		}
+
+		markerHandler.removeCallbacks(resetMarker);
 	}
 
 	/**
@@ -149,6 +195,34 @@ public class LocationLayout extends Fragment implements OnMapReadyCallback, Loca
 		}
 	}
 
+	/**
+	 * Refresh the global variables "lat" and "lon".
+	 *
+	 * Uses the most recent data in the database, if they are not older than 10 minutes.
+	 *
+	 * @return true if there is a location from less than 10 minutes ago, 0 otherwise.
+	 */
+	private boolean refreshLocation(){
+
+		SQLiteDatabase db = getActivity().openOrCreateDatabase(GM.DB.NAME, Activity.MODE_PRIVATE, null);
+		Cursor cursor;
+		cursor = db.rawQuery("SELECT lat, lon FROM location WHERE dtime >= Datetime('now', '-10 minutes') ORDER BY dtime DESC LIMIT 1;", null);
+		if (cursor.getCount() == 0){
+			cursor.close();
+			db.close();
+			return false;
+		}
+		else {
+			cursor.moveToFirst();
+			lat = cursor.getDouble(0);
+			lon = cursor.getDouble(1);
+			cursor.close();
+			db.close();
+			return true;
+		}
+
+	}
+
 	/**
 	 * Called when the map is ready to be used. 
 	 * Initializes it and sets the Gasteizko Margolariak marker.
@@ -160,6 +234,8 @@ public class LocationLayout extends Fragment implements OnMapReadyCallback, Loca
 	@Override
 	public void onMapReady(GoogleMap googleMap) {
 
+		gMap = googleMap;
+
 		if (!(ActivityCompat.checkSelfPermission(v.getContext(), android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(v.getContext(), android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED)) {
 			googleMap.setMyLocationEnabled(true);
 		}
@@ -171,30 +247,31 @@ public class LocationLayout extends Fragment implements OnMapReadyCallback, Loca
 		} catch (Exception e) {
 			Log.e("Error initializing maps", e.toString());
 		}
-		
-		//Set GM marker
-		SharedPreferences preferences = v.getContext().getSharedPreferences(GM.PREF, Context.MODE_PRIVATE);
-		Double lat = Double.longBitsToDouble(preferences.getLong(GM.PREF_GM_LATITUDE, 0));
-		Double lon = Double.longBitsToDouble(preferences.getLong(GM.PREF_GM_LONGITUDE, 0));
-		gmLocation = new LatLng(lat, lon);
-		moGm = new MarkerOptions();
-		moGm.title(v.getContext().getString(R.string.app_name));
-		moGm.position(gmLocation);
-		moGm.icon(BitmapDescriptorFactory.fromResource(R.drawable.pinpoint_gm));
-		googleMap.addMarker(moGm);
-		googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(lat, lon), 14.0f));
+
+		//If there is a location, set it
+		if (refreshLocation()) {
+
+			//Set the marker
+			gmLocation = new LatLng(lat, lon);
+			moGm.title(v.getContext().getString(R.string.app_name));
+			moGm.position(gmLocation);
+			moGm.icon(BitmapDescriptorFactory.fromResource(R.drawable.pinpoint_gm));
+			gmMarker = googleMap.addMarker(moGm);
+			googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(lat, lon), 14.0f));
+		}
 
 		//Start device location requests
 		if (!(ActivityCompat.checkSelfPermission(v.getContext(), android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(v.getContext(), android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED)) {
-			locationManager.requestLocationUpdates(locationManager.getBestProvider(new Criteria(), true), GM.LOCATION_ACCURACY_TIME, GM.LOCATION_ACCURACY_SPACE, this);
+			locationManager.requestLocationUpdates(locationManager.getBestProvider(new Criteria(), true), GM.LOCATION.ACCURACY.TIME, GM.LOCATION.ACCURACY.SPACE, this);
 			onLocationChanged(locationManager.getLastKnownLocation(LocationManager.PASSIVE_PROVIDER));
 		}
 	}
 
+
 	private void calCulateDistance(Location userLocation){
 		TextView text = (TextView) v.findViewById(R.id.tv_location_distance);
 		try {
-			Double distance = Distance.calculateDistance(userLocation.getLatitude(), userLocation.getLongitude(), gmLocation.latitude, gmLocation.longitude);
+			Double distance = Distance.calculateDistance(userLocation.getLatitude(), userLocation.getLongitude(), lat, lon);
 			if (distance <= 2) {
 				distance = 1000 * distance;
 				text.setText(String.format(getString(R.string.home_section_location_text_short), distance.intValue(), (int) (0.012 * distance.intValue())));
@@ -219,23 +296,11 @@ public class LocationLayout extends Fragment implements OnMapReadyCallback, Loca
 	 */
 	@Override
 	public void onLocationChanged(Location location) {
-		//TODO: Read again the GM Location.
-		SharedPreferences preferences = v.getContext().getSharedPreferences(GM.PREF, Context.MODE_PRIVATE);
-		if (!preferences.getString(GM.PREF_GM_LOCATION, GM.DEFAULT_PREF_GM_LOCATION).equals(GM.DEFAULT_PREF_GM_LOCATION)) {
-
-			Double lat = Double.longBitsToDouble(preferences.getLong(GM.PREF_GM_LATITUDE, 0));
-			Double lon = Double.longBitsToDouble(preferences.getLong(GM.PREF_GM_LONGITUDE, 0));
-			gmLocation = new LatLng(lat, lon);
-						calCulateDistance(location);
-			if (moGm != null){
-				moGm.visible(true);
-			}
-		}
+		calCulateDistance(location);
 	}
 
 	/**
 	 * Called when the location provider changes it's state.
-	 * Recalculates the list of events in the around section.
 	 *
 	 * @param provider The name of the provider
 	 * @param status Status code of the provider
@@ -274,7 +339,4 @@ public class LocationLayout extends Fragment implements OnMapReadyCallback, Loca
 	public void onProviderDisabled(String provider) {
 		//populateAround();
 	}
-
-
-
 }

+ 240 - 238
app/src/main/java/com/ivalentin/margolariak/MainActivity.java

@@ -2,9 +2,6 @@ package com.ivalentin.margolariak;
 
 import java.math.BigInteger;
 import java.security.SecureRandom;
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.Locale;
 
 import android.app.Activity;
 import android.app.Fragment;
@@ -15,11 +12,14 @@ import android.content.Context;
 import android.content.Intent;
 import android.content.SharedPreferences;
 import android.database.sqlite.SQLiteDatabase;
+import android.graphics.Color;
 import android.graphics.Typeface;
+import android.graphics.drawable.ColorDrawable;
 import android.graphics.drawable.Drawable;
 import android.net.Uri;
 import android.os.Bundle;
 import android.support.v7.app.AppCompatActivity;
+import android.util.DisplayMetrics;
 import android.util.Log;
 import android.view.Gravity;
 import android.view.KeyEvent;
@@ -44,7 +44,7 @@ import com.google.android.gms.appindexing.Thing;
 import com.google.android.gms.common.api.GoogleApiClient;
 
 /**
- * The main Activity of the app. It's actually the only activity, and it loads other fragments.
+ * The main Activity of the app. It's actually the only content activity, and it loads other fragments.
  *
  * @author Iñigo Valentin
  */
@@ -53,63 +53,52 @@ public class MainActivity extends Activity {
 	//Alarm to get location and notifications.
 	private AlarmReceiver notificationAlarm;
 
-	//The menu entries
-	private RelativeLayout menuItem[];
 	private TextView menuText[];
 	private ImageView menuImage[];
 
 	//Handler to periodically check for location updates
 	private final Handler locationHandler = new Handler();
 	// Code to check for location updates
+	private MainActivity activity = this;
 	private final Runnable checkForLocation = new Runnable() {
 		@Override
 		public void run() {
 
-			//Get location page and parse it
-			boolean result = false;
-			FetchURL fu = new FetchURL();
-			//TODO: This needs a simple API too
-			fu.Run(GM.SERVER + "/app/location.php");
-			String lat = "", lon = "";
-			String o = fu.getOutput().toString();
-			Log.d("Location", "Fetched location page");
-			if (o.contains("<location>none</location>"))
-				result = false;
-			if (o.contains("<lat>") && o.contains("<lon>")) {
-				lat = o.substring(o.indexOf("<lat>") + 5, o.indexOf("</lat>"));
-				lon = o.substring(o.indexOf("<lon>") + 5, o.indexOf("</lon>"));
-				result = true;
-			}
-
-			SharedPreferences settings = getSharedPreferences(GM.PREF, Context.MODE_PRIVATE);
-			SharedPreferences.Editor editor = settings.edit();
-			if (result) {
-				editor.putLong(GM.PREF_GM_LATITUDE, Double.doubleToLongBits(Double.parseDouble(lat)));
-				editor.putLong(GM.PREF_GM_LONGITUDE, Double.doubleToLongBits(Double.parseDouble(lon)));
-				editor.putString(GM.PREF_GM_LOCATION, new SimpleDateFormat("yyyyMMddHHmmss", Locale.US).format(Calendar.getInstance().getTime()));
-
-				//Show menu entry
-				if (menuItem[1] != null) {
-					menuItem[1].setVisibility(View.VISIBLE);
-				}
-			} else {
-				editor.putString(GM.PREF_GM_LOCATION, GM.DEFAULT_PREF_GM_LOCATION);
-				if (menuItem[1] != null) {
-					menuItem[1].setVisibility(View.GONE);
-				}
-			}
-			editor.apply();
+			new ReceiveLocation(activity).execute();
 
 			//Repeat this the same runnable code block again another th specified interval
-			locationHandler.postDelayed(checkForLocation, GM.INTERVAL_LOCATION);
+			locationHandler.postDelayed(checkForLocation, GM.LOCATION.INTERVAL);
 		}
 	};
+
 	/**
 	 * ATTENTION: This was auto-generated to implement the App Indexing API.
 	 * See https://g.co/AppIndexing/AndroidStudio for more information.
 	 */
 	private GoogleApiClient client;
 
+	/**
+	 * Enables o disables the location section.
+	 *
+	 * Shows or hiddes the menu entry and the home fragment,
+	 *
+	 * @param report True to show, false to hide.
+	 */
+	public void gotLocation(boolean report){
+		if (report) {
+			findViewById(R.id.rl_menu_location).setVisibility(View.VISIBLE);
+			if (findViewById(R.id.ll_home_section_location) != null){
+				findViewById(R.id.ll_home_section_location).setVisibility(View.VISIBLE);
+			}
+		}
+		else {
+			findViewById(R.id.rl_menu_location).setVisibility(View.GONE);
+			if (findViewById(R.id.ll_home_section_location) != null) {
+				findViewById(R.id.ll_home_section_location).setVisibility(View.GONE);
+			}
+		}
+	}
+
 	//Not referenced in code.
 	public void showMenu(View v) {
 		PopupMenu popup = new PopupMenu(this, v);
@@ -159,78 +148,83 @@ public class MainActivity extends Activity {
 		String title = "";
 		Bundle bundle = new Bundle();
 
+		//Get measures in dp
+		DisplayMetrics metrics = getResources().getDisplayMetrics();
+		int dp7 = (int) (8 * ((float)metrics.densityDpi / DisplayMetrics.DENSITY_DEFAULT));
+		int dp3 = (int) (4 * ((float)metrics.densityDpi / DisplayMetrics.DENSITY_DEFAULT));
+
 		//Reset all tabs to it's original state
 		for (int i = 0; i < 6; i++) {
 			menuText[i].setTypeface(null, Typeface.NORMAL);
 			menuImage[i].requestLayout();
-			menuImage[i].getLayoutParams().height = 2;
+			menuImage[i].getLayoutParams().height = dp3;
 		}
 
 		switch (section) {
-			case GM.SECTION_HOME:
+			case GM.SECTION.HOME:
 				fragment = new HomeLayout();
 				title = getString(R.string.menu_home);
 				menuText[0].setTypeface(null, Typeface.BOLD);
-				menuImage[0].getLayoutParams().height = 8;
+				menuImage[0].getLayoutParams().height = dp7;
 				break;
 
-			case GM.SECTION_LOCATION:
+			case GM.SECTION.LOCATION:
 				fragment = new LocationLayout();
 				title = getString(R.string.menu_location);
 				menuText[1].setTypeface(null, Typeface.BOLD);
-				menuImage[1].getLayoutParams().height = 8;
+				menuImage[1].getLayoutParams().height = dp7;
 				break;
 
-			case GM.SECTION_LABLANCA:
+			case GM.SECTION.LABLANCA:
 				//Get settings
-				SharedPreferences preferences = getSharedPreferences(GM.PREF, Context.MODE_PRIVATE);
-				if (preferences.getInt(GM.PREF_DB_FESTIVALS, 0) == 1) {
+				SharedPreferences sharedData = getSharedPreferences(GM.DATA.DATA, Context.MODE_PRIVATE);
+				if (sharedData.getBoolean(GM.DATA.KEY.LABLANCA, GM.DATA.DEFAULT.LABLANCA)) {
 					fragment = new LablancaLayout();
 				} else {
 					fragment = new LablancaNoFestivalsLayout();
 				}
 				title = getString(R.string.menu_lablanca);
 				menuText[2].setTypeface(null, Typeface.BOLD);
-				menuImage[2].getLayoutParams().height = 8;
+				menuImage[2].getLayoutParams().height = dp7;
 				break;
 
-			case GM.SECTION_LABLANCA_SCHEDULE:
+			case GM.SECTION.SCHEDULE:
 				fragment = new ScheduleLayout();
-				bundle.putInt(GM.SCHEDULE, GM.SECTION_LABLANCA_SCHEDULE);
+				bundle.putInt(GM.SCHEDULE.KEY, GM.SCHEDULE.MARGOLARIAK);
 				fragment.setArguments(bundle);
 				title = getString(R.string.menu_lablanca_schedule);
 				menuText[2].setTypeface(null, Typeface.BOLD);
-				menuImage[2].getLayoutParams().height = 8;
+				menuImage[2].getLayoutParams().height = dp7;
 				break;
 
-			case GM.SECTION_LABLANCA_GM_SCHEDULE:
+			case GM.SECTION.GM_SCHEDULE:
 				fragment = new ScheduleLayout();
-				bundle.putInt(GM.SCHEDULE, GM.SECTION_LABLANCA_GM_SCHEDULE);
+				bundle.putInt(GM.SCHEDULE.KEY, GM.SCHEDULE.MARGOLARIAK);
 				fragment.setArguments(bundle);
 				title = getString(R.string.menu_lablanca_gm_schedule);
 				menuText[2].setTypeface(null, Typeface.BOLD);
-				menuImage[2].getLayoutParams().height = 8;
+				menuImage[2].getLayoutParams().height = dp7;
 				break;
 
-			case GM.SECTION_ACTIVITIES:
+			case GM.SECTION.ACTIVITIES:
 				fragment = new ActivityLayout();
 				title = getString(R.string.menu_activities);
 				menuText[3].setTypeface(null, Typeface.BOLD);
-				menuImage[3].getLayoutParams().height = 8;
+				menuImage[3].getLayoutParams().height = dp7;
 				break;
 
-			case GM.SECTION_BLOG:
+			case GM.SECTION.BLOG:
 				fragment = new BlogLayout();
 				title = getString(R.string.menu_blog);
 				menuText[4].setTypeface(null, Typeface.BOLD);
-				menuImage[4].getLayoutParams().height = 8;
+				menuImage[4].getLayoutParams().height = dp7;
 				break;
 
-			case GM.SECTION_GALLERY:
+			case GM.SECTION.GALLERY:
 				fragment = new GalleryLayout();
 				title = getString(R.string.menu_blog);
 				menuText[5].setTypeface(null, Typeface.BOLD);
-				menuImage[5].getLayoutParams().height = 8;
+				menuImage[5].getLayoutParams().height = dp7;
 				break;
 		}
 
@@ -262,9 +256,9 @@ public class MainActivity extends Activity {
 	protected void onCreate(Bundle savedInstanceState) {
 
 		//Get intent extras
-		String action = getIntent().getStringExtra(GM.EXTRA_ACTION);
-		String actionText = getIntent().getStringExtra(GM.EXTRA_TEXT);
-		String actionTitle = getIntent().getStringExtra(GM.EXTRA_TITLE);
+		String action = getIntent().getStringExtra(GM.EXTRA.ACTION);
+		String actionText = getIntent().getStringExtra(GM.EXTRA.TEXT);
+		String actionTitle = getIntent().getStringExtra(GM.EXTRA.TITLE);
 
 		//Set an alarm for notifications..
 		//Wait a little
@@ -301,7 +295,7 @@ public class MainActivity extends Activity {
 		setContentView(R.layout.activity_main);
 
 		//Assign menu items
-		menuItem = new RelativeLayout[6];
+		RelativeLayout[] menuItem = new RelativeLayout[6];
 		menuItem[0] = (RelativeLayout) findViewById(R.id.rl_menu_home);
 		menuItem[1] = (RelativeLayout) findViewById(R.id.rl_menu_location);
 		menuItem[2] = (RelativeLayout) findViewById(R.id.rl_menu_lablanca);
@@ -331,253 +325,245 @@ public class MainActivity extends Activity {
 		menuItem[0].setOnClickListener(new OnClickListener() {
 			@Override
 			public void onClick(View v) {
-				loadSection(GM.SECTION_HOME);
+				loadSection(GM.SECTION.HOME);
 			}
 		});
 		menuItem[1].setOnClickListener(new OnClickListener() {
 			@Override
 			public void onClick(View v) {
-				loadSection(GM.SECTION_LOCATION);
+				loadSection(GM.SECTION.LOCATION);
 			}
 		});
 		menuItem[2].setOnClickListener(new OnClickListener() {
 			@Override
 			public void onClick(View v) {
-				loadSection(GM.SECTION_LABLANCA);
+				loadSection(GM.SECTION.LABLANCA);
 			}
 		});
 		menuItem[3].setOnClickListener(new OnClickListener() {
 			@Override
 			public void onClick(View v) {
-				loadSection(GM.SECTION_ACTIVITIES);
+				loadSection(GM.SECTION.ACTIVITIES);
 			}
 		});
 		menuItem[4].setOnClickListener(new OnClickListener() {
 			@Override
 			public void onClick(View v) {
-				loadSection(GM.SECTION_BLOG);
+				loadSection(GM.SECTION.BLOG);
 			}
 		});
 		menuItem[5].setOnClickListener(new OnClickListener() {
 			@Override
 			public void onClick(View v) {
-				loadSection(GM.SECTION_GALLERY);
+				loadSection(GM.SECTION.GALLERY);
 			}
 		});
 
 		//Get preferences
-		SharedPreferences preferences = getSharedPreferences(GM.PREF, Context.MODE_PRIVATE);
-		SharedPreferences.Editor editor = preferences.edit();
-
-		//TODO: Read preferences. If there is a recent location, show the menu entry
+		SharedPreferences sharedData = getSharedPreferences(GM.PREFERENCES.PREFERNCES, Context.MODE_PRIVATE);
+		SharedPreferences.Editor dataEditor = sharedData.edit();
 
 		//If the user code is not set, generate one
-		if (preferences.getString(GM.USER_CODE, "").length() == 0) {
+		if (sharedData.getString(GM.DATA.KEY.USER, GM.DATA.DEFAULT.USER).length() == GM.DATA.DEFAULT.USER.length()) {
 			SecureRandom random = new SecureRandom();
 			String newCode = new BigInteger(130, random).toString(32).substring(0, 16);
-			editor.putString(GM.USER_CODE, newCode);
-			editor.apply();
+			dataEditor.putString(GM.DATA.KEY.USER, newCode);
+			dataEditor.apply();
 		}
 
 		//Cerate database if it's not already created
 		createDatabase();
 
 		//If the database has just been updated, recreate the database
-		if (preferences.getInt(GM.PREF_PREVIOUS_VERSION, 0) < BuildConfig.VERSION_CODE) {
-			Log.d("UPDATE", "App updated from version " + preferences.getInt(GM.PREF_PREVIOUS_VERSION, 0) + " to " + BuildConfig.VERSION_CODE + ". Forcing a new sync...");
+		if (sharedData.getInt(GM.DATA.KEY.PREVIOUS_APP_VERSION, GM.DATA.DEFAULT.PREVIOUS_APP_VERSION) < BuildConfig.VERSION_CODE) {
+			Log.d("UPDATE", "App updated from version " + sharedData.getInt(GM.DATA.KEY.PREVIOUS_APP_VERSION, GM.DATA.DEFAULT.PREVIOUS_APP_VERSION) + " to " + BuildConfig.VERSION_CODE + ". Forcing a new sync...");
 			deleteDatabase();
-			editor.putInt(GM.PREF_PREVIOUS_VERSION, BuildConfig.VERSION_CODE);
-			editor.putInt(GM.PREF_DB_VERSION, 0);
-			editor.apply();
+			dataEditor.putInt(GM.DATA.KEY.PREVIOUS_APP_VERSION, BuildConfig.VERSION_CODE);
+			dataEditor.apply();
 			createDatabase();
 			initialSync();
 		}
 		else {
+			//Sync db
+			sync();
 
-			//If its the first time
-			if (preferences.getInt(GM.PREF_DB_VERSION, GM.DEFAULT_PREF_DB_VERSION) == GM.DEFAULT_PREF_DB_VERSION) {
-				initialSync();
-			}
-			//If t's not the first time
-			else {
-				//Sync db
-				sync();
-
-				//Load initial section
-				loadSection(GM.SECTION_HOME);
-
-				//If the intent had extras (from notifications), do something
-				if (actionText != null) {
-					TextView tvDialogTitle, tvDialogText;
-					Button btDialogClose, btDialogAction;
-					Drawable dialogIcon;
-					if (actionTitle != null) {
-
-						//Create a dialog
-						final Dialog dialog = new Dialog(this);
-
-						//Set up dialog window
-						dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
-						dialog.setContentView(R.layout.dialog_notification);
-
-						//Set title
-						tvDialogTitle = (TextView) dialog.findViewById(R.id.tv_dialog_notification_title);
-						tvDialogTitle.setText(actionTitle);
-
-						//Set text
-						tvDialogText = (TextView) dialog.findViewById(R.id.tv_dialog_notification_text);
-						tvDialogText.setText(actionText);
-
-						//Set close button
-						btDialogClose = (Button) dialog.findViewById(R.id.bt_dialog_notification_close);
-						btDialogClose.setOnClickListener(new OnClickListener() {
-							@Override
-							public void onClick(View v) {
-								dialog.dismiss();
-							}
-						});
-
-						//Set the icon
-						dialogIcon = getResources().getDrawable(R.drawable.ic_launcher);
-						if (dialogIcon != null) {
-							dialogIcon.setBounds(0, 0, (int) (tvDialogTitle.getTextSize() * 1.4), (int) (tvDialogTitle.getTextSize() * 1.4));
-						}
-						tvDialogTitle.setCompoundDrawables(dialogIcon, null, null, null);
-						tvDialogTitle.setCompoundDrawablePadding(20);
+			//Load initial section
+			loadSection(GM.SECTION.HOME);
 
-						//Get preferences
-						int festivals = preferences.getInt(GM.PREF_DB_FESTIVALS, 0);
+			//If the intent had extras (from notifications), do something
+			if (actionText != null) {
+				TextView tvDialogTitle, tvDialogText;
+				Button btDialogClose, btDialogAction;
+				Drawable dialogIcon;
+				if (actionTitle != null) {
 
-						//Set the action button
-						btDialogAction = (Button) dialog.findViewById(R.id.bt_dialog_notification_action);
-						if (action != null) {
-							switch (action) {
+					//Create a dialog
+					final Dialog dialog = new Dialog(this);
 
-								case GM.EXTRA_ACTION_LABLANCA:
+					//Set up dialog window
+					dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
+					dialog.setContentView(R.layout.dialog_notification);
 
-									//Set up the action button
-									btDialogAction.setVisibility(View.VISIBLE);
-									btDialogAction.setText(this.getApplicationContext().getString(R.string.notification_action_lablanca));
-									btDialogAction.setOnClickListener(new OnClickListener() {
-										@Override
-										public void onClick(View v) {
-											dialog.dismiss();
-											loadSection(GM.SECTION_LABLANCA);
-										}
-									});
-									break;
-
-								case GM.EXTRA_ACTION_LOCATION:
-
-									if (!preferences.getString(GM.PREF_GM_LOCATION, GM.DEFAULT_PREF_GM_LOCATION).equals(GM.DEFAULT_PREF_GM_LOCATION)) {
-										//Set up the action button if location is reported
-										btDialogAction.setVisibility(View.VISIBLE);
-										btDialogAction.setText(this.getApplicationContext().getString(R.string.notification_action_location));
-										btDialogAction.setOnClickListener(new OnClickListener() {
-											@Override
-											public void onClick(View v) {
-												dialog.dismiss();
-												loadSection(GM.SECTION_LOCATION);
-											}
-										});
+					//Set title
+					tvDialogTitle = (TextView) dialog.findViewById(R.id.tv_dialog_notification_title);
+					tvDialogTitle.setText(actionTitle);
 
+					//Set text
+					tvDialogText = (TextView) dialog.findViewById(R.id.tv_dialog_notification_text);
+					tvDialogText.setText(actionText);
+
+					//Set close button
+					btDialogClose = (Button) dialog.findViewById(R.id.bt_dialog_notification_close);
+					btDialogClose.setOnClickListener(new OnClickListener() {
+						@Override
+						public void onClick(View v) {
+							dialog.dismiss();
+						}
+					});
+
+					//Set the icon
+					dialogIcon = getResources().getDrawable(R.drawable.ic_launcher);
+					if (dialogIcon != null) {
+						dialogIcon.setBounds(0, 0, (int) (tvDialogTitle.getTextSize() * 1.4), (int) (tvDialogTitle.getTextSize() * 1.4));
+					}
+					tvDialogTitle.setCompoundDrawables(dialogIcon, null, null, null);
+					tvDialogTitle.setCompoundDrawablePadding(20);
+
+					//Get preferences
+					boolean festivals = sharedData.getBoolean(GM.DATA.KEY.LABLANCA, GM.DATA.DEFAULT.LABLANCA);
+
+					//Set the action button
+					btDialogAction = (Button) dialog.findViewById(R.id.bt_dialog_notification_action);
+					if (action != null) {
+						switch (action) {
+
+							case GM.EXTRA.SECTION.LABLANCA:
+
+								//Set up the action button
+								btDialogAction.setVisibility(View.VISIBLE);
+								btDialogAction.setText(this.getApplicationContext().getString(R.string.notification_action_lablanca));
+								btDialogAction.setOnClickListener(new OnClickListener() {
+									@Override
+									public void onClick(View v) {
+										dialog.dismiss();
+										loadSection(GM.SECTION.LABLANCA);
 									}
-									break;
+								});
+								break;
 
-								case GM.EXTRA_ACTION_BLOG:
+							case GM.EXTRA.SECTION.LOCATION:
 
-									//Set up the action button
+								//TODO: Read from database
+								/*if (!sharedData.getString(GM.PREF_GM_LOCATION, GM.DEFAULT_PREF_GM_LOCATION).equals(GM.DEFAULT_PREF_GM_LOCATION)) {
+									//Set up the action button if location is reported
 									btDialogAction.setVisibility(View.VISIBLE);
-									btDialogAction.setText(this.getApplicationContext().getString(R.string.notification_action_blog));
+									btDialogAction.setText(this.getApplicationContext().getString(R.string.notification_action_location));
 									btDialogAction.setOnClickListener(new OnClickListener() {
 										@Override
 										public void onClick(View v) {
 											dialog.dismiss();
-											loadSection(GM.SECTION_BLOG);
+											loadSection(GM.SECTION_LOCATION);
 										}
 									});
-									break;
 
-								case GM.EXTRA_ACTION_ACTIVITIES:
+								}*/
+								break;
+
+							case GM.EXTRA.SECTION.BLOG:
 
+								//Set up the action button
+								btDialogAction.setVisibility(View.VISIBLE);
+								btDialogAction.setText(this.getApplicationContext().getString(R.string.notification_action_blog));
+								btDialogAction.setOnClickListener(new OnClickListener() {
+									@Override
+									public void onClick(View v) {
+										dialog.dismiss();
+										loadSection(GM.SECTION.BLOG);
+									}
+								});
+								break;
+
+							case GM.EXTRA.SECTION.ACTIVITIES:
+
+								//Set up the action button
+								btDialogAction.setVisibility(View.VISIBLE);
+								btDialogAction.setText(this.getApplicationContext().getString(R.string.notification_action_activities));
+								btDialogAction.setOnClickListener(new OnClickListener() {
+									@Override
+									public void onClick(View v) {
+										dialog.dismiss();
+										loadSection(GM.SECTION.ACTIVITIES);
+									}
+								});
+								break;
+
+							case GM.EXTRA.SECTION.GALLERY:
+
+								//Set up the action button
+								btDialogAction.setVisibility(View.VISIBLE);
+								btDialogAction.setText(this.getApplicationContext().getString(R.string.notification_action_gallery));
+								btDialogAction.setOnClickListener(new OnClickListener() {
+									@Override
+									public void onClick(View v) {
+										dialog.dismiss();
+										loadSection(GM.SECTION.GALLERY);
+									}
+								});
+								break;
+
+							case GM.EXTRA.SECTION.GMSCHEDULE:
+
+								if (festivals) {
 									//Set up the action button
 									btDialogAction.setVisibility(View.VISIBLE);
-									btDialogAction.setText(this.getApplicationContext().getString(R.string.notification_action_activities));
+									btDialogAction.setText(this.getApplicationContext().getString(R.string.notification_action_gmschedule));
 									btDialogAction.setOnClickListener(new OnClickListener() {
 										@Override
 										public void onClick(View v) {
 											dialog.dismiss();
-											loadSection(GM.SECTION_ACTIVITIES);
+											loadSection(GM.SECTION.GM_SCHEDULE);
 										}
 									});
-									break;
-
-								case GM.EXTRA_ACTION_GALLERY:
+								}
+								break;
 
+							case GM.EXTRA.SECTION.SCHEDULE:
+								if (festivals) {
 									//Set up the action button
 									btDialogAction.setVisibility(View.VISIBLE);
-									btDialogAction.setText(this.getApplicationContext().getString(R.string.notification_action_gallery));
+									btDialogAction.setText(this.getApplicationContext().getString(R.string.notification_action_cityschedule));
 									btDialogAction.setOnClickListener(new OnClickListener() {
 										@Override
 										public void onClick(View v) {
 											dialog.dismiss();
-											loadSection(GM.SECTION_GALLERY);
+											loadSection(GM.SECTION.SCHEDULE);
 										}
 									});
-									break;
-
-								case GM.EXTRA_ACTION_GMSCHEDULE:
-
-									if (festivals == 1) {
-										//Set up the action button
-										btDialogAction.setVisibility(View.VISIBLE);
-										btDialogAction.setText(this.getApplicationContext().getString(R.string.notification_action_gmschedule));
-										btDialogAction.setOnClickListener(new OnClickListener() {
-											@Override
-											public void onClick(View v) {
-												dialog.dismiss();
-												loadSection(GM.SECTION_LABLANCA_GM_SCHEDULE);
-											}
-										});
-									}
-									break;
-
-								case GM.EXTRA_ACTION_CITYSCHEDULE:
-									if (festivals == 1) {
-										//Set up the action button
-										btDialogAction.setVisibility(View.VISIBLE);
-										btDialogAction.setText(this.getApplicationContext().getString(R.string.notification_action_cityschedule));
-										btDialogAction.setOnClickListener(new OnClickListener() {
-											@Override
-											public void onClick(View v) {
-												dialog.dismiss();
-												loadSection(GM.SECTION_LABLANCA_SCHEDULE);
-											}
-										});
-									}
-									break;
-
-								//If the notification is just text
-								default:
-									//Hide action button
-									btDialogAction.setVisibility(View.GONE);
-							}
-						} else {
-							btDialogAction.setVisibility(View.GONE);
-						}
+								}
+								break;
 
-						//Set dialog parameters
-						WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
-						lp.copyFrom(dialog.getWindow().getAttributes());
-						lp.width = WindowManager.LayoutParams.MATCH_PARENT;
-						lp.height = WindowManager.LayoutParams.WRAP_CONTENT;
-						lp.gravity = Gravity.CENTER;
-						lp.dimAmount = 0.4f;
-						dialog.getWindow().setAttributes(lp);
-
-						//Show dialog
-						dialog.show();
+							//If the notification is just text
+							default:
+								//Hide action button
+								btDialogAction.setVisibility(View.GONE);
+						}
+					} else {
+						btDialogAction.setVisibility(View.GONE);
 					}
+
+					//Set dialog parameters
+					WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
+					lp.copyFrom(dialog.getWindow().getAttributes());
+					lp.width = WindowManager.LayoutParams.MATCH_PARENT;
+					lp.height = WindowManager.LayoutParams.WRAP_CONTENT;
+					lp.gravity = Gravity.CENTER;
+					lp.dimAmount = 0.4f;
+					dialog.getWindow().setAttributes(lp);
+
+					dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
+
+					//Show dialog
+					dialog.show();
 				}
 			}
 		}
@@ -594,7 +580,7 @@ public class MainActivity extends Activity {
 		SQLiteDatabase db;
 		try {
 			//Create database
-			db = openOrCreateDatabase(GM.DB_NAME, Activity.MODE_PRIVATE, null);
+			db = openOrCreateDatabase(GM.DB.NAME, Activity.MODE_PRIVATE, null);
 			db.execSQL(GM.DB.QUERY.CREATE.ACTIVITY);
 			db.execSQL(GM.DB.QUERY.CREATE.ACTIVITY_COMMENT);
 			db.execSQL(GM.DB.QUERY.CREATE.ACTIVITY_IMAGE);
@@ -617,7 +603,7 @@ public class MainActivity extends Activity {
 			db.execSQL(GM.DB.QUERY.CREATE.POST_COMMENT);
 			db.execSQL(GM.DB.QUERY.CREATE.POST_IMAGE);
 			db.execSQL(GM.DB.QUERY.CREATE.POST_TAG);
-			db.execSQL(GM.DB.QUERY.CREATE.SETTINGS);
+			//db.execSQL(GM.DB.QUERY.CREATE.SETTINGS);
 			db.execSQL(GM.DB.QUERY.CREATE.SPONSOR);
 			db.execSQL(GM.DB.QUERY.CREATE.VERSION);
 			db.close();
@@ -630,9 +616,8 @@ public class MainActivity extends Activity {
 	 * Creates the app database and fills it with the hard coded, default data.
 	 */
 	private void deleteDatabase() {
-		SQLiteDatabase db;
 		try {
-			deleteDatabase(GM.DB_NAME);
+			getApplicationContext().deleteDatabase(GM.DB.NAME);
 		} catch (Exception ex) {
 			Log.e("Error deleting database", ex.toString());
 		}
@@ -668,7 +653,7 @@ public class MainActivity extends Activity {
 		lp.width = WindowManager.LayoutParams.MATCH_PARENT;
 		lp.height = WindowManager.LayoutParams.WRAP_CONTENT;
 		lp.gravity = Gravity.CENTER;
-		lp.dimAmount = 0.4f;
+		dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
 		dialog.getWindow().setAttributes(lp);
 
 		//Sync
@@ -695,7 +680,6 @@ public class MainActivity extends Activity {
 			}
 		} catch (Exception ex) {
 			Log.e("Error going back", "Finishing activity: " + ex.toString());
-			Log.e("RUNNABLE", "Finishing callback for location");
 			locationHandler.removeCallbacks(checkForLocation);
 			finish();
 			//super.onBackPressed();
@@ -718,18 +702,36 @@ public class MainActivity extends Activity {
 		return super.onKeyUp(keyCode, event);
 	}
 
+	/**
+	 * Overrides onResume().
+	 * Resumes the location handler to check for location regularly.
+	 *
+	 * @see Activity#onResume()
+	 */
 	@Override
 	public void onResume() {
 		locationHandler.post(checkForLocation);
 		super.onResume();
 	}
 
+	/**
+	 * Overrides onPause().
+	 * Stops the location handler to check for location regularly.
+	 *
+	 * @see Activity#onPause()
+	 */
 	@Override
 	public void onPause() {
 		locationHandler.removeCallbacks(checkForLocation);
 		super.onPause();
 	}
 
+	/**
+	 * Overrides onDestroy().
+	 * Stops the location handler to check for location regularly.
+	 *
+	 * @see Activity#onDestroy()
+	 */
 	@Override
 	public void onDestroy() {
 		locationHandler.removeCallbacks(checkForLocation);

+ 4 - 4
app/src/main/java/com/ivalentin/margolariak/PhotoLayout.java

@@ -123,7 +123,7 @@ public class PhotoLayout extends Fragment {
 	 */
 	private Integer[] loadPhotos(int id){
 
-		SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB_NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
+		SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB.NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
 
 		//Get album id for the photo
 		Cursor cAlbum = db.rawQuery("SELECT album FROM photo_album WHERE photo = " + id + ";", null);
@@ -156,7 +156,7 @@ public class PhotoLayout extends Fragment {
 		final int photoId = id;
 
 		//Get data from database
-		SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB_NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
+		SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB.NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
 		final Cursor cursor;
 		final String lang = GM.getLang();
 		cursor = db.rawQuery("SELECT id, file, title_" + lang+ " AS title, description_" + lang + " AS description, uploaded, width, height, size FROM photo WHERE id = " + id + ";", null);
@@ -204,11 +204,11 @@ public class PhotoLayout extends Fragment {
 		}
 		else {
 			//If not,  set placeholder image, create directories and download asynchronously
-			imageView.setImageResource(getResources().getIdentifier("com.ivalentin.margolariak:drawable/pinpoint_gm", null, null));
+			imageView.setImageResource(getResources().getIdentifier("com.ivalentin.margolariak:drawable/photo_placeholder", null, null));
 			File fpath;
 			fpath = new File(this.getActivity().getFilesDir().toString() + "/img/galeria/view/");
 			fpath.mkdirs();
-			new DownloadImage(GM.SERVER + "/img/galeria/view/" + image, this.getActivity().getFilesDir().toString() + "/img/galeria/view/" + image, imageView, GM.IMG_VIEW).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
+			new DownloadImage(GM.API.SERVER + "/img/galeria/view/" + image, this.getActivity().getFilesDir().toString() + "/img/galeria/view/" + image, imageView, GM.IMG.SIZE.VIEW).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
 		}
 
 		//Hide or show comments, as needed

+ 4 - 4
app/src/main/java/com/ivalentin/margolariak/PostComment.java

@@ -61,8 +61,8 @@ class PostComment extends AsyncTask<String, String, Integer> {
         pb.setVisibility(View.VISIBLE);
 
         //Get user code
-        SharedPreferences preferences = context.getSharedPreferences(GM.PREF, Context.MODE_PRIVATE);
-        userCode = preferences.getString(GM.USER_CODE, "");
+        SharedPreferences sharedData = context.getSharedPreferences(GM.DATA.DATA, Context.MODE_PRIVATE);
+        userCode = sharedData.getString(GM.DATA.KEY.USER, GM.DATA.DEFAULT.USER);
     }
 
     /**
@@ -103,7 +103,7 @@ class PostComment extends AsyncTask<String, String, Integer> {
             urlParams = urlParams + "&from=app&code=" + userCode;
             byte[] postData       = urlParams.getBytes("UTF-8");
             int    postDataLength = postData.length;
-            String request        = GM.SERVER + "/" + type + "/comment.php";
+            String request        = GM.API.SERVER + "/" + type + "/comment.php";
             url            = new URL( request );
             HttpURLConnection conn= (HttpURLConnection) url.openConnection();
             conn.setDoOutput( true );
@@ -122,7 +122,7 @@ class PostComment extends AsyncTask<String, String, Integer> {
 
             if (code == 200){
                 //Insert into local db
-                SQLiteDatabase db = SQLiteDatabase.openDatabase(context.getDatabasePath(GM.DB_NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS);
+                SQLiteDatabase db = SQLiteDatabase.openDatabase(context.getDatabasePath(GM.DB.NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS);
                 String table = "";
                 String item = "";
                 switch (type){

+ 2 - 2
app/src/main/java/com/ivalentin/margolariak/PostLayout.java

@@ -57,7 +57,7 @@ public class PostLayout extends Fragment {
         }
 
         //Get data from database
-        SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB_NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
+        SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB.NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
         final Cursor cursor;
         String lang = GM.getLang();
         cursor = db.rawQuery("SELECT id, title_" + lang+ " AS title, text_" + lang + " AS text, dtime FROM post WHERE id = " + id + ";", null);
@@ -110,7 +110,7 @@ public class PostLayout extends Fragment {
                 File fpath;
                 fpath = new File(this.getActivity().getFilesDir().toString() + "/img/blog/preview/");
                 fpath.mkdirs();
-				new DownloadImage(GM.SERVER + "/img/blog/preview/" + image, this.getActivity().getFilesDir().toString() + "/img/blog/preview/" + image, images[i], GM.IMG_PREVIEW).execute();
+				new DownloadImage(GM.API.SERVER + "/img/blog/preview/" + image, this.getActivity().getFilesDir().toString() + "/img/blog/preview/" + image, images[i], GM.IMG.SIZE.PREVIEW).execute();
             }
             images[i].setVisibility(View.VISIBLE);
             i ++;

+ 101 - 0
app/src/main/java/com/ivalentin/margolariak/ReceiveLocation.java

@@ -0,0 +1,101 @@
+package com.ivalentin.margolariak;
+
+import android.app.Activity;
+import android.database.sqlite.SQLiteDatabase;
+import android.os.AsyncTask;
+import android.util.Log;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+/**
+ * AsyncTask to get Gasteizko Margolariak location.
+ *
+ * Uses the Location V1 API.
+ *
+ * @author Inigo Valentin
+ *
+ * @see AsyncTask
+ */
+
+class ReceiveLocation extends AsyncTask<Void, Void, Void> {
+
+	private MainActivity activity;
+	private boolean report = false;
+
+	/**
+	 * Called when the AsyncTask is created.
+	 *
+	 * @param activity The calling activity.
+	 */
+	ReceiveLocation(MainActivity activity){
+		this.activity = activity;
+	}
+
+	@Override
+	protected Void doInBackground(Void... params) {
+
+		try {
+			String uri = GM.API.SERVER + GM.API.LOCATION.PATH;
+			URL url = new URL(uri);
+			HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
+
+			int httpCode = urlConnection.getResponseCode();
+			switch (httpCode) {
+				case 400:	//Client error: Bad request
+					Log.e("LOCATION", "The server returned a 400 code (Client Error: Bad request) for the url \"" + uri + "\"");
+					break;
+				case 204:	//Success: No content
+					Log.d("LOCATION", "The server returned a 204 code (Success: No content) for the url \"" + uri + "\". Not getting location...");
+					break;
+				case 200:	//Success: OK
+					Log.d("LOCATION", "The server returned a 200 code (Success: OK) for the url \"" + uri + "\". Now getting location...");
+					BufferedReader br = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));
+					StringBuilder sb = new StringBuilder();
+					String o;
+					while ((o = br.readLine()) != null) {
+						sb.append(o);
+					}
+
+					//Get the string with the sync json. (The whole page)
+					String strLocation = sb.toString();
+					String lat = strLocation.substring(strLocation.indexOf("\"lat\":\"") + 7, strLocation.indexOf("\"", strLocation.indexOf("\"lat\":\"") + 8));
+					String lon = strLocation.substring(strLocation.indexOf("\"lon\":\"") + 7, strLocation.indexOf("\"", strLocation.indexOf("\"lon\":\"") + 8));
+					String dtime = strLocation.substring(strLocation.indexOf("\"dtime\":\"") + 9, strLocation.indexOf("\"", strLocation.indexOf("\"dtime\":\"") + 10));
+					Log.d("LOCATION", "Found location [" +lat + ", " + lon + "] sent " + dtime);
+
+					//Insert into the database
+					SQLiteDatabase db = activity.openOrCreateDatabase(GM.DB.NAME, Activity.MODE_PRIVATE, null);
+					db.execSQL("INSERT INTO location VALUES ('" + dtime + "', " + lat + ", " + lon + ")");
+					db.close();
+
+					//Set to true so the menu and relevant sections are hidden.
+					report = true;
+			}
+
+
+		} catch (MalformedURLException e) {
+			Log.e("LOCATION", "Unable to get location, malformed URL: " + e.toString());
+		} catch (IOException e) {
+			Log.e("LOCATION", "Unable to get location, IO exception: " + e.toString());
+		}
+
+
+		return null;
+	}
+
+	/**
+	 * Things to do after sync. Shows or hides the menu entry and relevant sections.
+	 *
+	 * @see android.os.AsyncTask#onPreExecute()
+	 */
+	@Override
+	protected void onPostExecute(Void v){
+		activity.gotLocation(report);
+	}
+
+}

+ 9 - 9
app/src/main/java/com/ivalentin/margolariak/ScheduleLayout.java

@@ -105,18 +105,18 @@ public class ScheduleLayout extends Fragment implements OnMapReadyCallback{
 
 		//Get schedule type
 		Bundle bundle = this.getArguments();
-		schedule = bundle.getInt(GM.SCHEDULE, GM.SECTION_LABLANCA_SCHEDULE);
+		schedule = bundle.getInt(GM.SCHEDULE.KEY, GM.SCHEDULE.CITY);
 		
 		//Set the title
-		if (schedule == GM.SECTION_LABLANCA_SCHEDULE)
+		if (schedule == GM.SCHEDULE.CITY)
 			((MainActivity) getActivity()).setSectionTitle(view.getContext().getString(R.string.menu_lablanca_schedule));
 		else
 			((MainActivity) getActivity()).setSectionTitle(view.getContext().getString(R.string.menu_lablanca_gm_schedule));
 
 		//Populate the dates array
-		SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB_NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
+		SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB.NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
 		Cursor cursor;
-		if (schedule == GM.SECTION_LABLANCA_GM_SCHEDULE) {
+		if (schedule == GM.SCHEDULE.MARGOLARIAK) {
 			cursor = db.rawQuery("SELECT DISTINCT date(start) FROM festival_event WHERE strftime('%Y', start) = '" + year + "' AND strftime('%H', start) > '06' AND gm = 1;", null);
 		}
 		else{
@@ -224,7 +224,7 @@ public class ScheduleLayout extends Fragment implements OnMapReadyCallback{
 			Log.e("Datetime error", ex.toString());
 		}
 
-		SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB_NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
+		SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB.NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
 
 		String lang = GM.getLang();
 
@@ -252,7 +252,7 @@ public class ScheduleLayout extends Fragment implements OnMapReadyCallback{
 				tvDayMonth.setText(getString(R.string.schedule_month_august));
 				break;
 		}
-		if (schedule == GM.SECTION_LABLANCA_GM_SCHEDULE) {
+		if (schedule == GM.SCHEDULE.MARGOLARIAK) {
 			Cursor cursorDay = db.rawQuery("SELECT name_" + lang + " FROM festival_day WHERE date(date) = '" + dates[selected] + "';", null);
 			if (cursorDay.getCount() > 0) {
 				cursorDay.moveToFirst();
@@ -278,7 +278,7 @@ public class ScheduleLayout extends Fragment implements OnMapReadyCallback{
 
 		String query = "SELECT festival_event.id, title_" + lang + ", description_" + lang + ", place, start, end, name_" + lang + ", address_" + lang + ", lat, lon FROM festival_event, place WHERE place = place.id AND start >= '" + dates[selected] + " 06:00:00' AND start < '" + endDate + " 05:59:59' AND ";
 
-		if (schedule == GM.SECTION_LABLANCA_GM_SCHEDULE) {
+		if (schedule == GM.SCHEDULE.MARGOLARIAK) {
 			query = query + "gm = 1 ";
 		} else {
 			query = query + "gm = 0 ";
@@ -327,7 +327,7 @@ public class ScheduleLayout extends Fragment implements OnMapReadyCallback{
 			}
 
 			//Set icon
-			if (schedule == GM.SECTION_LABLANCA_GM_SCHEDULE) {
+			if (schedule == GM.SCHEDULE.MARGOLARIAK) {
 				ImageView pinPoint = (ImageView) entry.findViewById(R.id.iv_row_schedule_pinpoint);
 				pinPoint.setImageResource(getResources().getIdentifier("com.ivalentin.margolariak:drawable/pinpoint_gm", null, null));
 			}
@@ -399,7 +399,7 @@ public class ScheduleLayout extends Fragment implements OnMapReadyCallback{
 		Button btClose = (Button) dialog.findViewById(R.id.bt_schedule_close);
 		
 		//Get info about the event
-		SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB_NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
+		SQLiteDatabase db = SQLiteDatabase.openDatabase(getActivity().getDatabasePath(GM.DB.NAME).getAbsolutePath(), null, SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);
 		String lang = GM.getLang();
 		Cursor cursor = db.rawQuery("SELECT festival_event.id, title_" + lang + ", description_" + lang + ", place, start, end, name_" + lang + ", address_" + lang + ", lat, lon, host FROM festival_event, place WHERE place = place.id AND festival_event.id = " + id + ";", null);
 		if (cursor.getCount() > 0){

+ 250 - 78
app/src/main/java/com/ivalentin/margolariak/SettingsActivity.java

@@ -1,118 +1,290 @@
 package com.ivalentin.margolariak;
 
+import android.annotation.SuppressLint;
+import android.app.Activity;
+import android.app.Dialog;
+import android.content.Intent;
 import android.content.SharedPreferences;
+import android.graphics.Color;
+import android.graphics.drawable.ColorDrawable;
+import android.net.Uri;
 import android.os.Bundle;
-import android.preference.CheckBoxPreference;
-import android.preference.Preference;
-import android.preference.PreferenceActivity;
-import java.text.DecimalFormat;
-import java.text.NumberFormat;
+import android.util.Log;
+import android.view.Gravity;
+import android.view.View;
+import android.view.Window;
+import android.view.WindowManager;
+import android.webkit.WebView;
+import android.widget.Button;
+import android.widget.CheckBox;
+import android.widget.LinearLayout;
+import android.widget.TextView;
 
-public class SettingsActivity extends PreferenceActivity {
+/**
+ * Activity that allows the user to change the app settings.
+ *
+ * @author Iñigo Valentin
+ * @see Activity
+ */
+public class SettingsActivity extends Activity {
+
+	//Assign menu items
+	private LinearLayout llSync;
+	private LinearLayout llNotifications;
+	private CheckBox cbSync, cbNotifications;
+	private TextView tvSync;
+	private TextView tvNotifications;
+	private SharedPreferences preferences;
+	private SharedPreferences.Editor editor;
+
+	/**
+	 * Run when the app is created. Assigns views, configures their initial
+	 * states, and sets listeners
+	 *
+	 * @param savedInstanceState Activity state.
+	 *
+	 * @see Activity#onCreate(Bundle)
+	 */
+	@SuppressLint("CommitPrefEdits") // apply() is called in other methods
 	@Override
 	public void onCreate(Bundle savedInstanceState) {
 		super.onCreate(savedInstanceState);
 
-		// Load the preferences from an XML resource
-		addPreferencesFromResource(R.xml.preferences);
+		//Remove title bar.
+		this.requestWindowFeature(Window.FEATURE_NO_TITLE);
+		super.onCreate(savedInstanceState);
+
 
-		SharedPreferences sp = getPreferenceScreen().getSharedPreferences();
+		//Set layout.
+		setContentView(R.layout.activity_settings);
 
-		//Set up Sync preference
-		CheckBoxPreference prefSync = (CheckBoxPreference) getPreferenceManager().findPreference(GM.KEY_PREFERENCE_SYNC);
-		if (prefSync.isChecked()){
-			prefSync.setSummary(getString(R.string.preferences_sync_sync_on));
+		//Assign views
+		llSync = (LinearLayout) findViewById(R.id.ll_settings_sync);
+		llNotifications = (LinearLayout) findViewById(R.id.ll_settings_notifications);
+		LinearLayout llVersion = (LinearLayout) findViewById(R.id.ll_settings_version);
+		LinearLayout llSource = (LinearLayout) findViewById(R.id.ll_settings_source);
+		LinearLayout llFeedback = (LinearLayout) findViewById(R.id.ll_settings_feedback);
+		tvSync = (TextView) findViewById(R.id.tv_settings_sync);
+		tvNotifications = (TextView) findViewById(R.id.tv_settings_notifications);
+		TextView tvVersion = (TextView) findViewById(R.id.tv_settings_version);
+		cbSync = (CheckBox) findViewById(R.id.cb_settings_sync);
+		cbNotifications = (CheckBox) findViewById(R.id.cb_settings_notifications);
+
+		//Open preferences
+		preferences = getSharedPreferences(GM.PREFERENCES.PREFERNCES, MODE_PRIVATE);
+		editor = preferences.edit();
+
+		//Set up sync preferences. Incidentally, also sets initial state for notifications.
+		if (preferences.getBoolean(GM.PREFERENCES.KEY.SYNC, GM.PREFERENCES.DEFAULT.SYNC)){
+			tvSync.setText(R.string.preferences_sync_sync_on);
+			cbSync.setChecked(true);
+			enableNotifications();
 		}
 		else{
-			prefSync.setSummary(getString(R.string.preferences_sync_sync_off));
+			tvSync.setText(R.string.preferences_sync_sync_off);
+			cbSync.setChecked(false);
+			disableNotifications();
 		}
-		prefSync.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
-
-			public boolean onPreferenceChange(Preference preference, Object newValue) {
-				CheckBoxPreference prefNotification = (CheckBoxPreference) getPreferenceManager().findPreference(GM.KEY_PREFERENCE_NOTIFICATION);
-				if (newValue.toString().equals("true")) {
-					preference.setSummary(getString(R.string.preferences_sync_sync_on));
-					if (prefNotification.isChecked()){
-						prefNotification.setSummary(getString(R.string.preferences_sync_notifications_on));
-					}
-					else{
-						prefNotification.setSummary(getString(R.string.preferences_sync_notifications_off));
-					}
-					prefNotification.setEnabled(true);
-				} else {
-					prefNotification.setEnabled(false);
-					prefNotification.setSummary(getString(R.string.preferences_sync_notifications_disabled));
-					preference.setSummary(getString(R.string.preferences_sync_sync_off));
-				}
-				return true;
+
+		//Set up version preference
+		tvVersion.setText(com.ivalentin.margolariak.BuildConfig.VERSION_NAME);
+		llVersion.setOnClickListener(new View.OnClickListener() {
+			@Override
+			public void onClick(View v) {
+				blink(v);
+				showChangelog();
 			}
 		});
 
-		//Set up Notification preference
-		CheckBoxPreference prefNotification = (CheckBoxPreference) getPreferenceManager().findPreference(GM.KEY_PREFERENCE_NOTIFICATION);
-		if (!prefSync.isChecked()){
-			prefNotification.setEnabled(false);
-		}
-		else {
-			prefNotification.setEnabled(true);
-			if(!prefSync.isChecked()){
-				//TODO
+		//Set up source preference
+		llSource.setOnClickListener(new View.OnClickListener() {
+			@Override
+			public void onClick(View v) {
+				blink(v);
+				Intent i = new Intent(Intent.ACTION_VIEW);
+				i.setData(Uri.parse(GM.URL.GITHUB));
+				startActivity(i);
 			}
-			if (prefNotification.isChecked()) {
-				prefNotification.setSummary(getString(R.string.preferences_sync_notifications_on));
-			} else {
-				prefNotification.setSummary(getString(R.string.preferences_sync_notifications_off));
+		});
+
+		//Set up feedback preference
+		llFeedback.setOnClickListener(new View.OnClickListener() {
+			@Override
+			public void onClick(View v) {
+				blink(v);
+				//TODO: Show dialog to enter text
 			}
-		}
+		});
+	}
+
+	/**
+	 * UI feedback for touched settings.
+	 * Just makes them blink.
+	 *
+	 * @param v The view to be made to blink
+	 */
+	private void blink(View v){
+		final View view = v;
+
+		//These are the colors of the menu background
+		final int r = 0;
+		final int g = 120;
+		final int b = 255;
+
+		new Thread(){
+
+			@Override
+			public void run() {
 
-		prefNotification.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
+				//Alpha
+				int a  = 250;
 
-			public boolean onPreferenceChange(Preference preference, Object newValue) {
-				if (newValue.toString().equals("true")) {
-					preference.setSummary(getString(R.string.preferences_sync_notifications_on));
-				} else {
-					preference.setSummary(getString(R.string.preferences_sync_notifications_off));
+				try {
+					while (a >= 0) {
+						final int passAlpha = a;
+						runOnUiThread(new Runnable() {
+										  @Override
+										  public void run() {
+											  view.setBackgroundColor(Color.argb(passAlpha, r, g, b));
+										  }
+									  });
+
+						a -= 10;
+						sleep(10);
+					}
+				}
+				catch (InterruptedException e) {
+					view.setBackgroundColor(Color.argb(0, r, g, b));
 				}
-				return true;
 			}
-		});
+		}.start();
 
+	}
 
-		//Set up data preference
-		long bgData = sp.getLong(GM.STORAGE_TRAFFIC_BG_RECEIVED, 0) + sp.getLong(GM.STORAGE_TRAFFIC_BG_SENT, 0);
-		long fgData = sp.getLong(GM.STORAGE_TRAFFIC_FG_RECEIVED, 0) + sp.getLong(GM.STORAGE_TRAFFIC_FG_SENT, 0);
-		String value;
-		if (bgData < 1500){
-			value = bgData + getString(R.string.Kb);
+	/**
+	 * Not called from code, but referenced from activity_settings.xml.
+	 * Toggles the value of the sync preferences, changing the actual
+	 * preference, the ui, and, if set to disabled, it also disables the
+	 * notification setting.
+	 *
+	 * @param v Ignored
+	 */
+	public void toggleSync(View v){
+		blink(llSync);
+		editor.putBoolean(GM.PREFERENCES.KEY.SYNC, !preferences.getBoolean(GM.PREFERENCES.KEY.SYNC, GM.PREFERENCES.DEFAULT.SYNC));
+		editor.apply();
+		if (preferences.getBoolean(GM.PREFERENCES.KEY.SYNC, GM.PREFERENCES.DEFAULT.SYNC)){
+			tvSync.setText(R.string.preferences_sync_sync_on);
+			cbSync.setChecked(true);
+			enableNotifications();
+		}
+		else{
+			tvSync.setText(R.string.preferences_sync_sync_off);
+			cbSync.setChecked(false);
+			disableNotifications();
 		}
-		else if(bgData < 5 * 1024){
-			NumberFormat formatter = new DecimalFormat("#0.00");
-			value = (formatter.format(((float) bgData) / 1024.0)) + getString(R.string.Mb);
+	}
+
+	/**
+	 * Not called from code, but referenced from activity_settings.xml.
+	 * Toggles the value of the notification preferences, changing the
+	 * actual preference and the ui.
+	 *
+	 * @param v Ignored
+	 */
+	public void toggleNotifications(View v){
+		if (preferences.getBoolean(GM.PREFERENCES.KEY.SYNC, GM.PREFERENCES.DEFAULT.SYNC)) {
+			blink(llNotifications);
+			editor.putBoolean(GM.PREFERENCES.KEY.NOTIFICATIONS, !preferences.getBoolean(GM.PREFERENCES.KEY.NOTIFICATIONS, GM.PREFERENCES.DEFAULT.NOTIFICATIONS));
+			editor.apply();
+			if (preferences.getBoolean(GM.PREFERENCES.KEY.NOTIFICATIONS, GM.PREFERENCES.DEFAULT.NOTIFICATIONS)) {
+				tvNotifications.setText(R.string.preferences_sync_notifications_on);
+				cbNotifications.setChecked(true);
+			} else {
+				tvNotifications.setText(R.string.preferences_sync_notifications_off);
+				cbNotifications.setChecked(false);
+			}
 		}
 		else{
-			value = String.valueOf((int) (((float) bgData) / 1024.0)) + getString(R.string.Mb);
+			cbNotifications.setChecked(false);
 		}
-		Preference prefData = getPreferenceManager().findPreference(GM.KEY_PREFERENCE_DATA);
-		prefData.setSummary(value);
+	}
 
+	/**
+	 * Enables the notification setting toggler. Must be called when
+	 * the sync preference changes to true.
+	 */
+	private void enableNotifications(){
+		llNotifications.setAlpha(1);
+		if (preferences.getBoolean(GM.PREFERENCES.KEY.NOTIFICATIONS, GM.PREFERENCES.DEFAULT.NOTIFICATIONS)){
+			tvNotifications.setText(R.string.preferences_sync_notifications_on);
+			cbNotifications.setChecked(true);
+		}
+		else{
+			tvNotifications.setText(R.string.preferences_sync_notifications_off);
+			cbNotifications.setChecked(false);
+		}
 
+	}
 
-		//Set up version preference
-		Preference prefVersion = getPreferenceManager().findPreference(GM.KEY_PREFERENCE_VERSION);
-		prefVersion.setSummary(com.ivalentin.margolariak.BuildConfig.VERSION_NAME);
-		prefNotification.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
+	/**
+	 * Enables the notification setting toggler. Must be called when
+	 * the sync preference changes to false.
+	 */
+	private void disableNotifications(){
+		llNotifications.setAlpha(0.4f);
+		tvNotifications.setText(R.string.preferences_sync_notifications_disabled);
+		cbNotifications.setChecked(false);
+	}
+
+	private void showChangelog(){
+
+		//Create the dialog
+		final Dialog dialog = new Dialog(SettingsActivity.this);
+
+		//Set up dialog window
+		dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
+		dialog.setContentView(R.layout.dialog_changelog);
+
+		//Set the web view
+		WebView wv = (WebView) dialog.findViewById(R.id.wv_changelog);
+		wv.getSettings().setAllowContentAccess(true);
+		Log.e("URL", "file:///android_assets/changelog_" + GM.getLang() + ".html");
+		wv.loadUrl("file:///android_asset/changelog_" + GM.getLang() + ".html");
+
+		//Set close button
+		Button bt = (Button) dialog.findViewById(R.id.bt_changelog);
+		bt.setOnClickListener(new View.OnClickListener() {
 			@Override
-			public boolean onPreferenceClick(Preference preference) {
-				//TODO
-				return false;
+			public void onClick(View v) {
+				dialog.dismiss();
 			}
 		});
 
-		//Set up source preference
-		//TODO
+		//Prep the dialog
+		WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
+		lp.copyFrom(dialog.getWindow().getAttributes());
+		lp.width = WindowManager.LayoutParams.MATCH_PARENT;
+		lp.height = WindowManager.LayoutParams.WRAP_CONTENT;
+		lp.gravity = Gravity.CENTER;
+		//lp.dimAmount = 0.0f;
+		dialog.getWindow().setAttributes(lp);
+		dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
 
-		//Set up feedback preference
-		//TODO
+		//Show dialog
+		dialog.show();
+
+	}
 
+	/**
+	 * Not called from code, but referenced from activity_settings.xml.
+	 * Finishes the activity.
+	 *
+	 * @param v Ignored
+	 *
+	 * @see Activity#finish()
+	 */
+	public void finish(View v){
+		finish();
 	}
 }

+ 6 - 6
app/src/main/java/com/ivalentin/margolariak/SettingsLayout.java

@@ -59,8 +59,8 @@ public class SettingsLayout extends Fragment{
 
 
 		//Set initial state of the notification  settings
-		SharedPreferences settings = view.getContext().getSharedPreferences(GM.PREF, Context.MODE_PRIVATE);
-		if (settings.getInt(GM.PREF_NOTIFICATION, GM.DEFAULT_PREF_NOTIFICATION) == 1){
+		SharedPreferences settings = view.getContext().getSharedPreferences(GM.PREFERENCES.PREFERNCES, Context.MODE_PRIVATE);
+		if (settings.getBoolean(GM.PREFERENCES.KEY.NOTIFICATIONS, GM.PREFERENCES.DEFAULT.NOTIFICATIONS)){
 			cbNotification.setChecked(true);
 			tvNotification.setText(view.getContext().getString(R.string.settings_notification_on));
 		}
@@ -76,17 +76,17 @@ public class SettingsLayout extends Fragment{
 				if (cbNotification.isChecked()){
 					cbNotification.setChecked(false);
 					tvNotification.setText(view.getContext().getString(R.string.settings_notification_off));
-					SharedPreferences preferences = view.getContext().getSharedPreferences(GM.PREF, Context.MODE_PRIVATE);
+					SharedPreferences preferences = view.getContext().getSharedPreferences(GM.PREFERENCES.PREFERNCES, Context.MODE_PRIVATE);
 					SharedPreferences.Editor editor = preferences.edit();
-					editor.putInt(GM.PREF_NOTIFICATION, 0);
+					editor.putBoolean(GM.PREFERENCES.KEY.NOTIFICATIONS, false);
 					editor.apply();
 				}
 				else{
 					cbNotification.setChecked(true);
 					tvNotification.setText(view.getContext().getString(R.string.settings_notification_on));
-					SharedPreferences preferences = view.getContext().getSharedPreferences(GM.PREF, Context.MODE_PRIVATE);
+					SharedPreferences preferences = view.getContext().getSharedPreferences(GM.PREFERENCES.PREFERNCES, Context.MODE_PRIVATE);
 					SharedPreferences.Editor editor = preferences.edit();
-					editor.putInt(GM.PREF_NOTIFICATION, 1);
+					editor.putBoolean(GM.PREFERENCES.KEY.NOTIFICATIONS, true);
 					editor.apply();
 				}
 			}

+ 17 - 15
app/src/main/java/com/ivalentin/margolariak/Sync.java

@@ -86,6 +86,7 @@ class Sync extends AsyncTask<Void, Void, Void> {
 			int idx = (int) (Math.random() * 9);
 			tv.setText(strings[idx]);
 			doProgress = true;
+
 		}
 		Log.d("Sync", "Starting full sync");
 	}
@@ -111,7 +112,7 @@ class Sync extends AsyncTask<Void, Void, Void> {
 			dialog.dismiss();
 
 			//Check db version again
-			SQLiteDatabase db = myContextRef.openOrCreateDatabase(GM.DB_NAME, Activity.MODE_PRIVATE, null);
+			SQLiteDatabase db = myContextRef.openOrCreateDatabase(GM.DB.NAME, Activity.MODE_PRIVATE, null);
 			if (db.isReadOnly()){
 				Log.e("Db ro", "Database is locked and in read only mode. Skipping sync.");
 				return;
@@ -127,7 +128,7 @@ class Sync extends AsyncTask<Void, Void, Void> {
 			db.close();
 
 			//If the database is on it's initial version (i.e: There is no data, new or old)
-			if (dbVersion == GM.DEFAULT_PREF_DB_VERSION){
+			if (true){ //TODO dbVersion == GM.DATA.DEFAULT.DEFAULT_PREF_DB_VERSION){
 
 				Log.e("SYNC", "Full sync failed");
 
@@ -154,7 +155,7 @@ class Sync extends AsyncTask<Void, Void, Void> {
 			}
 			else{
 				Log.d("SYNC", "Full sync finished");
-				activity.loadSection(GM.SECTION_HOME);
+				activity.loadSection(GM.SECTION.HOME);
 			}
 		}
 
@@ -244,15 +245,15 @@ class Sync extends AsyncTask<Void, Void, Void> {
 	private String buildUrl(String user, int version, int foreground, String lang){
 		String url = "";
 		try {
-			url = GM.SERVER + GM.SERVER_SYNC + "?" +
-					GM.SERVER_SYNC_KEY_CLIENT + "=" + URLEncoder.encode(GM.CLIENT, "UTF-8") + "&" +
-					GM.SERVER_SYNC_KEY_USER + "=" + URLEncoder.encode(user, "UTF-8") + "&" +
-					GM.SERVER_SYNC_KEY_ACTION + "=" + URLEncoder.encode(GM.SERVER_SYNC_VALUE_ACTION, "UTF-8") + "&" +
-					GM.SERVER_SYNC_KEY_SECTION + "=" + URLEncoder.encode(GM.SERVER_SYNC_VALUE_SECTION, "UTF-8") + "&" +
-					GM.SERVER_SYNC_KEY_VERSION + "=" + version + "&" +
-					GM.SERVER_SYNC_KEY_FOREGROUND + "=" + foreground + "&" +
-					GM.SERVER_SYNC_KEY_FORMAT + "=" + URLEncoder.encode(GM.SERVER_SYNC_VALUE_FORMAT, "UTF-8") + "&" +
-					GM.SERVER_SYNC_KEY_LANG + "=" + URLEncoder.encode(lang, "UTF-8");
+			url = GM.API.SERVER + GM.API.SYNC.PATH + "?" +
+					GM.API.SYNC.KEY.CLIENT + "=" + URLEncoder.encode(GM.API.CLIENT, "UTF-8") + "&" +
+					GM.API.SYNC.KEY.USER + "=" + URLEncoder.encode(user, "UTF-8") + "&" +
+					GM.API.SYNC.KEY.ACTION + "=" + URLEncoder.encode(GM.API.SYNC.VALUE.ACTION, "UTF-8") + "&" +
+					GM.API.SYNC.KEY.SECTION + "=" + URLEncoder.encode(GM.API.SYNC.VALUE.SECTION, "UTF-8") + "&" +
+					GM.API.SYNC.KEY.VERSION + "=" + version + "&" +
+					GM.API.SYNC.KEY.FOREGROUND + "=" + foreground + "&" +
+					GM.API.SYNC.KEY.FORMAT + "=" + URLEncoder.encode(GM.API.SYNC.VALUE.FORMAT, "UTF-8") + "&" +
+					GM.API.SYNC.KEY.LANG + "=" + URLEncoder.encode(lang, "UTF-8");
 		}
 		catch (java.io.UnsupportedEncodingException ex){
 			Log.e("UTF-8", "Error encoding url for sync \"" + url + "\" - " + ex.toString());
@@ -585,13 +586,13 @@ class Sync extends AsyncTask<Void, Void, Void> {
 	protected Void doInBackground(Void... params) {
 
 		//Get preferences
-		SharedPreferences preferences = myContextRef.getSharedPreferences(GM.PREF, Context.MODE_PRIVATE);
+		SharedPreferences preferences = myContextRef.getSharedPreferences(GM.DATA.DATA, Context.MODE_PRIVATE);
 
 		//Get useful data for the uri
-		String userCode = preferences.getString(GM.USER_CODE, "");
+		String userCode = preferences.getString(GM.DATA.KEY.USER, GM.DATA.DEFAULT.USER);
 
 		//Get database. Stop if it's locked
-		SQLiteDatabase db = myContextRef.openOrCreateDatabase(GM.DB_NAME, Activity.MODE_PRIVATE, null);
+		SQLiteDatabase db = myContextRef.openOrCreateDatabase(GM.DB.NAME, Activity.MODE_PRIVATE, null);
 		if (db.isReadOnly()){
 			Log.e("SYNC", "Database is locked and in read only mode. Skipping sync.");
 			return null;
@@ -667,6 +668,7 @@ class Sync extends AsyncTask<Void, Void, Void> {
 				default:
 					Log.e("SYNC", "The server returned an unexpected code (" + httpCode + ") for the url \"" + uri + "\"");
 			}
+
 			urlConnection.disconnect();
 			return null;
 

+ 9 - 1
app/src/main/res/drawable/entry.xml

@@ -4,6 +4,14 @@
     <stroke
         android:width="1dp"
         android:color="@color/entry_border" />
-    <solid android:color="@color/entry_background" />
+
+    <solid
+        android:color="@color/entry_background" />
+
+    <corners
+        android:bottomRightRadius="4dp"
+        android:bottomLeftRadius="4dp"
+        android:topLeftRadius="4dp"
+        android:topRightRadius="4dp"/>
 
 </shape>

+ 13 - 0
app/src/main/res/drawable/gradient_v_white.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
+
+    <gradient
+        android:angle="90"
+        android:endColor="#00ffffff"
+        android:startColor="#ffffffff"
+        android:type="linear" />
+
+    <corners
+        android:radius="0dp"/>
+
+</shape>

+ 15 - 0
app/src/main/res/drawable/row_home_image.xml

@@ -0,0 +1,15 @@
+<shape
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle" >
+
+    <stroke
+        android:width="1dp"
+        android:color="@color/image_border" />
+
+    <corners
+        android:bottomRightRadius="2dp"
+        android:bottomLeftRadius="2dp"
+        android:topLeftRadius="2dp"
+        android:topRightRadius="2dp"/>
+
+</shape>

+ 14 - 5
app/src/main/res/drawable/section.xml

@@ -1,9 +1,18 @@
-<shape xmlns:android="http://schemas.android.com/apk/res/android"
+<shape
+    xmlns:android="http://schemas.android.com/apk/res/android"
     android:shape="rectangle" >
 
-    <!--<stroke-->
-        <!--android:width="2dp"-->
-        <!--android:color="@color/section_border" />-->
-    <solid android:color="@color/section_background" />
+    <stroke
+        android:width="1dp"
+        android:color="@color/section_border" />
+
+    <solid
+        android:color="@color/section_background" />
+
+    <corners
+        android:bottomRightRadius="5dp"
+        android:bottomLeftRadius="5dp"
+        android:topLeftRadius="8dp"
+        android:topRightRadius="8dp"/>
 
 </shape>

+ 18 - 0
app/src/main/res/drawable/section_large.xml

@@ -0,0 +1,18 @@
+<shape
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle" >
+    <!--
+        Same as section, but without the rounded corners.
+         To be used in long sections, such as past activity list
+         to save memory.
+    -->
+
+
+    <stroke
+        android:width="1dp"
+        android:color="@color/section_border" />
+
+    <solid
+        android:color="@color/section_background" />
+
+</shape>

+ 16 - 0
app/src/main/res/drawable/section_title.xml

@@ -0,0 +1,16 @@
+<shape
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle" >
+
+    <stroke
+        android:width="1dp"
+        android:color="@color/section_border" />
+
+    <solid
+        android:color="@color/section_title_background" />
+
+    <corners
+        android:topLeftRadius="8dp"
+        android:topRightRadius="8dp"/>
+
+</shape>

+ 49 - 43
app/src/main/res/layout/activity_main.xml

@@ -9,7 +9,7 @@
 	<LinearLayout
 		android:layout_width="fill_parent"
 		android:layout_height="wrap_content"
-		android:background="@drawable/titlebar"
+		android:background="@color/background_menu"
 		android:gravity="center_vertical"
 		android:orientation="horizontal"
 		android:padding="2dp">
@@ -18,22 +18,23 @@
 
 		<ImageView
 			android:contentDescription="@string/app_name"
-			android:layout_width="40dp"
-			android:layout_height="40dp"
 			android:id="@+id/iv_logo"
 			android:src="@drawable/ic_launcher"
 			android:adjustViewBounds="true"
 			android:layout_weight=".2"
+			android:padding="1dp"
+			android:layout_height="wrap_content"
+			android:layout_width="wrap_content"
 			android:maxHeight="45dp"
 			android:maxWidth="45dp"
-			android:padding="1dp"/>
+			android:layout_gravity="center_vertical"/>
 
 		<!-- Layout with the app title and current section -->
 
 		<LinearLayout
 			android:layout_width="wrap_content"
 			android:layout_height="wrap_content"
-			android:layout_gravity="center"
+			android:layout_gravity="center_vertical|center"
 			android:layout_weight=".8"
 			android:gravity="center"
 			android:orientation="vertical" >
@@ -46,7 +47,8 @@
 				android:gravity="center"
 				android:text="@string/app_name"
 				android:textSize="18sp"
-				android:textStyle="bold" />
+				android:textStyle="bold"
+				android:textColor="@color/menu_entry"/>
 
 			<!-- Section title -->
 
@@ -56,12 +58,13 @@
 				android:layout_height="wrap_content"
 				android:gravity="center"
 				android:text="@string/menu_home"
-				android:textSize="20sp" />
+				android:textSize="20sp"
+				android:textColor="@color/menu_entry"/>
 
 		</LinearLayout>
 
 		<ImageButton
-			android:layout_width="40dp"
+			android:layout_width="wrap_content"
 			android:layout_height="match_parent"
 			android:src="@drawable/ic_expand"
 			android:contentDescription="@string/tutorial_menu"
@@ -69,7 +72,9 @@
 			android:layout_weight=".2"
 			android:id="@+id/bt_menu"
 			app:srcCompat="@drawable/ic_expand"
-			android:background="#00000000"/>
+			android:background="#00000000"
+			android:adjustViewBounds="false"
+			android:cropToPadding="false"/>
 
 		<ProgressBar
 			android:id="@+id/pb_sync"
@@ -86,19 +91,19 @@
 
 	<HorizontalScrollView
 		android:layout_width="wrap_content"
-		android:layout_height="50dp"
+		android:layout_height="55dp"
 		android:id="@+id/sv_menu"
 		android:scrollIndicators="none"
 		android:requiresFadingEdge="horizontal"
-		android:fadingEdgeLength="125dp"
-		android:background="@color/background_bar_gradient"
+		android:fadingEdgeLength="80dp"
+		android:background="@color/background_menu"
 		tools:ignore="UnusedAttribute">
 
 		<LinearLayout
 			android:orientation="horizontal"
 			android:layout_width="wrap_content"
 			android:layout_height="match_parent"
-			>
+			android:layout_marginBottom="1dp">
 
 			<RelativeLayout
 				android:orientation="vertical"
@@ -117,11 +122,11 @@
 					android:textSize="15sp"
 					android:layout_centerInParent="true"
 					android:textStyle="bold"
-					android:id="@+id/tv_menu_home"/>
+					android:id="@+id/tv_menu_home"
+					android:textColor="@color/menu_entry"/>
 
 				<ImageView
 					android:layout_width="match_parent"
-					android:layout_height="8dp"
 					android:id="@+id/iv_menu_home"
 					android:background="@color/menu_selected"
 					android:alpha="1"
@@ -131,7 +136,8 @@
 					android:layout_alignParentLeft="false"
 					android:layout_alignParentRight="false"
 					android:layout_alignParentBottom="true"
-					tools:ignore="ContentDescription"/>
+					tools:ignore="ContentDescription"
+					android:layout_height="7dp"/>
 			</RelativeLayout>
 
 			<RelativeLayout
@@ -150,11 +156,11 @@
 					android:layout_gravity="top"
 					android:textSize="15sp"
 					android:layout_centerInParent="true"
-					android:id="@+id/tv_menu_location"/>
+					android:id="@+id/tv_menu_location"
+					android:textColor="@color/menu_entry"/>
 
 				<ImageView
 					android:layout_width="match_parent"
-					android:layout_height="2dp"
 					android:id="@+id/iv_menu_location"
 					android:background="@color/menu_selected"
 					android:alpha="1"
@@ -164,7 +170,8 @@
 					android:layout_alignParentLeft="false"
 					android:layout_alignParentRight="false"
 					android:layout_alignParentBottom="true"
-					tools:ignore="ContentDescription"/>
+					tools:ignore="ContentDescription"
+					android:layout_height="3dp"/>
 			</RelativeLayout>
 
 			<RelativeLayout
@@ -183,11 +190,11 @@
 					android:layout_gravity="top"
 					android:textSize="15sp"
 					android:layout_centerInParent="true"
-					android:id="@+id/tv_menu_lablanca"/>
+					android:id="@+id/tv_menu_lablanca"
+					android:textColor="@color/menu_entry"/>
 
 				<ImageView
 					android:layout_width="match_parent"
-					android:layout_height="2dp"
 					android:id="@+id/iv_menu_lablanca"
 					android:background="@color/menu_selected"
 					android:alpha="1"
@@ -197,7 +204,8 @@
 					android:layout_alignParentLeft="false"
 					android:layout_alignParentRight="false"
 					android:layout_alignParentBottom="true"
-					tools:ignore="ContentDescription"/>
+					tools:ignore="ContentDescription"
+					android:layout_height="3dp"/>
 			</RelativeLayout>
 
 			<RelativeLayout
@@ -216,11 +224,11 @@
 					android:layout_gravity="top"
 					android:textSize="15sp"
 					android:layout_centerInParent="true"
-					android:id="@+id/tv_menu_activities"/>
+					android:id="@+id/tv_menu_activities"
+					android:textColor="@color/menu_entry"/>
 
 				<ImageView
 					android:layout_width="match_parent"
-					android:layout_height="2dp"
 					android:id="@+id/iv_menu_activities"
 					android:background="@color/menu_selected"
 					android:alpha="1"
@@ -230,7 +238,8 @@
 					android:layout_alignParentLeft="false"
 					android:layout_alignParentRight="false"
 					android:layout_alignParentBottom="true"
-					tools:ignore="ContentDescription"/>
+					tools:ignore="ContentDescription"
+					android:layout_height="3dp"/>
 			</RelativeLayout>
 
 			<RelativeLayout
@@ -249,11 +258,11 @@
 					android:layout_gravity="top"
 					android:textSize="15sp"
 					android:layout_centerInParent="true"
-					android:id="@+id/tv_menu_blog"/>
+					android:id="@+id/tv_menu_blog"
+					android:textColor="@color/menu_entry"/>
 
 				<ImageView
 					android:layout_width="match_parent"
-					android:layout_height="2dp"
 					android:id="@+id/iv_menu_blog"
 					android:background="@color/menu_selected"
 					android:alpha="1"
@@ -263,7 +272,8 @@
 					android:layout_alignParentLeft="false"
 					android:layout_alignParentRight="false"
 					android:layout_alignParentBottom="true"
-					tools:ignore="ContentDescription"/>
+					tools:ignore="ContentDescription"
+					android:layout_height="3dp"/>
 			</RelativeLayout>
 
 			<RelativeLayout
@@ -282,11 +292,11 @@
 					android:layout_gravity="top"
 					android:textSize="15sp"
 					android:layout_centerInParent="true"
-					android:id="@+id/tv_menu_gallery"/>
+					android:id="@+id/tv_menu_gallery"
+					android:textColor="@color/menu_entry"/>
 
 				<ImageView
 					android:layout_width="match_parent"
-					android:layout_height="2dp"
 					android:id="@+id/iv_menu_gallery"
 					android:background="@color/menu_selected"
 					android:alpha="1"
@@ -296,25 +306,21 @@
 					android:layout_alignParentLeft="false"
 					android:layout_alignParentRight="false"
 					android:layout_alignParentBottom="true"
-					tools:ignore="ContentDescription"/>
+					tools:ignore="ContentDescription"
+					android:layout_height="3dp"/>
 			</RelativeLayout>
 
 		</LinearLayout>
 	</HorizontalScrollView>
 
-	<ScrollView
-		android:layout_width="fill_parent"
-		android:layout_height="wrap_content"
-		android:id="@+id/sv_main_content">
-
-		<FrameLayout
-			android:id="@+id/activity_main_content_fragment"
-			android:layout_width="match_parent"
-			android:layout_height="match_parent"
-			tools:ignore="ScrollViewSize">
+	<FrameLayout
+		android:id="@+id/activity_main_content_fragment"
+		android:layout_width="match_parent"
+		android:layout_height="match_parent"
+		tools:ignore="ScrollViewSize"
+		android:background="@color/background_app">
 
-		</FrameLayout>
-	</ScrollView>
+	</FrameLayout>
 
 </LinearLayout>
 

+ 340 - 0
app/src/main/res/layout/activity_settings.xml

@@ -0,0 +1,340 @@
+<LinearLayout
+    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="fill_parent"
+    android:orientation="vertical">
+
+    <LinearLayout
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:background="@color/background_menu"
+        android:gravity="center_vertical"
+        android:orientation="horizontal"
+        android:padding="2dp">
+
+        <ImageView
+            android:contentDescription="@string/app_name"
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:id="@+id/iv_logo"
+            android:src="@drawable/ic_launcher"
+            android:adjustViewBounds="true"
+            android:layout_weight=".2"
+            android:maxHeight="45dp"
+            android:maxWidth="45dp"
+            android:padding="1dp"
+            android:layout_gravity="center_vertical"/>
+
+        <LinearLayout
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center_vertical|center"
+            android:layout_weight=".8"
+            android:gravity="center"
+            android:orientation="vertical" >
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:gravity="center"
+                android:text="@string/app_name"
+                android:contentDescription="@string/app_name"
+                android:textSize="18sp"
+                android:textStyle="bold"
+                android:textColor="@color/menu_entry"/>
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:gravity="center"
+                android:text="@string/menu_settings"
+                android:textSize="20sp"
+                android:textColor="@color/menu_entry"/>
+
+        </LinearLayout>
+
+        <ImageButton
+            android:layout_width="40dp"
+            android:layout_height="match_parent"
+            android:src="@android:drawable/ic_menu_revert"
+            android:onClick="finish"
+            android:contentDescription="@string/accept"
+            android:layout_weight=".2"
+            android:id="@+id/bt_back"
+            app:srcCompat="@android:drawable/ic_menu_revert"
+            android:background="#00000000"/>
+
+    </LinearLayout>
+
+    <ScrollView
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:background="@color/background_app">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            tools:ignore="ScrollViewSize"
+            android:background="@color/background_app"
+            android:orientation="vertical">
+
+            <TextView
+                android:text="@string/preferences_sync"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:textStyle="bold"
+                android:textColor="@color/background_menu"
+                android:paddingEnd="10dp"
+                android:paddingLeft="10dp"
+                android:paddingRight="10dp"
+                android:paddingStart="10dp"
+                android:textSize="20sp"
+                android:layout_marginBottom="5dp"
+                android:background="@color/section_background"/>
+
+            <LinearLayout
+                android:orientation="horizontal"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:id="@+id/ll_settings_sync"
+                android:padding="10dp"
+                android:layout_marginBottom="5dp"
+                android:onClick="toggleSync">
+
+                <LinearLayout
+                    android:orientation="vertical"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:layout_weight=".15">
+
+                    <TextView
+                        android:text="@string/preferences_sync_sync"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:textSize="18sp"
+                        android:textColor="@android:color/black"
+                        />
+
+                    <TextView
+                        android:text="@string/preferences_sync_sync_on"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:id="@+id/tv_settings_sync"
+                        android:textSize="16sp"
+                        android:textColor="@android:color/black"
+                        android:layout_marginTop="4dp"
+                        android:layout_marginStart="10dp"
+                        android:layout_marginLeft="10dp"
+                        android:textStyle="italic"
+                        android:alpha="0.8"/>
+                </LinearLayout>
+
+                <CheckBox
+                    android:layout_height="50dp"
+                    android:id="@+id/cb_settings_sync"
+                    android:padding="15dp"
+                    android:layout_width="match_parent"
+                    android:layout_weight=".85"
+                    android:gravity="center_vertical|center_horizontal"
+                    android:layout_gravity="center_vertical|center_horizontal"
+                    android:textAlignment="center"
+                    android:onClick="toggleSync"/>
+
+            </LinearLayout>
+
+            <TextView
+                android:layout_width="match_parent"
+                android:layout_height="1dp"
+                android:background="@color/entry_border"
+                android:layout_marginLeft="15dp"
+                android:layout_marginRight="15dp"
+                android:layout_marginStart="15dp"
+                android:layout_marginEnd="15dp"/>
+
+            <LinearLayout
+                android:orientation="horizontal"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:id="@+id/ll_settings_notifications"
+                android:padding="10dp"
+                android:layout_marginBottom="5dp"
+                android:onClick="toggleNotifications">
+
+                <LinearLayout
+                    android:orientation="vertical"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:layout_weight=".15">
+
+                    <TextView
+                        android:text="@string/preferences_sync_notifications"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:textSize="18sp"
+                        android:textColor="@android:color/black"
+                        />
+
+                    <TextView
+                        android:text="@string/preferences_sync_notifications_on"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:id="@+id/tv_settings_notifications"
+                        android:textSize="16sp"
+                        android:textColor="@android:color/black"
+                        android:layout_marginTop="4dp"
+                        android:layout_marginStart="10dp"
+                        android:layout_marginLeft="10dp"
+                        android:textStyle="italic"
+                        android:alpha="0.8"/>
+                </LinearLayout>
+
+                <CheckBox
+                    android:layout_height="50dp"
+                    android:id="@+id/cb_settings_notifications"
+                    android:padding="15dp"
+                    android:layout_width="match_parent"
+                    android:layout_weight=".85"
+                    android:gravity="center_vertical|center_horizontal"
+                    android:layout_gravity="center_vertical|center_horizontal"
+                    android:textAlignment="center"
+                    android:onClick="toggleNotifications"/>
+
+            </LinearLayout>
+
+            <TextView
+                android:text="@string/preferences_info"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:textStyle="bold"
+                android:textColor="@color/background_menu"
+                android:paddingEnd="10dp"
+                android:paddingLeft="10dp"
+                android:paddingRight="10dp"
+                android:paddingStart="10dp"
+                android:layout_marginTop="20dp"
+                android:textSize="20sp"
+                android:layout_marginBottom="5dp"
+                android:background="@color/section_background"/>
+
+            <LinearLayout
+                android:orientation="vertical"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:id="@+id/ll_settings_version"
+                android:padding="10dp"
+                android:layout_marginBottom="5dp">
+
+                <TextView
+                    android:text="@string/preferences_info_version"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:textSize="18sp"
+                    android:textColor="@android:color/black"
+                    android:layout_weight=".15"/>
+
+                <TextView
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:id="@+id/tv_settings_version"
+                    android:textSize="16sp"
+                    android:textColor="@android:color/black"
+                    android:layout_marginTop="4dp"
+                    android:layout_marginStart="10dp"
+                    android:layout_marginLeft="10dp"
+                    android:layout_weight=".15"
+                    android:textStyle="italic"
+                    android:alpha="0.8"/>
+
+            </LinearLayout>
+
+            <TextView
+                android:layout_width="match_parent"
+                android:layout_height="1dp"
+                android:background="@color/entry_border"
+                android:layout_marginLeft="15dp"
+                android:layout_marginRight="15dp"
+                android:layout_marginStart="15dp"
+                android:layout_marginEnd="15dp"/>
+
+            <LinearLayout
+                android:orientation="vertical"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:id="@+id/ll_settings_source"
+                android:padding="10dp"
+                android:layout_marginBottom="5dp">
+
+                <TextView
+                    android:text="@string/preferences_info_source"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:textSize="18sp"
+                    android:textColor="@android:color/black"
+                    android:layout_weight=".15"/>
+
+                <TextView
+                    android:text="@string/preferences_info_source_summary"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:textSize="16sp"
+                    android:textColor="@android:color/black"
+                    android:layout_marginTop="4dp"
+                    android:layout_marginStart="10dp"
+                    android:layout_marginLeft="10dp"
+                    android:layout_weight=".15"
+                    android:textStyle="italic"
+                    android:alpha="0.8"/>
+
+            </LinearLayout>
+
+            <TextView
+                android:layout_width="match_parent"
+                android:layout_height="1dp"
+                android:background="@color/entry_border"
+                android:layout_marginLeft="15dp"
+                android:layout_marginRight="15dp"
+                android:layout_marginStart="15dp"
+                android:layout_marginEnd="15dp"
+                android:visibility="gone"/>
+
+            <LinearLayout
+                android:orientation="vertical"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:id="@+id/ll_settings_feedback"
+                android:padding="10dp"
+                android:layout_marginBottom="5dp"
+                android:visibility="gone">
+
+                <TextView
+                    android:text="@string/preferences_info_feedback"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:textSize="18sp"
+                    android:textColor="@android:color/black"
+                    android:layout_weight=".15"/>
+
+                <TextView
+                    android:text="@string/preferences_info_feedback_summary"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:textSize="16sp"
+                    android:textColor="@android:color/black"
+                    android:layout_marginTop="4dp"
+                    android:layout_marginStart="10dp"
+                    android:layout_marginLeft="10dp"
+                    android:layout_weight=".15"
+                    android:textStyle="italic"
+                    android:alpha="0.8"/>
+
+            </LinearLayout>
+
+        </LinearLayout>
+
+
+    </ScrollView>
+
+</LinearLayout>
+

+ 69 - 0
app/src/main/res/layout/dialog_changelog.xml

@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:orientation="vertical"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@drawable/section"
+    android:id="@+id/ll_home_section_lablanca"
+    android:layout_marginBottom="30dp"
+    android:layout_marginEnd="12dp"
+    android:layout_marginLeft="12dp"
+    android:layout_marginRight="12dp"
+    android:layout_marginStart="12dp"
+    android:layout_marginTop="30dp"
+    android:paddingBottom="15dp">
+
+    <TextView
+        android:text="@string/changelog"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:textAppearance="?android:attr/textAppearanceLarge"
+        android:textStyle="bold"
+        android:textColor="@color/section_title"
+        android:paddingBottom="4dp"
+        android:paddingEnd="10dp"
+        android:paddingLeft="20dp"
+        android:paddingRight="10dp"
+        android:paddingStart="20dp"
+        android:paddingTop="4dp"
+        android:background="@drawable/section_title"
+        android:layout_alignParentTop="true"
+        android:id="@+id/tv_changelog"/>
+
+    <WebView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:id="@+id/wv_changelog"
+        android:scrollbars="vertical"
+        android:layout_below="@+id/tv_changelog"
+        android:layout_above="@+id/bt_changelog"
+        android:layout_marginEnd="1dp"
+        android:layout_marginLeft="1dp"
+        android:layout_marginRight="1dp"
+        android:layout_marginStart="1dp"
+        android:background="@drawable/entry"
+        android:scrollbarFadeDuration="0"
+        android:scrollbarAlwaysDrawVerticalTrack="true"/>
+
+    <Button
+        android:text="@string/accept"
+        android:layout_width="wrap_content"
+        android:id="@+id/bt_changelog"
+        android:layout_alignParentBottom="true"
+        android:layout_height="wrap_content"
+        android:layout_centerInParent="false"
+        android:layout_centerHorizontal="true"
+        android:layout_marginBottom="15dp"
+        android:layout_marginEnd="25dp"
+        android:layout_marginLeft="25dp"
+        android:layout_marginRight="25dp"
+        android:layout_marginStart="25dp"
+        android:layout_marginTop="5dp"
+        android:layout_weight=".5"
+        android:background="@drawable/button_selector"
+        android:minHeight="40dp"
+        android:textColor="@color/input_button_color"
+        android:textStyle="bold"/>
+</RelativeLayout>

+ 23 - 8
app/src/main/res/layout/dialog_notification.xml

@@ -1,24 +1,39 @@
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
-    android:background="@drawable/section"
     android:orientation="vertical"
-    android:padding="7dp" >
+    android:background="@drawable/section"
+    android:layout_marginBottom="30dp"
+    android:layout_marginEnd="18dp"
+    android:layout_marginLeft="18dp"
+    android:layout_marginRight="18dp"
+    android:layout_marginStart="18dp"
+    android:layout_marginTop="35dp"
+    android:paddingBottom="15dp">
 
     <TextView
         android:id="@+id/tv_dialog_notification_title"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
-        android:ellipsize="end"
-        android:maxLines="2"
-        android:textAppearance="@android:style/TextAppearance.Large"
-        android:textStyle="bold"/>
+        android:textAppearance="?android:attr/textAppearanceLarge"
+        android:textStyle="bold"
+        android:background="@drawable/section_title"
+        android:paddingBottom="4dp"
+        android:paddingEnd="10dp"
+        android:paddingLeft="20dp"
+        android:paddingRight="10dp"
+        android:paddingStart="20dp"
+        android:paddingTop="4dp"
+        android:textColor="@color/section_title"/>
 
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:orientation="vertical"
-        android:background="@drawable/entry">
+        android:background="@drawable/entry"
+        android:layout_margin="8dp"
+        android:padding="7dp">
 
         <TextView
             android:id="@+id/tv_dialog_notification_text"

+ 39 - 17
app/src/main/res/layout/dialog_sync.xml

@@ -3,31 +3,53 @@
               android:layout_height="wrap_content"
               android:background="@drawable/section"
               android:orientation="vertical"
-              android:padding="7dp">
+              android:layout_margin="20dp">
 
     <TextView
         android:id="@+id/textView1"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:text="@string/dialog_sync_title"
-        android:textAppearance="@android:style/TextAppearance.Large"
-        android:textStyle="bold"/>
+        android:textAppearance="?android:attr/textAppearanceLarge"
+        android:textStyle="bold"
+        android:background="@drawable/section_title"
+        android:paddingBottom="4dp"
+        android:paddingEnd="10dp"
+        android:paddingLeft="20dp"
+        android:paddingRight="10dp"
+        android:paddingStart="20dp"
+        android:paddingTop="4dp"
+        android:textColor="@color/section_title"/>
 
-    <TextView
-        android:id="@+id/tv_dialog_sync_text"
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:text="@string/dialog_sync_text_0"
-        android:textAppearance="@android:style/TextAppearance.Medium"
-        android:background="@drawable/entry"
+    <LinearLayout
+        android:orientation="vertical"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_margin="8dp"
         android:padding="7dp"
-        android:layout_marginTop="10dp"/>
+        android:background="@drawable/entry">
 
-    <ProgressBar
-        android:id="@+id/progressBar1"
-        style="?android:attr/progressBarStyleLarge"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_gravity="center_horizontal"/>
+        <ProgressBar
+            android:id="@+id/pb_sync_dialog"
+            style="?android:attr/progressBarStyleLarge"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center_horizontal"
+            android:layout_marginTop="20dp"/>
+
+        <TextView
+            android:id="@+id/tv_dialog_sync_text"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="@string/dialog_sync_text_0"
+            android:textAppearance="@android:style/TextAppearance.Medium"
+            android:layout_marginTop="20dp"
+            android:layout_marginBottom="20dp"
+            android:layout_marginEnd="10dp"
+            android:layout_marginLeft="10dp"
+            android:layout_marginRight="10dp"
+            android:layout_marginStart="10dp"
+            android:textAlignment="center"/>
+    </LinearLayout>
 
 </LinearLayout>

+ 47 - 25
app/src/main/res/layout/fragment_layout_activities.xml

@@ -5,9 +5,6 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
-    android:id="@+id/scrollView3"
-    android:background="@color/background_app"
-    android:padding="7dp"
     tools:ignore="Overdraw">
 
     <LinearLayout
@@ -18,56 +15,81 @@
         <LinearLayout
             android:orientation="vertical"
             android:layout_width="match_parent"
-            android:layout_height="match_parent"
+            android:layout_height="wrap_content"
             android:background="@drawable/section"
-            android:padding="7dp"
-            android:layout_marginBottom="10dp">
+            android:layout_margin="10dp">
 
             <TextView
-                android:layout_width="wrap_content"
+                android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:textAppearance="?android:attr/textAppearanceLarge"
                 android:text="@string/activity_future"
-                android:id="@+id/textView5"
-                android:textStyle="bold"/>
+                android:textAppearance="?android:attr/textAppearanceLarge"
+                android:textStyle="bold"
+                tools:layout_width="match_parent"
+                android:background="@drawable/section_title"
+                android:paddingBottom="4dp"
+                android:paddingEnd="10dp"
+                android:paddingLeft="20dp"
+                android:paddingRight="10dp"
+                android:paddingStart="20dp"
+                android:paddingTop="4dp"
+                android:textColor="@color/section_title"/>
 
             <TextView
                 android:layout_width="fill_parent"
                 android:layout_height="fill_parent"
+                android:textAppearance="@android:style/TextAppearance.Medium"
                 android:text="@string/activity_no_future"
                 android:id="@+id/tv_activities_no_future"
                 android:background="@drawable/entry"
-                android:layout_margin="7dp"
-                android:padding="10dp" />
+                android:layout_margin="8dp"
+                android:padding="7dp" />
 
             <LinearLayout
                 android:orientation="vertical"
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
-                android:layout_margin="7dp"
                 android:id="@+id/ll_activities_future_list" />
         </LinearLayout>
 
+        <TextView
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="@string/activity_past"
+            android:textAppearance="?android:attr/textAppearanceLarge"
+            android:textStyle="bold"
+            tools:layout_width="match_parent"
+            android:background="@drawable/section_title"
+            android:paddingBottom="4dp"
+            android:paddingEnd="10dp"
+            android:paddingLeft="20dp"
+            android:paddingRight="10dp"
+            android:paddingStart="20dp"
+            android:paddingTop="4dp"
+            android:textColor="@color/section_title"
+            android:layout_marginTop="10dp"
+            android:layout_marginLeft="10dp"
+            android:layout_marginRight="10dp"
+            android:layout_marginStart="10dp"
+            android:layout_marginEnd="10dp"
+            android:layout_marginBottom="-1.5dp"/>
+
         <LinearLayout
             android:orientation="vertical"
             android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:background="@drawable/section"
-            android:padding="7dp">
-
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:textAppearance="?android:attr/textAppearanceLarge"
-                android:text="@string/activity_past"
-                android:id="@+id/textView7"
-                android:textStyle="bold"/>
+            android:layout_height="wrap_content"
+            android:background="@drawable/section_large"
+            android:layout_marginBottom="10dp"
+            android:layout_marginEnd="10dp"
+            android:layout_marginLeft="10dp"
+            android:layout_marginRight="10dp"
+            android:layout_marginStart="10dp"
+            android:layout_marginTop="0dp">
 
             <LinearLayout
                 android:orientation="vertical"
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
-                android:layout_margin="7dp"
                 android:id="@+id/ll_activities_past_list"/>
         </LinearLayout>
     </LinearLayout>

+ 109 - 119
app/src/main/res/layout/fragment_layout_activity_future.xml

@@ -4,180 +4,170 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
-    android:id="@+id/scrollView3"
-    android:background="@color/background_app"
-    android:padding="7dp"
-    tools:ignore="Overdraw">
+    android:background="@color/background_app">
 
     <LinearLayout
         android:orientation="vertical"
-        android:layout_width="fill_parent"
-        android:layout_height="match_parent"
-        android:background="@drawable/section"
-        android:layout_margin="7dp"
-        android:padding="7dp" >
-
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:textAppearance="?android:attr/textAppearanceLarge"
-            android:text="Large Text"
-            android:id="@+id/tv_activity_future_title"
-            android:textStyle="bold"/>
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginBottom="10dp">
 
         <LinearLayout
             android:orientation="vertical"
             android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:background="@drawable/entry"
-            android:padding="7dp" >
+            android:layout_height="wrap_content"
+            android:background="@drawable/section"
+            android:layout_margin="10dp"
+            tools:ignore="UselessParent">
 
             <TextView
-                android:layout_width="fill_parent"
+                android:layout_width="match_parent"
                 android:layout_height="wrap_content"
+                android:id="@+id/tv_activity_future_title"
                 android:textAppearance="?android:attr/textAppearanceLarge"
-                android:text="Large Text"
-                android:id="@+id/tv_activity_future_date"
-                android:layout_gravity="end"
-                android:gravity="center_horizontal" />
-
-            <ImageView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:id="@+id/iv_activity_future_0"
-                android:layout_gravity="center_horizontal"
-                android:contentDescription="@string/app_cdesc"
-                android:visibility="gone"
-                android:maxHeight="70dp"
-                />
-
-            <WebView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:id="@+id/wv_activity_future_text" />
+                android:textStyle="bold"
+                tools:layout_width="match_parent"
+                android:background="@drawable/section_title"
+                android:paddingBottom="4dp"
+                android:paddingEnd="10dp"
+                android:paddingLeft="20dp"
+                android:paddingRight="10dp"
+                android:paddingStart="20dp"
+                android:paddingTop="4dp"
+                android:textColor="@color/section_title"/>
 
             <LinearLayout
-                android:orientation="horizontal"
+                android:orientation="vertical"
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
-                android:gravity="center_horizontal"
-                android:layout_gravity="center_horizontal" >
+                android:background="@drawable/entry"
+                android:padding="7dp"
+                android:layout_margin="8dp">
 
-                <ImageView
-                    android:layout_width="wrap_content"
+                <TextView
+                    android:layout_width="fill_parent"
                     android:layout_height="wrap_content"
-                    android:id="@+id/iv_activity_future_1"
-                    android:contentDescription="@string/app_cdesc"
-                    android:layout_gravity="center_horizontal"
-                    android:maxHeight="50dp"
-                    android:visibility="gone"/>
+                    android:id="@+id/tv_activity_future_date"
+                    android:textAppearance="?android:attr/textAppearanceMedium"
+                    android:textColor="@color/entry_title"
+                    android:textStyle="bold" />
 
-                <ImageView
+                <TextView
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:id="@+id/iv_activity_future_2"
-                    android:contentDescription="@string/app_cdesc"
-                    android:visibility="gone"
-                    android:maxHeight="50dp" />
+                    android:id="@+id/tv_activity_future_city"
+                    android:textAppearance="?android:attr/textAppearanceMedium"
+                    android:textColor="@color/entry_title"
+                    android:textStyle="bold"/>
 
                 <ImageView
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:id="@+id/iv_activity_future_3"
-                    android:contentDescription="@string/app_cdesc"
+                    android:id="@+id/iv_activity_future_0"
+                    android:layout_gravity="center_horizontal"
+                    android:contentDescription="@string/empty"
                     android:visibility="gone"
-                    android:maxHeight="50dp" />
+                    android:maxHeight="90dp"/>
 
-                <ImageView
-                    android:layout_width="wrap_content"
+                <LinearLayout
+                    android:orientation="horizontal"
+                    android:gravity="center_horizontal"
+                    android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:id="@+id/iv_activity_future_4"
-                    android:contentDescription="@string/app_cdesc"
-                    android:visibility="gone"
-                    android:maxHeight="50dp" />
-            </LinearLayout>
-
-            <TableLayout
-                android:layout_width="wrap_content"
-                android:layout_height="match_parent"
-                android:layout_margin="15dp"
-                android:layout_gravity="center_horizontal"
-                android:background="@color/album_border"
-                >
-
-                <TableRow
-                    android:layout_width="wrap_content"
-                    android:layout_height="match_parent">
+                    android:layout_marginBottom="10dp">
 
                     <TextView
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:textAppearance="@android:style/TextAppearance.Medium"
-                        android:text="@string/activity_city"
-                        android:gravity="end"
-                        android:background="#ffffff"
+                        android:textAppearance="@android:style/TextAppearance.Small"
+                        android:text="@string/activity_price"
                         android:layout_margin="1dp"
-                        android:padding="4dp"/>
+                        android:padding="4dp"
+                        android:visibility="gone"/>
 
                     <TextView
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:textAppearance="@android:style/TextAppearance.Medium"
-                        android:id="@+id/tv_activity_future_city"
-                        android:layout_margin="1dp"
-                        android:background="#ffffff"
+                        android:textAppearance="@android:style/TextAppearance.Small"
+                        android:id="@+id/tv_activity_future_price"
                         android:padding="4dp"/>
-                </TableRow>
+                </LinearLayout>
+
+                <WebView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:id="@+id/wv_activity_future_text" />
 
-                <TableRow
+                <LinearLayout
+                    android:orientation="horizontal"
                     android:layout_width="match_parent"
-                    android:layout_height="match_parent">
+                    android:layout_height="match_parent"
+                    android:gravity="center_horizontal"
+                    android:layout_gravity="center_horizontal" >
 
-                    <TextView
+                    <ImageView
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:textAppearance="@android:style/TextAppearance.Medium"
-                        android:text="@string/activity_price"
-                        android:layout_margin="1dp"
-                        android:gravity="end"
-                        android:background="#ffffff"
-                        android:padding="4dp"/>
+                        android:id="@+id/iv_activity_future_1"
+                        android:contentDescription="@string/app_cdesc"
+                        android:layout_gravity="center_horizontal"
+                        android:maxHeight="50dp"
+                        android:visibility="gone"/>
 
-                    <TextView
+                    <ImageView
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:textAppearance="@android:style/TextAppearance.Medium"
-                        android:id="@+id/tv_activity_future_price"
-                        android:layout_margin="1dp"
-                        android:background="#ffffff"
-                        android:padding="4dp"/>
-                </TableRow>
-            </TableLayout>
+                        android:id="@+id/iv_activity_future_2"
+                        android:contentDescription="@string/app_cdesc"
+                        android:visibility="gone"
+                        android:maxHeight="50dp" />
 
-        </LinearLayout>
+                    <ImageView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:id="@+id/iv_activity_future_3"
+                        android:contentDescription="@string/app_cdesc"
+                        android:visibility="gone"
+                        android:maxHeight="50dp" />
 
-        <LinearLayout
-            android:orientation="vertical"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:layout_marginTop="15dp"
-            android:id="@+id/ll_activity_future_schedule">
+                    <ImageView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:id="@+id/iv_activity_future_4"
+                        android:contentDescription="@string/app_cdesc"
+                        android:visibility="gone"
+                        android:maxHeight="50dp" />
+                </LinearLayout>
 
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:textAppearance="?android:attr/textAppearanceLarge"
-                android:text="@string/activity_schedule"
-                android:textStyle="bold"/>
+            </LinearLayout>
 
             <LinearLayout
                 android:orientation="vertical"
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
-                android:id="@+id/ll_activity_future_schedule_list"
                 android:background="@drawable/entry"
-                android:padding="7dp"/>
+                android:padding="7dp"
+                android:layout_margin="8dp"
+                android:id="@+id/ll_activity_future_schedule">
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/activity_schedule"
+                    android:textAppearance="?android:attr/textAppearanceMedium"
+                    android:textColor="@color/entry_title"
+                    android:textStyle="bold"/>
+
+                <LinearLayout
+                    android:orientation="vertical"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:id="@+id/ll_activity_future_schedule_list"
+                    android:padding="7dp"/>
+            </LinearLayout>
+
         </LinearLayout>
 
     </LinearLayout>
+
 </com.ivalentin.margolariak.CustomScrollView>

+ 87 - 80
app/src/main/res/layout/fragment_layout_activity_past.xml

@@ -4,117 +4,124 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="fill_parent"
     android:layout_height="match_parent"
-    android:id="@+id/scrollView3"
-    android:background="@color/background_app"
-    android:padding="7dp"
-    tools:ignore="Overdraw">
+    android:background="@color/background_app">
 
     <LinearLayout
         android:orientation="vertical"
-        android:layout_width="fill_parent"
-        android:layout_height="match_parent"
-        android:background="@drawable/section"
-        android:layout_margin="7dp"
-        android:padding="7dp" >
-
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:textAppearance="?android:attr/textAppearanceLarge"
-            android:text="Large Text"
-            android:id="@+id/tv_activity_past_title"
-            android:textStyle="bold"/>
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginBottom="10dp">
 
         <LinearLayout
             android:orientation="vertical"
-            android:transitionGroup="true"
             android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:background="@drawable/entry"
-            android:padding="7dp">
+            android:layout_height="wrap_content"
+            android:background="@drawable/section"
+            android:layout_margin="10dp"
+            tools:ignore="UselessParent">
+
+            <TextView
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:id="@+id/tv_activity_past_title"
+                android:textAppearance="?android:attr/textAppearanceLarge"
+                android:textStyle="bold"
+                tools:layout_width="match_parent"
+                android:background="@drawable/section_title"
+                android:paddingBottom="4dp"
+                android:paddingEnd="10dp"
+                android:paddingLeft="20dp"
+                android:paddingRight="10dp"
+                android:paddingStart="20dp"
+                android:paddingTop="4dp"
+                android:textColor="@color/section_title"/>
 
             <LinearLayout
-                android:orientation="horizontal"
+                android:orientation="vertical"
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
-                android:layout_marginBottom="7dp">
+                android:background="@drawable/entry"
+                android:padding="7dp"
+                android:layout_margin="8dp">
 
                 <TextView
-                    android:layout_width="wrap_content"
+                    android:layout_width="fill_parent"
                     android:layout_height="wrap_content"
+                    android:id="@+id/tv_activity_past_date"
                     android:textAppearance="?android:attr/textAppearanceMedium"
-                    android:id="@+id/tv_activity_past_city"
-                    android:layout_margin="5dp" />
+                    android:textColor="@color/entry_title"
+                    android:textStyle="bold"/>
 
                 <TextView
-                    android:layout_width="fill_parent"
+                    android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
+                    android:id="@+id/tv_activity_past_city"
                     android:textAppearance="?android:attr/textAppearanceMedium"
-                    android:id="@+id/tv_activity_past_date"
-                    android:layout_margin="5dp"
-                    android:gravity="end" />
-
-            </LinearLayout>
-
-            <ImageView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:id="@+id/iv_activity_past_0"
-                android:contentDescription="@string/app_cdesc"
-                android:layout_gravity="center_horizontal"
-                android:visibility="gone"
-                android:maxHeight="70dp" />
-
-            <WebView
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:id="@+id/wv_activity_past_text"
-                android:layout_marginTop="10dp"
-                android:layout_marginBottom="10dp" />
-
-            <LinearLayout
-                android:orientation="horizontal"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:gravity="center_horizontal"
-                android:layout_gravity="center_horizontal"
-                android:layout_marginBottom="15dp">
+                    android:textColor="@color/entry_title"
+                    android:textStyle="bold"/>
 
                 <ImageView
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:id="@+id/iv_activity_past_1"
-                    android:contentDescription="@string/app_cdesc"
-                    android:visibility="gone"
+                    android:id="@+id/iv_activity_past_0"
                     android:layout_gravity="center_horizontal"
-                    android:maxHeight="50dp" />
-
-                <ImageView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:id="@+id/iv_activity_past_2"
-                    android:contentDescription="@string/app_cdesc"
+                    android:contentDescription="@string/empty"
                     android:visibility="gone"
-                    android:maxHeight="50dp" />
+                    android:maxHeight="90dp"/>
 
-                <ImageView
-                    android:layout_width="wrap_content"
+                <WebView
+                    android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:id="@+id/iv_activity_past_3"
-                    android:contentDescription="@string/app_cdesc"
-                    android:visibility="gone"
-                    android:maxHeight="50dp" />
+                    android:id="@+id/wv_activity_past_text"
+                    android:layout_marginTop="10dp"
+                    android:layout_marginBottom="10dp" />
+
+                <LinearLayout
+                    android:orientation="horizontal"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:gravity="center_horizontal"
+                    android:layout_gravity="center_horizontal"
+                    android:layout_marginBottom="15dp">
+
+                    <ImageView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:id="@+id/iv_activity_past_1"
+                        android:contentDescription="@string/app_cdesc"
+                        android:visibility="gone"
+                        android:layout_gravity="center_horizontal"
+                        android:maxHeight="50dp" />
+
+                    <ImageView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:id="@+id/iv_activity_past_2"
+                        android:contentDescription="@string/empty"
+                        android:visibility="gone"
+                        android:maxHeight="50dp" />
+
+                    <ImageView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:id="@+id/iv_activity_past_3"
+                        android:contentDescription="@string/app_cdesc"
+                        android:visibility="gone"
+                        android:maxHeight="50dp" />
+
+                    <ImageView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:id="@+id/iv_activity_past_4"
+                        android:contentDescription="@string/empty"
+                        android:visibility="gone"
+                        android:maxHeight="50dp" />
+                </LinearLayout>
 
-                <ImageView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:id="@+id/iv_activity_past_4"
-                    android:contentDescription="@string/app_cdesc"
-                    android:visibility="gone"
-                    android:maxHeight="50dp" />
             </LinearLayout>
 
         </LinearLayout>
 
     </LinearLayout>
+
 </com.ivalentin.margolariak.CustomScrollView>

+ 55 - 29
app/src/main/res/layout/fragment_layout_album.xml

@@ -5,47 +5,73 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
-    android:id="@+id/scrollView3"
-    android:background="@color/background_app"
-    android:padding="7dp"
-    tools:ignore="Overdraw">
+    >
 
     <LinearLayout
-        android:orientation="vertical"
         android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:background="@drawable/section"
-        android:paddingBottom="15dp"
-        android:paddingLeft="7dp"
-        android:paddingTop="7dp"
-        android:paddingRight="7dp">
+        android:layout_height="wrap_content"
+        android:orientation="vertical">
 
         <TextView
-            android:layout_width="wrap_content"
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:textAppearance="?android:attr/textAppearanceLarge"
             android:id="@+id/tv_album_title"
-            android:textStyle="bold"/>
-
-        <WebView
-            android:layout_width="fill_parent"
-            android:layout_height="wrap_content"
-            android:textAppearance="?android:attr/textAppearanceMedium"
-            android:text="Medium Text"
-            android:id="@+id/wv_album_description"
-            android:layout_margin="7dp"
-            android:background="@drawable/entry"
-            android:padding="7dp" />
+            android:textAppearance="?android:attr/textAppearanceLarge"
+            android:textStyle="bold"
+            tools:layout_width="match_parent"
+            android:background="@drawable/section_title"
+            android:paddingBottom="4dp"
+            android:paddingEnd="10dp"
+            android:paddingLeft="20dp"
+            android:paddingRight="10dp"
+            android:paddingStart="20dp"
+            android:paddingTop="4dp"
+            android:textColor="@color/section_title"
+            android:layout_marginBottom="-1.3dp"
+            android:layout_marginEnd="10dp"
+            android:layout_marginLeft="10dp"
+            android:layout_marginRight="10dp"
+            android:layout_marginStart="10dp"
+            android:layout_marginTop="10dp"/>
 
         <LinearLayout
             android:orientation="vertical"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
-            android:layout_marginLeft="7dp"
-            android:layout_marginTop="15dp"
-            android:layout_marginRight="7dp"
-            android:layout_marginBottom="7dp"
-            android:id="@+id/ll_album_list">
+            android:background="@drawable/section_large"
+            android:layout_marginBottom="10dp"
+            android:layout_marginEnd="10dp"
+            android:layout_marginLeft="10dp"
+            android:layout_marginRight="10dp"
+            android:layout_marginStart="10dp"
+            android:layout_marginTop="0dp">
+
+            <LinearLayout
+                android:orientation="vertical"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:background="@drawable/entry"
+                android:padding="7dp"
+                android:layout_margin="8dp">
+
+                <WebView
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:id="@+id/wv_album_description"/>
+
+            </LinearLayout>
+
+            <LinearLayout
+                android:orientation="vertical"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_marginLeft="7dp"
+                android:layout_marginTop="15dp"
+                android:layout_marginRight="7dp"
+                android:layout_marginBottom="7dp"
+                android:id="@+id/ll_album_list">
+            </LinearLayout>
+
         </LinearLayout>
 
     </LinearLayout>

+ 60 - 46
app/src/main/res/layout/fragment_layout_blog.xml

@@ -3,66 +3,80 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="fill_parent"
-    android:layout_height="wrap_content"
-    android:id="@+id/scrollView3"
-    android:background="@color/background_app"
-    android:padding="7dp"
-    tools:ignore="Overdraw">
+    android:layout_height="wrap_content">
 
     <LinearLayout
         android:orientation="vertical"
         android:layout_width="match_parent"
         android:layout_height="fill_parent"
-        android:layout_weight="1"
-        android:background="@drawable/section"
-        android:padding="5dp">
-
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:textAppearance="?android:attr/textAppearanceLarge"
-            android:text="@string/section_title_blog"
-            android:textStyle="bold"
-            android:layout_marginBottom="10dp"
-            android:layout_margin="5dp" />
+        android:layout_marginBottom="10dp"
+        tools:ignore="UselessParent">
 
         <LinearLayout
             android:orientation="vertical"
             android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:id="@+id/ll_blog_list"/>
-
-        <LinearLayout
-            android:orientation="horizontal"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:layout_gravity="center_horizontal"
-            android:gravity="center_horizontal">
+            android:layout_height="fill_parent"
+            android:background="@drawable/section"
+            android:layout_margin="10dp">
 
-            <Button
-                android:layout_width="wrap_content"
+            <TextView
+                android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:text="@string/blog_pager_previous"
-                android:id="@+id/bt_blog_previous"
-                android:background="@drawable/button_selector"
+                android:text="@string/section_title_blog"
+                android:textAppearance="?android:attr/textAppearanceLarge"
                 android:textStyle="bold"
-                android:textColor="@color/input_button_color"
-                android:layout_gravity="center_horizontal"
-                android:visibility="gone"
-                android:layout_margin="5dp"
-                tools:ignore="ButtonStyle"/>
+                tools:layout_width="match_parent"
+                android:background="@drawable/section_title"
+                android:paddingBottom="4dp"
+                android:paddingEnd="10dp"
+                android:paddingLeft="20dp"
+                android:paddingRight="10dp"
+                android:paddingStart="20dp"
+                android:paddingTop="4dp"
+                android:textColor="@color/section_title"/>
 
-            <Button
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="@string/blog_pager_next"
-                android:id="@+id/bt_blog_next"
-                android:background="@drawable/button_selector"
-                android:textStyle="bold"
-                android:textColor="@color/input_button_color"
+            <LinearLayout
+                android:orientation="vertical"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:id="@+id/ll_blog_list"/>
+
+            <LinearLayout
+                android:orientation="horizontal"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
                 android:layout_gravity="center_horizontal"
-                android:layout_margin="5dp"
-                tools:ignore="ButtonStyle"/>
+                android:gravity="center_horizontal">
+
+                <Button
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/blog_pager_previous"
+                    android:id="@+id/bt_blog_previous"
+                    android:background="@drawable/button_selector"
+                    android:textStyle="bold"
+                    android:textColor="@color/input_button_color"
+                    android:layout_gravity="center_horizontal"
+                    android:visibility="gone"
+                    android:layout_margin="5dp"
+                    tools:ignore="ButtonStyle"/>
+
+                <Button
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/blog_pager_next"
+                    android:id="@+id/bt_blog_next"
+                    android:background="@drawable/button_selector"
+                    android:textStyle="bold"
+                    android:textColor="@color/input_button_color"
+                    android:layout_gravity="center_horizontal"
+                    android:layout_margin="5dp"
+                    tools:ignore="ButtonStyle"/>
+
+            </LinearLayout>
+
         </LinearLayout>
+
     </LinearLayout>
+
 </com.ivalentin.margolariak.CustomScrollView>

+ 31 - 20
app/src/main/res/layout/fragment_layout_gallery.xml

@@ -5,15 +5,13 @@
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
     android:id="@+id/scrollView3"
-    android:background="@color/background_app"
-    android:padding="7dp"
     tools:ignore="Overdraw">
 
     <LinearLayout
         android:orientation="vertical"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:paddingBottom="20dp">
+        >
 
         <LinearLayout
             android:orientation="vertical"
@@ -57,27 +55,40 @@
 
         </LinearLayout>
 
+        <TextView
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="@string/gallery_albums"
+            android:textAppearance="?android:attr/textAppearanceLarge"
+            android:textStyle="bold"
+            tools:layout_width="match_parent"
+            android:background="@drawable/section_title"
+            android:paddingBottom="4dp"
+            android:paddingEnd="10dp"
+            android:paddingLeft="20dp"
+            android:paddingRight="10dp"
+            android:paddingStart="20dp"
+            android:paddingTop="4dp"
+            android:textColor="@color/section_title"
+            android:layout_marginTop="10dp"
+            android:layout_marginLeft="10dp"
+            android:layout_marginRight="10dp"
+            android:layout_marginStart="10dp"
+            android:layout_marginEnd="10dp"
+            android:layout_marginBottom="-1.5dp"/>
+
         <LinearLayout
             android:orientation="vertical"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
-            android:background="@drawable/section"
-            android:padding="7dp"
-            android:layout_marginTop="20dp">
-
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:textAppearance="?android:attr/textAppearanceLarge"
-                android:text="@string/gallery_albums"
-                android:textStyle="bold"/>
+            android:id="@+id/ll_gallery_album_list"
+            android:layout_marginBottom="10dp"
+            android:layout_marginEnd="10dp"
+            android:layout_marginLeft="10dp"
+            android:layout_marginRight="10dp"
+            android:layout_marginStart="10dp"
+            android:layout_marginTop="0dp"
+            android:background="@drawable/section_large"/>
 
-            <LinearLayout
-                android:orientation="vertical"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:layout_marginBottom="10dp"
-                android:id="@+id/ll_gallery_album_list"/>
-        </LinearLayout>
     </LinearLayout>
 </com.ivalentin.margolariak.CustomScrollView>

+ 185 - 137
app/src/main/res/layout/fragment_layout_home.xml

@@ -1,5 +1,6 @@
 <com.ivalentin.margolariak.CustomScrollView
 	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/sh_home_layout"
     android:layout_width="fill_parent"
@@ -13,23 +14,27 @@
     
 	    <LinearLayout
 			android:id="@+id/ll_home_section_location"
-			android:layout_width="fill_parent"
+			android:layout_width="match_parent"
 			android:layout_height="wrap_content"
 			android:orientation="vertical"
 			android:background="@drawable/section"
-			android:visibility="gone"
-			android:layout_marginLeft="0dp"
-			android:layout_marginTop="2dp"
-			android:layout_marginRight="0dp"
-			android:layout_marginBottom="4dp"
-			android:paddingTop="5dp">
+			android:layout_margin="10dp"
+			android:visibility="gone">
 
 			<TextView
-				android:layout_width="wrap_content"
+				android:layout_width="match_parent"
 				android:layout_height="wrap_content"
 				android:text="@string/home_section_location"
 				android:textAppearance="?android:attr/textAppearanceLarge"
 				android:textStyle="bold"
+				tools:layout_width="match_parent"
+				android:background="@drawable/section_title"
+				android:paddingBottom="4dp"
+				android:paddingEnd="10dp"
+				android:paddingLeft="20dp"
+				android:paddingRight="10dp"
+				android:paddingStart="20dp"
+				android:paddingTop="4dp"
 				android:textColor="@color/section_title"/>
 
 			<LinearLayout
@@ -39,14 +44,15 @@
 				android:orientation="vertical"
 				android:background="@drawable/entry"
 				android:padding="7dp"
-				android:layout_margin="3dp">
+				android:layout_margin="8dp">
 
 				<TextView
-					android:layout_width="wrap_content"
+					android:layout_width="match_parent"
 					android:layout_height="wrap_content"
-					android:textAppearance="@android:style/TextAppearance.Medium"
-					android:text="@string/home_section_location_text_0"
-					android:id="@+id/textView9"/>
+					android:textAppearance="?android:attr/textAppearanceMedium"
+					android:textColor="@color/entry_title"
+					android:textStyle="bold"
+					android:text="@string/home_section_location_text_0"/>
 
 				<LinearLayout
 					android:orientation="horizontal"
@@ -81,24 +87,26 @@
 		<LinearLayout
 			android:orientation="vertical"
 			android:layout_width="match_parent"
-			android:layout_height="match_parent"
+			android:layout_height="wrap_content"
 			android:background="@drawable/section"
 			android:id="@+id/ll_home_section_lablanca"
-			android:visibility="gone"
-			android:layout_marginLeft="0dp"
-			android:layout_marginTop="2dp"
-			android:layout_marginRight="0dp"
-			android:layout_marginBottom="4dp"
-			android:paddingTop="5dp">
+			android:layout_margin="10dp"
+			android:visibility="gone">
 
 			<TextView
-				android:layout_width="wrap_content"
+				android:layout_width="match_parent"
 				android:layout_height="wrap_content"
 				android:textAppearance="?android:attr/textAppearanceLarge"
 				android:text="@string/lablanca_title"
-				android:id="@+id/textView4"
 				android:textStyle="bold"
-				android:textColor="@color/section_title"/>
+				android:textColor="@color/section_title"
+				android:paddingBottom="4dp"
+				android:paddingEnd="10dp"
+				android:paddingLeft="20dp"
+				android:paddingRight="10dp"
+				android:paddingStart="20dp"
+				android:paddingTop="4dp"
+				android:background="@drawable/section_title"/>
 
 			<LinearLayout
 				android:orientation="horizontal"
@@ -106,7 +114,7 @@
 				android:layout_height="match_parent"
 				android:background="@drawable/entry"
 				android:padding="7dp"
-				android:layout_margin="3dp">
+				android:layout_margin="8dp">
 
 				<ImageView
 					android:layout_width="wrap_content"
@@ -125,8 +133,14 @@
 					android:id="@+id/tv_home_section_lablanca_text"
 					android:layout_weight=".6"
 					android:padding="7dp"
-					android:maxLines="4"
-					android:ellipsize="end"/>
+					android:maxLines="4"/>
+
+				<ImageView
+					android:layout_width="match_parent"
+					android:layout_weight="1"
+					android:layout_height="40dp"
+					android:layout_marginTop="-40dp"
+					android:background="@drawable/gradient_v_white"/>
 
 			</LinearLayout>
 		</LinearLayout>
@@ -137,20 +151,23 @@
 			android:layout_height="wrap_content"
 			android:orientation="vertical"
 			android:background="@drawable/section"
-			android:visibility="gone"
-			android:layout_marginLeft="0dp"
-			android:layout_marginRight="0dp"
-			android:layout_marginTop="2dp"
-			android:layout_marginBottom="4dp"
-			android:paddingTop="5dp">
+			android:layout_margin="10dp"
+			android:visibility="gone">
 
 			<TextView
-				android:layout_width="wrap_content"
+				android:layout_width="match_parent"
 				android:layout_height="wrap_content"
 				android:text="@string/home_section_gmschedule"
 				android:textAppearance="?android:attr/textAppearanceLarge"
-				android:layout_marginBottom="10dp"
 				android:textStyle="bold"
+				tools:layout_width="match_parent"
+				android:background="@drawable/section_title"
+				android:paddingBottom="4dp"
+				android:paddingEnd="10dp"
+				android:paddingLeft="20dp"
+				android:paddingRight="10dp"
+				android:paddingStart="20dp"
+				android:paddingTop="4dp"
 				android:textColor="@color/section_title"/>
 
 			<LinearLayout
@@ -160,14 +177,15 @@
 				android:background="@drawable/entry"
 				android:id="@+id/ll_home_section_gmschedule_now_content"
 				android:padding="7dp"
-				android:layout_margin="3dp">
+				android:layout_margin="8dp">
 
 				<TextView
-					android:layout_width="wrap_content"
+					android:layout_width="match_parent"
 					android:layout_height="wrap_content"
-					android:textAppearance="@android:style/TextAppearance.Medium"
-					android:text="@string/schedule_now"
-					android:textStyle="bold"/>
+					android:textAppearance="?android:attr/textAppearanceMedium"
+					android:textColor="@color/entry_title"
+					android:textStyle="bold"
+					android:text="@string/schedule_now"/>
 
 				<LinearLayout
 					android:id="@+id/ll_home_section_gmschedule_now_list"
@@ -187,14 +205,15 @@
 				android:background="@drawable/entry"
 				android:id="@+id/ll_home_section_gmschedule_later_content"
 				android:padding="7dp"
-				android:layout_margin="3dp">
+				android:layout_margin="8dp">
 
 				<TextView
-					android:layout_width="wrap_content"
+					android:layout_width="match_parent"
 					android:layout_height="wrap_content"
-					android:textAppearance="@android:style/TextAppearance.Medium"
-					android:text="@string/schedule_later"
-					android:textStyle="bold"/>
+					android:textAppearance="?android:attr/textAppearanceMedium"
+					android:textColor="@color/entry_title"
+					android:textStyle="bold"
+					android:text="@string/schedule_later"/>
 
 				<LinearLayout
 					android:id="@+id/ll_home_section_gmschedule_later_list"
@@ -215,20 +234,23 @@
 			android:layout_height="wrap_content"
 			android:orientation="vertical"
 			android:background="@drawable/section"
-			android:visibility="gone"
-			android:layout_marginLeft="0dp"
-			android:layout_marginTop="2dp"
-			android:layout_marginRight="0dp"
-			android:layout_marginBottom="4dp"
-			android:paddingTop="5dp">
+			android:layout_margin="10dp"
+			android:visibility="gone">
 
 			<TextView
-				android:layout_width="wrap_content"
+				android:layout_width="match_parent"
 				android:layout_height="wrap_content"
 				android:text="@string/home_section_cityschedule"
 				android:textAppearance="?android:attr/textAppearanceLarge"
-				android:layout_marginBottom="10dp"
 				android:textStyle="bold"
+				tools:layout_width="match_parent"
+				android:background="@drawable/section_title"
+				android:paddingBottom="4dp"
+				android:paddingEnd="10dp"
+				android:paddingLeft="20dp"
+				android:paddingRight="10dp"
+				android:paddingStart="20dp"
+				android:paddingTop="4dp"
 				android:textColor="@color/section_title"/>
 
 			<LinearLayout
@@ -238,14 +260,15 @@
 				android:background="@drawable/entry"
 				android:id="@+id/ll_home_section_cityschedule_now_content"
 				android:padding="7dp"
-				android:layout_margin="3dp">
+				android:layout_margin="8dp">
 
 				<TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:textAppearance="@android:style/TextAppearance.Medium"
-                    android:text="@string/schedule_now"
-					android:textStyle="bold"/>
+					android:layout_width="match_parent"
+					android:layout_height="wrap_content"
+					android:textAppearance="?android:attr/textAppearanceMedium"
+					android:textColor="@color/entry_title"
+					android:textStyle="bold"
+                    android:text="@string/schedule_now"/>
 
 				<LinearLayout
                     android:id="@+id/ll_home_section_cityschedule_now_list"
@@ -265,14 +288,15 @@
 				android:background="@drawable/entry"
 				android:id="@+id/ll_home_section_cityschedule_later_content"
 				android:padding="7dp"
-				android:layout_margin="3dp">
+				android:layout_margin="8dp">
 
 				<TextView
-					android:layout_width="wrap_content"
+					android:layout_width="match_parent"
 					android:layout_height="wrap_content"
-					android:textAppearance="@android:style/TextAppearance.Medium"
-					android:text="@string/schedule_later"
-					android:textStyle="bold"/>
+					android:textAppearance="?android:attr/textAppearanceMedium"
+					android:textColor="@color/entry_title"
+					android:textStyle="bold"
+					android:text="@string/schedule_later"/>
 
 				<LinearLayout
 					android:id="@+id/ll_home_section_cityschedule_later_list"
@@ -293,26 +317,30 @@
 			android:layout_height="wrap_content"
 			android:orientation="vertical"
 			android:background="@drawable/section"
-			android:visibility="gone"
-			android:layout_marginLeft="0dp"
-			android:layout_marginTop="2dp"
-			android:layout_marginRight="0dp"
-			android:layout_marginBottom="4dp"
-			android:paddingTop="5dp">
+			android:layout_margin="10dp"
+			android:visibility="gone">
 
 			<TextView
-				android:layout_width="wrap_content"
+				android:layout_width="match_parent"
 				android:layout_height="wrap_content"
 				android:text="@string/home_section_around"
 				android:textAppearance="?android:attr/textAppearanceLarge"
 				android:textStyle="bold"
+				tools:layout_width="match_parent"
+				android:background="@drawable/section_title"
+				android:paddingBottom="4dp"
+				android:paddingEnd="10dp"
+				android:paddingLeft="20dp"
+				android:paddingRight="10dp"
+				android:paddingStart="20dp"
+				android:paddingTop="4dp"
 				android:textColor="@color/section_title"/>
 
 			<LinearLayout
 				android:id="@+id/ll_home_section_around_content"
 				android:layout_width="match_parent"
 				android:layout_height="wrap_content"
-				android:layout_margin="3dp"
+				android:layout_margin="8dp"
 				android:orientation="vertical"
 				android:background="@drawable/entry"
 				>
@@ -327,26 +355,30 @@
 			android:layout_height="wrap_content"
 			android:orientation="vertical"
 			android:background="@drawable/section"
-			android:visibility="gone"
-			android:layout_marginLeft="0dp"
-			android:layout_marginTop="2dp"
-			android:layout_marginRight="0dp"
-			android:layout_marginBottom="4dp"
-			android:paddingTop="5dp">
+			android:layout_margin="10dp"
+			android:visibility="gone">
 
 			<TextView
-				android:layout_width="wrap_content"
+				android:layout_width="match_parent"
 				android:layout_height="wrap_content"
 				android:text="@string/home_section_activities_future"
 				android:textAppearance="?android:attr/textAppearanceLarge"
 				android:textStyle="bold"
+				tools:layout_width="match_parent"
+				android:background="@drawable/section_title"
+				android:paddingBottom="4dp"
+				android:paddingEnd="10dp"
+				android:paddingLeft="20dp"
+				android:paddingRight="10dp"
+				android:paddingStart="20dp"
+				android:paddingTop="4dp"
 				android:textColor="@color/section_title"/>
 
 			<LinearLayout
 				android:id="@+id/ll_home_section_activities_future_content"
 				android:layout_width="match_parent"
 				android:layout_height="wrap_content"
-				android:layout_margin="3dp"
+				android:layout_margin="8dp"
 				android:orientation="vertical">
 
 			</LinearLayout>
@@ -359,27 +391,30 @@
 			android:layout_height="wrap_content"
 			android:orientation="vertical"
 			android:background="@drawable/section"
-			android:layout_marginLeft="0dp"
-			android:layout_marginTop="2dp"
-			android:layout_marginRight="0dp"
-			android:layout_marginBottom="4dp"
-			android:paddingTop="5dp">
+			android:layout_margin="10dp">
 
 			<TextView
-				android:layout_width="wrap_content"
+				android:layout_width="match_parent"
 				android:layout_height="wrap_content"
 				android:text="@string/home_section_blog"
 				android:textAppearance="?android:attr/textAppearanceLarge"
 				android:textStyle="bold"
+				tools:layout_width="match_parent"
+				android:background="@drawable/section_title"
+				android:paddingBottom="4dp"
+				android:paddingEnd="10dp"
+				android:paddingLeft="20dp"
+				android:paddingRight="10dp"
+				android:paddingStart="20dp"
+				android:paddingTop="4dp"
 				android:textColor="@color/section_title"/>
 
 			<LinearLayout
 				android:id="@+id/ll_home_section_blog_content"
 				android:layout_width="match_parent"
 				android:layout_height="wrap_content"
-				android:layout_margin="3dp"
 				android:orientation="vertical"
-				>
+				android:layout_margin="8dp">
 
 			</LinearLayout>
 
@@ -391,25 +426,29 @@
 			android:layout_height="wrap_content"
 			android:orientation="vertical"
 			android:background="@drawable/section"
-			android:layout_marginLeft="0dp"
-			android:layout_marginTop="2dp"
-			android:layout_marginRight="0dp"
-			android:layout_marginBottom="4dp"
-			android:paddingTop="5dp">
+			android:layout_margin="10dp">
 
 			<TextView
-				android:layout_width="wrap_content"
+				android:layout_width="match_parent"
 				android:layout_height="wrap_content"
 				android:text="@string/home_section_gallery"
 				android:textAppearance="?android:attr/textAppearanceLarge"
 				android:textStyle="bold"
+				tools:layout_width="match_parent"
+				android:background="@drawable/section_title"
+				android:paddingBottom="4dp"
+				android:paddingEnd="10dp"
+				android:paddingLeft="20dp"
+				android:paddingRight="10dp"
+				android:paddingStart="20dp"
+				android:paddingTop="4dp"
 				android:textColor="@color/section_title"/>
 
 			<LinearLayout
 				android:id="@+id/ll_home_section_gallery_content"
 				android:layout_width="match_parent"
 				android:layout_height="wrap_content"
-				android:layout_margin="3dp"
+				android:layout_margin="8dp"
 				android:orientation="vertical"
 				android:background="@drawable/entry"
 				android:padding="7dp">
@@ -432,9 +471,9 @@
 							android:layout_height="wrap_content"
 							android:id="@+id/iv_home_section_gallery_0"
 							android:contentDescription="@string/app_cdesc"
-							android:layout_margin="7dp"
-							android:padding="1dp"
-							android:background="@color/album_border"
+							android:layout_margin="3dp"
+							android:padding="0.5dp"
+							android:background="@color/image_border"
 							android:adjustViewBounds="true"
 							/>
 					</LinearLayout>
@@ -451,9 +490,9 @@
 							android:layout_height="wrap_content"
 							android:id="@+id/iv_home_section_gallery_1"
 							android:contentDescription="@string/app_cdesc"
-							android:layout_margin="7dp"
-							android:background="@color/album_border"
-							android:padding="1dp"
+							android:layout_margin="3dp"
+							android:background="@color/image_border"
+							android:padding="0.5dp"
 							android:adjustViewBounds="true"
 							/>
 					</LinearLayout>
@@ -478,9 +517,9 @@
 							android:layout_height="wrap_content"
 							android:id="@+id/iv_home_section_gallery_2"
 							android:contentDescription="@string/app_cdesc"
-							android:layout_margin="7dp"
-							android:padding="1dp"
-							android:background="@color/album_border"
+							android:layout_margin="3dp"
+							android:padding="0.5dp"
+							android:background="@color/image_border"
 							android:adjustViewBounds="true"
 							/>
 					</LinearLayout>
@@ -497,9 +536,9 @@
 							android:layout_height="wrap_content"
 							android:id="@+id/iv_home_section_gallery_3"
 							android:contentDescription="@string/app_cdesc"
-							android:layout_margin="7dp"
-							android:background="@color/album_border"
-							android:padding="1dp"
+							android:layout_margin="3dp"
+							android:background="@color/image_border"
+							android:padding="0.5dp"
 							android:adjustViewBounds="true"
 							/>
 					</LinearLayout>
@@ -544,26 +583,29 @@
 			android:layout_height="wrap_content"
 			android:orientation="vertical"
 			android:background="@drawable/section"
-			android:visibility="gone"
-			android:layout_marginLeft="0dp"
-			android:layout_marginTop="2dp"
-			android:layout_marginRight="0dp"
-			android:layout_marginBottom="4dp"
-			android:paddingTop="5dp">
+			android:layout_margin="10dp"
+			android:visibility="gone">
 
 			<TextView
-				android:layout_width="wrap_content"
+				android:layout_width="match_parent"
 				android:layout_height="wrap_content"
 				android:text="@string/home_section_activities_past"
 				android:textAppearance="?android:attr/textAppearanceLarge"
 				android:textStyle="bold"
+				tools:layout_width="match_parent"
+				android:background="@drawable/section_title"
+				android:paddingBottom="4dp"
+				android:paddingEnd="10dp"
+				android:paddingLeft="20dp"
+				android:paddingRight="10dp"
+				android:paddingStart="20dp"
+				android:paddingTop="4dp"
 				android:textColor="@color/section_title"/>
 
 			<LinearLayout
 				android:id="@+id/ll_home_section_activities_past_content"
 				android:layout_width="match_parent"
 				android:layout_height="wrap_content"
-				android:layout_margin="3dp"
 				android:orientation="vertical">
 
 			</LinearLayout>
@@ -576,25 +618,29 @@
 			android:layout_height="wrap_content"
 			android:orientation="vertical"
 			android:background="@drawable/section"
-			android:layout_marginLeft="0dp"
-			android:layout_marginTop="2dp"
-			android:layout_marginRight="0dp"
-			android:layout_marginBottom="4dp"
-			android:paddingTop="5dp">
+			android:layout_margin="10dp">
 
 			<TextView
-				android:layout_width="wrap_content"
+				android:layout_width="match_parent"
 				android:layout_height="wrap_content"
 				android:text="@string/home_section_social"
 				android:textAppearance="?android:attr/textAppearanceLarge"
 				android:textStyle="bold"
+				tools:layout_width="match_parent"
+				android:background="@drawable/section_title"
+				android:paddingBottom="4dp"
+				android:paddingEnd="10dp"
+				android:paddingLeft="20dp"
+				android:paddingRight="10dp"
+				android:paddingStart="20dp"
+				android:paddingTop="4dp"
 				android:textColor="@color/section_title"/>
 
 			<LinearLayout
 				android:id="@+id/ll_home_section_social_content"
 				android:layout_width="match_parent"
 				android:layout_height="wrap_content"
-				android:layout_margin="3dp"
+				android:layout_margin="8dp"
 				android:orientation="vertical"
 				android:background="@drawable/entry"
 				android:padding="7dp">
@@ -608,40 +654,40 @@
 						android:id="@+id/iv_home_section_social_phone"
 						android:layout_width="wrap_content"
 						android:layout_height="wrap_content"
-						android:layout_margin="10dp"
+						android:layout_margin="5dp"
 						android:adjustViewBounds="true"
 						android:contentDescription="@string/social_phone"
-						android:maxWidth="50dp"
+						android:maxWidth="60dp"
 						android:src="@drawable/social_phone"/>
 
 					<ImageView
 						android:id="@+id/iv_home_section_social_mail"
 						android:layout_width="wrap_content"
 						android:layout_height="wrap_content"
-						android:layout_margin="10dp"
+						android:layout_margin="5dp"
 						android:adjustViewBounds="true"
 						android:contentDescription="@string/social_mail"
-						android:maxWidth="50dp"
+						android:maxWidth="60dp"
 						android:src="@drawable/social_mail" />
 
 					<ImageView
 						android:id="@+id/iv_home_section_social_whatsapp"
 						android:layout_width="wrap_content"
 						android:layout_height="wrap_content"
-						android:layout_margin="10dp"
+						android:layout_margin="5dp"
 						android:adjustViewBounds="true"
 						android:contentDescription="@string/social_whatsapp"
-						android:maxWidth="50dp"
+						android:maxWidth="60dp"
 						android:src="@drawable/social_whatsapp" />
 
 					<ImageView
 						android:id="@+id/iv_home_section_social_facebook"
 						android:layout_width="wrap_content"
 						android:layout_height="wrap_content"
-						android:layout_margin="10dp"
+						android:layout_margin="5dp"
 						android:adjustViewBounds="true"
 						android:contentDescription="@string/social_facebook"
-						android:maxWidth="50dp"
+						android:maxWidth="60dp"
 						android:src="@drawable/social_facebook" />
 				</LinearLayout>
 
@@ -654,42 +700,44 @@
 						android:id="@+id/iv_home_section_social_twitter"
 						android:layout_width="wrap_content"
 						android:layout_height="wrap_content"
-						android:layout_margin="10dp"
+						android:layout_margin="5dp"
 						android:adjustViewBounds="true"
 						android:contentDescription="@string/social_twitter"
-						android:maxWidth="50dp"
+						android:maxWidth="60dp"
 						android:src="@drawable/social_twitter" />
 
 					<ImageView
 						android:id="@+id/iv_home_section_social_googleplus"
 						android:layout_width="wrap_content"
 						android:layout_height="wrap_content"
-						android:layout_margin="10dp"
+						android:layout_margin="5dp"
 						android:adjustViewBounds="true"
 						android:contentDescription="@string/social_googleplus"
-						android:maxWidth="50dp"
+						android:maxWidth="60dp"
 						android:src="@drawable/social_googleplus" />
 
 					<ImageView
 						android:id="@+id/iv_home_section_social_youtube"
 						android:layout_width="wrap_content"
 						android:layout_height="wrap_content"
-						android:layout_margin="10dp"
+						android:layout_margin="5dp"
 						android:adjustViewBounds="true"
 						android:contentDescription="@string/social_youtube"
-						android:maxWidth="50dp"
+						android:maxWidth="60dp"
 						android:src="@drawable/social_youtube" />
 
 					<ImageView
 						android:id="@+id/iv_home_section_social_instagram"
 						android:layout_width="wrap_content"
 						android:layout_height="wrap_content"
-						android:layout_margin="10dp"
+						android:layout_margin="5dp"
 						android:adjustViewBounds="true"
 						android:contentDescription="@string/social_instagram"
-						android:maxWidth="50dp"
+						android:maxWidth="60dp"
 						android:src="@drawable/social_instagram" />
+
 				</LinearLayout>
+
 			</LinearLayout>
 
 		</LinearLayout>

+ 15 - 8
app/src/main/res/layout/fragment_layout_lablanca_nofestivals.xml

@@ -5,8 +5,6 @@
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
     android:id="@+id/scrollView3"
-    android:background="@color/background_app"
-    android:padding="7dp"
     tools:ignore="Overdraw">
 
     <LinearLayout
@@ -14,15 +12,23 @@
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:background="@drawable/section"
-        android:padding="7dp">
+        android:layout_margin="10dp">
 
         <TextView
-            android:layout_width="wrap_content"
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:textAppearance="?android:attr/textAppearanceLarge"
             android:text="@string/lablanca_title"
-            android:id="@+id/textView10"
-            android:textStyle="bold"/>
+            android:textAppearance="?android:attr/textAppearanceLarge"
+            android:textStyle="bold"
+            tools:layout_width="match_parent"
+            android:background="@drawable/section_title"
+            android:paddingBottom="4dp"
+            android:paddingEnd="10dp"
+            android:paddingLeft="20dp"
+            android:paddingRight="10dp"
+            android:paddingStart="20dp"
+            android:paddingTop="4dp"
+            android:textColor="@color/section_title"/>
 
         <TextView
             android:layout_width="fill_parent"
@@ -31,7 +37,8 @@
             android:text="@string/lablanca_nofestivals"
             android:id="@+id/textView11"
             android:background="@drawable/entry"
-            android:padding="7dp"/>
+            android:padding="7dp"
+            android:layout_margin="8dp"/>
     </LinearLayout>
 
 

+ 18 - 14
app/src/main/res/layout/fragment_layout_location.xml

@@ -12,19 +12,22 @@
 		android:layout_width="match_parent"
 		android:layout_height="match_parent"
 		android:background="@drawable/section"
-		android:layout_marginTop="2dp"
-		android:layout_marginBottom="4dp"
-		android:paddingTop="5dp">
+		android:layout_margin="10dp">
 
 		<TextView
-			android:layout_width="wrap_content"
+			android:layout_width="match_parent"
 			android:layout_height="wrap_content"
-			android:textAppearance="@android:style/TextAppearance.Large"
 			android:text="@string/menu_location"
-			android:id="@+id/textView2"
+			android:textAppearance="?android:attr/textAppearanceLarge"
 			android:textStyle="bold"
-			android:layout_marginLeft="10dp"
-			android:layout_marginStart="10dp"
+			tools:layout_width="match_parent"
+			android:background="@drawable/section_title"
+			android:paddingBottom="4dp"
+			android:paddingEnd="10dp"
+			android:paddingLeft="20dp"
+			android:paddingRight="10dp"
+			android:paddingStart="20dp"
+			android:paddingTop="4dp"
 			android:textColor="@color/section_title"/>
 
 		<LinearLayout
@@ -32,15 +35,16 @@
 			android:layout_width="match_parent"
 			android:layout_height="match_parent"
 			android:background="@drawable/entry"
-			android:padding="7dp">
+			android:padding="7dp"
+			android:layout_margin="8dp">
 
 			<TextView
-                android:layout_width="fill_parent"
-                android:layout_height="wrap_content"
-                android:textAppearance="@android:style/TextAppearance.Medium"
                 android:text="@string/home_section_location_text_0"
-                android:id="@+id/textView3"
-				/>
+				android:layout_width="wrap_content"
+				android:layout_height="wrap_content"
+				android:textAppearance="?android:attr/textAppearanceMedium"
+				android:textColor="@color/entry_title"
+				android:textStyle="bold"/>
 
 			<TextView
 				android:layout_width="wrap_content"

+ 169 - 146
app/src/main/res/layout/fragment_layout_photo.xml

@@ -2,198 +2,221 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="fill_parent"
-    android:layout_height="wrap_content"
-    android:background="@color/background_app"
-    android:padding="7dp"
-    tools:ignore="Overdraw">
+    android:layout_height="wrap_content">
 
     <LinearLayout
         android:orientation="vertical"
         android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:background="@drawable/section"
-        android:paddingBottom="15dp"
-        android:paddingLeft="7dp"
-        android:paddingTop="7dp"
-        android:paddingRight="7dp">
-
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:textAppearance="?android:attr/textAppearanceLarge"
-            android:id="@+id/tv_photo_title"
-            android:textStyle="bold"/>
+        android:layout_height="fill_parent"
+        android:layout_marginBottom="10dp">
 
         <LinearLayout
             android:orientation="vertical"
             android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:background="@drawable/entry"
-            android:padding="7dp">
-
-            <ImageView
-                android:layout_width="fill_parent"
-                android:layout_height="wrap_content"
-                android:id="@+id/iv_photo"
-                android:contentDescription="@string/app_cdesc"
-                android:padding="2dp"
-                android:background="@color/album_border"
-                android:adjustViewBounds="true"
-                android:src="@drawable/photo_placeholder_preview"/>
-
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:textAppearance="?android:attr/textAppearanceMedium"
-                android:text="Medium Text"
-                android:id="@+id/tv_photo_description"/>
+            android:layout_height="wrap_content"
+            android:background="@drawable/section"
+            android:layout_margin="10dp"
+            tools:ignore="UselessParent">
 
             <TextView
-                android:layout_width="wrap_content"
+                android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:textAppearance="?android:attr/textAppearanceSmall"
-                android:text="Small Text"
-                android:id="@+id/tv_photo_date"
-                android:layout_marginStart="15dp"
-                android:layout_marginBottom="15dp"
-                android:textStyle="italic"/>
+                android:id="@+id/tv_photo_title"
+                android:textAppearance="?android:attr/textAppearanceLarge"
+                android:textStyle="bold"
+                tools:layout_width="match_parent"
+                android:background="@drawable/section_title"
+                android:paddingBottom="4dp"
+                android:paddingEnd="10dp"
+                android:paddingLeft="20dp"
+                android:paddingRight="10dp"
+                android:paddingStart="20dp"
+                android:paddingTop="4dp"
+                android:textColor="@color/section_title"/>
 
             <LinearLayout
-                android:orientation="horizontal"
+                android:orientation="vertical"
                 android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:layout_gravity="center_horizontal"
-                android:gravity="center_horizontal"
-                android:padding="7dp">
+                android:layout_height="wrap_content"
+                android:background="@drawable/entry"
+                android:padding="7dp"
+                android:layout_margin="8dp">
 
-                <Button
-                    android:layout_width="wrap_content"
+                <ImageView
+                    android:layout_width="fill_parent"
                     android:layout_height="wrap_content"
-                    android:text="@string/blog_pager_previous"
-                    android:id="@+id/bt_photo_previous"
-                    android:background="@drawable/button_selector"
-                    android:textStyle="bold"
-                    android:textColor="@color/input_button_color"
-                    android:layout_gravity="center_horizontal"
-                    android:visibility="visible"
-                    android:layout_margin="5dp"
-                    tools:ignore="ButtonStyle"/>
+                    android:id="@+id/iv_photo"
+                    android:contentDescription="@string/app_cdesc"
+                    android:padding="2dp"
+                    android:background="@color/album_border"
+                    android:adjustViewBounds="true"
+                    android:src="@drawable/photo_placeholder_preview"/>
 
-                <Button
+                <TextView
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:text="@string/blog_pager_next"
-                    android:id="@+id/bt_photo_next"
-                    android:background="@drawable/button_selector"
-                    android:textStyle="bold"
-                    android:textColor="@color/input_button_color"
-                    android:layout_gravity="center_horizontal"
-                    android:layout_margin="5dp"
-                    tools:ignore="ButtonStyle"/>
-            </LinearLayout>
-        </LinearLayout>
+                    android:textAppearance="?android:attr/textAppearanceMedium"
+                    android:text="Medium Text"
+                    android:id="@+id/tv_photo_description"/>
 
-        <LinearLayout
-            android:orientation="vertical"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:background="@drawable/entry"
-            android:layout_marginTop="15dp"
-            android:padding="7dp">
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:textAppearance="?android:attr/textAppearanceSmall"
+                    android:text="Small Text"
+                    android:id="@+id/tv_photo_date"
+                    android:layout_marginStart="15dp"
+                    android:layout_marginBottom="15dp"
+                    android:textStyle="italic"/>
 
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="New Text"
-                android:id="@+id/tv_comments"
-                android:textAppearance="@android:style/TextAppearance.Medium" />
+                <LinearLayout
+                    android:orientation="horizontal"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:layout_gravity="center_horizontal"
+                    android:gravity="center_horizontal"
+                    android:padding="7dp">
 
-            <LinearLayout
-                android:orientation="vertical"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:id="@+id/ll_comment_list">
+                    <Button
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="@string/blog_pager_previous"
+                        android:id="@+id/bt_photo_previous"
+                        android:background="@drawable/button_selector"
+                        android:textStyle="bold"
+                        android:textColor="@color/input_button_color"
+                        android:layout_gravity="center_horizontal"
+                        android:visibility="visible"
+                        android:layout_margin="5dp"
+                        tools:ignore="ButtonStyle"/>
 
+                    <Button
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="@string/blog_pager_next"
+                        android:id="@+id/bt_photo_next"
+                        android:background="@drawable/button_selector"
+                        android:textStyle="bold"
+                        android:textColor="@color/input_button_color"
+                        android:layout_gravity="center_horizontal"
+                        android:layout_margin="5dp"
+                        tools:ignore="ButtonStyle"/>
+                </LinearLayout>
             </LinearLayout>
 
-            <LinearLayout
-                android:orientation="vertical"
-                android:layout_width="match_parent"
-                android:layout_height="2dp"
-                android:background="@color/background_separator"
-                android:layout_margin="6dp" />
-
             <LinearLayout
                 android:orientation="vertical"
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
-                android:id="@+id/ll_new_comment"
-                android:layout_marginTop="15dp"
-                android:layout_marginLeft="7dp"
-                android:layout_marginRight="7dp"
-                android:layout_marginBottom="7dp">
+                android:background="@drawable/entry"
+                android:padding="7dp"
+                android:layout_margin="8dp">
 
                 <TextView
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:text="@string/comment_your_comment"
-                    android:textAppearance="@android:style/TextAppearance.Medium" />
+                    android:id="@+id/tv_comments"
+                    android:textAppearance="?android:attr/textAppearanceMedium"
+                    android:textColor="@color/entry_title"
+                    android:textStyle="bold" />
 
-                <EditText
-                    android:layout_width="fill_parent"
-                    android:layout_height="wrap_content"
-                    android:id="@+id/et_comment_text"
-                    android:minLines="2"
-                    android:hint="@string/comment_text"
-                    android:background="@drawable/input"
-                    android:textColor="@color/input_text_color"
-                    android:textColorHint="@color/input_hint_color"
-                    android:gravity="top"
-                    android:layout_margin="4dp"
-                    android:inputType="textCapSentences|textMultiLine"/>
-
-                <EditText
-                    android:layout_width="fill_parent"
-                    android:layout_height="wrap_content"
-                    android:id="@+id/et_comment_name"
-                    android:layout_marginLeft="20dp"
-                    android:layout_marginRight="20dp"
-                    android:hint="@string/comment_name"
-                    android:background="@drawable/input"
-                    android:textColor="@color/input_text_color"
-                    android:textColorHint="@color/input_hint_color"
-                    android:layout_marginTop="5dp"
-                    android:layout_marginBottom="5dp"
-                    android:inputType="textCapWords"/>
+                <LinearLayout
+                    android:orientation="vertical"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:id="@+id/ll_comment_list">
+
+                </LinearLayout>
+
+                <ImageView
+                    android:layout_width="match_parent"
+                    android:layout_height="0.5dp"
+                    android:background="@color/image_border"
+                    android:layout_margin="10dp"
+                    android:layout_marginBottom="1dp"
+                    android:layout_marginEnd="10dp"
+                    android:layout_marginLeft="10dp"
+                    android:layout_marginRight="10dp"
+                    android:layout_marginStart="10dp"
+                    android:layout_marginTop="3dp"
+                    android:alpha="0.5"
+                    android:adjustViewBounds="false"
+                    android:contentDescription="@string/empty"/>
 
                 <LinearLayout
-                    android:orientation="horizontal"
+                    android:orientation="vertical"
                     android:layout_width="match_parent"
                     android:layout_height="match_parent"
-                    android:gravity="center_horizontal"
-                    android:layout_marginBottom="10dp">
+                    android:id="@+id/ll_new_comment"
+                    android:layout_marginTop="15dp"
+                    android:layout_marginLeft="7dp"
+                    android:layout_marginRight="7dp"
+                    android:layout_marginBottom="7dp">
 
-                    <Button
+                    <TextView
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:text="@string/comment_send"
-                        android:id="@+id/bt_comment_send"
-                        android:layout_gravity="center_horizontal"
-                        android:background="@drawable/button_selector"
-                        android:textColor="@color/input_button_color"
-                        android:textStyle="bold"
-                        android:layout_marginTop="5dp"
-                        android:layout_marginBottom="5dp" />
+                        android:text="@string/comment_your_comment"
+                        android:textAppearance="@android:style/TextAppearance.Medium" />
 
-                    <ProgressBar
-                        android:layout_width="wrap_content"
+                    <EditText
+                        android:layout_width="fill_parent"
                         android:layout_height="wrap_content"
-                        android:id="@+id/pb_comment"
-                        android:layout_gravity="center_horizontal"
-                        android:visibility="gone" />
+                        android:id="@+id/et_comment_text"
+                        android:minLines="2"
+                        android:hint="@string/comment_text"
+                        android:background="@drawable/input"
+                        android:textColor="@color/input_text_color"
+                        android:textColorHint="@color/input_hint_color"
+                        android:gravity="top"
+                        android:layout_margin="4dp"
+                        android:inputType="textCapSentences|textMultiLine"/>
+
+                    <EditText
+                        android:layout_width="fill_parent"
+                        android:layout_height="wrap_content"
+                        android:id="@+id/et_comment_name"
+                        android:layout_marginLeft="20dp"
+                        android:layout_marginRight="20dp"
+                        android:hint="@string/comment_name"
+                        android:background="@drawable/input"
+                        android:textColor="@color/input_text_color"
+                        android:textColorHint="@color/input_hint_color"
+                        android:layout_marginTop="5dp"
+                        android:layout_marginBottom="5dp"
+                        android:inputType="textCapWords"/>
+
+                    <LinearLayout
+                        android:orientation="horizontal"
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:gravity="center_horizontal"
+                        android:layout_marginBottom="10dp">
+
+                        <Button
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:text="@string/comment_send"
+                            android:id="@+id/bt_comment_send"
+                            android:layout_gravity="center_horizontal"
+                            android:background="@drawable/button_selector"
+                            android:textColor="@color/input_button_color"
+                            android:textStyle="bold"
+                            android:layout_marginTop="5dp"
+                            android:layout_marginBottom="5dp" />
+
+                        <ProgressBar
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:id="@+id/pb_comment"
+                            android:layout_gravity="center_horizontal"
+                            android:visibility="gone" />
+                    </LinearLayout>
+
                 </LinearLayout>
 
             </LinearLayout>
+
         </LinearLayout>
 
     </LinearLayout>

+ 183 - 147
app/src/main/res/layout/fragment_layout_post.xml

@@ -2,207 +2,243 @@
 <com.ivalentin.margolariak.CustomScrollView
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
-    android:layout_width="fill_parent"
+    android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:background="@color/background_app"
-    android:padding="7dp"
-    tools:ignore="Overdraw">
+    android:background="@color/background_app">
+
+
 
     <LinearLayout
         android:orientation="vertical"
-        android:layout_width="fill_parent"
-        android:layout_height="match_parent"
-        android:background="@drawable/section"
-        android:layout_margin="7dp"
-        android:padding="7dp">
-
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:textAppearance="?android:attr/textAppearanceLarge"
-            android:text="Large Text"
-            android:id="@+id/tv_post_title"
-            android:textStyle="bold"/>
+        android:layout_width="match_parent"
+        android:layout_height="fill_parent"
+        android:layout_marginBottom="10dp">
 
         <LinearLayout
             android:orientation="vertical"
             android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:background="@drawable/entry"
-            android:padding="7dp">
+            android:layout_height="wrap_content"
+            android:background="@drawable/section"
+            android:layout_margin="10dp"
+            tools:ignore="UselessParent">
 
-            <ImageView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:id="@+id/iv_post_0"
-                android:contentDescription="@string/app_cdesc"
-                android:layout_gravity="center_horizontal"
-                android:visibility="gone"
-                android:maxHeight="70dp" />
-
-            <WebView
-                android:layout_width="wrap_content"
+            <TextView
+                android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:id="@+id/wv_post_text" />
+                android:id="@+id/tv_post_title"
+                android:textAppearance="?android:attr/textAppearanceLarge"
+                android:textStyle="bold"
+                tools:layout_width="match_parent"
+                android:background="@drawable/section_title"
+                android:paddingBottom="4dp"
+                android:paddingEnd="10dp"
+                android:paddingLeft="20dp"
+                android:paddingRight="10dp"
+                android:paddingStart="20dp"
+                android:paddingTop="4dp"
+                android:textColor="@color/section_title"/>
 
             <LinearLayout
-                android:orientation="horizontal"
+                android:orientation="vertical"
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
-                android:gravity="center_horizontal"
-                android:layout_gravity="center_horizontal">
+                android:background="@drawable/entry"
+                android:padding="7dp"
+                android:layout_margin="8dp">
 
                 <ImageView
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:id="@+id/iv_post_1"
+                    android:id="@+id/iv_post_0"
                     android:contentDescription="@string/app_cdesc"
-                    android:visibility="gone"
                     android:layout_gravity="center_horizontal"
-                    android:maxHeight="50dp" />
-
-                <ImageView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:id="@+id/iv_post_2"
-                    android:contentDescription="@string/app_cdesc"
                     android:visibility="gone"
-                    android:maxHeight="50dp" />
+                    android:maxHeight="90dp" />
 
-                <ImageView
+                <WebView
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:id="@+id/iv_post_3"
-                    android:contentDescription="@string/app_cdesc"
-                    android:visibility="gone"
-                    android:maxHeight="50dp" />
+                    android:id="@+id/wv_post_text" />
 
-                <ImageView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:id="@+id/iv_post_4"
-                    android:contentDescription="@string/app_cdesc"
-                    android:visibility="gone"
-                    android:maxHeight="50dp" />
-            </LinearLayout>
+                <LinearLayout
+                    android:orientation="horizontal"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:gravity="center_horizontal"
+                    android:layout_gravity="center_horizontal">
 
-            <LinearLayout
-                android:orientation="vertical"
-                android:layout_width="match_parent"
-                android:layout_height="1dp"
-                android:background="@color/background_separator"
-                android:layout_margin="6dp"/>
+                    <ImageView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:id="@+id/iv_post_1"
+                        android:contentDescription="@string/app_cdesc"
+                        android:visibility="gone"
+                        android:layout_gravity="center_horizontal"
+                        android:maxHeight="50dp" />
 
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="New Text"
-                android:id="@+id/tv_post_date"
-                android:layout_gravity="end" />
-        </LinearLayout>
+                    <ImageView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:id="@+id/iv_post_2"
+                        android:contentDescription="@string/app_cdesc"
+                        android:visibility="gone"
+                        android:maxHeight="50dp" />
 
-        <LinearLayout
-            android:orientation="vertical"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:background="@drawable/entry"
-            android:layout_marginTop="15dp"
-            android:padding="7dp">
+                    <ImageView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:id="@+id/iv_post_3"
+                        android:contentDescription="@string/app_cdesc"
+                        android:visibility="gone"
+                        android:maxHeight="50dp" />
 
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="New Text"
-                android:id="@+id/tv_comments"
-                android:textAppearance="@android:style/TextAppearance.Medium" />
+                    <ImageView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:id="@+id/iv_post_4"
+                        android:contentDescription="@string/app_cdesc"
+                        android:visibility="gone"
+                        android:maxHeight="50dp" />
+                </LinearLayout>
 
-            <LinearLayout
-                android:orientation="vertical"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:id="@+id/ll_comment_list">
+                <ImageView
+                    android:layout_width="match_parent"
+                    android:layout_height="0.5dp"
+                    android:background="@color/image_border"
+                    android:layout_margin="10dp"
+                    android:layout_marginBottom="1dp"
+                    android:layout_marginEnd="10dp"
+                    android:layout_marginLeft="10dp"
+                    android:layout_marginRight="10dp"
+                    android:layout_marginStart="10dp"
+                    android:layout_marginTop="3dp"
+                    android:alpha="0.5"
+                    android:adjustViewBounds="false"
+                    android:contentDescription="@string/empty"/>
 
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:id="@+id/tv_post_date"
+                    android:layout_gravity="end" />
             </LinearLayout>
 
-            <LinearLayout
-                android:orientation="vertical"
-                android:layout_width="match_parent"
-                android:layout_height="2dp"
-                android:background="@color/background_separator"
-                android:layout_margin="6dp" />
-
             <LinearLayout
                 android:orientation="vertical"
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
-                android:id="@+id/ll_new_comment"
-                android:layout_marginTop="15dp"
-                android:layout_marginLeft="7dp"
-                android:layout_marginRight="7dp"
-                android:layout_marginBottom="7dp">
+                android:background="@drawable/entry"
+                android:padding="7dp"
+                android:layout_margin="8dp">
 
                 <TextView
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:text="@string/comment_your_comment"
-                    android:id="@+id/textView"
-                    android:textAppearance="@android:style/TextAppearance.Medium" />
+                    android:id="@+id/tv_comments"
+                    android:textAppearance="?android:attr/textAppearanceMedium"
+                    android:textColor="@color/entry_title"
+                    android:textStyle="bold" />
 
-                <EditText
-                    android:layout_width="fill_parent"
-                    android:layout_height="wrap_content"
-                    android:id="@+id/et_comment_text"
-                    android:minLines="2"
-                    android:hint="@string/comment_text"
-                    android:background="@drawable/input"
-                    android:textColor="@color/input_text_color"
-                    android:textColorHint="@color/input_hint_color"
-                    android:gravity="top"
-                    android:layout_margin="4dp"
-                    android:inputType="textCapSentences|textMultiLine"/>
-
-                <EditText
-                    android:layout_width="fill_parent"
-                    android:layout_height="wrap_content"
-                    android:id="@+id/et_comment_name"
-                    android:layout_marginLeft="20dp"
-                    android:layout_marginRight="20dp"
-                    android:hint="@string/comment_name"
-                    android:background="@drawable/input"
-                    android:textColor="@color/input_text_color"
-                    android:textColorHint="@color/input_hint_color"
-                    android:layout_marginTop="5dp"
-                    android:layout_marginBottom="5dp"
-                    android:inputType="textCapSentences"/>
+                <LinearLayout
+                    android:orientation="vertical"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:id="@+id/ll_comment_list">
+
+                </LinearLayout>
+
+                <ImageView
+                    android:layout_width="match_parent"
+                    android:layout_height="0.5dp"
+                    android:background="@color/image_border"
+                    android:layout_margin="10dp"
+                    android:layout_marginBottom="1dp"
+                    android:layout_marginEnd="10dp"
+                    android:layout_marginLeft="10dp"
+                    android:layout_marginRight="10dp"
+                    android:layout_marginStart="10dp"
+                    android:layout_marginTop="3dp"
+                    android:alpha="0.5"
+                    android:adjustViewBounds="false"
+                    android:contentDescription="@string/empty"/>
 
                 <LinearLayout
-                    android:orientation="horizontal"
+                    android:orientation="vertical"
                     android:layout_width="match_parent"
                     android:layout_height="match_parent"
-                    android:gravity="center_horizontal"
-                    android:layout_marginBottom="10dp">
+                    android:id="@+id/ll_new_comment"
+                    android:layout_marginTop="15dp"
+                    android:layout_marginLeft="7dp"
+                    android:layout_marginRight="7dp"
+                    android:layout_marginBottom="7dp">
 
-                    <Button
+                    <TextView
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:text="@string/comment_send"
-                        android:id="@+id/bt_comment_send"
-                        android:layout_gravity="center_horizontal"
-                        android:background="@drawable/button_selector"
-                        android:textColor="@color/input_button_color"
-                        android:textStyle="bold"
-                        android:layout_marginTop="5dp"
-                        android:layout_marginBottom="5dp" />
+                        android:text="@string/comment_your_comment"
+                        android:id="@+id/textView"
+                        android:textAppearance="@android:style/TextAppearance.Medium" />
 
-                    <ProgressBar
-                        android:layout_width="wrap_content"
+                    <EditText
+                        android:layout_width="fill_parent"
                         android:layout_height="wrap_content"
-                        android:id="@+id/pb_comment"
-                        android:layout_gravity="center_horizontal"
-                        android:visibility="gone" />
+                        android:id="@+id/et_comment_text"
+                        android:minLines="2"
+                        android:hint="@string/comment_text"
+                        android:background="@drawable/input"
+                        android:textColor="@color/input_text_color"
+                        android:textColorHint="@color/input_hint_color"
+                        android:gravity="top"
+                        android:layout_margin="4dp"
+                        android:inputType="textCapSentences|textMultiLine"/>
+
+                    <EditText
+                        android:layout_width="fill_parent"
+                        android:layout_height="wrap_content"
+                        android:id="@+id/et_comment_name"
+                        android:layout_marginLeft="20dp"
+                        android:layout_marginRight="20dp"
+                        android:hint="@string/comment_name"
+                        android:background="@drawable/input"
+                        android:textColor="@color/input_text_color"
+                        android:textColorHint="@color/input_hint_color"
+                        android:layout_marginTop="5dp"
+                        android:layout_marginBottom="5dp"
+                        android:inputType="textCapSentences"/>
+
+                    <LinearLayout
+                        android:orientation="horizontal"
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:gravity="center_horizontal"
+                        android:layout_marginBottom="10dp">
+
+                        <Button
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:text="@string/comment_send"
+                            android:id="@+id/bt_comment_send"
+                            android:layout_gravity="center_horizontal"
+                            android:background="@drawable/button_selector"
+                            android:textColor="@color/input_button_color"
+                            android:textStyle="bold"
+                            android:layout_marginTop="5dp"
+                            android:layout_marginBottom="5dp" />
+
+                        <ProgressBar
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:id="@+id/pb_comment"
+                            android:layout_gravity="center_horizontal"
+                            android:visibility="gone" />
+                    </LinearLayout>
+
                 </LinearLayout>
 
             </LinearLayout>
+
         </LinearLayout>
+
     </LinearLayout>
+
 </com.ivalentin.margolariak.CustomScrollView>

+ 53 - 61
app/src/main/res/layout/row_activity_future.xml

@@ -8,85 +8,68 @@
     <TextView
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:textAppearance="?android:attr/textAppearanceLarge"
-        android:id="@+id/tv_row_activity_future_title"
-        />
-
-    <TextView
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:textAppearance="@android:style/TextAppearance.Medium"
-        android:id="@+id/tv_row_activity_future_date"
-        android:textStyle="italic"
-        android:layout_margin="6dp" />
+        android:textAppearance="?android:attr/textAppearanceMedium"
+        android:textColor="@color/entry_title"
+        android:textStyle="bold"
+        android:id="@+id/tv_row_activity_future_title"/>
 
     <LinearLayout
         android:orientation="horizontal"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:gravity="end"
         android:layout_gravity="center_vertical">
 
         <ImageView
-            android:layout_width="fill_parent"
+            android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:id="@+id/iv_row_activity_future"
             android:contentDescription="@string/app_cdesc"
             android:minHeight="30dp"
             android:minWidth="30dp"
             android:layout_gravity="center_vertical"
-            android:layout_weight=".7" />
-
-        <TableLayout
-            android:layout_width="fill_parent"
-            android:layout_height="wrap_content"
-            android:gravity="end"
-            android:stretchColumns="1"
-            android:layout_gravity="center_vertical|end"
-            android:layout_marginEnd="15dp"
-            android:layout_weight=".3">
-
-            <TableRow
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content">
-
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:textAppearance="@android:style/TextAppearance.Medium"
-                    android:text="@string/activity_city"
-                    android:gravity="end"
-                    android:padding="4dp" />
+            android:background="@color/image_border"
+            android:padding="0.5dp"
+            android:layout_margin="3dp"
+            android:adjustViewBounds="true"/>
 
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:textAppearance="@android:style/TextAppearance.Medium"
-                    android:id="@+id/tv_row_activity_future_city"
-                    android:padding="4dp" />
-            </TableRow>
+        <LinearLayout
+            android:orientation="vertical"
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:layout_gravity="center_vertical"
+            android:gravity="center_vertical">
 
-            <TableRow
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content">
+            <TextView
+                android:id="@+id/tv_row_activity_future_date"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:textAppearance="?android:attr/textAppearanceMedium"
+                android:textStyle="italic"
+                android:layout_marginTop="4dp"
+                android:layout_marginStart="8dp"
+                android:layout_marginLeft="8dp" />
 
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:textAppearance="@android:style/TextAppearance.Medium"
-                    android:text="@string/activity_price"
-                    android:gravity="end"
-                    android:padding="4dp" />
+            <TextView
+                android:id="@+id/tv_row_activity_future_city"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:textAppearance="?android:attr/textAppearanceMedium"
+                android:textStyle="italic"
+                android:layout_marginTop="4dp"
+                android:layout_marginStart="8dp"
+                android:layout_marginLeft="8dp" />
 
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:textAppearance="@android:style/TextAppearance.Medium"
-                    android:id="@+id/tv_row_activity_future_price"
-                    android:padding="4dp" />
-            </TableRow>
+            <TextView
+                android:id="@+id/tv_row_activity_future_price"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:textAppearance="?android:attr/textAppearanceMedium"
+                android:textStyle="italic"
+                android:layout_marginTop="4dp"
+                android:layout_marginStart="8dp"
+                android:layout_marginLeft="8dp" />
+        </LinearLayout>
 
-        </TableLayout>
     </LinearLayout>
 
     <TextView
@@ -94,7 +77,16 @@
         android:layout_height="wrap_content"
         android:textAppearance="@android:style/TextAppearance.Medium"
         android:id="@+id/tv_row_activity_future_text"
-        android:layout_margin="7dp" />
+        android:layout_margin="7dp"
+        android:maxLines="6"
+        android:minHeight="30dp"/>
+
+    <ImageView
+        android:layout_width="match_parent"
+        android:layout_weight="1"
+        android:layout_height="40dp"
+        android:layout_marginTop="-40dp"
+        android:background="@drawable/gradient_v_white"/>
 
     <TextView
         android:layout_width="wrap_content"

+ 54 - 37
app/src/main/res/layout/row_activity_past.xml

@@ -1,32 +1,18 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="vertical" android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:background="@drawable/entry"
-    android:padding="4dp">
+              android:orientation="vertical" android:layout_width="match_parent"
+              android:layout_height="wrap_content"
+              android:background="@drawable/entry"
+              android:padding="7dp"
+              android:layout_margin="8dp">
 
-    <LinearLayout
-        android:orientation="vertical"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent">
-
-        <TextView
-            android:layout_width="fill_parent"
-            android:layout_height="wrap_content"
-            android:textAppearance="?android:attr/textAppearanceLarge"
-            android:id="@+id/tv_row_activity_past_title"
-            />
-
-        <TextView
-            android:layout_width="fill_parent"
-            android:layout_height="wrap_content"
-            android:textAppearance="?android:attr/textAppearanceSmall"
-            android:id="@+id/tv_row_activity_past_date"
-            android:gravity="end"
-            android:layout_marginStart="20dp"
-            android:textStyle="italic"
-            />
-    </LinearLayout>
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:textAppearance="?android:attr/textAppearanceMedium"
+        android:textColor="@color/entry_title"
+        android:textStyle="bold"
+        android:id="@+id/tv_row_activity_past_title"/>
 
     <TextView
         android:layout_width="wrap_content"
@@ -40,23 +26,54 @@
         android:layout_height="match_parent">
 
         <ImageView
-            android:layout_width="fill_parent"
+            android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:id="@+id/iv_row_activity_past"
+            android:maxWidth="100dp"
             android:contentDescription="@string/app_cdesc"
-            android:maxWidth="130dp"
-            android:layout_weight=".8"
-            android:layout_margin="3dp"
-            android:layout_gravity="center_vertical"
+            android:minHeight="30dp"
+            android:minWidth="30dp"
+            android:background="@color/image_border"
+            android:padding="0.5dp"
+            android:layout_margin="2dp"
+            android:layout_gravity="top"
+            android:maxHeight="100dp"
             android:adjustViewBounds="true"/>
 
-        <TextView
-            android:layout_width="fill_parent"
+        <LinearLayout
+            android:orientation="vertical"
+            android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:id="@+id/tv_row_activity_past_text"
-            android:layout_weight=".2"
-            android:textAppearance="@android:style/TextAppearance.Medium"
-            android:layout_margin="5dp" />
+            android:layout_gravity="top">
+
+            <TextView
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:textAppearance="?android:attr/textAppearanceSmall"
+                android:id="@+id/tv_row_activity_past_date"
+                android:layout_marginStart="10dp"
+                android:textStyle="italic"
+                android:layout_marginLeft="10dp"
+                android:layout_marginTop="10dp"/>
+
+            <TextView
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:id="@+id/tv_row_activity_past_text"
+                android:textAppearance="?android:attr/textAppearanceMedium"
+                android:layout_margin="5dp"
+                android:maxLines="4"
+                android:minHeight="30dp"/>
+
+            <ImageView
+                android:layout_width="match_parent"
+                android:layout_weight="1"
+                android:layout_height="40dp"
+                android:layout_marginTop="-40dp"
+                android:background="@drawable/gradient_v_white"/>
+
+        </LinearLayout>
+
     </LinearLayout>
 
 </LinearLayout>

+ 25 - 14
app/src/main/res/layout/row_album.xml

@@ -13,15 +13,19 @@
         android:layout_height="wrap_content"
         android:layout_weight=".5"
         android:background="@drawable/entry"
-        android:layout_margin="5dp"
-        android:padding="5dp"
-        android:id="@+id/ll_row_album_left">
+        android:padding="7dp"
+        android:id="@+id/ll_row_album_left"
+        android:layout_marginBottom="8dp"
+        android:layout_marginEnd="8dp"
+        android:layout_marginLeft="0dp"
+        android:layout_marginRight="8dp"
+        android:layout_marginStart="0dp"
+        android:layout_marginTop="8dp">
 
         <TextView
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:textAppearance="?android:attr/textAppearanceMedium"
-            android:text="Medium Text"
             android:id="@+id/tv_row_album_hidden_left"
             android:visibility="gone" />
 
@@ -40,6 +44,8 @@
             android:layout_width="fill_parent"
             android:layout_height="wrap_content"
             android:textAppearance="?android:attr/textAppearanceMedium"
+            android:textColor="@color/entry_title"
+            android:textStyle="bold"
             android:id="@+id/tv_row_album_title_left"
             android:gravity="center_horizontal" />
 
@@ -59,10 +65,10 @@
                 android:layout_gravity="center_vertical" />
 
             <ImageView
-                android:layout_width="15dp"
-                android:layout_height="15dp"
+                android:layout_width="11dp"
+                android:layout_height="11dp"
                 android:src="@drawable/comment"
-                android:contentDescription="@string/app_cdesc"
+                android:contentDescription="@string/empty"
                 android:layout_marginStart="5dp"
                 android:layout_gravity="center_vertical" />
         </LinearLayout>
@@ -75,16 +81,20 @@
         android:layout_height="wrap_content"
         android:layout_weight=".5"
         android:background="@drawable/entry"
-        android:layout_margin="5dp"
-        android:padding="5dp"
+        android:padding="7dp"
         android:id="@+id/ll_row_album_right"
+        android:layout_marginBottom="8dp"
+        android:layout_marginEnd="8dp"
+        android:layout_marginLeft="0dp"
+        android:layout_marginRight="8dp"
+        android:layout_marginStart="0dp"
+        android:layout_marginTop="8dp"
         android:visibility="invisible">
 
         <TextView
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:textAppearance="?android:attr/textAppearanceMedium"
-            android:text="Medium Text"
             android:id="@+id/tv_row_album_hidden_right"
             android:visibility="gone" />
 
@@ -103,7 +113,8 @@
             android:layout_width="fill_parent"
             android:layout_height="wrap_content"
             android:textAppearance="?android:attr/textAppearanceMedium"
-            android:text="Medium Text"
+            android:textColor="@color/entry_title"
+            android:textStyle="bold"
             android:id="@+id/tv_row_album_title_right"
             android:gravity="center_horizontal" />
 
@@ -124,10 +135,10 @@
                 android:layout_gravity="center_vertical" />
 
             <ImageView
-                android:layout_width="15dp"
-                android:layout_height="15dp"
+                android:layout_width="11dp"
+                android:layout_height="11dp"
                 android:src="@drawable/comment"
-                android:contentDescription="@string/app_cdesc"
+                android:contentDescription="@string/empty"
                 android:layout_marginStart="5dp"
                 android:layout_gravity="center_vertical" />
         </LinearLayout>

+ 54 - 19
app/src/main/res/layout/row_blog.xml

@@ -1,22 +1,25 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
     android:orientation="vertical"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:background="@drawable/entry"
-    android:padding="4dp">
+    android:padding="7dp"
+    android:layout_margin="8dp">
 
     <TextView
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:textAppearance="?android:attr/textAppearanceLarge"
+        android:textAppearance="?android:attr/textAppearanceMedium"
+        android:textColor="@color/entry_title"
+        android:textStyle="bold"
         android:id="@+id/tv_row_blog_title" />
 
     <TextView
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:text="New Text"
         android:id="@+id/tv_row_blog_hidden"
         android:visibility="gone" />
 
@@ -26,31 +29,63 @@
         android:layout_height="match_parent">
 
         <ImageView
-            android:layout_width="fill_parent"
+            android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:id="@+id/iv_row_blog_image"
-            android:maxWidth="130dp"
+            android:maxWidth="110dp"
             android:contentDescription="@string/app_cdesc"
-            android:layout_weight=".8"
+            android:minHeight="30dp"
+            android:minWidth="30dp"
+            android:layout_gravity="top|center_vertical"
+            android:background="@color/image_border"
+            android:padding="0.5dp"
             android:layout_margin="3dp"
-            android:layout_gravity="center_vertical"
-            android:adjustViewBounds="true"/>
+            android:adjustViewBounds="true"
+            android:maxHeight="100dp"/>
 
-        <TextView
-            android:layout_width="fill_parent"
+        <LinearLayout
+            android:orientation="vertical"
+            android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:id="@+id/tv_row_blog_text"
-            android:layout_weight=".2"
-            android:textAppearance="@android:style/TextAppearance.Medium"
-            android:layout_margin="5dp" />
+            android:layout_gravity="top">
+
+            <TextView
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:id="@+id/tv_row_blog_text"
+                android:textAppearance="@android:style/TextAppearance.Medium"
+                android:layout_margin="5dp"
+                android:maxLines="4"
+                android:minHeight="30dp"/>
+
+            <ImageView
+                android:layout_width="match_parent"
+                android:layout_weight="1"
+                android:layout_height="40dp"
+                android:layout_marginTop="-40dp"
+                android:background="@drawable/gradient_v_white"
+                android:adjustViewBounds="true"
+                android:contentDescription="@string/empty"
+                tools:ignore="InefficientWeight"/>
+
+        </LinearLayout>
+
     </LinearLayout>
 
-    <LinearLayout
-        android:orientation="vertical"
+    <ImageView
         android:layout_width="match_parent"
-        android:layout_height="2dp"
-        android:background="@color/background_separator"
-        android:layout_margin="10dp"/>
+        android:layout_height="0.5dp"
+        android:background="@color/image_border"
+        android:layout_margin="10dp"
+        android:layout_marginBottom="1dp"
+        android:layout_marginEnd="10dp"
+        android:layout_marginLeft="10dp"
+        android:layout_marginRight="10dp"
+        android:layout_marginStart="10dp"
+        android:layout_marginTop="3dp"
+        android:alpha="0.5"
+        android:adjustViewBounds="false"
+        android:contentDescription="@string/empty"/>
 
     <LinearLayout
         android:orientation="horizontal"

+ 48 - 36
app/src/main/res/layout/row_gallery.xml

@@ -1,17 +1,25 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="vertical" android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:background="@drawable/entry"
-    android:padding="7dp">
+              android:orientation="vertical" android:layout_width="match_parent"
+              android:layout_height="wrap_content"
+              android:background="@drawable/entry"
+              android:padding="7dp"
+              android:layout_margin="8dp">
+
+    <TextView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:textAppearance="?android:attr/textAppearanceMedium"
+        android:textColor="@color/entry_title"
+        android:textStyle="bold"
+        android:id="@+id/tv_row_gallery_title" />
 
     <RelativeLayout
         android:layout_width="wrap_content"
-        android:layout_height="match_parent"
+        android:layout_height="wrap_content"
         android:layout_gravity="center"
-        android:padding="15dp"
-        android:background="@drawable/album"
-        android:layout_margin="15dp">
+        android:layout_margin="0dp"
+        android:layout_marginBottom="10dp">
 
         <ImageView
             android:contentDescription="@string/app_cdesc"
@@ -23,14 +31,18 @@
             android:layout_alignParentLeft="false"
             android:layout_alignParentRight="false"
             android:layout_alignParentBottom="false"
-            android:layout_marginEnd="90dp"
-            android:layout_marginBottom="90dp"
-            android:padding="1dp"
+            android:layout_marginEnd="110dp"
+            android:layout_marginBottom="110dp"
+            android:padding="2dp"
             android:layout_alignParentEnd="false"
             android:layout_alignParentStart="false"
             android:maxHeight="180dp"
             android:src="@drawable/photo_placeholder_thumb"
-            android:adjustViewBounds="true"/>
+            android:adjustViewBounds="true"
+            android:layout_marginTop="20dp"
+            android:layout_marginStart="20dp"
+            android:layout_marginRight="20dp"
+            android:layout_marginLeft="20dp"/>
 
         <ImageView
             android:contentDescription="@string/app_cdesc"
@@ -42,15 +54,17 @@
             android:layout_alignParentLeft="false"
             android:layout_alignParentEnd="false"
             android:layout_alignParentBottom="false"
-            android:layout_marginEnd="60dp"
-            android:layout_marginBottom="60dp"
-            android:layout_marginStart="30dp"
-            android:layout_marginTop="30dp"
-            android:padding="1dp"
+            android:layout_marginEnd="80dp"
+            android:layout_marginBottom="80dp"
+            android:layout_marginStart="50dp"
+            android:layout_marginTop="50dp"
+            android:padding="2dp"
             android:layout_alignParentStart="false"
             android:maxHeight="180dp"
             android:src="@drawable/photo_placeholder_thumb"
-            android:adjustViewBounds="true"/>
+            android:adjustViewBounds="true"
+            android:layout_marginLeft="20dp"
+            android:layout_marginRight="20dp"/>
 
         <ImageView
             android:contentDescription="@string/app_cdesc"
@@ -62,15 +76,17 @@
             android:layout_alignParentLeft="false"
             android:layout_alignParentEnd="false"
             android:layout_alignParentBottom="false"
-            android:layout_marginStart="60dp"
-            android:layout_marginTop="60dp"
-            android:padding="1dp"
+            android:layout_marginStart="80dp"
+            android:layout_marginTop="80dp"
+            android:padding="2dp"
             android:layout_alignParentStart="false"
             android:maxHeight="180dp"
-            android:layout_marginEnd="30dp"
-            android:layout_marginBottom="30dp"
+            android:layout_marginEnd="50dp"
+            android:layout_marginBottom="50dp"
             android:src="@drawable/photo_placeholder_thumb"
-            android:adjustViewBounds="true"/>
+            android:adjustViewBounds="true"
+            android:layout_marginLeft="20dp"
+            android:layout_marginRight="20dp"/>
 
         <ImageView
             android:contentDescription="@string/app_cdesc"
@@ -82,23 +98,19 @@
             android:layout_alignParentLeft="false"
             android:layout_alignParentEnd="false"
             android:layout_alignParentBottom="false"
-            android:layout_marginStart="90dp"
-            android:layout_marginTop="90dp"
-            android:padding="1dp"
+            android:layout_marginStart="110dp"
+            android:layout_marginTop="110dp"
+            android:padding="2dp"
             android:layout_alignParentStart="false"
             android:maxHeight="180dp"
             android:src="@drawable/photo_placeholder_thumb"
-            android:adjustViewBounds="true"/>
+            android:adjustViewBounds="true"
+            android:layout_marginBottom="20dp"
+            android:layout_marginEnd="20dp"
+            android:layout_marginLeft="20dp"
+            android:layout_marginRight="20dp"/>
     </RelativeLayout>
 
-    <TextView
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:textAppearance="@android:style/TextAppearance.Large"
-        android:id="@+id/tv_row_gallery_title"
-        android:layout_marginTop="15dp"
-        android:layout_gravity="center_horizontal" />
-
     <TextView
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"

+ 60 - 35
app/src/main/res/layout/row_home_activities.xml

@@ -1,24 +1,20 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
     android:orientation="vertical" android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:background="@drawable/entry"
-    android:padding="4dp">
+    android:padding="7dp"
+    android:layout_margin="8dp">
 
     <TextView
-        android:layout_width="wrap_content"
+        android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:textAppearance="?android:attr/textAppearanceLarge"
+        android:textAppearance="?android:attr/textAppearanceMedium"
+        android:textColor="@color/entry_title"
+        android:textStyle="bold"
         android:id="@+id/tv_row_home_activity_title" />
 
-    <TextView
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:textAppearance="?android:attr/textAppearanceSmall"
-        android:id="@+id/tv_row_home_activity_date"
-        android:gravity="end"
-        android:textStyle="italic" />
-
     <TextView
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
@@ -39,35 +35,64 @@
             android:maxWidth="130dp"
             android:layout_weight=".8"
             android:layout_margin="3dp"
-            android:layout_gravity="center_vertical"
-            android:adjustViewBounds="true"/>
+            android:layout_gravity="top"
+            android:adjustViewBounds="true"
+            android:background="@color/image_border"
+            android:padding="0.5dp"/>
 
-        <TextView
-            android:layout_width="fill_parent"
+        <LinearLayout
+            android:orientation="vertical"
             android:layout_height="wrap_content"
-            android:id="@+id/tv_row_home_activity_text"
             android:layout_weight=".2"
-            android:textAppearance="@android:style/TextAppearance.Medium"
-            android:layout_margin="5dp" />
-    </LinearLayout>
+            android:layout_width="match_parent"
+            android:layout_gravity="top">
 
-    <LinearLayout
-        android:orientation="horizontal"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent" >
+            <TextView
+                android:id="@+id/tv_row_home_activity_date"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textAppearance="?android:attr/textAppearanceSmall"
+                android:textStyle="italic"
+                android:layout_marginTop="4dp"
+                android:layout_marginStart="8dp"
+                android:layout_marginLeft="8dp"/>
 
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:textAppearance="?android:attr/textAppearanceSmall"
-            android:id="@+id/tv_row_home_activity_city" />
+            <TextView
+                android:id="@+id/tv_row_home_activity_city"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textAppearance="?android:attr/textAppearanceSmall"
+                android:textStyle="italic"
+                android:layout_marginTop="4dp"
+                android:layout_marginStart="8dp"
+                android:layout_marginLeft="8dp"/>
+
+            <TextView
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                android:id="@+id/tv_row_home_activity_text"
+                android:textAppearance="@android:style/TextAppearance.Medium"
+                android:layout_margin="5dp"
+                android:maxLines="4"
+                android:minHeight="30dp"/>
+
+            <ImageView
+                android:layout_width="match_parent"
+                android:layout_weight="1"
+                android:layout_height="40dp"
+                android:layout_marginTop="-40dp"
+                android:background="@drawable/gradient_v_white"/>
+
+            <TextView
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:textAppearance="?android:attr/textAppearanceSmall"
+                android:id="@+id/tv_row_home_activity_price"
+                android:layout_weight="1"
+                android:layout_marginLeft="35dp"
+                android:layout_marginStart="35dp"/>
+        </LinearLayout>
 
-        <TextView
-            android:layout_width="fill_parent"
-            android:layout_height="wrap_content"
-            android:textAppearance="?android:attr/textAppearanceSmall"
-            android:id="@+id/tv_row_home_activity_price"
-            android:gravity="end" />
     </LinearLayout>
 
 </LinearLayout>

+ 44 - 21
app/src/main/res/layout/row_home_blog.xml

@@ -1,30 +1,22 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="vertical" android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:background="@drawable/entry"
-    android:padding="4dp">
+              android:orientation="vertical" android:layout_width="match_parent"
+              android:layout_height="wrap_content"
+              android:background="@drawable/entry"
+              android:padding="7dp"
+              android:layout_margin="8dp">
 
     <TextView
+        android:id="@+id/tv_row_home_blog_title"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:textAppearance="?android:attr/textAppearanceMedium"
-        android:id="@+id/tv_row_home_blog_title"
         android:textColor="@color/entry_title"
         android:textStyle="bold"/>
 
-    <TextView
-        android:layout_width="match_parent"
-        android:layout_height="0dp"
-        android:textAppearance="?android:attr/textAppearanceSmall"
-        android:id="@+id/tv_row_home_blog_date"
-        android:layout_weight=".5"
-        android:textStyle="italic"/>
-
     <TextView
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:text="New Text"
         android:id="@+id/tv_row_home_blog_hidden"
         android:visibility="gone" />
 
@@ -41,16 +33,47 @@
             android:maxWidth="130dp"
             android:layout_weight=".7"
             android:layout_margin="3dp"
-            android:layout_gravity="center_vertical"
-            android:adjustViewBounds="true"/>
+            android:adjustViewBounds="true"
+            android:padding="0.5dp"
+            android:background="@color/image_border"
+            android:layout_gravity="top"/>
 
-        <TextView
-            android:layout_width="fill_parent"
+        <LinearLayout
+            android:orientation="vertical"
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:id="@+id/tv_row_home_blog_text"
             android:layout_weight=".3"
-            android:textAppearance="@android:style/TextAppearance.Medium"
-            android:layout_margin="5dp" />
+            android:layout_gravity="top">
+
+            <TextView
+                android:layout_width="match_parent"
+                android:layout_height="0dp"
+                android:textAppearance="?android:attr/textAppearanceSmall"
+                android:id="@+id/tv_row_home_blog_date"
+                android:layout_weight=".3"
+                android:textStyle="italic"
+                android:layout_marginTop="4dp"
+                android:layout_marginStart="8dp"
+                android:layout_marginLeft="8dp"/>
+
+            <TextView
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:id="@+id/tv_row_home_blog_text"
+                android:layout_weight=".3"
+                android:textAppearance="@android:style/TextAppearance.Medium"
+                android:layout_margin="5dp"
+                android:maxLines="4"/>
+
+            <ImageView
+                android:layout_width="match_parent"
+                android:layout_weight="1"
+                android:layout_height="40dp"
+                android:layout_marginTop="-40dp"
+                android:background="@drawable/gradient_v_white"/>
+
+        </LinearLayout>
+
     </LinearLayout>
 
 </LinearLayout>

+ 2 - 3
app/src/main/res/layout/row_home_schedule.xml

@@ -4,9 +4,8 @@
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
     android:orientation="vertical"
-    android:paddingStart="15dp"
-    android:paddingEnd="15dp"
-    android:paddingTop="5dp">
+    android:layout_margin="8dp"
+    android:padding="7dp">
 
     <TextView
         android:id="@+id/tv_row_home_schedule_id"

+ 17 - 16
app/src/main/res/values-en/strings.xml

@@ -164,21 +164,22 @@
 	<string name="pop_menu_about">About us</string>
 	<string name="pop_menu_settings">Settings</string>
 	<string name="pop_menu_sponsors">-</string>
-	<string name="preferences">-</string>
-	<string name="preferences_info">-</string>
-	<string name="preferences_info_feedback">-</string>
-	<string name="preferences_info_feedback_summary">-</string>
-	<string name="preferences_info_source">-</string>
-	<string name="preferences_info_source_summary">-</string>
-	<string name="preferences_info_version">-</string>
-	<string name="preferences_sync">-</string>
-	<string name="preferences_sync_notifications">-</string>
-	<string name="preferences_sync_usage">-</string>
-	<string name="preferences_sync_sync_on">-</string>
-	<string name="preferences_sync_sync_off">-</string>
-	<string name="preferences_sync_sync">-</string>
-	<string name="preferences_sync_notifications_on">-</string>
-	<string name="preferences_sync_notifications_off">-</string>
-	<string name="preferences_sync_notifications_disabled">-</string>
+	<string name="preferences">Preferences</string>
+	<string name="preferences_info">Information</string>
+	<string name="preferences_info_feedback">Feedback</string>
+	<string name="preferences_info_feedback_summary">Send anonymous feedback to the developer</string>
+	<string name="preferences_info_source">Source code</string>
+	<string name="preferences_info_source_summary">Checkout source code on Github</string>
+	<string name="preferences_info_version">App version</string>
+	<string name="preferences_sync">Sync</string>
+	<string name="preferences_sync_notifications">Notifications</string>
+	<string name="preferences_sync_usage">Background data usage</string>
+	<string name="preferences_sync_sync_on">Background sync is enabled</string>
+	<string name="preferences_sync_notifications_on">Notifications will be received</string>
+	<string name="preferences_sync_notifications_off">Notifications will not be received</string>
+	<string name="preferences_sync_notifications_disabled">Enable background sync to enable notifications</string>
+	<string name="preferences_sync_sync">Background Sync</string>
+	<string name="preferences_sync_sync_off">Background sync is disabled</string>
+	<string name="changelog">Changelog</string>
 
 </resources>

+ 18 - 17
app/src/main/res/values-eu-rES/strings.xml

@@ -167,23 +167,24 @@
 	<string name="settings_notification_on">Recibir notificaciones</string>
 	<string name="home_section_location_text_calculating">Calculando distancia…</string>
 	<string name="pop_menu_about">About us</string>
-	<string name="pop_menu_settings">Settings</string>
+	<string name="pop_menu_settings">Ajustes</string>
 	<string name="pop_menu_sponsors">-</string>
-	<string name="preferences">-</string>
-	<string name="preferences_info">-</string>
-	<string name="preferences_info_feedback">-</string>
-	<string name="preferences_info_feedback_summary">-</string>
-	<string name="preferences_info_source">-</string>
-	<string name="preferences_info_source_summary">-</string>
-	<string name="preferences_info_version">-</string>
-	<string name="preferences_sync">-</string>
-	<string name="preferences_sync_notifications">-</string>
-	<string name="preferences_sync_notifications_disabled">-</string>
-	<string name="preferences_sync_notifications_off">-</string>
-	<string name="preferences_sync_notifications_on">-</string>
-	<string name="preferences_sync_sync">-</string>
-	<string name="preferences_sync_sync_off">-</string>
-	<string name="preferences_sync_sync_on">--</string>
-	<string name="preferences_sync_usage">-</string>
+	<string name="preferences_info">Informazioa</string>
+	<string name="preferences_info_feedback_summary">Send anonymous feedback to the developer</string>
+	<string name="preferences_info_source">Codigo fuente</string>
+	<string name="preferences_info_source_summary">Ojear el código fuente en Github</string>
+	<string name="preferences_info_version">Versión de la aplicación</string>
+	<string name="preferences_sync">Sincronización</string>
+	<string name="preferences_sync_notifications">Notificaciones</string>
+	<string name="preferences_sync_notifications_disabled">Activa la sincronización en segundo plano para recibir notificaciones</string>
+	<string name="preferences_sync_notifications_off">No se recibirán notificaciones</string>
+	<string name="preferences_sync_notifications_on">Se recibirán notificaciones</string>
+	<string name="preferences_sync_sync_on">Sincronización activada</string>
+	<string name="preferences_sync_usage">Uso de datos</string>
+	<string name="preferences">Preferences</string>
+	<string name="preferences_info_feedback">Feedback</string>
+	<string name="preferences_sync_sync">Sincronización en segundo plano</string>
+	<string name="preferences_sync_sync_off">Sincronización desactivada</string>
+	<string name="changelog">Changelog</string>
 
 </resources>

+ 10 - 0
app/src/main/res/values-v21/styles.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+    <style name="Theme.AppBaseTheme" parent="android:Theme.Material.Light">
+        <item name="android:colorPrimary">@color/background_menu</item>
+        <item name="android:colorPrimaryDark">@color/background_menu</item>
+        <item name="android:colorAccent">@color/background_menu</item>
+        <item name="android:colorBackground">@color/background_app</item>
+    </style>
+</resources>

+ 12 - 8
app/src/main/res/values/color.xml

@@ -3,18 +3,22 @@
 
     <!-- Backgrounds for several sections -->
     
-    <color name="background_app">#e4f4fd</color>
-    <color name="background_menu">#4c9ed8</color>
+    <color name="background_app">#b5d3e5</color>
+    <color name="background_menu">#0078ff</color>
     <color name="background_notification">#000000</color>
     <color name="background_separator">#000000</color>
 
 
-    <color name="section_background">#d9ecf9</color>
-    <color name="section_border">#badde1</color>
-    <color name="section_title">#07383e</color>
+    <color name="section_background">#98c8ff</color>
+    <color name="section_border">#000011</color>
+    <color name="section_title">#ffffff</color>
+    <color name="section_title_background">#0078ff</color>
     <color name="entry_background">#ffffff</color>
-    <color name="entry_border">#d8f3f5</color>
-    <color name="entry_title">#41786e</color>
+    <color name="entry_border">#6D6990</color>
+    <color name="entry_title">#275573</color>
+
+    <!--Color for the border of the image-->
+    <color name="image_border">#292690</color>
     
     <!--Color for the menu entries-->
     <color name="menu_entry">#ffffff</color>
@@ -23,7 +27,7 @@
 
     <color name="background_bar">#9bc1da</color>
     <color name="background_bar_gradient">#bdf8fd</color>
-    <color name="menu_selected">#456075</color>
+    <color name="menu_selected">#ccccff</color>
 
     <!--Color for input fields-->
     <color name="input_background">#223344</color>

+ 17 - 15
app/src/main/res/values/strings.xml

@@ -185,26 +185,28 @@
 	<string name="pop_menu_sponsors">Sponsors</string>
 
 	<!--Preferences screen-->
-	<string name="preferences">Preferences</string>
-	<string name="preferences_sync">Sync</string>
-	<string name="preferences_sync_sync">Background Sync</string>
-	<string name="preferences_sync_sync_on">Background sync is enabled</string>
-	<string name="preferences_sync_sync_off">Background sync is disabled</string>
-	<string name="preferences_sync_notifications">Notifications</string>
-	<string name="preferences_sync_notifications_on">Notifications will be received</string>
-	<string name="preferences_sync_notifications_off">Notifications will not be received</string>
-	<string name="preferences_sync_notifications_disabled">Enable background sync to enable notifications</string>
-	<string name="preferences_sync_usage">Background data usage</string>
-	<string name="preferences_info">Information</string>
-	<string name="preferences_info_version">App version</string>
-	<string name="preferences_info_source">Source code</string>
-	<string name="preferences_info_source_summary">Checkout source code on Github</string>
+	<string name="preferences">Preferencias</string>
+	<string name="preferences_sync">Sincronización</string>
+	<string name="preferences_sync_sync">Sincronización en segundo plano</string>
+	<string name="preferences_sync_sync_on">Sincronización activada</string>
+	<string name="preferences_sync_sync_off">Sincronización desactivada</string>
+	<string name="preferences_sync_notifications">Notificaciones</string>
+	<string name="preferences_sync_notifications_on">Se recibirán notificaciones</string>
+	<string name="preferences_sync_notifications_off">No se recibirán notificaciones</string>
+	<string name="preferences_sync_notifications_disabled">Activa la sincronización en segundo plano para recibir notificaciones</string>
+	<string name="preferences_sync_usage">Uso de datos</string>
+	<string name="preferences_info">Informacion</string>
+	<string name="preferences_info_version">Versión de la aplicación</string>
+	<string name="preferences_info_source_summary">Ojear el código fuente en Github</string>
 	<string name="preferences_info_feedback">Feedback</string>
-	<string name="preferences_info_feedback_summary">Send anonymous feedback to the developer</string>
+	<string name="preferences_info_feedback_summary">Enviar información anónima al desarrollador</string>
 
 	<string name="eur" translatable="false">€</string>
 	<string name="Kb" translatable="false"> Kb</string>
 	<string name="Mb" translatable="false"> Mb</string>
 	<string name="pop_menu_about">Sobre nosotros</string>
+	<string name="preferences_info_source">Código fuente</string>
+	<string name="changelog">Changelog</string>
+	<string name="empty" translatable="false"></string>
 
 </resources>

+ 7 - 0
app/src/main/res/values/styles.xml

@@ -16,6 +16,13 @@
     <style name="AppTheme" parent="AppBaseTheme">
         <!-- All customizations that are NOT specific to a particular API-level can go here. -->
         <item name="android:textColorPrimary">#333333</item>
+        <item name="android:windowBackground">@color/background_menu</item>
+        <item name="android:colorBackground">@color/background_app</item>
+
+        <item name="colorPrimary">@color/background_menu</item>
+        <item name="colorPrimaryDark">@color/background_menu</item>
+        <item name="colorAccent">@color/background_menu</item>
+
     </style>
     
     <style name="Theme.Default" parent="Theme.AppCompat.Light"></style>

+ 0 - 4
app/src/main/res/xml/preferences.xml

@@ -12,10 +12,6 @@
             android:title="@string/preferences_sync_notifications"
             android:summary="@string/preferences_sync_notifications_on"
             android:defaultValue="true" />
-        <Preference
-            android:key="preference_key_data"
-            android:title="@string/preferences_sync_usage"
-            android:summary="0 kb" />
 
     </PreferenceCategory>
 

+ 1 - 1
build.gradle

@@ -4,7 +4,7 @@ buildscript {
         jcenter()
     }
     dependencies {
-        classpath 'com.android.tools.build:gradle:2.2.1'
+        classpath 'com.android.tools.build:gradle:2.2.2'
     }
 }
 

+ 317 - 290
build/intermediates/dex-cache/cache.xml

@@ -2,526 +2,553 @@
 <items version="2" >
 
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-base/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.android.support/support-v4/24.0.0/jars/libs/internal_impl-24.0.0.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="af7582c6b327449c6d32518e6a10307860b7b5d6">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.android.gms-play-services-base-9.6.1_7ac195096f4e0ada520db3c53d8ae9864e1c8ba2.jar" />
+        sha1="fcaf463e10e69c1923ccf1edeba3b4196d239e00">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/internal_impl-24.0.0_1f5abb0d2e89b98d6d33de46b87c13626eb7935b/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.firebase/firebase-iid/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.firebase/firebase-auth-module/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="1e14ebe1cda8491f152083e752ca5bf73cd37bff">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.firebase-firebase-iid-9.6.1_403ea5a61be49e21332f3462c234008ca60f6336.jar" />
+        sha1="3f8f779a22cbb4c4d0759467a4f1011bb5252970">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.firebase-firebase-auth-module-9.8.0_026ec631482474d9a78a3613caf910156cf35d07/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.firebase/firebase-storage-common/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.android.support/mediarouter-v7/24.0.0/jars/libs/internal_impl-24.0.0.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="159494eb362396d073d8c922b77e40c0da5fc5bc">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.firebase-firebase-storage-common-9.6.1_48af8689644cd6ecb17fc824c2419f055cba7102.jar" />
+        sha1="b6763651ec29b4c95e7bbe63fc393ffcc8c4c2c5">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/internal_impl-24.0.0_1055fe1af038c6ce63de654dd954a4d039099a24/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.firebase/firebase-config/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/24.0.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="cf2c4e6607c77b0e671dc5ca252c5ea0d9c1ce0d">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.firebase-firebase-config-9.6.1_db8ba77b89d7aa440ac0686170139e28f09de65e.jar" />
+        sha1="0874286cc2fd88d54fdf130e9d5372730da6de97">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.android.support-appcompat-v7-24.0.0_7fef7b8e9a4b533406d389142608cd7b149350fe/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-cast/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-gass/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="a136366045678579300d161de97c2211c4c4f7a0">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.android.gms-play-services-cast-9.6.1_e6cebcfd61f8db0e1de857ed62e76f8cc4074fbf.jar" />
+        sha1="363a20f1d25336e827dd24020f2ecdc42d62638f">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.android.gms-play-services-gass-9.8.0_136935441bc2374d3e6fef0991c3f67f6c063a3c/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-iid/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-wallet/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="0dfc12e4aacf514346ea866560c99807d032bc48">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.android.gms-play-services-iid-9.6.1_7014a27f57ed36da6bde443bc509f94d66ac5992.jar" />
+        sha1="910c013c511f752c4bbe24c5f492f669f4a3ccc0">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.android.gms-play-services-wallet-9.8.0_33918df18de852ff9c11022eafe5c929c4d66667/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-safetynet/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-instantapps/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="c828add497d2b7a3de7c047bf72050cd4b7521a1">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.android.gms-play-services-safetynet-9.6.1_4678d98ae5dccc9db0ffa35bc61cb0e5973b2165.jar" />
+        sha1="00d358528c5a8731a6e19bca910cbb3fd755ee31">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.android.gms-play-services-instantapps-9.8.0_fc1c185b5952d0d2037bd5bd14e9a98d5d2d7a80/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-gass/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.android.support/support-vector-drawable/24.0.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="ee61ace5f3e488fc610e1c67693c49186a441f32">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.android.gms-play-services-gass-9.6.1_896c4af60e1d386beaddc6f5875a8ade673aa21e.jar" />
+        sha1="3bd97cfefd783e9de1dd1c30574a6adb44b4409b">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.android.support-support-vector-drawable-24.0.0_779af4c59b4d7b1c1469457bd8bfdd61d69f6f97/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.firebase/firebase-common/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-tagmanager-api/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="1ef72e72bc0d05602c366582afa9439f58bb31d6">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.firebase-firebase-common-9.6.1_1ee9d93b6a5bef16c77f067d004083613ebe5687.jar" />
+        sha1="266570862e5792ef3c51143a8b8593cf54fac68d">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.android.gms-play-services-tagmanager-api-9.8.0_0781074c70dff3dd41ee18703578e2c477c4a0b4/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-basement/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.firebase/firebase-storage/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="eccaaa9ffa6bb4bfbd2e870f01aaf69655d353be">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.android.gms-play-services-basement-9.6.1_3b563553288b9611099ebf3986f0aa6217a54dd2.jar" />
+        sha1="7fd91ec2730fdaa82906aad32a3f3d3e574bae56">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.firebase-firebase-storage-9.8.0_aa88eadb0e5cad3cd10296be35cb1e8736af8077/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-drive/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.firebase/firebase-messaging/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="f8db47be01cbe8cfa81e9cecce5ff1371ed1ad95">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.android.gms-play-services-drive-9.6.1_439b5527f332d0fde03f43ed22ef4715c0997ebf.jar" />
+        sha1="5ffe8867f51cfc726e9fb21db1e5b6962ebf25a0">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.firebase-firebase-messaging-9.8.0_57e03b5b76fc3707d229b8b7b92b694594cb050c/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-identity/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-wearable/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="518adc52081d41724932b41bc132e4d50a352b86">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.android.gms-play-services-identity-9.6.1_8dd6e8ed2658f860e3443c0a2cc4c83ba83d7f8a.jar" />
+        sha1="0b8e087da59c0b062c33f49a335e59f907086da2">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.android.gms-play-services-wearable-9.8.0_035236780241321148d8689380c1e2002010820f/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-cast-framework/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-basement/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="9c0cf3d4f9d7d076f301e110b92e18ae23da12c2">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.android.gms-play-services-cast-framework-9.6.1_e3b8b0d2f2f44a2811f6ff98a35fe11a83e590d2.jar" />
+        sha1="9f6d236bac26d02b410e4ee186ba517ace5ee661">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.android.gms-play-services-basement-9.8.0_3bccf6bcc9662d6e3f4ace5094096aaed494ae00/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.android.support/mediarouter-v7/24.0.0/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.firebase/firebase-iid/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="b327fbe2fad414bc38cf0ce8f7efe1a38f572837">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.android.support-mediarouter-v7-24.0.0_37111cf3f37cb25b45cafcbf20b7d59ebc35f8b4.jar" />
+        sha1="6b6f292b8b951dcf2ecf2b20853e3eabc7d65c48">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.firebase-firebase-iid-9.8.0_85b28521c4d103b0aa554598bc525fd9b4f3facd/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-fitness/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.firebase/firebase-common/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="a76a6983a23788b3689524d4bed763955afbd306">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.android.gms-play-services-fitness-9.6.1_94a53ea85de76064035a935ef964dffc16dc8411.jar" />
+        sha1="c61641e333fa88da21758bab8cc28ee16604b05f">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.firebase-firebase-common-9.8.0_d79ae3ff232f7acc69aebbc63aaaa88ad3883237/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-awareness/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.android.support/support-v4/24.0.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="90be14317e3f26d18438e8dbf8544500d1dfe07f">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.android.gms-play-services-awareness-9.6.1_13b3809e1cbc9236685716ab1101442909c4a61b.jar" />
+        sha1="2f7e6e2dad1bccaf68a8820820adc6c0d5b96d37">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.android.support-support-v4-24.0.0_2405e5abb42e00b89ce6df7f5c072345c0402549/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-plus/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-appinvite/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="8ebae43cd06058e99e08c8b4d305b72f2b9927c6">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.android.gms-play-services-plus-9.6.1_74efde925ed72f28ae8a6c63e854c6f453803ba2.jar" />
+        sha1="e56f31b23ddb067f95f01255295167db7c798612">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.android.gms-play-services-appinvite-9.8.0_db1641e5bc566dd01e9f1987d238565ff5dfba79/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-nearby/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-base/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="f6aa7c76cbaa867e05dbad0afab1ef0e65c4e55f">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.android.gms-play-services-nearby-9.6.1_3ab37a921fabd80c6d6d8d25526c87e9cecacffb.jar" />
+        sha1="7e92aadd0697922316d1395c1887a23aebec640a">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.android.gms-play-services-base-9.8.0_93124110ade0eca1bc1f90b1bd46a89f834744b4/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-vision/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-appindexing/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="0cae6511c5705869cacf199f8abb0ea84cd10157">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.android.gms-play-services-vision-9.6.1_7046c35ff7fab1822f646ca381c7c432487957ce.jar" />
+        sha1="e3234cd25e23069abd48ecd2117bc0e8011bf45a">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.android.gms-play-services-appindexing-9.8.0_8388d6b91d0a8a7d86a3a815169d825571470938/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/24.0.0/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-places/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="e70f608219ed6b974644c333249ab2bb7b71de98">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.android.support-animated-vector-drawable-24.0.0_0432bfa53eb43dda18ef4e2a2522d2908732ec51.jar" />
+        sha1="679251204de40ace98776a6f4e3a649c27e3d89f">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.android.gms-play-services-places-9.8.0_2b6ccaba062c06153d4172e13d7f697acff114d5/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-instantapps/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-cast/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="babb25794a7599069d34705038744c5760a9a88c">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.android.gms-play-services-instantapps-9.6.1_502472f88bac34da85fdaac903a4792fd6880b0c.jar" />
+        sha1="74ac7cbcf0de4a88e59612dc3a9e3f9e71acb4ca">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.android.gms-play-services-cast-9.8.0_7a5b206f5c8b69748f976abda3113164a226084f/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-ads-lite/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-iid/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="6ff796a3173787afe2e712f3aec6f5b99796118e">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.android.gms-play-services-ads-lite-9.6.1_8ac9236c48c6caefc7f159eadfb1127b136cefaf.jar" />
+        sha1="85299bf1924dde0200109a58033c5ef84ecb6991">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.android.gms-play-services-iid-9.8.0_a26961d68877f0fe7bc2dc682d45ec69c41e2e1a/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-clearcut/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-cast-framework/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="ee0ccb43f6ab276191b7f2d77c305fa9beb26db9">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.android.gms-play-services-clearcut-9.6.1_150290d780b3cbce95dff4c78f1ef8ad67452090.jar" />
+        sha1="055eed08c9cff50cac0db69c74c4d9ff7aef3d84">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.android.gms-play-services-cast-framework-9.8.0_e38928212d681428077eafcc1c4630117185f64b/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.firebase/firebase-auth/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-nearby/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="2a18547ea91d258866d132c2a763185f15b01b25">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.firebase-firebase-auth-9.6.1_b65a93693af9823e5d71520a6b5252c45e96537c.jar" />
+        sha1="c81df6bd515398ebe45089b0b16c55752a131f6a">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.android.gms-play-services-nearby-9.8.0_f93f25e4b32bddd155d384a9aa998e314032c7a7/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-places/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.firebase/firebase-database-connection/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="cdddf21e0a8205e9955661061d1735ed10e44a7b">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.android.gms-play-services-places-9.6.1_ae576b6d11930d9721dce2ad8c83a0665d9b2bfd.jar" />
+        sha1="5f47ede9561595584dca71104baa0fecb36dda87">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.firebase-firebase-database-connection-9.8.0_6172862b79dc258844ca29a43ce22407e8641a10/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.firebase/firebase-crash/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-analytics-impl/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="4df40545c9b875855f3dd9d4928e5d07f07c20ba">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.firebase-firebase-crash-9.6.1_30cc233294b5b71e088083f80812d190a960a390.jar" />
+        sha1="50e35ae101a679c4c8ef3dda075b1df9d5d947d9">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.android.gms-play-services-analytics-impl-9.8.0_a0984f87512b8c86bf04266016f62f0a71027fd1/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-ads/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/incremental-runtime-classes/debug/instant-run.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="47bbb3ec4b31ba71e125241c090dabe70cbb4de7">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.android.gms-play-services-ads-9.6.1_cb8fcbdf4447e783b359533368a55cff32d7fcf4.jar" />
+        sha1="6cf346e253708b5f7644233a177549c90b526951">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/instant-run_15a1d2a9f707c04a32b2e59a05f11d5d24fd3ce9/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-auth-base/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.android.support/multidex/1.0.1/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="465f40f840e583f8b7421a3aacf3fbf08c28f00a">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.android.gms-play-services-auth-base-9.6.1_7c13c2c00b4257fd63f3da661fa647661d12adf5.jar" />
+        sha1="78ea232052df889856dcb7b7b542707c89bb3bfb">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.android.support-multidex-1.0.1_acbdadd08a79c83848e4c5c45cf39c3c1e5068a6/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-auth/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.firebase/firebase-database/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="da3f763afd39da1c947d9442847c837e9182a09f">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.android.gms-play-services-auth-9.6.1_7b0956e5298c0704efcdce87ed69e78870b69577.jar" />
+        sha1="03df48d3713661d66ad024b1e406259a4c26fcac">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.firebase-firebase-database-9.8.0_0e49b07e90ce06f18619b27c049b66b27573b528/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-analytics/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-location/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="526f4b02f1771fa7607ff1b89fe2e9bd0344fee8">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.android.gms-play-services-analytics-9.6.1_7a7d4736db50f805b1dff41d472dae36c85fa415.jar" />
+        sha1="04bbbddf868aa02dd33f9e90d8f5d908c360f638">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.android.gms-play-services-location-9.8.0_09556db1e4fa2f91ac1b8a666e4b482e7f0ea35d/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-appinvite/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.firebase/firebase-auth-common/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="0e0e0681c26a1f575d3e4c542182dd59bab75fd6">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.android.gms-play-services-appinvite-9.6.1_44fde3350ae98e4b6b4e01b9a98c6ebd08618756.jar" />
+        sha1="4438b1a7848a7c571122ba618aa1304514aabee6">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.firebase-firebase-auth-common-9.8.0_991a8566aff547b010754b1e30f5c65297e013bf/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/24.0.0/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-ads/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="0874286cc2fd88d54fdf130e9d5372730da6de97">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.android.support-appcompat-v7-24.0.0_fffe2f4e617ed3b8b602d243b14e5bfddbc035fe.jar" />
+        sha1="f2d240dd085626f03f759c41d628a0c8b63e491f">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.android.gms-play-services-ads-9.8.0_f0e3f40d925b978bae5086f1b688ad465c13974f/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-gcm/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.firebase/firebase-config/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="ad7706f8bb4a985656a8d2142f74021c8b0e03d8">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.android.gms-play-services-gcm-9.6.1_0cd90341675e204663d8aded708c25b798e726cd.jar" />
+        sha1="289cad663c288ce965463cb9ece8b35cc7de0fac">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.firebase-firebase-config-9.8.0_80b37e37c27d00f8c0f312a883ad116bed31d32c/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.android.support/mediarouter-v7/24.0.0/jars/libs/internal_impl-24.0.0.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-auth-base/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="b6763651ec29b4c95e7bbe63fc393ffcc8c4c2c5">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/internal_impl-24.0.0_9e4eec54accb1025979d2d84a5828ba0a5fa0f7e.jar" />
+        sha1="a1ed98e01bd58976d80c062fd0ea2968a1ff68a1">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.android.gms-play-services-auth-base-9.8.0_e51c86e62ac06fb61d2ea8b66ac2cea4810c0450/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-tagmanager-api/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/incremental-classes/debug/instant-run-bootstrap.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="f0e96478ca3147bc588aadb9ae467d85b42473cc">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.android.gms-play-services-tagmanager-api-9.6.1_3a3f426ee25c2910c6847e28a26e06c92b412979.jar" />
+        sha1="e028955d7c7107d32dcd97784324a384650182b5">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/instant-run-bootstrap_1f8d3b9c93240d0d1885dad81b19dab9322da9fd/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.android.support/palette-v7/24.0.0/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-vision/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="734e80dffea7bd76c18ae256822a124c30d85850">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.android.support-palette-v7-24.0.0_1eb42a962599c03e9301e4593d9d3e0752764a5e.jar" />
+        sha1="a30aea7df545072ad3c06f56b2efc13e67222140">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.android.gms-play-services-vision-9.8.0_e9d270e53ca3748e41bbc3b49095af940d1be322/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.android.support/support-v4/24.0.0/jars/libs/internal_impl-24.0.0.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.firebase/firebase-analytics-impl/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="fcaf463e10e69c1923ccf1edeba3b4196d239e00">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/internal_impl-24.0.0_0bfa3fe36cec8d9b2d7905ab662ceeb5a4a0e58a.jar" />
+        sha1="190a642ba16d1421296a4d794606279b80039c59">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.firebase-firebase-analytics-impl-9.8.0_9310018f448c90b6176e92e47f467e6e0b652572/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-games/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.firebase/firebase-crash/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="d45c048bb1c55cf963899190e507065aea8e5be9">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.android.gms-play-services-games-9.6.1_7187e617d56a281306570d28a8f3f1fc56d3bceb.jar" />
+        sha1="b4671be3d1288bf4e5f527cd33e42909fbe4ecc6">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.firebase-firebase-crash-9.8.0_4d3e16bde72e1f0b90cb4c701e690ec7810d598a/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-analytics-impl/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-analytics/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="a53ac0560ab915a02c50d2e5c7b003381e6fb5e3">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.android.gms-play-services-analytics-impl-9.6.1_0bf634eb6b12cfc69346189837582a52fcd9a023.jar" />
+        sha1="16afe57c1d7f8165d107c7806ce7b0c71de87159">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.android.gms-play-services-analytics-9.8.0_304497a55aa685d6d7fe616fc4685f1da9ece2d4/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.firebase/firebase-auth-module/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-safetynet/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="6ffe8b28ab61e5ee92ab9431a220379790c71ddf">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.firebase-firebase-auth-module-9.6.1_77dbaa8ee2121c4b96ecf141481f5174812c95b1.jar" />
+        sha1="20a3c4e355150c15c13dd58045d43ad0c717d916">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.android.gms-play-services-safetynet-9.8.0_b6a3be890d92e2bceb9c239098aa4e5ded9a2fde/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.firebase/firebase-analytics/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-auth/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="a1c351dc10b92d638da57f3a6513f87cfbdc9f83">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.firebase-firebase-analytics-9.6.1_23e650ce0aab172a687385979e89845d745beb83.jar" />
+        sha1="ca851be26ff89f5b32cc222cee98139fb3fac830">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.android.gms-play-services-auth-9.8.0_d9ee32f042317823baa9e464f78570f0ddaedbe5/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Programs/Android/android-sdk-linux/extras/android/m2repository/com/android/support/support-annotations/24.0.0/support-annotations-24.0.0.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/24.0.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="2943c74db6d4346ab8c6531adac91fa05c137c40">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/support-annotations-24.0.0_a307c3e70da68a9f44492c93047893d0b55d1b75.jar" />
+        sha1="e70f608219ed6b974644c333249ab2bb7b71de98">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.android.support-animated-vector-drawable-24.0.0_025bebee508480f87c4e017fd682ee9c2d5e2648/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-appindexing/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.firebase/firebase-analytics/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="cc39b4bcc9e7062891db90d5a752fa9e4986f447">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.android.gms-play-services-appindexing-9.6.1_598e839e48d8dd58401117fe429593be893f77b9.jar" />
+        sha1="9ff04cc3470178a44512624036751a803418c2ca">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.firebase-firebase-analytics-9.8.0_38d0e9b02eb98f963d5ddc03aacb914cac779b19/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.firebase/firebase-database/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-drive/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="b75ecdd04a37d31b4a0da2729fc5c558962a529b">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.firebase-firebase-database-9.6.1_d0ea3856c392787d15aac4247ee2e2ba824b6feb.jar" />
+        sha1="0b53c4b90654b67ee3892a8e2e7b819c083ab7a6">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.android.gms-play-services-drive-9.8.0_a39dd64fc73178a7fbf9b4e7af36127cdb5b41a2/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.firebase/firebase-storage/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-fitness/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="8c6ef5bd4072f8cda2b89d8356ea7d8acd0683aa">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.firebase-firebase-storage-9.6.1_130d84515be5e8380c6231d1accd13b45ca98716.jar" />
+        sha1="a7a04d6b7c01e569a285fa627cf64f5b05295906">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.android.gms-play-services-fitness-9.8.0_4e390e594e082fcc57db950dfa56f0d1219a805f/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.firebase/firebase-database-connection/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-maps/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="ac8365c87591065db07f7bac8551504504832cd4">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.firebase-firebase-database-connection-9.6.1_8dfb11044e39d6aeeee7f957383e98ef73f294b4.jar" />
+        sha1="122ec9237acd8a57d974b9d529987f1ee6ca5aea">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.android.gms-play-services-maps-9.8.0_3f533d8d2a31d2095f5a226af82b4a5049032ed1/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-tagmanager/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-games/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="1810ae0df0a1b9b539ce97df54e96f2bf8f5ff94">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.android.gms-play-services-tagmanager-9.6.1_4ebb81133a0d5b4b538b68858350108b02f5f790.jar" />
+        sha1="fbb3885c40e431cd2b0dc69c0cab2bf6d5da7b43">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.android.gms-play-services-games-9.8.0_1cfe6955cc90c06bd807299d0e42e6d3dbed1420/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-panorama/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-tagmanager/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="ff9be0a1e75a21c372735930d8987a55b5e6065f">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.android.gms-play-services-panorama-9.6.1_edbce62deb7f068efdf61b8b2fb432bfd6340029.jar" />
+        sha1="a972970c8beddb69c198f61f3fc55f0606a7dfe3">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.android.gms-play-services-tagmanager-9.8.0_d3cb228a84cb7e2023a7cda3d65bf9dffb738436/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.android.support/support-v4/24.0.0/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-ads-lite/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="2f7e6e2dad1bccaf68a8820820adc6c0d5b96d37">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.android.support-support-v4-24.0.0_82200ff615466707c1068dc2de15d0e06b5f7532.jar" />
+        sha1="e9b2cfdfd59b03643f1e240668275378b96615a8">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.android.gms-play-services-ads-lite-9.8.0_2d1a8abbfd58330e7ee0598533be3a1c14f91b08/classes.dex" />
+    </item>
+    <item
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-identity/9.8.0/jars/classes.jar"
+        jumboMode="true"
+        optimize="true"
+        revision="23.0.3"
+        sha1="cef85cfc7df40e29fbea58844dd4c1e7d0b15542">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.android.gms-play-services-identity-9.8.0_92e692dac73502fa44dfbf2111ddcb440f910699/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.firebase/firebase-messaging/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-panorama/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="80dd8bea08bc5fe10b10a3243b8279c856ccc690">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.firebase-firebase-messaging-9.6.1_ca9035fcae6e09c2bc3167ed7844256ed56f010c.jar" />
+        sha1="2d3035050a075484cbf2e33f1ce1f779bae4d451">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.android.gms-play-services-panorama-9.8.0_443e11effa260c78dd048572e74481584197c280/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-wearable/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.firebase/firebase-auth/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="c4394d46152165cd3256fb711ac94f66a28fbae1">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.android.gms-play-services-wearable-9.6.1_032dcfc4a8f685fde6ebb96ace6ff7e6aefad27f.jar" />
+        sha1="15e59454416c6341bd3ed2533b585cd340682dd1">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.firebase-firebase-auth-9.8.0_bf70c5f6c5d03920f28655523113af69e0bf55bf/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.firebase/firebase-auth-common/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Programs/Android/sdk/extras/android/m2repository/com/android/support/support-annotations/24.0.0/support-annotations-24.0.0.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="77558e74bb2056ef38516296f13a27c4c4fc3e5c">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.firebase-firebase-auth-common-9.6.1_eeb25c700a88f601d9a935cdc3c0d9a2ea2720b4.jar" />
+        sha1="2943c74db6d4346ab8c6531adac91fa05c137c40">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/support-annotations-24.0.0_a204ee22575048a5757e016bb09883c73ef9d2fe/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-location/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-clearcut/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="79f521967ad7f49b34748db89df02852c2b2f87b">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.android.gms-play-services-location-9.6.1_4dd398850bcc58da034d2a7115aef034f34715ee.jar" />
+        sha1="ee5304fd374e0b4ebf6b42d4037fbfb2c5336511">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.android.gms-play-services-clearcut-9.8.0_23e57e78b70f65b627689c14c5a1a7943651614c/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.android.support/support-vector-drawable/24.0.0/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-awareness/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="3bd97cfefd783e9de1dd1c30574a6adb44b4409b">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.android.support-support-vector-drawable-24.0.0_30a210962b76daf110f6c248d758ff76af36c91f.jar" />
+        sha1="a2537b11ae24b42172d34e2a613fc0b903c56158">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.android.gms-play-services-awareness-9.8.0_d033a8aa306a43878a1a01b805c4c7ff651a163c/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-tasks/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.firebase/firebase-storage-common/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="4a36600281a648769411ef642c331851732bf29e">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.android.gms-play-services-tasks-9.6.1_e5da4cbad7106508e70f48ab1c58b1bd89f9d339.jar" />
+        sha1="ec9104b53aee77dfcfd2fe1c4add23ff7c4df55f">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.firebase-firebase-storage-common-9.8.0_eadb09fec83faf92d2a3962402bbcaddadd1837b/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-maps/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.android.support/mediarouter-v7/24.0.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="62ff84124b89177abc0c27f3e38c9732f2d41617">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.android.gms-play-services-maps-9.6.1_7d3d201dd83655f1e56d50051050b9fc7499d5e7.jar" />
+        sha1="b327fbe2fad414bc38cf0ce8f7efe1a38f572837">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.android.support-mediarouter-v7-24.0.0_706b31c0a28b18bdf2132ccc7939541728a94cb9/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-wallet/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-gcm/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="dfcba20b85ef3669a8ced0a8760a6df281cbd7c7">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.android.gms-play-services-wallet-9.6.1_e14df77cbd735d7b7b5220855532ace3c5be2c47.jar" />
+        sha1="9dae58326f6f6a515022468cce56dd04ec3b9fdb">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.android.gms-play-services-gcm-9.8.0_8a83d84cd4e99ced12f131366186881e3994205a/classes.dex" />
     </item>
     <item
-        is-multidex="false"
-        jar="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/exploded-aar/com.google.firebase/firebase-analytics-impl/9.6.1/jars/classes.jar"
-        jumboMode="false"
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-tasks/9.8.0/jars/classes.jar"
+        jumboMode="true"
         optimize="true"
         revision="23.0.3"
-        sha1="0efd1b44f47c134fb245914a1d54a55adbfc2f8d">
-        <dex dex="/home/seavenois/Workspace/Programming/GM_APP/app/build/intermediates/pre-dexed/debug/com.google.firebase-firebase-analytics-impl-9.6.1_53934db2b49616a01755c1a794694d08424aa1a4.jar" />
+        sha1="bf2e1838e4428616c1aa26edf43de72b5b99bf84">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.android.gms-play-services-tasks-9.8.0_043faf11c6abe645354a5c73a74a8605204b1261/classes.dex" />
+    </item>
+    <item
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-plus/9.8.0/jars/classes.jar"
+        jumboMode="true"
+        optimize="true"
+        revision="23.0.3"
+        sha1="3daa7a9c9009fd386872a84c177a76979bdcafd6">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.google.android.gms-play-services-plus-9.8.0_9d0fe6ff89528de9139499cc0e7c80783e4b1df2/classes.dex" />
+    </item>
+    <item
+        is-multidex="true"
+        jar="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/exploded-aar/com.android.support/palette-v7/24.0.0/jars/classes.jar"
+        jumboMode="true"
+        optimize="true"
+        revision="23.0.3"
+        sha1="734e80dffea7bd76c18ae256822a124c30d85850">
+        <dex dex="/home/seavenois/Workspace/GasteizkoMargolariakApp/app/build/intermediates/transforms/dex/debug/folders/1000/10/com.android.support-palette-v7-24.0.0_36f3b0263787295c8ddece1cb24ad54877f5ca2f/classes.dex" />
     </item>
 
 </items>

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно