]> iEval git - unical.git/commitdiff
add interface for displaying an event
authorPetru Trimbitas <l3asketballplayer@yahoo.com>
Tue, 28 May 2013 19:54:43 +0000 (22:54 +0300)
committerPetru Trimbitas <l3asketballplayer@yahoo.com>
Tue, 28 May 2013 19:54:43 +0000 (22:54 +0300)
res/layout/addevent.xml
res/layout/eventview.xml
res/layout/login.xml
res/menu/options.xml
res/values/strings.xml
src/ro/ieval/unical/displayEventActivity.java [new file with mode: 0644]

index e9ad03293c263867ca07833f1b1c6ea46081652a..8c166e5b72046e6d75dfa5aaba8998a12b915505 100644 (file)
@@ -39,7 +39,7 @@
             </LinearLayout>
 
             <TextView
-                android:id="@+id/textView2"
+                android:id="@+id/location"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:text="@string/description"
                 android:ems="10"
                 android:inputType="textMultiLine" />
 
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_weight="2.13" >
-
-                <TimePicker
-                    android:id="@+id/timePicker1"
-                    android:layout_width="171dp"
-                    android:layout_height="wrap_content" />
-
-                <DatePicker
-                    android:id="@+id/datePicker1"
-                    android:layout_width="match_parent"
-                    android:layout_height="match_parent" />
-
-            </LinearLayout>
-
             <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
index 08d8ceef01134d7fd7b1ca394147fcd23c607c9b..73fb2d2b97cd00ae1e32d16b96c5ab7eac9ebe7b 100644 (file)
@@ -28,7 +28,7 @@
         android:id="@+id/description"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:text="Description:"
+        android:text="@string/descriptionlabel"
         android:textAppearance="?android:attr/textAppearanceMedium" />
 
     <TextView
         android:text="Small Text"
         android:textAppearance="?android:attr/textAppearanceSmall" />
 
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content" >
+
+        <TextView
+            android:id="@+id/textView1"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/locationlabel"
+            android:textAppearance="?android:attr/textAppearanceMedium" />
+
+        <TextView
+            android:id="@+id/location"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="Medium Text"
+            android:textAppearance="?android:attr/textAppearanceMedium" />
+
+    </LinearLayout>
+
 </LinearLayout>
\ No newline at end of file
index 12cb589d294ab627428ac3497cfbbc1f41031eca..664ba30891010a9fa5aead2764197f609e9e5641 100644 (file)
@@ -18,7 +18,7 @@
         android:layout_weight="0.00" >
 
         <TextView
-            android:id="@+id/textView2"
+            android:id="@+id/location"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:text="@string/userlabel"
index f95d124958dc3f946893c7a52ce07b2ba34a6b0d..974e391cf235307ab1c69be079b30c59b23e032f 100644 (file)
@@ -6,6 +6,9 @@
     >
         
     </item>
+    <item android:id="@+id/deleteevent"
+        android:icon="@android:drawable/ic_menu_delete"
+        ></item>
     
 
 </menu>
index 1b3bd9c2a6e7ae86739beebdf32b74ddc63176b1..11f2e86aa4c548fa26f5ce6ea739ffb081b919ea 100644 (file)
@@ -4,6 +4,7 @@
     <string name="app_id">148275978690487</string>
     <string name="title">Title</string>
     <string name="description">Description</string>
+    <string name="descriptionlabel">Description: </string>
     <string name="login">Log In</string>
     <string name="location">Location</string>
     <string name="userlabel">User: </string>
diff --git a/src/ro/ieval/unical/displayEventActivity.java b/src/ro/ieval/unical/displayEventActivity.java
new file mode 100644 (file)
index 0000000..b6ded5d
--- /dev/null
@@ -0,0 +1,37 @@
+package ro.ieval.unical;
+
+import java.util.Date;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.widget.TextView;
+
+public class displayEventActivity extends Activity {
+       @Override
+       protected void onCreate(Bundle savedInstanceState) {
+               // TODO Auto-generated method stub
+               super.onCreate(savedInstanceState);
+               //aici iei parametru
+               Event e=new Event();
+               setContentView(R.layout.eventview);
+           final TextView eventTitle= (TextView) findViewById(R.id.eventTitle);
+               final TextView date=(TextView) findViewById(R.id.date);
+               final TextView description=(TextView) findViewById(R.id.description);
+               final TextView location= (TextView) findViewById(R.id.location);
+               eventTitle.setText(e.title);
+               date.setText((new Date(e.date)).toString());
+               description.setText(e.description);
+               location.setText(e.location);
+       }
+       
+       @Override
+       public boolean onCreateOptionsMenu(Menu menu) {
+               // TODO Auto-generated method stub
+               // nu stiu cum sa pun delete in loc de new event
+               MenuInflater inflater = getMenuInflater();
+           inflater.inflate(R.menu.options, menu);
+               return true;
+       }
+}
This page took 0.032606 seconds and 4 git commands to generate.