[markww-foursquared] 4 new revisions pushed by markww on 2010-09-28 17:56 GMT

2 views
Skip to first unread message

markww-fo...@googlecode.com

unread,
Sep 28, 2010, 2:08:28 PM9/28/10
to foursqu...@googlegroups.com
4 new revisions:

Revision: 57bdff3a66
Author: mar...@gmail.com
Date: Mon Sep 27 14:55:51 2010
Log: Removing unused class.
http://code.google.com/r/markww-foursquared/source/detail?r=57bdff3a66

Revision: 411295f474
Author: mar...@gmail.com
Date: Tue Sep 28 10:20:10 2010
Log: Reformatted user details activity a bit to be compatible with
android ...
http://code.google.com/r/markww-foursquared/source/detail?r=411295f474

Revision: 8e2d3e87cc
Author: mar...@gmail.com
Date: Tue Sep 28 10:28:32 2010
Log: Added another workaround for layout bug on android 1.5.
http://code.google.com/r/markww-foursquared/source/detail?r=8e2d3e87cc

Revision: 4581263adc
Author: mar...@gmail.com
Date: Tue Sep 28 10:56:27 2010
Log: Updated venue checkins activity to split checkins up based on friend
r...
http://code.google.com/r/markww-foursquared/source/detail?r=4581263adc

==============================================================================
Revision: 57bdff3a66
Author: mar...@gmail.com
Date: Mon Sep 27 14:55:51 2010
Log: Removing unused class.
http://code.google.com/r/markww-foursquared/source/detail?r=57bdff3a66

Deleted:
/main/src/com/joelapenna/foursquared/widget/SackOfViewsAdapter.java

=======================================
--- /main/src/com/joelapenna/foursquared/widget/SackOfViewsAdapter.java Wed
Sep 22 11:57:13 2010
+++ /dev/null
@@ -1,174 +0,0 @@
-/***
- Copyright (c) 2008-2009 CommonsWare, LLC
- Portions (c) 2009 Google, Inc.
-
- Licensed under the Apache License, Version 2.0 (the "License"); you may
- not use this file except in compliance with the License. You may obtain
- a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-
-package com.joelapenna.foursquared.widget;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.BaseAdapter;
-
-/**
- * Adapter that simply returns row views from a list.
- *
- * If you supply a size, you must implement newView(), to
- * create a required view. The adapter will then cache these
- * views.
- *
- * If you supply a list of views in the constructor, that
- * list will be used directly. If any elements in the list
- * are null, then newView() will be called just for those
- * slots.
- *
- * Subclasses may also wish to override areAllItemsEnabled()
- * (default: false) and isEnabled() (default: false), if some
- * of their rows should be selectable.
- *
- * It is assumed each view is unique, and therefore will not
- * get recycled.
- *
- * Note that this adapter is not designed for long lists. It
- * is more for screens that should behave like a list. This
- * is particularly useful if you combine this with other
- * adapters (e.g., SectionedAdapter) that might have an
- * arbitrary number of rows, so it all appears seamless.
- */
-public class SackOfViewsAdapter extends BaseAdapter {
- private List<View> views=null;
-
- /**
- * Constructor creating an empty list of views, but with
- * a specified count. Subclasses must override newView().
- */
- public SackOfViewsAdapter(int count) {
- super();
-
- views=new ArrayList<View>(count);
-
- for (int i=0;i<count;i++) {
- views.add(null);
- }
- }
-
- /**
- * Constructor wrapping a supplied list of views.
- * Subclasses must override newView() if any of the elements
- * in the list are null.
- */
- public SackOfViewsAdapter(List<View> views) {
- super();
-
- this.views=views;
- }
-
- /**
- * Get the data item associated with the specified
- * position in the data set.
- * @param position Position of the item whose data we want
- */
- @Override
- public Object getItem(int position) {
- return(views.get(position));
- }
-
- /**
- * How many items are in the data set represented by this
- * Adapter.
- */
- @Override
- public int getCount() {
- return(views.size());
- }
-
- /**
- * Returns the number of types of Views that will be
- * created by getView().
- */
- @Override
- public int getViewTypeCount() {
- return(getCount());
- }
-
- /**
- * Get the type of View that will be created by getView()
- * for the specified item.
- * @param position Position of the item whose data we want
- */
- @Override
- public int getItemViewType(int position) {
- return(position);
- }
-
- /**
- * Are all items in this ListAdapter enabled? If yes it
- * means all items are selectable and clickable.
- */
- @Override
- public boolean areAllItemsEnabled() {
- return(false);
- }
-
- /**
- * Returns true if the item at the specified position is
- * not a separator.
- * @param position Position of the item whose data we want
- */
- @Override
- public boolean isEnabled(int position) {
- return(false);
- }
-
- /**
- * Get a View that displays the data at the specified
- * position in the data set.
- * @param position Position of the item whose data we want
- * @param convertView View to recycle, if not null
- * @param parent ViewGroup containing the returned View
- */
- @Override
- public View getView(int position, View convertView,
- ViewGroup parent) {
- View result=views.get(position);
-
- if (result==null) {
- result=newView(position, parent);
- views.set(position, result);
- }
-
- return(result);
- }
-
- /**
- * Get the row id associated with the specified position
- * in the list.
- * @param position Position of the item whose data we want
- */
- @Override
- public long getItemId(int position) {
- return(position);
- }
-
- /**
- * Create a new View to go into the list at the specified
- * position.
- * @param position Position of the item whose data we want
- * @param parent ViewGroup containing the returned View
- */
- protected View newView(int position, ViewGroup parent) {
- throw new RuntimeException("You must override newView()!");
- }
-}

