Просмотр исходного кода

Improvements in location section. Several adaptations for small screens. Fixed portrait mode. UI improvements.

seavenois 10 лет назад
Родитель
Сommit
4b55da3eee

+ 4 - 2
app/src/main/AndroidManifest.xml

@@ -2,8 +2,8 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
           xmlns:tools="http://schemas.android.com/tools"
           package="com.ivalentin.margolariak"
-    android:versionCode="14"
-    android:versionName="2.0-RC3" >
+    android:versionCode="15"
+    android:versionName="2.0.1" >
 
     <uses-permission android:name="android.permission.INTERNET" />
     <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
@@ -43,6 +43,8 @@
             android:name="com.ivalentin.margolariak.MainActivity"
             android:theme="@style/Theme.NoTitle"
             android:windowSoftInputMode="stateHidden|adjustResize"
+            android:configChanges="orientation"
+            android:screenOrientation="portrait"
             android:label="@string/app_name">
             
             <intent-filter>

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

@@ -141,13 +141,17 @@ public class AlarmReceiver extends BroadcastReceiver {
 			lon = o.substring(o.indexOf("<lon>") + 5, o.indexOf("</lon>"));
 			result = true;
 		}
+
+		SharedPreferences.Editor editor = settings.edit();
 		if (result){
-			SharedPreferences.Editor editor = settings.edit();
 	    	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()));
-	    	editor.apply();
 		}
+		else{
+			editor.putString(GM.PREF_GM_LOCATION, GM.DEFAULT_PREF_GM_LOCATION);
+		}
+		editor.apply();
 
 		//Perform a background sync
 		new Sync(context).execute();

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

