use of com.abewy.android.apps.klyph.adapter.MultiObjectAdapter in project Klyph by jonathangerbaud.
the class ConversationFragment method onViewCreated.
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
MultiObjectAdapter adapter = KlyphPreferences.areBannerAdsEnabled() ? new ConversationAdapter(getListView()) : new MultiObjectAdapter(getListView());
setListAdapter(adapter);
registerForContextMenu(getListView());
defineEmptyText(R.string.empty_list_no_message);
getListView().setStackFromBottom(true);
getListView().setDrawSelectorOnTop(false);
getListView().setSelector(R.drawable.transparent_selector);
// getListView().setTranscriptMode(AbsListView.TRANSCRIPT_MODE_ALWAYS_SCROLL);
setListVisible(false);
setRequestType(Query.MESSAGES);
setLoadingObjectAsFirstItem(true);
super.onViewCreated(view, savedInstanceState);
}
use of com.abewy.android.apps.klyph.adapter.MultiObjectAdapter in project Klyph by jonathangerbaud.
the class UserLikeDialog method onViewCreated.
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
setListAdapter(new MultiObjectAdapter(getListView()));
defineEmptyText(R.string.empty_list_no_user);
getListView().setOnItemClickListener(this);
setListVisible(false);
setRequestType(Query.USER_LIKE);
load();
}
use of com.abewy.android.apps.klyph.adapter.MultiObjectAdapter in project Klyph by jonathangerbaud.
the class UserListDialog method onViewCreated.
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
defineEmptyText(R.string.empty_list_no_user);
setEmptyViewVisible(false);
setListAdapter(new MultiObjectAdapter(getListView()));
getListView().setOnItemClickListener(this);
setListVisible(false);
if (list != null) {
populate(list);
setNoMoreData(true);
}
}
use of com.abewy.android.apps.klyph.adapter.MultiObjectAdapter 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.MultiObjectAdapter in project Klyph by jonathangerbaud.
the class PostPhotos method setImages.
public void setImages(List<String> uris) {
MultiObjectAdapter adapter = new MultiObjectAdapter(getListView()) {
@Override
protected TypeAdapter<GraphObject> getAdapter(GraphObject object, int layoutType) {
TypeAdapter<GraphObject> adapter = BaseAdapterSelector.getAdapter(object, layoutType);
if (adapter != null)
return adapter;
if (object instanceof Picture)
return new GalleryAdapter();
return null;
}
};
for (String uri : uris) {
adapter.add(new Picture(uri));
}
getGridView().setAdapter(adapter);
adapter.notifyDataSetChanged();
setListVisible(true);
}
Aggregations