Bladeren bron

make event list prettier

Yiupang 9 jaren geleden
bovenliggende
commit
3f6d6792a5

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

@@ -41,7 +41,7 @@
         android:layout_gravity="center_horizontal"
         android:adjustViewBounds="true"
         android:cropToPadding="false"
-        android:src="@drawable/logo2"
+        android:src="@drawable/com_facebook_button_icon"
         android:layout_marginBottom="57dp"
         android:layout_alignParentBottom="true"
         android:layout_alignParentStart="true" />

+ 51 - 37
app/src/main/res/layout/events_list_item.xml

@@ -1,39 +1,53 @@
 <?xml version="1.0" encoding="utf-8"?>
-
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout  xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="fill_parent"
-    android:layout_height="fill_parent"
-    android:padding="10dip">
-
-    <TextView xmlns:android="http://schemas.android.com/apk/res/android"
-        android:id="@+id/name"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_alignParentStart="true"
-        android:padding="10dip"
-        android:textSize="16sp"
-        android:textStyle="bold" >
-    </TextView>
-
-    <TextView xmlns:android="http://schemas.android.com/apk/res/android"
-        android:id="@+id/type"
-        android:layout_toEndOf="@+id/name"
-        android:layout_width="wrap_content"
-        android:layout_alignParentEnd="true"
-        android:layout_height="wrap_content"
-        android:padding="10dip"
-        android:textSize="16sp"
-        android:textStyle="bold" >
-    </TextView>
-
-    <TextView xmlns:android="http://schemas.android.com/apk/res/android"
-        android:id="@+id/desc"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_below="@+id/name"
-        android:padding="10dip"
-        android:textSize="16sp"
-        android:textStyle="bold" >
-    </TextView>
-</RelativeLayout>
-
+    android:layout_height="wrap_content"
+    android:padding="8dp">
+    <LinearLayout android:id="@+id/Text"
+        android:orientation="vertical"
+        android:layout_width="fill_parent"
+        android:layout_height="fill_parent"
+        android:padding="10dip">
+        <TextView
+            android:id="@+id/name"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textSize="20sp"
+            android:textStyle="bold|italic"
+            />
+        <TextView
+            android:text="@string/food_type"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textSize="16sp"
+            android:textColor="#FF267F00"
+            />
+        <TextView
+            android:id="@+id/type"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textSize="14sp"
+            />
+        <TextView
+            android:text="@string/description"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textSize="16sp"
+            android:textColor="#FF267F00"
+            />
+        <TextView
+            android:id="@+id/desc"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textSize="14sp"
+            />
+    </LinearLayout>
+    <ImageView
+        android:contentDescription="@string/host"
+        android:id="@+id/Image"
+        android:layout_width="48dp"
+        android:layout_height="48dp"
+        android:padding="5dp"
+        android:src="@drawable/default_image"
+        android:layout_alignParentEnd="true" />
+</RelativeLayout >

+ 2 - 2
app/src/main/res/layout/events_screen.xml

@@ -13,8 +13,8 @@
         </TextView>
 
     <ListView
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
         android:id="@+id/events_screen"/>
 
 </LinearLayout>

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

@@ -1,9 +1,7 @@
 <resources>
     <string name="app_name">FreeFoodFinder</string>
     <string name="action_settings">Settings</string>
-
-    <!-- id # must match with your fb developer account -->
-    <string name="facebook_app_id">1363372700411977</string>
+    <string name="facebook_app_id">169855136874779</string>
 
     <!-- Titles for the button bar -->
     <string name="about_us">About Us</string>
@@ -13,5 +11,8 @@
 
     <string name="copy_right">Copyrights © %1$d</string>
 
-
+    <!--Strings on the event list-->
+    <string name="food_type">Food type: </string>
+    <string name="description">Description: </string>
+    <string name="host">Host </string>
 </resources>