@@ -206,6 +206,11 @@ final class GM {
 	 */
 	static final String PREF_GM_LOCATION = "gmlocationtime";
 
+	/**
+	 * Name of the preference to store GM last location timestamp.
+	 */
+	static final String DEFAULT_PREF_GM_LOCATION = "19700101000000";
+
 	/**
 	 * Name of the database
 	 */
@@ -282,13 +287,14 @@ final class GM {
 			Calendar calendar = Calendar.getInstance();
 			calendar.setTime(date);
 			int dayNumber = calendar.get(Calendar.DAY_OF_WEEK);
+			int day = calendar.get(Calendar.DAY_OF_MONTH);
 			int monthNumber = calendar.get(Calendar.MONTH);
 
 			switch (lang){
 				case "es":
 					dayName = dayNameEs[dayNumber];
 					monthName = monthNameEs[monthNumber];
-					output = dayName + ", " + dayNumber + " de " + monthName + " de " + year;
+					output = dayName + ", " + day + " de " + monthName + " de " + year;
 					if (includeTime){
 						output = output + " a las " + time;
 					}
@@ -296,7 +302,7 @@ final class GM {
 				case "eu":
 					dayName = dayNameEu[dayNumber];
 					monthName = monthNameEu[monthNumber];
-					output = year + "ko" + monthName + " " + dayNumber + "an, " + dayName;
+					output = year + "ko" + monthName + " " + day + "an, " + dayName;
 					if (includeTime){
 						output = output + " " + time + "etan";
 					}
@@ -304,7 +310,7 @@ final class GM {
 				default:
 					dayName = dayNameEn[dayNumber];
 					monthName = monthNameEn[monthNumber];
-					output = dayName + ", " + monthName + " " + dayNumber + ", " + year;
+					output = dayName + ", " + monthName + " " + day + ", " + year;
 					if (includeTime){
 						output = output + " " + time;
 					}

+ 24 - 13
app/src/main/java/com/ivalentin/margolariak/HomeLayout.java

@@ -27,6 +27,7 @@ import android.app.FragmentManager;
 import android.app.FragmentTransaction;
 import android.support.v4.app.ActivityCompat;
 import android.text.Html;
+import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.MotionEvent;
 import android.view.View;
@@ -491,18 +492,23 @@ public class HomeLayout extends Fragment implements LocationListener {
 	 */
 	private boolean setUpLocation(Location location, View view) {
 		SharedPreferences preferences = view.getContext().getSharedPreferences(GM.PREF, Context.MODE_PRIVATE);
-		if (preferences.getString(GM.PREF_GM_LOCATION, "").length() > 0) {
-			Double lat = Double.longBitsToDouble(preferences.getLong(GM.PREF_GM_LATITUDE, 0));
-			Double lon = Double.longBitsToDouble(preferences.getLong(GM.PREF_GM_LONGITUDE, 0));
-			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) {
-				distance = 1000 * distance;
-				text.setText(String.format(getString(R.string.home_section_location_text_short), distance.intValue(), (int) (0.012 * distance.intValue())));
-			} else {
-				text.setText(String.format(getString(R.string.home_section_location_text_long), String.format(Locale.US, "%.02f", distance)));
+		if (preferences.getString(GM.PREF_GM_LOCATION, GM.DEFAULT_PREF_GM_LOCATION).equals(GM.DEFAULT_PREF_GM_LOCATION) == false) {
+			try {
+				Double lat = Double.longBitsToDouble(preferences.getLong(GM.PREF_GM_LATITUDE, 0));
+				Double lon = Double.longBitsToDouble(preferences.getLong(GM.PREF_GM_LONGITUDE, 0));
+				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) {
+					distance = 1000 * distance;
+					text.setText(String.format(getString(R.string.home_section_location_text_short), distance.intValue(), (int) (0.012 * distance.intValue())));
+				} 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());
 			}
-			return true;
 
 		}
 		return false;
@@ -1068,8 +1074,13 @@ public class HomeLayout extends Fragment implements LocationListener {
 	@Override
 	public void onDestroy() {
 		//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);
+		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);
+			}
+		}
+		catch (Exception ex){
+			Log.e("Location manager", "Unable to stop location manager on destroy: " + ex.toString());
 		}
 		super.onDestroy();
 	}

+ 25 - 8
app/src/main/java/com/ivalentin/margolariak/LocationLayout.java

@@ -1,5 +1,3 @@
-//TODO: Rework this file
-
 package com.ivalentin.margolariak;
 
 import java.util.Locale;
@@ -29,8 +27,6 @@ import android.view.View;
 import android.view.ViewGroup;
 import android.widget.TextView;
 
-//TODO: Try to fetch a new location report when created
-
 /**
  * Section that shows a map with the location of Gasteizko Margolariak. 
  * If no recent report location, it will explain that and will show the 
@@ -46,6 +42,7 @@ public class LocationLayout extends Fragment implements OnMapReadyCallback, Loca
 
 	//The map view
 	private MapView mapView;
+	MarkerOptions moGm;
 
 	private LocationManager locationManager;
 
@@ -72,7 +69,9 @@ 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);
+		}
 
 		//Set the title
 		((MainActivity) getActivity()).setSectionTitle(v.getContext().getString(R.string.menu_location));
@@ -160,6 +159,7 @@ public class LocationLayout extends Fragment implements OnMapReadyCallback, Loca
 	 */
 	@Override
 	public void onMapReady(GoogleMap 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);
 		}
@@ -177,7 +177,7 @@ public class LocationLayout extends Fragment implements OnMapReadyCallback, Loca
 		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);
-		MarkerOptions moGm = new MarkerOptions();
+		moGm = new MarkerOptions();
 		moGm.title(v.getContext().getString(R.string.app_name));
 		moGm.position(gmLocation);
 		moGm.icon(BitmapDescriptorFactory.fromResource(R.drawable.pinpoint_gm));
@@ -219,8 +219,25 @@ public class LocationLayout extends Fragment implements OnMapReadyCallback, Loca
 	 */
 	@Override
 	public void onLocationChanged(Location location) {
-		if (gmLocation != null)
-			calCulateDistance(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) == false) {
+
+			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);
+			if (gmLocation != null){
+				calCulateDistance(location);
+				if (moGm != null){
+					moGm.visible(true);
+				}
+			}
+			else{
+				if (moGm != null){
+					moGm.visible(false);
+				}
+			}
+		}
 	}
 
 	/**

+ 24 - 18
app/src/main/java/com/ivalentin/margolariak/MainActivity.java

@@ -1,5 +1,3 @@
-//TODO: implement onResume, to try and fetch location
-
 package com.ivalentin.margolariak;
 
 import java.io.File;
@@ -357,17 +355,19 @@ public class MainActivity extends Activity{
 
 							case GM.EXTRA_ACTION_LOCATION:
 
-								//TODO: Check for a recent location!
-								//Set up the action button
-								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, false);
-									}
-								});
+								if (preferences.getString(GM.PREF_GM_LOCATION, GM.DEFAULT_PREF_GM_LOCATION).equals(GM.DEFAULT_PREF_GM_LOCATION) == false) {
+									//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, false);
+										}
+									});
+
+								}
 								break;
 
 							case GM.EXTRA_ACTION_BLOG:
@@ -562,13 +562,19 @@ public class MainActivity extends Activity{
 	 */
 	@Override
 	public void onBackPressed(){
-		FragmentManager fm = getFragmentManager();
-		if (fm.getBackStackEntryCount() > 1){
-			fm.popBackStack();
+		try {
+			FragmentManager fm = getFragmentManager();
+			if (fm.getBackStackEntryCount() > 1) {
+				fm.popBackStack();
+			} else {
+				finish();
+				super.onBackPressed();
+			}
 		}
-		else{
+		catch (Exception ex){
+			Log.e("Error going back", "Finishing activity: " + ex.toString());
 			finish();
-			super.onBackPressed();
+			//super.onBackPressed();
 		}
 		
 	}

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

@@ -42,6 +42,7 @@ import android.widget.Button;
 import android.widget.EditText;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
+import android.widget.ScrollView;
 import android.widget.TextView;
 
 /**
@@ -93,8 +94,16 @@ public class ScheduleLayout extends Fragment implements OnMapReadyCallback{
 		bund = savedInstanceState;
 		
 		//Load the layout
-		view = inflater.inflate(R.layout.fragment_layout_schedule, null);		
-		
+		view = inflater.inflate(R.layout.fragment_layout_schedule, null);
+		view.addOnLayoutChangeListener(new View.OnLayoutChangeListener() {
+			@Override
+			public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) {
+				CustomScrollView sv = (CustomScrollView) v.findViewById(R.id.sv_schedule);
+				Log.d("SV", "INVALIDATED");
+				sv.invalidate();
+			}
+		});
+
 		//Get schedule type
 		Bundle bundle = this.getArguments();
 		schedule = bundle.getInt(GM.SCHEDULE, GM.SECTION_LABLANCA_SCHEDULE);
@@ -164,7 +173,7 @@ public class ScheduleLayout extends Fragment implements OnMapReadyCallback{
 		//Return the fragment view
 		return view;
 	}
-	
+
 	/**
 	 * Populates the list of activities with the ones n the selected day.
 	 * 
@@ -334,6 +343,16 @@ public class ScheduleLayout extends Fragment implements OnMapReadyCallback{
 
 		cursor.close();
 		db.close();
+
+		//Scroll to top
+		try {
+			ScrollView sw = (ScrollView) list.getParent().getParent();
+			sw.scrollTo(0, 0);
+		}
+		catch(Exception ex){
+			Log.e("Schedule scroll", "Culdnt get scrollview to scroll: " + ex.toString());
+		}
+
 		return eventCount;
 
 	}

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

@@ -48,7 +48,7 @@ class Sync extends AsyncTask<Void, Void, Void> {
 			pbSync.setVisibility(View.VISIBLE);
 		if (dialog != null) {
 			dialog.show();
-			strings = new String[9];
+			strings = new String[10];
 			strings[0] = myContextRef.getString(R.string.dialog_sync_text_0);
 			strings[1] = myContextRef.getString(R.string.dialog_sync_text_1);
 			strings[2] = myContextRef.getString(R.string.dialog_sync_text_2);
@@ -58,6 +58,7 @@ class Sync extends AsyncTask<Void, Void, Void> {
 			strings[6] = myContextRef.getString(R.string.dialog_sync_text_6);
 			strings[7] = myContextRef.getString(R.string.dialog_sync_text_7);
 			strings[8] = myContextRef.getString(R.string.dialog_sync_text_8);
+			strings[9] = myContextRef.getString(R.string.dialog_sync_text_8); //In case I get a 9;
 			tv = (TextView) dialog.findViewById(R.id.tv_dialog_sync_text);
 			int idx = (int) (Math.random() * 9);
 			tv.setText(strings[idx]);

+ 1 - 1
app/src/main/res/layout/fragment_layout_home.xml

@@ -64,7 +64,7 @@
 						android:layout_width="wrap_content"
 						android:layout_height="wrap_content"
 						android:textAppearance="@android:style/TextAppearance.Medium"
-						android:text="Medium Text"
+						android:text="@string/home_section_location_text_calculating"
 						android:id="@+id/tv_home_section_location_distance"
 						android:layout_gravity="center_vertical"
 						android:layout_margin="7dp"/>

+ 1 - 0
app/src/main/res/layout/fragment_layout_location.xml

@@ -43,6 +43,7 @@
 				android:layout_height="wrap_content"
 				android:textAppearance="?android:attr/textAppearanceSmall"
 				android:id="@+id/tv_location_distance"
+				android:text="@string/home_section_location_text_calculating"
 				android:layout_margin="10dp"/>
 
 			<com.google.android.gms.maps.MapView

+ 1 - 1
app/src/main/res/layout/row_activity_future.xml

@@ -38,7 +38,7 @@
             android:layout_weight=".7" />
 
         <TableLayout
-            android:layout_width="wrap_content"
+            android:layout_width="fill_parent"
             android:layout_height="wrap_content"
             android:gravity="end"
             android:stretchColumns="1"

+ 6 - 5
app/src/main/res/layout/row_activity_past.xml

@@ -40,19 +40,20 @@
         android:layout_height="match_parent">
 
         <ImageView
-            android:layout_width="wrap_content"
+            android:layout_width="fill_parent"
             android:layout_height="wrap_content"
             android:id="@+id/iv_row_activity_past"
             android:contentDescription="@string/app_cdesc"
             android:maxWidth="10dp"
-            android:layout_weight=".3"
-            android:layout_margin="3dp" />
+            android:layout_weight=".7"
+            android:layout_margin="3dp"
+            android:layout_gravity="center_vertical"/>
 
         <TextView
-            android:layout_width="wrap_content"
+            android:layout_width="fill_parent"
             android:layout_height="wrap_content"
             android:id="@+id/tv_row_activity_past_text"
-            android:layout_weight=".7"
+            android:layout_weight=".3"
             android:textAppearance="@android:style/TextAppearance.Medium"
             android:layout_margin="5dp" />
     </LinearLayout>

+ 6 - 5
app/src/main/res/layout/row_blog.xml

@@ -26,19 +26,20 @@
         android:layout_height="match_parent">
 
         <ImageView
-            android:layout_width="wrap_content"
+            android:layout_width="fill_parent"
             android:layout_height="wrap_content"
             android:id="@+id/iv_row_blog_image"
             android:maxWidth="10dp"
             android:contentDescription="@string/app_cdesc"
-            android:layout_weight=".3"
-            android:layout_margin="3dp" />
+            android:layout_weight=".7"
+            android:layout_margin="3dp"
+            android:layout_gravity="center_vertical"/>
 
         <TextView
-            android:layout_width="wrap_content"
+            android:layout_width="fill_parent"
             android:layout_height="wrap_content"
             android:id="@+id/tv_row_blog_text"
-            android:layout_weight=".7"
+            android:layout_weight=".3"
             android:textAppearance="@android:style/TextAppearance.Medium"
             android:layout_margin="5dp" />
     </LinearLayout>

+ 8 - 4
app/src/main/res/layout/row_gallery.xml

@@ -29,7 +29,8 @@
             android:layout_alignParentEnd="false"
             android:layout_alignParentStart="false"
             android:maxHeight="180dp"
-            android:src="@drawable/photo_placeholder_thumb"/>
+            android:src="@drawable/photo_placeholder_thumb"
+            android:adjustViewBounds="true"/>
 
         <ImageView
             android:contentDescription="@string/app_cdesc"
@@ -48,7 +49,8 @@
             android:padding="1dp"
             android:layout_alignParentStart="false"
             android:maxHeight="180dp"
-            android:src="@drawable/photo_placeholder_thumb"/>
+            android:src="@drawable/photo_placeholder_thumb"
+            android:adjustViewBounds="true"/>
 
         <ImageView
             android:contentDescription="@string/app_cdesc"
@@ -67,7 +69,8 @@
             android:maxHeight="180dp"
             android:layout_marginEnd="30dp"
             android:layout_marginBottom="30dp"
-            android:src="@drawable/photo_placeholder_thumb"/>
+            android:src="@drawable/photo_placeholder_thumb"
+            android:adjustViewBounds="true"/>
 
         <ImageView
             android:contentDescription="@string/app_cdesc"
@@ -84,7 +87,8 @@
             android:padding="1dp"
             android:layout_alignParentStart="false"
             android:maxHeight="180dp"
-            android:src="@drawable/photo_placeholder_thumb"/>
+            android:src="@drawable/photo_placeholder_thumb"
+            android:adjustViewBounds="true"/>
     </RelativeLayout>
 
     <TextView

+ 6 - 5
app/src/main/res/layout/row_home_activities.xml

@@ -33,18 +33,19 @@
 
         <ImageView
             android:contentDescription="@string/app_cdesc"
-            android:layout_width="wrap_content"
+            android:layout_width="fill_parent"
             android:layout_height="wrap_content"
             android:id="@+id/iv_row_home_activity"
             android:maxWidth="10dp"
-            android:layout_weight=".3"
-            android:layout_margin="3dp" />
+            android:layout_weight=".7"
+            android:layout_margin="3dp"
+            android:layout_gravity="center_vertical"/>
 
         <TextView
-            android:layout_width="wrap_content"
+            android:layout_width="fill_parent"
             android:layout_height="wrap_content"
             android:id="@+id/tv_row_home_activity_text"
-            android:layout_weight=".7"
+            android:layout_weight=".3"
             android:textAppearance="@android:style/TextAppearance.Medium"
             android:layout_margin="5dp" />
     </LinearLayout>

+ 8 - 7
app/src/main/res/layout/row_home_blog.xml

@@ -6,13 +6,13 @@
     android:padding="4dp">
 
     <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_row_home_blog_title" />
 
     <TextView
-        android:layout_width="fill_parent"
+        android:layout_width="match_parent"
         android:layout_height="0dp"
         android:textAppearance="?android:attr/textAppearanceSmall"
         android:id="@+id/tv_row_home_blog_date"
@@ -32,18 +32,19 @@
 
         <ImageView
             android:contentDescription="@string/app_cdesc"
-            android:layout_width="wrap_content"
+            android:layout_width="fill_parent"
             android:layout_height="wrap_content"
             android:id="@+id/iv_row_home_blog_image"
             android:maxWidth="10dp"
-            android:layout_weight=".3"
-            android:layout_margin="3dp" />
+            android:layout_weight=".7"
+            android:layout_margin="3dp"
+            android:layout_gravity="center_vertical"/>
 
         <TextView
-            android:layout_width="wrap_content"
+            android:layout_width="fill_parent"
             android:layout_height="wrap_content"
             android:id="@+id/tv_row_home_blog_text"
-            android:layout_weight=".7"
+            android:layout_weight=".3"
             android:textAppearance="@android:style/TextAppearance.Medium"
             android:layout_margin="5dp" />
     </LinearLayout>

+ 1 - 1
app/src/main/res/layout/row_schedule.xml

@@ -59,7 +59,7 @@
         android:layout_height="match_parent"
         android:layout_weight=".25"
         android:orientation="vertical"
-        android:paddingBottom="15dp" >
+        android:paddingBottom="25dp" >
 
         <TextView
             android:id="@+id/tv_row_schedule_title"

+ 2 - 1
app/src/main/res/values-en/strings.xml

@@ -3,7 +3,7 @@
 
 
 	<!-- Common strings -->
-	<string name="price">Price: %1$d</string>
+	<string name="price">Price: %1$d</string>
 
 
 	<string name="section_title_blog">Blog</string>
@@ -160,5 +160,6 @@
 	<string name="dialog_sync_failed_text">Couldn\'t download content.\n\nMake sure you have a network connection and try again.</string>
 	<string name="dialog_sync_failed_close">Close</string>
 	<string name="lablanca_nofestivals">Las Fiestas de La Blanca. Esos días, del 4 al 9 de agosto, en los que Vitoria-Gasteiz se transforma. Se llena de color y alegría, y en cada esquina puedes encontrar actividades y espectáculos. Todos las estamos esperando.\n\nPor desgracia, aún hay que esperar más.\n\nNosotros ya estamos trabajando en ello. Tan pronto como vayamos sabiendo más, aquí iremos publicando nuestro programa y otra información sobre las fiestas.</string>
+	<string name="home_section_location_text_calculating">Calculating distance...</string>
 
 </resources>

+ 3 - 2
app/src/main/res/values-eu-rES/strings.xml

@@ -16,7 +16,7 @@
 
 	<!-- Menu sections -->
 
-	<string name="menu_home">Etxea</string>
+	<string name="menu_home">Hasiera</string>
 	<string name="menu_lablanca">Andre Zuria</string>
 	<string name="menu_lablanca_schedule">Jaiako programa</string>
 	<string name="menu_lablanca_gm_schedule">Margolari programa</string>
@@ -143,7 +143,7 @@
 	<string name="dialog_sync_title">Sinkronizatzen</string>
 	<string name="dialog_sync_failed_title">Sinkronizazioko errakuntza</string>
 	<string name="dialog_sync_failed_close">Itxali</string>
-	<string name="price">Prezioa: %1$d</string>
+	<string name="price">Prezioa: %1$d</string>
 	<string name="settings_about">Gu</string>
 	<string name="settings_about_content"><![CDATA[La Asociación Cultural Gasteizko Margolariak nace en el año 2013 con la idea de estimular la participación ciudadana y fortalecer la cultura y las tradiciones de Vitoria-Gasteiz.<br/><br/>En nuestro nombre se refleja un barrio en el que las calles nos recuerdan a grandes pintores: el barrio de San Martín. Estamos representados en los barrios, y creemos que son la esencia de esta ciudad.<br/><br/>Nos convertimos en Cuadrilla de Blusas y Neskas en 2013, y en ese mismo año, miembros de la Comisión de Blusas y Neskas.<br/><br/>Desde entonces no hemos hecho más que crecer junto con todos los que han decidido, año tras año, apostar por nosotros.]]></string>
 	<string name="settings_license">Lizentzia</string>
@@ -165,5 +165,6 @@
 	<string name="lablanca_nofestivals">Las Fiestas de La Blanca. Esos días, del 4 al 9 de agosto, en los que Vitoria-Gasteiz se transforma. Se llena de color y alegría, y en cada esquina puedes encontrar actividades y espectáculos. Todos las estamos esperando.\n\nPor desgracia, aún hay que esperar más.\n\nNosotros ya estamos trabajando en ello. Tan pronto como vayamos sabiendo más, aquí iremos publicando nuestro programa y otra información sobre las fiestas.</string>
 	<string name="settings_notification_off">No recibir notificaciones</string>
 	<string name="settings_notification_on">Recibir notificaciones</string>
+	<string name="home_section_location_text_calculating">Calculando distancia...</string>
 
 </resources>

+ 4 - 3
app/src/main/res/values/strings.xml

@@ -21,7 +21,7 @@
 
 	<!-- Menu sections -->
 
-	<string name="menu_home">Home</string>
+	<string name="menu_home">Inicio</string>
 	<string name="menu_lablanca">La Blanca</string>
 	<string name="menu_lablanca_schedule">Programa de fiestas</string>
 	<string name="menu_lablanca_gm_schedule">Programa Margolari</string>
@@ -102,7 +102,7 @@
 	<string name="dialog_sync_failed_text">No se pudierdon descargar los contenidos\n\nAsegúrate de que dispones de conexión a internet e inténtalo de nuevo.</string>
 	<string name="dialog_sync_failed_close">Cerrar</string>
 	<string name="activity_city">Cudad:</string>
-	<string name="activity_future">Proximas actividades</string>
+	<string name="activity_future">Próximas actividades</string>
 	<string name="activity_no_future">No hay actividades planeadas proximamanete. Cuando organicemos algo, aparecera aquí.</string>
 	<string name="activity_past">Actividades pasadas</string>
 	<string name="activity_price">Precio:</string>
@@ -138,6 +138,7 @@
 	<string name="home_section_gmschedule">Programa Margolari</string>
 	<string name="home_section_location_text_short" tools:ignore="PluralsCandidate">¡Están a solo %1$d metros de ti! (Unos %2$d minutos andando)</string>
 	<string name="home_section_location_text_long">¡Están a solo %1$s kilometros de ti!</string>
+	<string name="home_section_location_text_calculating">Calculando distancia...</string>
 	<string name="lablanca_date_august">%1$s de agosto</string>
 	<string name="lablanca_date_july">%1$s de julio</string>
 	<string name="lablanca_prices">Precios</string>
@@ -165,7 +166,7 @@
 	<string name="notification_action_gallery">Abrir galería</string>
 	<string name="notification_action_lablanca">Abrir La Blanca</string>
 	<string name="notification_action_location">Ver localización</string>
-	<string name="price">Precio: %1$d</string>
+	<string name="price">Precio: %1$d</string>
 	<string name="settings_about">Sobre nosotros</string>
 	<string name="settings_license">Licencia</string>
 	<string name="settings_license_content"><![CDATA[Copyright 2016 Iñigo Valentin<br/><br/>This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation.<br/><br/>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details at http://www.gnu.org/licenses/.<br/><br/>The name "Gasteizko Margolariak" and its logotype are property of Gasteizko Margolariak.<br/><br/><br/><div style="background-color:#bbbbbb;padding:6px;border-radius:5px;border-style:solid;border-width:2px;border-color:#333333;text-align:center;">You can get the source code for this project at <a href="https://github.com/Seavenois/GM">Github</a></div>]]></string>