use of com.abewy.android.apps.klyph.core.fql.Friend in project Klyph by jonathangerbaud.
the class EventDeclined method onGridItemClick.
@Override
public void onGridItemClick(KlyphGridView gridView, View v, int position, long id) {
Friend friend = (Friend) gridView.getItemAtPosition(position);
startActivity(Klyph.getIntentForGraphObject(getActivity(), friend));
}
use of com.abewy.android.apps.klyph.core.fql.Friend in project Klyph by jonathangerbaud.
the class FollowedPeople method onGridItemClick.
@Override
public void onGridItemClick(KlyphGridView l, View v, int position, long id) {
Friend friend = (Friend) l.getItemAtPosition(position);
startActivity(Klyph.getIntentForGraphObject(getActivity(), friend));
}
use of com.abewy.android.apps.klyph.core.fql.Friend in project Klyph by jonathangerbaud.
the class FollowedPeople method onViewCreated.
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
MultiObjectAdapter moa = new MultiObjectAdapter(getListView());
moa.setFilter(new Filter() {
@SuppressWarnings("unchecked")
@Override
protected void publishResults(CharSequence constraint, FilterResults results) {
setFilteredResults((List<GraphObject>) results.values);
}
@Override
protected FilterResults performFiltering(CharSequence constraint) {
FilterResults results = new FilterResults();
List<Friend> filteredFriends = new ArrayList<Friend>();
// perform your search here using the searchConstraint String.
constraint = constraint.toString().toLowerCase();
for (int i = 0; i < friends.size(); i++) {
Friend friend = (Friend) friends.get(i);
if (friend.getName().toLowerCase().startsWith(constraint.toString())) {
filteredFriends.add(friend);
}
}
results.count = filteredFriends.size();
results.values = filteredFriends;
return results;
}
});
setListAdapter(moa);
defineEmptyText(R.string.empty_list_no_user);
setListVisible(false);
setRequestType(Query.FOLLOWED_PEOPLE);
super.onViewCreated(view, savedInstanceState);
}
use of com.abewy.android.apps.klyph.core.fql.Friend in project Klyph by jonathangerbaud.
the class UserListDialog method onItemClick.
@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) {
GraphObject object = (GraphObject) arg0.getItemAtPosition(position);
if (object instanceof Tag) {
Tag tag = (Tag) object;
startActivity(Klyph.getIntentForGraphObject(getActivity(), tag));
} else if (object instanceof Friend) {
Friend friend = (Friend) object;
startActivity(Klyph.getIntentForGraphObject(getActivity(), friend));
}
}
use of com.abewy.android.apps.klyph.core.fql.Friend in project Klyph by jonathangerbaud.
the class FriendDeserializer method deserializeObject.
@Override
public GraphObject deserializeObject(JSONObject data) {
Friend friend = new Friend();
deserializePrimitives(friend, data);
friend.setEducation(new EducationDeserializer().deserializeArray(getJsonArray(data, "education"), Education.class));
friend.setWork(new WorkDeserializer().deserializeArray(getJsonArray(data, "work"), Work.class));
return friend;
}
Aggregations