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);
}
use of com.abewy.android.apps.klyph.adapter.MultiObjectAdapter in project Klyph by jonathangerbaud.
the class StreamFragment method onViewCreated.
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
defineEmptyText(R.string.cannot_find_post);
adapter = new MultiObjectAdapter(getListView(), SpecialLayout.STREAM_DETAIL);
setListAdapter(adapter);
getListView().getAdapter().registerDataSetObserver(observer);
sendButton = (ImageButton) view.findViewById(R.id.send_button);
sendEditText = (EditText) view.findViewById(R.id.send_text_edit);
sendButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
handlePostComment();
}
});
setListVisible(false);
super.onViewCreated(view, savedInstanceState);
getGridView().setVerticalSpacing(1);
}
use of com.abewy.android.apps.klyph.adapter.MultiObjectAdapter 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);
}
Aggregations