浏览代码

Last fixes.

Iñigo Valentin 9 年之前
父节点
当前提交
ba8e62defa

+ 2 - 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="19"
-    android:versionName="2.0.5" >
+    android:versionCode="20"
+    android:versionName="2.0.6" >
 
     <uses-permission android:name="android.permission.INTERNET" />
     <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>

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

@@ -243,7 +243,7 @@ public class MainActivity extends Activity {
 
 			case GM.SECTION.SCHEDULE:
 				fragment = new ScheduleLayout();
-				bundle.putInt(GM.SCHEDULE.KEY, GM.SCHEDULE.MARGOLARIAK);
+				bundle.putInt(GM.SCHEDULE.KEY, GM.SCHEDULE.CITY);
 				fragment.setArguments(bundle);
 				title = getString(R.string.menu_lablanca_schedule);
 				shareURL = GM.SHARE.LABLANCA;

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

@@ -87,8 +87,6 @@ public class ScheduleLayout extends Fragment implements OnMapReadyCallback{
 		String year = Integer.toString(calendar.get(Calendar.YEAR));
 
 
-
-
 		//Set bundle for the map
 		bund = savedInstanceState;
 		
@@ -104,14 +102,19 @@ public class ScheduleLayout extends Fragment implements OnMapReadyCallback{
 		});
 
 		//Get schedule type
+		TextView title = (TextView) view.findViewById(R.id.tv_schedule_type);
 		Bundle bundle = this.getArguments();
 		schedule = bundle.getInt(GM.SCHEDULE.KEY, GM.SCHEDULE.CITY);
 		
 		//Set the title
-		if (schedule == GM.SCHEDULE.CITY)
+		if (schedule == GM.SCHEDULE.CITY) {
 			((MainActivity) getActivity()).setSectionTitle(view.getContext().getString(R.string.menu_lablanca_schedule));
-		else
+			title.setText(R.string.menu_lablanca_schedule);
+		}
+		else{
 			((MainActivity) getActivity()).setSectionTitle(view.getContext().getString(R.string.menu_lablanca_gm_schedule));
+			title.setText(R.string.menu_lablanca_gm_schedule);
+		}
 		((MainActivity) getActivity()).setShareLink(getString(R.string.share_lablanca), GM.SHARE.LABLANCA);
 
 		//Populate the dates array

+ 23 - 22
app/src/main/res/layout/fragment_layout_home.xml

@@ -85,61 +85,62 @@
 		</LinearLayout>
 
 		<LinearLayout
-			android:orientation="vertical"
+			android:id="@+id/ll_home_section_lablanca"
 			android:layout_width="match_parent"
 			android:layout_height="wrap_content"
-			android:background="@drawable/section"
-			android:id="@+id/ll_home_section_lablanca"
 			android:layout_margin="10dp"
+			android:background="@drawable/section"
+			android:orientation="vertical"
 			android:visibility="gone">
 
 			<TextView
 				android:layout_width="match_parent"
 				android:layout_height="wrap_content"
-				android:textAppearance="?android:attr/textAppearanceLarge"
-				android:text="@string/lablanca_title"
-				android:textStyle="bold"
-				android:textColor="@color/section_title"
+				android:background="@drawable/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:text="@string/lablanca_title"
+				android:textAppearance="?android:attr/textAppearanceLarge"
+				android:textColor="@color/section_title"
+				android:textStyle="bold"/>
 
 			<LinearLayout
-				android:orientation="horizontal"
 				android:layout_width="match_parent"
 				android:layout_height="match_parent"
+				android:layout_margin="8dp"
 				android:background="@drawable/entry"
-				android:padding="7dp"
-				android:layout_margin="8dp">
+				android:orientation="horizontal"
+				android:padding="7dp">
 
 				<ImageView
-					android:layout_width="wrap_content"
-					android:layout_height="wrap_content"
 					android:id="@+id/iv_home_section_lablanca_image"
-					android:contentDescription="@string/app_cdesc"
-					android:layout_weight=".4"
+					android:layout_width="match_parent"
+					android:layout_height="wrap_content"
 					android:layout_margin="3dp"
+					android:layout_weight=".7"
 					android:adjustViewBounds="true"
-					android:maxWidth="130dp"/>
+					android:contentDescription="@string/app_cdesc"
+					android:maxWidth="130dp"
+					android:minHeight="95dp"/>
 
 				<TextView
-					android:layout_width="wrap_content"
-					android:layout_height="wrap_content"
-					android:textAppearance="@android:style/TextAppearance.Medium"
 					android:id="@+id/tv_home_section_lablanca_text"
-					android:layout_weight=".6"
+					android:layout_width="match_parent"
+					android:layout_height="wrap_content"
+					android:layout_weight=".3"
+					android:maxLines="4"
 					android:padding="7dp"
-					android:maxLines="4"/>
+					android:textAppearance="@android:style/TextAppearance.Medium"/>
 
 				<ImageView
 					android:layout_width="match_parent"
-					android:layout_weight="1"
 					android:layout_height="40dp"
 					android:layout_marginTop="-40dp"
+					android:layout_weight="1"
 					android:background="@drawable/gradient_v_white"/>
 
 			</LinearLayout>

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

@@ -17,12 +17,9 @@
         android:layout_margin="7dp">
 
         <TextView
-            android:text="@string/lablanca_schedule_gm"
+            android:id="@+id/tv_schedule_type"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:textAppearance="?android:attr/textAppearanceLarge"
-            android:textStyle="bold"
-            tools:layout_width="match_parent"
             android:background="@drawable/section_title"
             android:paddingBottom="4dp"
             android:paddingEnd="10dp"
@@ -30,7 +27,11 @@
             android:paddingRight="10dp"
             android:paddingStart="20dp"
             android:paddingTop="4dp"
-            android:textColor="@color/section_title"/>
+            android:text="@string/lablanca_schedule_gm"
+            android:textAppearance="?android:attr/textAppearanceLarge"
+            android:textColor="@color/section_title"
+            android:textStyle="bold"
+            tools:layout_width="match_parent"/>
 
         <LinearLayout
             android:layout_width="match_parent"