==============================================================================
Revision: 411295f474
Author: mar...@gmail.com
Date: Tue Sep 28 10:20:10 2010
Log: Reformatted user details activity a bit to be compatible with android
1.5. The layout works fine if the activity is full-screen. If the activity
is displayed within a tab, then a stack overflow exception occurred within
the dark-grey sections which was a linear layout within a relative layout.
The inner linear layout was used to center the small icons. Removed the ll,
moved the elements into the parent rl. Now using some fake padding to
approximate vertical centering. So sad.
http://code.google.com/r/markww-foursquared/source/detail?r=411295f474

Modified:
/main/res/drawable/ic_menu_venue_add_todo.png
/main/res/drawable/ic_menu_venue_leave_tip.png
/main/res/layout/user_details_activity.xml
/main/src/com/joelapenna/foursquared/UserDetailsActivity.java

=======================================
--- /main/res/drawable/ic_menu_venue_add_todo.png Mon Sep 27 13:34:17 2010
+++ /main/res/drawable/ic_menu_venue_add_todo.png Tue Sep 28 10:20:10 2010
Binary file, no diff available.
=======================================
--- /main/res/drawable/ic_menu_venue_leave_tip.png Mon Sep 27 13:34:17 2010
+++ /main/res/drawable/ic_menu_venue_leave_tip.png Tue Sep 28 10:20:10 2010
Binary file, no diff available.
=======================================
--- /main/res/layout/user_details_activity.xml Sun Sep 26 16:56:17 2010
+++ /main/res/layout/user_details_activity.xml Tue Sep 28 10:20:10 2010
@@ -130,29 +130,26 @@
android:paddingLeft="2dip"

android:textAppearance="@style/TextViewStyleUserDetailsActivityGeneralTitle"
/>

- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:paddingLeft="2dip"
-
android:layout_below="@id/userDetailsActivityGeneralMayorshipsTitle" >
-
- <ImageView
- android:layout_width="16dip"
- android:layout_height="12dip"
- android:scaleType="fitXY"
- android:layout_gravity="center_vertical"
- android:layout_marginRight="4dip"
- android:src="@drawable/crown_small" />
-
- <TextView
- android:id="@+id/userDetailsActivityGeneralMayorshipsValue"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="4"
-
android:textAppearance="@style/TextViewStyleUserDetailsActivityGeneralValue"
/>
-
- </LinearLayout>
+ <ImageView
+ android:id="@+id/userDetailsActivityGeneralMayorshipsIcon"
+ android:layout_width="16dip"
+ android:layout_height="12dip"
+ android:scaleType="fitXY"
+ android:layout_gravity="center_vertical"
+ android:layout_marginRight="4dip"
+ android:layout_marginTop="7dip"
+ android:src="@drawable/crown_small"
+
android:layout_below="@id/userDetailsActivityGeneralMayorshipsTitle"
+ android:layout_alignParentLeft="true" />
+
+ <TextView
+ android:id="@+id/userDetailsActivityGeneralMayorshipsValue"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="4"
+
android:textAppearance="@style/TextViewStyleUserDetailsActivityGeneralValue"
+
android:layout_below="@id/userDetailsActivityGeneralMayorshipsTitle"
+
android:layout_toRightOf="@id/userDetailsActivityGeneralMayorshipsIcon" />

