Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/aarya123/CampusFeed
Browse files Browse the repository at this point in the history
Conflicts:
	src/com/example/campusfeed/EventOrganizer.java
	src/com/example/campusfeed/MainActivity.java
	src/com/example/campusfeed/TimePickerEvent.java
  • Loading branch information
pranavmenon committed Jan 17, 2013
2 parents f81b208 + 0bb1140 commit bfed2b2
Show file tree
Hide file tree
Showing 21 changed files with 495 additions and 273 deletions.
4 changes: 4 additions & 0 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@
android:name="com.example.campusfeed.TDLSortViewer"
android:label="@string/title_activity_tdlsort_viewer" >
</activity>
<activity
android:name="com.example.campusfeed.AccountSettings"
android:label="account_settings" >
</activity>

<meta-data
android:name="com.google.android.maps.v2.API_KEY"
Expand Down
2 changes: 1 addition & 1 deletion project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

# Project target.
target=android-17
target=android-16
android.library.reference.1=../aFileChooser
android.library.reference.2=../../Users/Siddharth/android-sdks/extras/google/google_play_services/libproject/google-play-services_lib
30 changes: 30 additions & 0 deletions res/layout/account_settings_list.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:background="#ffffff"
android:layout_height="match_parent"
android:orientation="vertical" >

<ImageView
android:id="@+id/account_choice_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="17dp"
android:layout_marginTop="15dp"
android:src="@drawable/event_not_yet" />

<TextView
android:id="@+id/account_choice_textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000"

android:layout_alignBottom="@+id/account_choice_icon"
android:layout_marginLeft="28dp"
android:layout_toRightOf="@+id/account_choice_icon"
android:text="Large Text"
android:textAppearance="?android:attr/textAppearanceLarge" />

</RelativeLayout>
23 changes: 23 additions & 0 deletions res/layout/activity_account_settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:background="#ededed"
android:layout_height="match_parent"
android:orientation="vertical" >



<ListView
android:id="@+id/account_settings_list"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:dividerHeight="10dp"

android:divider="#ededed"

android:paddingLeft="10dp"
android:paddingRight="10dp" >

</ListView>

</LinearLayout>
71 changes: 46 additions & 25 deletions res/layout/activity_event_info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,53 +15,74 @@
android:layout_gravity="top"
android:orientation="vertical" >

<TextView
android:id="@+id/name"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#2388cd"
android:gravity="center"
android:text="Event Name"
android:textColor="#FFFFFF"
android:textSize="25sp" />

<View
android:id="@+id/separator"
android:layout_width="fill_parent"
android:layout_height="0.5dp"
android:background="#FFFFFF"
android:visibility="visible" />

<TextView
android:id="@+id/eventInfo"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="Event Info"
android:textSize="20sp" />
android:layout_height="59dp" >

<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="98dp"
android:gravity="center"
android:paddingTop="7dp"
android:text="Event Name"
android:textSize="20sp" />

<TextView
android:id="@+id/postedBy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginLeft="24dp"
android:layout_toRightOf="@+id/name"
android:text="User"
android:textAppearance="?android:attr/textAppearanceSmall" />

<ImageView
android:id="@+id/imageView1"
android:layout_width="75dp"
android:layout_height="75dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="@drawable/ic_menu_refresh" />

</RelativeLayout>

<TextView
android:id="@+id/description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#2388cd"
android:gravity="center"
android:text="Handouts"
android:text="What"
android:textColor="#FFFFFF"
android:textSize="25sp" />

<ImageView
android:id="@+id/handout_download"
android:layout_width="wrap_content"
<TextView
android:id="@+id/eventInfo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="78dp"
android:paddingBottom="10dp"
android:paddingTop="10dp"
android:src="@drawable/download_handout" />
android:clickable="true"
android:gravity="center"
android:onClick="onClick"
android:text="EventInfo"
android:textSize="20sp" />


<TextView
android:id="@+id/when"
android:layout_width="match_parent"

android:layout_height="wrap_content"
android:background="#2388cd"
android:gravity="center"
Expand Down
6 changes: 3 additions & 3 deletions res/layout/activity_extra_sorters.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@

