diff --git a/LeWebConnect2011/res/drawable-hdpi/ic_favorites_tiny.png b/LeWebConnect2011/res/drawable-hdpi/ic_favorites_tiny.png
new file mode 100644
index 0000000..f3bb783
Binary files /dev/null and b/LeWebConnect2011/res/drawable-hdpi/ic_favorites_tiny.png differ
diff --git a/LeWebConnect2011/res/layout/profile.xml b/LeWebConnect2011/res/layout/profile.xml
index cddc8d9..017ea0f 100644
--- a/LeWebConnect2011/res/layout/profile.xml
+++ b/LeWebConnect2011/res/layout/profile.xml
@@ -2,13 +2,47 @@
+ android:orientation="vertical" >
-
+ android:background="#002531" >
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/LeWebConnect2011/res/layout/rowlayout.xml b/LeWebConnect2011/res/layout/rowlayout.xml
index b564f37..a1eb235 100644
--- a/LeWebConnect2011/res/layout/rowlayout.xml
+++ b/LeWebConnect2011/res/layout/rowlayout.xml
@@ -21,65 +21,58 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="20"
- android:src="@drawable/no_all" />
+ android:src="@drawable/no_all" />
+ android:layout_weight="4" >
-
-
-
-
-
-
-
+ android:layout_weight="4"
+ android:orientation="vertical" >
-
+
-
+
+
+
+
+ android:layout_weight="1"
+ android:text="Medium Text"
+ android:textAppearance="?android:attr/textAppearanceSmall" android:layout_marginTop="10px" android:layout_marginRight="20px" android:drawableBottom="@drawable/ic_favorites_tiny"/>
+
\ No newline at end of file
diff --git a/LeWebConnect2011/src/com/thinkit/lewebconnect/Attendee.java b/LeWebConnect2011/src/com/thinkit/lewebconnect/Attendee.java
index 4113e04..a0b83b5 100644
--- a/LeWebConnect2011/src/com/thinkit/lewebconnect/Attendee.java
+++ b/LeWebConnect2011/src/com/thinkit/lewebconnect/Attendee.java
@@ -12,6 +12,18 @@ public class Attendee{
private String linkedin;
private String facebook;
private String country;
+ private int likes;
+
+
+
+ public static final String LNAME = "lname";
+ public static final String FNAME = "fname";
+ public static final String COMPANY = "company";
+ public static final String TWITTER = "twitter";
+ public static final String LINKEDIN = "linkedin";
+ public static final String FACEBOOK = "facebook";
+ public static final String COUNTRY = "country";
+
public Attendee()
{
@@ -95,6 +107,14 @@ public class Attendee{
this.country = country;
}
+ public int getLikes() {
+ return likes;
+ }
+
+ public void setLikes(int likes) {
+ this.likes = likes;
+ }
+
@Override public String toString() {
return new String(getFname() + " " + getLname());
diff --git a/LeWebConnect2011/src/com/thinkit/lewebconnect/LeWebAdapter.java b/LeWebConnect2011/src/com/thinkit/lewebconnect/LeWebAdapter.java
index c02c5e6..8e8437b 100644
--- a/LeWebConnect2011/src/com/thinkit/lewebconnect/LeWebAdapter.java
+++ b/LeWebConnect2011/src/com/thinkit/lewebconnect/LeWebAdapter.java
@@ -19,7 +19,7 @@ import android.widget.TextView;
public class LeWebAdapter extends ArrayAdapter {
private final Context context;
- private ArrayList users;
+ public ArrayList users;
/**
* Lock used to modify the content of {@link #mObjects}. Any write operation
@@ -188,12 +188,15 @@ public class LeWebAdapter extends ArrayAdapter {
TextView name_text = (TextView) rowview.findViewById(R.id.name_text);
TextView company = (TextView) rowview.findViewById(R.id.company_text);
TextView country = (TextView) rowview.findViewById(R.id.country_text);
+ TextView likes = (TextView) rowview.findViewById(R.id.likes);
if (name_text != null)
name_text.setText(user.getLname() + " " + user.getFname());
if (company != null)
company.setText(user.getCompany());
if (country != null)
country.setText(user.getCountry());
+ if (likes != null)
+ likes.setText(String.valueOf(user.getLikes()));
setSocial(rowview, user);
if(enableSections && getSectionForPosition(position) != getSectionForPosition(position - 1))
{
@@ -220,58 +223,37 @@ public class LeWebAdapter extends ArrayAdapter {
private void setSocial(View rowview, Attendee user) {
// TODO Auto-generated method stub
- boolean facebook = false;
boolean twitter = false;
boolean linkedin = false;
+ boolean facebook = false;
ImageView imageView = (ImageView) rowview.findViewById(R.id.icons);
- TextView id = (TextView) rowview.findViewById(R.id.id_text);
- TextView fb = (TextView) rowview.findViewById(R.id.fb_text);
- TextView tw = (TextView) rowview.findViewById(R.id.tw_text);
- TextView ld = (TextView) rowview.findViewById(R.id.ld_text);
-
- id.setText(String.valueOf(user.getId()));
facebook = ( user.getFacebook() != null && !user.getFacebook().equals("null") && !user.getFacebook().isEmpty());
linkedin = ( user.getLinkedin() != null && !user.getLinkedin().equals("null") && !user.getLinkedin().isEmpty());
twitter = ( user.getTwitter() != null && !user.getTwitter().equals("null") && !user.getTwitter().isEmpty());
- fb.setText("null");
- ld.setText("null");
- tw.setText("null");
if (facebook && twitter && linkedin){
imageView.setImageResource(R.drawable.social_all);
- fb.setText(user.getFacebook());
- tw.setText(user.getTwitter());
- ld.setText(user.getLinkedin());
}
else if (facebook && twitter) {
imageView.setImageResource(R.drawable.no_linkedin);
- fb.setText(user.getFacebook());
- tw.setText(user.getTwitter());
}
else if (facebook && linkedin) {
imageView.setImageResource(R.drawable.no_twitter);
- fb.setText(user.getFacebook());
- ld.setText(user.getLinkedin());
}
else if (twitter && linkedin) {
imageView.setImageResource(R.drawable.no_fb);
- tw.setText(user.getTwitter());
- ld.setText(user.getLinkedin());
}
else if (twitter) {
imageView.setImageResource(R.drawable.twitter);
- tw.setText(user.getTwitter());
}
else if (facebook) {
imageView.setImageResource(R.drawable.fb);
- fb.setText(user.getFacebook());
}
else if (linkedin) {
imageView.setImageResource(R.drawable.linkedin);
- ld.setText(user.getLinkedin());
}
else
imageView.setImageResource(R.drawable.no_all);
diff --git a/LeWebConnect2011/src/com/thinkit/lewebconnect/Perticipents.java b/LeWebConnect2011/src/com/thinkit/lewebconnect/Perticipents.java
index b89c855..65d986e 100644
--- a/LeWebConnect2011/src/com/thinkit/lewebconnect/Perticipents.java
+++ b/LeWebConnect2011/src/com/thinkit/lewebconnect/Perticipents.java
@@ -140,10 +140,18 @@ public class Perticipents extends ListActivity {
try {
Intent i = new Intent(this, UserProfile.class);
- Attendee user = (Attendee) l.getItemAtPosition(position);
- Toast.makeText(this, user.getLname(), Toast.LENGTH_LONG).show();
+ LeWebAdapter adapter = (LeWebAdapter) l.getAdapter();
+ Attendee user = (Attendee) adapter.users.get(position);
+
+// Toast.makeText(this, user.getCompany(), Toast.LENGTH_LONG).show();
- i.putExtra("user_name", user.getLinkedin());
+ i.putExtra(Attendee.LNAME, user.getLname());
+ i.putExtra(Attendee.FNAME, user.getFname());
+ i.putExtra(Attendee.COUNTRY, user.getCountry());
+ i.putExtra(Attendee.COMPANY, user.getCompany());
+ i.putExtra(Attendee.FACEBOOK, user.getFacebook());
+ i.putExtra(Attendee.TWITTER, user.getTwitter());
+ i.putExtra(Attendee.LINKEDIN, user.getLinkedin());
startActivity(i);
} catch (Exception e) {
// TODO Auto-generated catch block
@@ -253,6 +261,7 @@ public class Perticipents extends ListActivity {
String country = attrs.getNamedItem("country").getTextContent();
String facebook = attrs.getNamedItem("facebook").getTextContent();
String twitter = attrs.getNamedItem("twitter").getTextContent();
+ String likes = attrs.getNamedItem("likes").getTextContent();
Attendee user = new Attendee();
user.setFname(fname);
@@ -261,6 +270,8 @@ public class Perticipents extends ListActivity {
user.setCountry(country);
user.setFacebook(facebook);
user.setTwitter(twitter);
+ user.setLikes(Integer.valueOf(likes));
+
return user;
}
}
\ No newline at end of file
diff --git a/LeWebConnect2011/src/com/thinkit/lewebconnect/UserProfile.java b/LeWebConnect2011/src/com/thinkit/lewebconnect/UserProfile.java
index 1a1a6e4..1a39a77 100644
--- a/LeWebConnect2011/src/com/thinkit/lewebconnect/UserProfile.java
+++ b/LeWebConnect2011/src/com/thinkit/lewebconnect/UserProfile.java
@@ -13,13 +13,23 @@ public class UserProfile extends Activity {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
- setContentView(R.layout.profile);
- setTitle(R.string.user_profile);
- TextView mUserName = (TextView) findViewById(R.id.profile_name);
- Bundle extras = getIntent().getExtras();
- if (extras != null) {
- String name = extras.getString("user_name");
- mUserName.setText(name);
+ try {
+ setContentView(R.layout.profile);
+ setTitle(R.string.user_profile);
+ TextView mUserName = (TextView) findViewById(R.id.profile_name);
+ TextView mCompany = (TextView) findViewById(R.id.profile_company);
+ TextView mCountry = (TextView) findViewById(R.id.profile_country);
+ Bundle extras = getIntent().getExtras();
+ if (extras != null) {
+ String fname = extras.getString(Attendee.FNAME);
+ String lname = extras.getString(Attendee.LNAME);
+ mUserName.setText(lname + " " + fname);
+ mCompany.setText(extras.getString(Attendee.COMPANY));
+ mCountry.setText(extras.getString(Attendee.COUNTRY));
+ }
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
}
}
}