<ImageView
android:id="@+id/userDetailsActivityGeneralMayorshipsChevron"
@@ -188,30 +185,27 @@
android:paddingLeft="2dip"

android:textAppearance="@style/TextViewStyleUserDetailsActivityGeneralTitle"
/>

- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:paddingLeft="2dip"
-
android:layout_below="@id/userDetailsActivityGeneralBadgesTitle" >
-
- <ImageView
- android:layout_width="17dip"
- android:layout_height="20dip"
- android:scaleType="fitXY"
- android:layout_gravity="center_vertical"
- android:layout_marginRight="4dip"
- android:src="@drawable/badge" />
-
- <TextView
- android:id="@+id/userDetailsActivityGeneralBadgesValue"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="4"
-
android:textAppearance="@style/TextViewStyleUserDetailsActivityGeneralValue"
/>
-
- </LinearLayout>
-
+ <ImageView
+ android:id="@+id/userDetailsActivityGeneralBadgesIcon"
+ android:layout_width="17dip"
+ android:layout_height="20dip"
+ android:scaleType="fitXY"
+ android:layout_gravity="center_vertical"
+ android:layout_marginRight="4dip"
+ android:layout_marginTop="3dip"
+ android:src="@drawable/badge"
+ android:layout_below="@id/userDetailsActivityGeneralBadgesTitle"
+ android:layout_alignParentLeft="true" />
+
+ <TextView
+ android:id="@+id/userDetailsActivityGeneralBadgesValue"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="4"
+
android:textAppearance="@style/TextViewStyleUserDetailsActivityGeneralValue"
+ android:layout_below="@id/userDetailsActivityGeneralBadgesTitle"
+
android:layout_toRightOf="@id/userDetailsActivityGeneralBadgesIcon" />
+
<ImageView
android:id="@+id/userDetailsActivityGeneralBadgesChevron"
android:layout_width="9dip"
@@ -245,30 +239,27 @@
android:paddingLeft="2dip"

android:textAppearance="@style/TextViewStyleUserDetailsActivityGeneralTitle"
/>

- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:paddingLeft="2dip"
- android:layout_below="@id/userDetailsActivityGeneralTipsTitle" >
-
- <ImageView
- android:layout_width="13dip"
- android:layout_height="19dip"
- android:scaleType="fitXY"
- android:layout_gravity="center_vertical"
- android:layout_marginRight="4dip"
- android:src="@drawable/tip" />
-
- <TextView
- android:id="@+id/userDetailsActivityGeneralTipsValue"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="4"
-
android:textAppearance="@style/TextViewStyleUserDetailsActivityGeneralValue"
/>
-
- </LinearLayout>
-
+ <ImageView
+ android:id="@+id/userDetailsActivityGeneralTipsIcon"
+ android:layout_width="13dip"
+ android:layout_height="19dip"
+ android:scaleType="fitXY"
+ android:layout_gravity="center_vertical"
+ android:layout_marginRight="4dip"
+ android:layout_marginTop="3dip"
+ android:src="@drawable/tip"
+ android:layout_below="@id/userDetailsActivityGeneralTipsTitle"
+ android:layout_alignParentLeft="true" />
+
+ <TextView
+ android:id="@+id/userDetailsActivityGeneralTipsValue"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="4"
+
android:textAppearance="@style/TextViewStyleUserDetailsActivityGeneralValue"
+ android:layout_below="@id/userDetailsActivityGeneralTipsTitle"
+ android:layout_toRightOf="@id/userDetailsActivityGeneralTipsIcon"
/>
+
<ImageView
android:id="@+id/userDetailsActivityGeneralTipsChevron"
android:layout_width="9dip"
=======================================
--- /main/src/com/joelapenna/foursquared/UserDetailsActivity.java Mon Sep
27 14:53:02 2010
+++ /main/src/com/joelapenna/foursquared/UserDetailsActivity.java Tue Sep
28 10:20:10 2010
@@ -176,6 +176,8 @@