<ListView
android:id="@+id/choiceList"
android:dividerHeight="7.0dp"
android:divider="#ededed"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
android:layout_height="wrap_content"
android:divider="#ededed"
android:dividerHeight="7.0dp" >
</ListView>
</LinearLayout>

Expand Down
2 changes: 1 addition & 1 deletion res/layout/activity_tdlsort_viewer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"

android:text="Events at the same "
android:textSize="20sp" />

<ListView
Expand Down
40 changes: 32 additions & 8 deletions res/layout/advanced_search.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<ViewSwitcher xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/searchViewSwitcher"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
android:layout_height="wrap_content" >

<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
Expand Down Expand Up @@ -72,9 +71,9 @@
android:id="@+id/advsrch_setlocation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginTop="8dp"
android:entries="@array/locations"
android:prompt="@string/location_prompt"/>
android:prompt="@string/location_prompt" />

<Button
android:id="@+id/advsrch_submit"
Expand All @@ -84,7 +83,32 @@
android:layout_marginTop="30dp"
android:onClick="onClick"
android:text="SUBMIT" />

</LinearLayout>

</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >

<!-- tools:context=".Searchable" -->

<ListView
android:id="@+id/searchlist"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginTop="38dp" >
</ListView>

<TextView
android:id="@+id/number_of_matches"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_marginTop="10dp"
android:text="l"
android:textAppearance="?android:attr/textAppearanceMedium" />
</RelativeLayout>

</ViewSwitcher>
6 changes: 6 additions & 0 deletions res/menu/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<item
android:icon="@drawable/ic_action_settings"
android:showAsAction="ifRoom"

android:title="Settings">
<menu>
<item
Expand All @@ -28,6 +29,11 @@
android:icon="@drawable/ic_action_create_icon"
android:showAsAction="ifRoom"
android:title="Create an Event"/>
<item
android:id="@+id/myAccount"

android:showAsAction="never"
android:title="My Account"/>


</menu>
2 changes: 0 additions & 2 deletions res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
<item>Share on Facebook</item>
</string-array>

<string name="title_activity_event_info">EventInfo</string>
<string name="EventName">Event Name</string>
<string name="Description">Description</string>
<string name="EventInfo">Event Info</string>
Expand All @@ -38,7 +37,6 @@
<string name="Today">Today</string>
<string name="Popular">Popular</string>
<string name="More">More</string>
<string name="title_activity_extra_sorters">ExtraSorters</string>
<string name="title_activity_extra_list_viewer">ExtraListViewer</string>
<string name="title_activity_create_account">CreateAccount</string>
<string name="title_activity_sign_in">SignIn</string>
Expand Down
79 changes: 79 additions & 0 deletions src/com/example/campusfeed/AccountSettings.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
package com.example.campusfeed;

import java.io.IOException;
import org.apache.http.HttpResponse;
import org.apache.http.ParseException;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.util.EntityUtils;

import android.os.AsyncTask;
import android.os.Bundle;
import android.app.Activity;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;

public class AccountSettings extends Activity
{
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_account_settings);
// ACCOUNT OPTIONS
String[] choices=new String[]{"Create an Event","My Events","Following","My Groups","My School","About CampusFeed"};
ListView accountChoices=(ListView)findViewById(R.id.account_settings_list);
AccountSettingsAdapter adapter=new AccountSettingsAdapter(this.getApplicationContext(),R.id.account_settings_list,choices);
accountChoices.setSelector(android.R.color.holo_blue_light);
accountChoices.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
accountChoices.setAdapter(adapter);
accountChoices.setOnItemClickListener(new OnItemClickListener(){
/*
* (non-Javadoc)
* @see android.widget.AdapterView.OnItemClickListener#onItemClick(android.widget.AdapterView, android.view.View, int, long)
*
* we need to set the switcher here. Based on each option
*
*/

@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int position,
long arg3) {
if(position==0){
Toast.makeText(getApplicationContext(), position+"", Toast.LENGTH_LONG).show();
}
else
if(position==1){
// choice
}
else
if(position==2){
// choice...
}
else
if(position==3){

}
else
if(position==4){

}
else
if(position==5){

}

}

});
}
}
Loading

0 comments on commit bfed2b2

Please sign in to comment.