]> iEval git - unical.git/commitdiff
Better DisplayEventActivity
authorMarius Gavrilescu <marius@ieval.ro>
Wed, 21 Aug 2013 12:42:06 +0000 (15:42 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Wed, 21 Aug 2013 12:47:07 +0000 (15:47 +0300)
res/layout/event_view.xml
res/values/strings.xml
src/ro/ieval/unical/DisplayEventActivity.java

index 6fd935fb8638653bebe465b4e3e671b65678a0f9..e4dfa8f48babf0cc324806533bfd0bbabfa5568c 100644 (file)
         </LinearLayout>
     </LinearLayout>
 
-    <TextView
+       <View
+               android:layout_width="fill_parent"
+               android:layout_height="1dp"
+               android:background="@android:color/darker_gray"/>
+
+       <TextView
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:text="@string/descriptionlabel"
+        android:text="@string/description"
         android:textStyle="bold"
         android:textAppearance="?android:attr/textAppearanceLarge" />
     <TextView
         android:id="@+id/event_view_description"
         android:layout_width="match_parent"
         android:layout_height="wrap_content" />
+
+       <View
+               android:layout_width="fill_parent"
+               android:layout_height="1dp"
+               android:background="@android:color/darker_gray"/>
+
+       <TextView
+               android:layout_width="wrap_content"
+               android:layout_height="wrap_content"
+               android:text="@string/alarms"
+               android:textStyle="bold"
+               android:textAppearance="?android:attr/textAppearanceLarge" />
        <ListView
                android:id="@+id/alarm_list"
                android:layout_width="match_parent"
index a4c44a26093eab7421fd6996ffca4c3358154f4f..edc277073b0de2fcf458d54230ce498f2ba909ea 100644 (file)
@@ -4,7 +4,6 @@
     <string name="app_id">148275978690487</string>
     <string name="title">Title</string>
     <string name="description">Description</string>
-    <string name="descriptionlabel">Description: </string>
     <string name="log_in">Log In</string>
     <string name="location">Location</string>
     <string name="username">Username</string>
@@ -50,6 +49,7 @@
     <string name="edit_event">Edit Event</string>
        <string name="add_alarm">Add alarm</string>
        <string name="delete">Delete</string>
+       <string name="alarms">Alarms</string>
 
     <string-array name="repeat_array_s">
         <item>Day</item>
index 4f160696bd6f3cc5aee6a0496ba3d8bb60c37174..18f6ef9556b16ec1caabd0fff78d4abcec40ffd6 100644 (file)
@@ -81,13 +81,16 @@ public class DisplayEventActivity extends Activity {
                final DateFormat dayOfWeekFormat = new SimpleDateFormat("EEEEEEE", Locale.UK);
 
                startDay.setText(dayOfWeekFormat.format(start));
+               startDate.setText(dateFormat.format(start));
                if(!dateFormat.format(start).equals(dateFormat.format(end))) {
                        endDay.setText(dayOfWeekFormat.format(end));
                        endDate.setText(dateFormat.format(end));
                }
-               startDate.setText(dateFormat.format(start));
+
                startTime.setText(timeFormat.format(start));
-               endTime.setText(timeFormat.format(end));
+               if(!start.equals(end))
+                       endTime.setText(timeFormat.format(end));
+
                description.setText(event.description);
                setAdapter();
        }
This page took 0.031744 seconds and 4 git commands to generate.