private void ensureUi() {

+ int sdk = UiUtil.sdkVersion();
+
View viewProgressBar =
findViewById(R.id.venueActivityDetailsProgress);
TextView tvUsername =
(TextView)findViewById(R.id.userDetailsActivityUsername);
TextView tvLastSeen =
(TextView)findViewById(R.id.userDetailsActivityHometownOrLastSeen);
@@ -307,7 +309,9 @@
}
});
viewMayorships.setFocusable(true);
- ivMayorshipsChevron.setVisibility(View.VISIBLE);
+ if (sdk > 3) {
+ ivMayorshipsChevron.setVisibility(View.VISIBLE);
+ }
}

if (user.getBadges() != null && user.getBadges().size() >
0) {
@@ -318,7 +322,9 @@
}
});
viewBadges.setFocusable(true);
- ivBadgesChevron.setVisibility(View.VISIBLE);
+ if (sdk > 3) {
+ ivBadgesChevron.setVisibility(View.VISIBLE);
+ }
}

if (user.getTipCount() > 0) {
@@ -329,7 +335,9 @@
}
});
viewTips.setFocusable(true);
- ivTipsChevron.setVisibility(View.VISIBLE);
+ if (sdk > 3) {
+ ivTipsChevron.setVisibility(View.VISIBLE);
+ }
}

// The rest of the items depend on if we're viewing
ourselves or not.

==============================================================================
Revision: 8e2d3e87cc
Author: mar...@gmail.com
Date: Tue Sep 28 10:28:32 2010
Log: Added another workaround for layout bug on android 1.5.
http://code.google.com/r/markww-foursquared/source/detail?r=8e2d3e87cc

Modified:
/main/src/com/joelapenna/foursquared/widget/TodosListAdapter.java

=======================================
--- /main/src/com/joelapenna/foursquared/widget/TodosListAdapter.java Wed
Sep 22 11:57:13 2010
+++ /main/src/com/joelapenna/foursquared/widget/TodosListAdapter.java Tue
Sep 28 10:28:32 2010
@@ -13,6 +13,7 @@
import com.joelapenna.foursquared.util.RemoteResourceManager;
import com.joelapenna.foursquared.util.StringFormatters;
import com.joelapenna.foursquared.util.TipUtils;
+import com.joelapenna.foursquared.util.UiUtil;

import android.content.Context;
import android.content.res.Resources;
@@ -53,6 +54,7 @@
private int mLoadedPhotoIndex;
private Map<String, String> mCachedTimestamps;
private boolean mDisplayVenueTitles;
+ private int mSdk;


public TodosListAdapter(Context context, RemoteResourceManager rrm) {
@@ -65,6 +67,7 @@
mLoadedPhotoIndex = 0;
mCachedTimestamps = new HashMap<String, String>();
mDisplayVenueTitles = true;
+ mSdk = UiUtil.sdkVersion();

mRrm.addObserver(mResourcesObserver);
}
@@ -138,7 +141,12 @@
holder.body.setText(tip.getText());
holder.body.setVisibility(View.VISIBLE);
} else {
- holder.body.setVisibility(View.GONE);
+ if (mSdk > 3) {
+ holder.body.setVisibility(View.GONE);
+ } else {
+ holder.body.setText("");
+ holder.body.setVisibility(View.INVISIBLE);
+ }
}

==============================================================================
Revision: 4581263adc
Author: mar...@gmail.com
Date: Tue Sep 28 10:56:27 2010
Log: Updated venue checkins activity to split checkins up based on friend
relationship or seeing yourself at a venue.
http://code.google.com/r/markww-foursquared/source/detail?r=4581263adc

