use of com.abewy.android.apps.klyph.adapter.animation.GoogleCardStyleAdapter in project Klyph by jonathangerbaud.
the class StreamListFragment method onViewCreated.
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
MultiObjectAdapter adapter = /* KlyphPreferences.areBannerAdsEnabled() ? new NewsfeedAdapter(getListView()) : */
new MultiObjectAdapter(getListView());
if (KlyphPreferences.animateCards()) {
GoogleCardStyleAdapter gcsAdapter = new GoogleCardStyleAdapter(adapter);
gcsAdapter.setAbsListView(getListView());
setListAdapter(gcsAdapter);
} else {
setListAdapter(adapter);
}
defineEmptyText(R.string.empty_list_no_stream);
// getListView().setPadding(0, 8, 0, 0);
// getListView().setDivider(getResources().getDrawable(R.drawable.hdivider_transparent));
// getGridView().setVerticalSpacing(16);
// getListView().setItemsCanFocus(false);
getListView().setDrawSelectorOnTop(true);
getListView().setSelector(AttrUtil.getResourceId(getActivity(), R.attr.streamSelector));
setListVisible(false);
if (KlyphData.getFriendLists() == null) {
new AsyncRequest(Query.FRIEND_LISTS, "", "", new Callback() {
@Override
public void onComplete(Response response) {
onRequestComplete(response);
}
}).execute();
}
super.onViewCreated(view, savedInstanceState);
}
use of com.abewy.android.apps.klyph.adapter.animation.GoogleCardStyleAdapter in project Klyph by jonathangerbaud.
the class UserTimeline method onViewCreated.
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
defineEmptyText(R.string.empty_list_no_stream);
setListVisible(false);
getListView().setDrawSelectorOnTop(true);
getListView().setSelector(AttrUtil.getResourceId(getActivity(), R.attr.streamSelector));
super.onViewCreated(view, savedInstanceState);
MultiObjectAdapter adapter = /*KlyphPreferences.areBannerAdsEnabled() ? new NewsfeedAdapter(getListView(), SpecialLayout.ELEMENT_TIMELINE)
: */
new MultiObjectAdapter(getListView(), SpecialLayout.ELEMENT_TIMELINE);
if (KlyphPreferences.animateCards()) {
GoogleCardStyleAdapter gcsAdapter = new GoogleCardStyleAdapter(adapter);
gcsAdapter.setAbsListView(getListView());
setListAdapter(gcsAdapter);
} else {
setListAdapter(adapter);
}
}
use of com.abewy.android.apps.klyph.adapter.animation.GoogleCardStyleAdapter in project Klyph by jonathangerbaud.
the class EventFragment method onViewCreated.
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
defineEmptyText(R.string.empty_list_no_data);
setListVisible(false);
attendButtonListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
if (!event.isUserAttendingEvent()) {
handleResponseClick(Query.POST_EVENT_ATTEND);
}
}
};
unsureButtonListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
if (!event.isUserUnsureEvent()) {
handleResponseClick(Query.POST_EVENT_UNSURE);
}
}
};
declinedButtonListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
if (!event.isUserDeclinedEvent()) {
handleResponseClick(Query.POST_EVENT_DECLINE);
}
}
};
invitedGuestListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
UserListDialog dialog = new UserListDialog();
dialog.setCustomTitle(getString(R.string.event_num_invitee, event.getAll_members_count()));
dialog.setRequestType(Query.EVENT_INVITED);
dialog.setElementId(event.getEid());
dialog.show(getFragmentManager(), "");
dialog.load();
}
};
goingGuestListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
UserListDialog dialog = new UserListDialog();
dialog.setCustomTitle(getString(R.string.event_num_attending, event.getAttending_count()));
dialog.setRequestType(Query.EVENT_GOING);
dialog.setElementId(event.getEid());
dialog.show(getFragmentManager(), "");
dialog.load();
}
};
unsureGuestListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
UserListDialog dialog = new UserListDialog();
dialog.setCustomTitle(getString(R.string.event_num_unsure, event.getUnsure_count()));
dialog.setRequestType(Query.EVENT_MAYBE);
dialog.setElementId(event.getEid());
dialog.show(getFragmentManager(), "");
dialog.load();
}
};
declinedGuestListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
UserListDialog dialog = new UserListDialog();
dialog.setCustomTitle(getString(R.string.event_num_declined, event.getDeclined_count()));
dialog.setRequestType(Query.EVENT_DECLINED);
dialog.setElementId(event.getEid());
dialog.show(getFragmentManager(), "");
dialog.load();
}
};
setRequestType(Query.EVENT_TIMELINE);
setNewestRequestType(Query.EVENT_TIMELINE);
super.onViewCreated(view, savedInstanceState);
MultiObjectAdapter adapter = /*KlyphPreferences.areBannerAdsEnabled() ? new NewsfeedAdapter(getListView(), SpecialLayout.EVENT_ABOUT)
: */
new MultiObjectAdapter(getListView(), SpecialLayout.EVENT_ABOUT);
if (KlyphPreferences.animateCards()) {
GoogleCardStyleAdapter gcsAdapter = new GoogleCardStyleAdapter(adapter);
gcsAdapter.setAbsListView(getListView());
setListAdapter(gcsAdapter);
} else {
setListAdapter(adapter);
}
}
Aggregations