</activity>
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/app_id"/>
<activity android:name="com.facebook.LoginActivity"></activity>
- <activity android:name="loginActivity"></activity>
+ <activity android:name="loginActivity">
+ </activity>
+ <activity android:name="ro.ieval.unical.addEventActivity"></activity>
</application>
</manifest>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical" >
+
+ <ScrollView
+ android:id="@+id/scrollView1"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="1.00" >
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical" >
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="2.13" >
+
+ <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/textView2"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/description"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+
+ <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" >
+
+ <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"
+ android:layout_weight="2.13" >
+
+ <CheckBox
+ android:id="@+id/checkBox1"
+ android:layout_width="wrap_content"
+ 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>
+
+ </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="Add Event"
+ />
+
+</LinearLayout>
\ No newline at end of file
android:id="@+id/textView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:text="Log in"
+ android:text="@string/login"
android:textAlignment="center"
android:textAppearance="?android:attr/textAppearanceLarge" />
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="User:"
+ android:text="@string/userlabel"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="Pass:"
+ android:text="@string/passwordlabel"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="Log In" />
+ android:text="@string/login" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
- <item android:id="@+id/item1" android:title="New Event" android:visible="true"></item>
+ <item android:id="@+id/NewEvent" android:title="New Event"
+ android:visible="true" android:showAsAction="always"
+ android:icon="@android:drawable/ic_menu_add"
+ >
+
+ </item>
</menu>
<string name="app_name">Unical</string>
<string name="app_id">148275978690487</string>
-
-</resources>
\ No newline at end of file
+ <string name="title">Title</string>
+ <string name="description">Description</string>
+ <string name="login">Log In</string>
+ <string name="location">Location</string>
+ <string name="userlabel">User: </string>
+ <string name="passwordlabel">Pass: </string>
+ <string name="locationlabel">Location: </string>
+ <string name="repeatlabel">Repeating </string>
+
+ <string-array name="Repeat">
+ <item>Daily</item>
+ <item>Weekly</item>
+ <item>Monthly</item>
+ <item>Yearly</item>
+ </string-array>
+</resources>
--- /dev/null
+package ro.ieval.unical;
+import ro.ieval.unical.R;
+import android.R.string;
+import android.app.Activity;
+import android.os.Bundle;
+import android.widget.Spinner;
+
+
+public class addEventActivity extends Activity {
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ Spinner spinner=(Spinner) findViewById(R.id.spinner1);
+ setContentView(R.layout.addevent);
+ }
+}
import android.os.Handler;
import android.preference.PreferenceManager;
import android.util.Base64;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
//log in
super.onCreate(savedInstanceState);
+
final SharedPreferences prefs=PreferenceManager.getDefaultSharedPreferences(this);
if(prefs.getBoolean("FirstTime", true)) {
prefs.edit().putBoolean("FirstTime", false).commit();
startActivity(i);
}
}
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ // TODO Auto-generated method stub
+ MenuInflater inflater = getMenuInflater();
+ inflater.inflate(R.menu.options, menu);
+ return true;
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ // Handle item selection
+ switch (item.getItemId()) {
+ case R.id.NewEvent:
+ Intent i=new Intent(this,addEventActivity.class);
+ startActivity(i);
+ return true;
+ default:
+ return true;
+ }
+ }
}