Modified:
/main/res/values/strings.xml
/main/src/com/joelapenna/foursquared/VenueCheckinsActivity.java

=======================================
--- /main/res/values/strings.xml Mon Sep 27 10:19:14 2010
+++ /main/res/values/strings.xml Tue Sep 28 10:56:27 2010
@@ -358,14 +358,21 @@
<string name="venue_activity_mayor_name_none">This place has no
mayor</string>
<string name="venue_activity_mayor_text">is the mayor</string>
<string name="venue_activity_mayor_text_none">Check in here and it could
be you</string>
- <string name="venue_activity_people_count_single">%d person is
here</string>
- <string name="venue_activity_people_count_plural">%d people are
here</string>
+ <string name="venue_activity_people_count_you">You\'re here!</string>
+ <string name="venue_activity_checkins_count_friends_single">%d friend is
here</string>
+ <string name="venue_activity_checkins_count_friends_plural">%d friends
are here</string>
+ <string name="venue_activity_checkins_count_others_single">%d other
person is here</string>
+ <string name="venue_activity_checkins_count_others_plural">%d other
people are here</string>
+ <string name="venue_activity_checkins_count_others_alone_single">%d
person is here</string>
+ <string name="venue_activity_checkins_count_others_alone_plural">%d
people are here</string>
<string name="venue_activity_tip_count_single">%d tip here</string>
<string name="venue_activity_tip_count_plural">%d tips here</string>
<string name="venue_activity_tip_count_none">No tips here</string>
<string name="venue_activity_tip_count_friend_single">%d tip from
friends</string>
<string name="venue_activity_tip_count_friend_plural">%d tips from
friends</string>
<string name="venue_activity_tip_count_other_people">%d left by other
people</string>
+ <string name="venue_activity_people_count_single">%d person is
here</string>
+ <string name="venue_activity_people_count_plural">%d people are
here</string>
<string name="venue_activity_people_count_friend_single">%d friend is
here</string>
<string name="venue_activity_people_count_friend_plural">%d friends are
here</string>
<string name="venue_activity_people_count_friend_single_single">%d
friend is here with %d other person</string>
=======================================
--- /main/src/com/joelapenna/foursquared/VenueCheckinsActivity.java Thu Sep
16 15:38:32 2010
+++ /main/src/com/joelapenna/foursquared/VenueCheckinsActivity.java Tue Sep
28 10:56:27 2010
@@ -4,6 +4,15 @@

package com.joelapenna.foursquared;

+import com.joelapenna.foursquare.types.Checkin;
+import com.joelapenna.foursquare.types.Group;
+import com.joelapenna.foursquare.types.User;
+import com.joelapenna.foursquare.types.Venue;
+import com.joelapenna.foursquared.app.LoadableListActivity;
+import com.joelapenna.foursquared.util.UserUtils;
+import com.joelapenna.foursquared.widget.CheckinListAdapter;
+import com.joelapenna.foursquared.widget.SeparatedListAdapter;
+
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@@ -15,13 +24,6 @@
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;

