]> iEval git - unical.git/commitdiff
Day of week now displays correctly in event_view. Removes old add event
authorPetru Trimbitas <l3asketballplayer@yahoo.com>
Tue, 11 Jun 2013 08:08:37 +0000 (11:08 +0300)
committerPetru Trimbitas <l3asketballplayer@yahoo.com>
Tue, 11 Jun 2013 08:08:37 +0000 (11:08 +0300)
layout

res/layout/add_event.xml
res/values/strings.xml
src/ro/ieval/unical/DisplayEventActivity.java

index 002e6dbd3b6374b12633f892e11200f6f23cc40e..6840e24971178cb4b2bd7cfa1c8e4cf8ff8345c5 100644 (file)
     android:layout_height="match_parent"
     android:orientation="vertical" >
 
-    <ScrollView
-        android:id="@+id/scrollView1"
+    <TabHost
+        android:id="@android:id/tabhost"
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_weight="1.00" >
+        android:layout_height="match_parent" >
 
         <LinearLayout
             android:layout_width="match_parent"
-            android:layout_height="wrap_content"
+            android:layout_height="match_parent"
             android:orientation="vertical" >
 
-            <LinearLayout
+            <TabWidget
+                android:id="@android:id/tabs"
                 android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_weight="2.13" >
+                android:layout_height="wrap_content" >
+            </TabWidget>
 
-                <TextView
-                    android:id="@+id/textView1"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:text="@string/title"
-                    android:textAppearance="?android:attr/textAppearanceMedium" />
-
-                <EditText
-                    android:id="@+id/editText1"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:ems="10" >
-
-                    <requestFocus />
-                </EditText>
-
-            </LinearLayout>
-
-            <TextView
-                android:id="@+id/location"
+            <FrameLayout
+                android:id="@android:id/tabcontent"
                 android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:text="@string/description"
-                android:textAppearance="?android:attr/textAppearanceMedium" />
+                android:layout_height="match_parent" >
 
-            <EditText
-                android:id="@+id/editText2"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_weight="2.13"
-                android:ems="10"
-                android:inputType="textMultiLine" />
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_weight="2.13" >
-
-                <CheckBox
-                    android:id="@+id/checkBox1"
-                    android:layout_width="0dip"
-                    android:layout_height="wrap_content"
-                    android:layout_weight="2.13"
-                    android:text="@string/repeatlabel" />
-
-                <Spinner
-                    android:id="@+id/spinner1"
-                    android:layout_width="213dp"
-                    android:layout_height="wrap_content" />
+                <LinearLayout
+                    android:id="@+id/tab1"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:orientation="vertical" >
+                </LinearLayout>
 
-            </LinearLayout>
+                <LinearLayout
+                    android:id="@+id/tab2"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:orientation="vertical" >
+                </LinearLayout>
 
+                <LinearLayout
+                    android:id="@+id/tab3"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:orientation="vertical" >
+                </LinearLayout>
+            </FrameLayout>
         </LinearLayout>
-
-    </ScrollView>
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_weight="1.00" >
-
-        <TextView
-            android:id="@+id/textView3"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="@string/locationlabel"
-            android:textAppearance="?android:attr/textAppearanceMedium" />
-
-        <EditText
-            android:id="@+id/editText3"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:ems="10" />
-
-    </LinearLayout>
-
-    <Button
-        android:id="@+id/AddEventButton"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:text="@string/addeventtitle"
-    />
+    </TabHost>
 
 </LinearLayout>
\ No newline at end of file
index 09153300dabaa80b8693b0cbb45d0be909bd0fed..21090792eb51b64096449c14d68bf9559ff1e69a 100644 (file)
@@ -24,6 +24,7 @@
     <string name="thursday">Thursday</string>
     <string name="friday">Friday</string>
     <string name="saturday">Saturday</string>
+    <string name="save">Save</string>
     
     <string-array name="Repeat">
         <item>Daily</item>
index df885caa7c7afd8885df32589f0a0e03062cd5fd..48b8068bbb9bb43ebdb18161cf36fe31be34b018 100644 (file)
@@ -40,14 +40,14 @@ public class DisplayEventActivity extends Activity {
                final Date end=new Date(e.dtend);
                final SimpleDateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy", Locale.UK);
                final SimpleDateFormat timeFormat = new SimpleDateFormat("HH:mm:ss", Locale.UK);
-               final SimpleDateFormat dayOfWeekFormat = new SimpleDateFormat("E", Locale.UK);
+               final SimpleDateFormat dayOfWeekFormat = new SimpleDateFormat("EEEEEEE", Locale.UK);
                
                startDay.setText(dayOfWeekFormat.format(start));
-               if(dayOfWeekFormat.format(start)!=dayOfWeekFormat.format(end))
+               if(dateFormat.format(start)!=dateFormat.format(end)) {
                        endDay.setText(dayOfWeekFormat.format(end));
-               startDate.setText(dateFormat.format(start));
-               if(dateFormat.format(start)!=dateFormat.format(end))
                        endDate.setText(dateFormat.format(end));
+               }
+               startDate.setText(dateFormat.format(start));
                startTime.setText(timeFormat.format(start));
                endTime.setText(timeFormat.format(end));
        }
This page took 0.032944 seconds and 4 git commands to generate.