Browse Source

Merge branch 'master' into Reorder_GM

seavenois 9 years ago
parent
commit
46e3d19bcc

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

@@ -106,9 +106,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);
 
@@ -202,9 +199,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);
 

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

@@ -52,7 +52,7 @@ public class AlbumLayout extends Fragment {
         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, name_" + lang + " AS name, description_" + lang + " AS description FROM album WHERE id = " + id + ";", null);
+        cursor = db.rawQuery("SELECT id, title_" + lang + " AS title, description_" + lang + " AS description FROM album WHERE id = " + id + ";", null);
         cursor.moveToFirst();
 
         //Set album elements
@@ -95,7 +95,7 @@ public class AlbumLayout extends Fragment {
 
             //Set title
             TextView tvTitleLeft = (TextView) entry.findViewById(R.id.tv_row_album_title_left);
-			if (imageCursor.getString(1).length() > 0) {
+			if (imageCursor.getString(1) != null && imageCursor.getString(1).length() > 0) {
 				tvTitleLeft.setText(imageCursor.getString(1));
 			}
 			else{
@@ -167,7 +167,7 @@ public class AlbumLayout extends Fragment {
 
                 //Set title
                 TextView tvTitleRight = (TextView) entry.findViewById(R.id.tv_row_album_title_right);
-				if (imageCursor.getString(1).length() > 0) {
+				if (imageCursor.getString(1) != null && imageCursor.getString(1).length() > 0) {
 					tvTitleRight.setText(imageCursor.getString(1));
 				}
 				else{

+ 11 - 2
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.
@@ -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);
 
@@ -127,6 +130,12 @@ public class GalleryLayout extends Fragment{
                     fpath.mkdirs();
                     new DownloadImage(GM.API.SERVER + "/img/galeria/miniature/" + image, this.getActivity().getFilesDir().toString() + "/img/galeria/miniature/" + image, preview[i], GM.IMG.MINIATURE).execute();
                 }
+
+                //Rotate the image
+                r = new Random();
+                int rot = r.nextInt(31) - 15;
+                preview[i].setRotation(rot);
+
                 i ++;
             }
 

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

@@ -15,7 +15,9 @@ 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;
@@ -44,7 +46,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
  */
@@ -661,7 +663,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

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

@@ -172,7 +172,7 @@ public class PhotoLayout extends Fragment {
 		LinearLayout llCommentList = (LinearLayout) v.findViewById(R.id.ll_comment_list);
 
 		//Set fields
-		if (cursor.getString(2).length() > 0) {
+		if (cursor.getString(2) != null && cursor.getString(2).length() > 0) {
 			tvTitle.setVisibility(View.VISIBLE);
 			tvTitle.setText(cursor.getString(2));
 			((MainActivity) getActivity()).setSectionTitle(cursor.getString(2));
@@ -182,7 +182,7 @@ public class PhotoLayout extends Fragment {
 			((MainActivity) getActivity()).setSectionTitle(albumName);
 		}
 
-		if (cursor.getString(3).length() > 0) {
+		if (cursor.getString(3) != null && cursor.getString(3).length() > 0) {
 			tvDescription.setVisibility(View.VISIBLE);
 			tvDescription.setText(cursor.getString(3));
 		}

+ 1 - 0
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");
 	}

+ 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>

+ 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: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 - 24
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,27 +15,35 @@
         <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"
@@ -48,26 +53,44 @@
                 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>

+ 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>

+ 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>
 
 

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

@@ -8,85 +8,67 @@
     <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"/>
 
-                <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 +76,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"

+ 55 - 39
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,53 @@
         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:adjustViewBounds="true"/>
-
-        <TextView
-            android:layout_width="fill_parent"
+            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"/>
+
+        <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>

+ 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"

+ 15 - 15
app/src/main/res/layout/row_home_activities.xml

@@ -1,10 +1,11 @@
 <?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:layout_margin="8dp">
+<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:layout_margin="8dp">
 
     <TextView
         android:layout_width="match_parent"
@@ -47,34 +48,33 @@
             android:layout_gravity="top">
 
             <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:id="@+id/tv_row_home_activity_date"
-                android:gravity="end"
                 android:textStyle="italic"
-                android:layout_weight="1"
                 android:layout_marginTop="4dp"
                 android:layout_marginStart="8dp"
                 android:layout_marginLeft="8dp"/>
 
             <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:id="@+id/tv_row_home_activity_city"
-                android:layout_weight="1"
-                android:layout_marginLeft="8dp"
-                android:layout_marginStart="8dp"/>
+                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:layout_weight="1"
                 android:textAppearance="@android:style/TextAppearance.Medium"
                 android:layout_margin="5dp"
-                android:maxLines="4"/>
+                android:maxLines="4"
+                android:minHeight="30dp"/>
 
             <ImageView
                 android:layout_width="match_parent"