-import com.joelapenna.foursquare.types.Checkin;
-import com.joelapenna.foursquare.types.Group;
-import com.joelapenna.foursquare.types.Venue;
-import com.joelapenna.foursquared.app.LoadableListActivity;
-import com.joelapenna.foursquared.widget.CheckinListAdapter;
-import com.joelapenna.foursquared.widget.SeparatedListAdapter;
-
/**
* @author Joe LaPenna (j...@joelapenna.com)
* @author Mark Wyszomierski (mar...@gmail.com)
@@ -56,9 +58,10 @@
if (retained != null && retained instanceof StateHolder) {
mStateHolder = (StateHolder) retained;
} else {
- mStateHolder = new StateHolder();
if (getIntent().hasExtra(INTENT_EXTRA_VENUE)) {
-
mStateHolder.setVenue((Venue)getIntent().getExtras().getParcelable(INTENT_EXTRA_VENUE));
+ mStateHolder = new StateHolder(
+
(Venue)getIntent().getExtras().getParcelable(INTENT_EXTRA_VENUE),
+ ((Foursquared) getApplication()).getUserId());
} else {
Log.e(TAG, "VenueCheckinsActivity requires a venue parcel
its intent extras.");
finish();
@@ -86,21 +89,45 @@

private void ensureUi() {

- Group<Checkin> checkins = mStateHolder.getVenue().getCheckins();
-
- CheckinListAdapter groupAdapter = new CheckinListAdapter(this,
- ((Foursquared)
getApplication()).getRemoteResourceManager());
- groupAdapter.setGroup(checkins);
-
- String title = "";
- if (checkins.size() == 1) {
- title =
getResources().getString(R.string.venue_activity_people_count_single,
checkins.size());
- } else {
- title =
getResources().getString(R.string.venue_activity_people_count_plural,
checkins.size());
- }
-
mListAdapter = new SeparatedListAdapter(this);
- mListAdapter.addSection(title, groupAdapter);
+
+ if (mStateHolder.getCheckinsYou().size() > 0) {
+ String title =
getResources().getString(R.string.venue_activity_people_count_you);
+
+ CheckinListAdapter adapter = new CheckinListAdapter(this,
+ ((Foursquared)
getApplication()).getRemoteResourceManager());
+ adapter.setGroup(mStateHolder.getCheckinsYou());
+ mListAdapter.addSection(title, adapter);
+ }
+ if (mStateHolder.getCheckinsFriends().size() > 0) {
+ String title = getResources().getString(
+ mStateHolder.getCheckinsOthers().size() == 1 ?
+ R.string.venue_activity_checkins_count_friends_single :
+ R.string.venue_activity_checkins_count_friends_plural,
+ mStateHolder.getCheckinsOthers().size());
+
+ CheckinListAdapter adapter = new CheckinListAdapter(this,
+ ((Foursquared)
getApplication()).getRemoteResourceManager());
+ adapter.setGroup(mStateHolder.getCheckinsFriends());
+ mListAdapter.addSection(title, adapter);
+ }
+ if (mStateHolder.getCheckinsOthers().size() > 0) {
+ boolean others = mStateHolder.getCheckinsYou().size() +
+ mStateHolder.getCheckinsFriends().size() > 0;
+
+ String title = getResources().getString(
+ mStateHolder.getCheckinsOthers().size() == 1 ?
+ (others ?
R.string.venue_activity_checkins_count_others_single :
+
R.string.venue_activity_checkins_count_others_alone_single) :
+ (others ?
R.string.venue_activity_checkins_count_others_plural :
+
R.string.venue_activity_checkins_count_others_alone_plural),
+ mStateHolder.getCheckinsOthers().size());
+
+ CheckinListAdapter adapter = new CheckinListAdapter(this,
+ ((Foursquared)
getApplication()).getRemoteResourceManager());
+ adapter.setGroup(mStateHolder.getCheckinsOthers());
+ mListAdapter.addSection(title, adapter);
+ }

ListView listView = getListView();
listView.setAdapter(mListAdapter);
@@ -120,17 +147,40 @@

private static class StateHolder {

- private Venue mVenue;
-
- public StateHolder() {
+ private Group<Checkin> mYou;
+ private Group<Checkin> mFriends;
+ private Group<Checkin> mOthers;
+
+ public StateHolder(Venue venue, String loggedInUserId) {
+ mYou = new Group<Checkin>();
+ mFriends = new Group<Checkin>();
+ mOthers = new Group<Checkin>();
+
+ mYou.clear();
+ mFriends.clear();
+ mOthers.clear();
+ for (Checkin it : venue.getCheckins()) {
+ User user = it.getUser();
+ if (UserUtils.isFriend(user)) {
+ mFriends.add(it);
+ } else if (loggedInUserId.equals(user.getId())) {
+ mYou.add(it);
+ } else {
+ mOthers.add(it);
+ }
+ }
}

- public Venue getVenue() {
- return mVenue;
+ public Group<Checkin> getCheckinsYou() {
+ return mYou;
+ }
+
+ public Group<Checkin> getCheckinsFriends() {
+ return mFriends;
}

- public void setVenue(Venue venue) {
- mVenue = venue;
+ public Group<Checkin> getCheckinsOthers() {
+ return mOthers;
}
}
}

Reply all
Reply to author
Forward
0 new messages