Search in sources :

Example 11 with MultiObjectAdapter

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);
}
Also used : MultiObjectAdapter(com.abewy.android.apps.klyph.adapter.MultiObjectAdapter) ConversationAdapter(com.abewy.android.apps.klyph.adapter.ConversationAdapter)

Example 12 with MultiObjectAdapter

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();
}
Also used : MultiObjectAdapter(com.abewy.android.apps.klyph.adapter.MultiObjectAdapter)

Example 13 with MultiObjectAdapter

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);
    }
}
Also used : MultiObjectAdapter(com.abewy.android.apps.klyph.adapter.MultiObjectAdapter)

Example 14 with MultiObjectAdapter

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);
    }
}
Also used : MultiObjectAdapter(com.abewy.android.apps.klyph.adapter.MultiObjectAdapter) GoogleCardStyleAdapter(com.abewy.android.apps.klyph.adapter.animation.GoogleCardStyleAdapter)

Example 15 with MultiObjectAdapter

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);
}
Also used : MultiObjectAdapter(com.abewy.android.apps.klyph.adapter.MultiObjectAdapter) GraphObject(com.abewy.android.apps.klyph.core.graph.GraphObject)

Aggregations

MultiObjectAdapter (com.abewy.android.apps.klyph.adapter.MultiObjectAdapter)32 View (android.view.View)7 GraphObject (com.abewy.android.apps.klyph.core.graph.GraphObject)7 ArrayList (java.util.ArrayList)5 List (java.util.List)4 Filter (android.widget.Filter)3 GoogleCardStyleAdapter (com.abewy.android.apps.klyph.adapter.animation.GoogleCardStyleAdapter)3 KlyphGridView (com.abewy.android.apps.klyph.widget.KlyphGridView)3 ImageView (android.widget.ImageView)2 ListView (android.widget.ListView)2 TextView (android.widget.TextView)2 Friend (com.abewy.android.apps.klyph.core.fql.Friend)2 AlertDialog (android.app.AlertDialog)1 DialogInterface (android.content.DialogInterface)1 Intent (android.content.Intent)1 Handler (android.os.Handler)1 Editable (android.text.Editable)1 TextWatcher (android.text.TextWatcher)1 SparseBooleanArray (android.util.SparseBooleanArray)1 KeyEvent (android.view.KeyEvent)1