Search in sources :

Example 1 with StreamHolder

use of com.abewy.android.apps.klyph.adapter.holder.StreamHolder in project Klyph by jonathangerbaud.

the class StreamAdapter2 method mergeViewWithData.

@Override
protected void mergeViewWithData(View view, GraphObject data) {
    super.mergeViewWithData(view, data);
    if (buttonBarAdapter == null)
        buttonBarAdapter = new StreamButtonBar(parentAdapter, specialLayout);
    if (photoAdapter == null)
        photoAdapter = new StreamPhoto(parentAdapter, specialLayout);
    if (linkAdapter == null)
        linkAdapter = new StreamLink(parentAdapter, specialLayout);
    if (statusAdapter == null)
        statusAdapter = new StreamStatus(parentAdapter, specialLayout);
    final StreamHolder holder = (StreamHolder) getHolder(view);
    setData(view, data);
    final Stream stream = (Stream) data;
    setData(holder, stream);
}
Also used : StreamButtonBar(com.abewy.android.apps.klyph.adapter.subAdapter.StreamButtonBar) StreamPhoto(com.abewy.android.apps.klyph.adapter.subAdapter.StreamPhoto) Stream(com.abewy.android.apps.klyph.core.fql.Stream) StreamStatus(com.abewy.android.apps.klyph.adapter.subAdapter.StreamStatus) StreamLink(com.abewy.android.apps.klyph.adapter.subAdapter.StreamLink) StreamHolder(com.abewy.android.apps.klyph.adapter.holder.StreamHolder)

Example 2 with StreamHolder

use of com.abewy.android.apps.klyph.adapter.holder.StreamHolder in project Klyph by jonathangerbaud.

the class StreamAdapter2 method attachHolder.

@Override
protected void attachHolder(View view) {
    ImageView authorProfileImage = (ImageView) view.findViewById(R.id.author_profile_image);
    TextView story = (TextView) view.findViewById(R.id.story);
    TextView postTime = (TextView) view.findViewById(R.id.post_time);
    ImageView sharedAuthorProfileImage = (ImageView) view.findViewById(R.id.shared_author_profile_image);
    TextView sharedStory = (TextView) view.findViewById(R.id.shared_story);
    TextView sharedPostTime = (TextView) view.findViewById(R.id.shared_post_time);
    TextView message = (TextView) view.findViewById(R.id.message);
    ImageView postPhoto = (ImageView) view.findViewById(R.id.post_photo);
    ImageView postVideoPlay = (ImageView) view.findViewById(R.id.post_video_play);
    TextView videoTitle = (TextView) view.findViewById(R.id.post_video_title);
    TextView videoUrl = (TextView) view.findViewById(R.id.post_video_url);
    ImageView postPicturePlay = (ImageView) view.findViewById(R.id.post_picture_play);
    ImageView postLinkBackground = (ImageView) view.findViewById(R.id.stream_link_image_background);
    TextView postName = (TextView) view.findViewById(R.id.post_name);
    TextView postCaption = (TextView) view.findViewById(R.id.post_caption);
    TextView postDescription = (TextView) view.findViewById(R.id.post_description);
    HListView streamAlbum = (HListView) view.findViewById(R.id.stream_album);
    ViewGroup streamLink = (ViewGroup) view.findViewById(R.id.stream_link);
    Button likeButton = (Button) view.findViewById(R.id.like_button);
    Button commentButton = (Button) view.findViewById(R.id.comment_button);
    ImageButton shareButton = (ImageButton) view.findViewById(R.id.share_button);
    ImageButton overflowButton = (ImageButton) view.findViewById(R.id.overflow_button);
    ViewGroup buttonBar = (ViewGroup) view.findViewById(R.id.button_bar);
    View buttonBarDivider = (View) view.findViewById(R.id.button_bar_divider);
    StreamHolder holder = new StreamHolder(authorProfileImage, story, postTime, sharedAuthorProfileImage, sharedStory, sharedPostTime, message, postPhoto, postVideoPlay, videoTitle, videoUrl, postPicturePlay, postLinkBackground, postName, postCaption, postDescription, likeButton, commentButton, shareButton, overflowButton, streamAlbum, streamLink, buttonBar, buttonBarDivider);
    setHolder(view, holder);
}
Also used : ImageButton(android.widget.ImageButton) HListView(it.sephiroth.android.library.widget.HListView) ImageButton(android.widget.ImageButton) Button(android.widget.Button) ViewGroup(android.view.ViewGroup) TextView(android.widget.TextView) ImageView(android.widget.ImageView) ImageView(android.widget.ImageView) HListView(it.sephiroth.android.library.widget.HListView) View(android.view.View) TextView(android.widget.TextView) StreamHolder(com.abewy.android.apps.klyph.adapter.holder.StreamHolder)

Example 3 with StreamHolder

use of com.abewy.android.apps.klyph.adapter.holder.StreamHolder in project Klyph by jonathangerbaud.

the class StreamAdapter method mergeViewWithData.

@Override
protected void mergeViewWithData(View view, GraphObject data) {
    //GraphObject previousData = getData(view);
    /*if (previousData != null)
		{
			if (((Stream) previousData).getPost_id().equals(((Stream) data).getPost_id()))
			{
				return;
			}
		}*/
    super.mergeViewWithData(view, data);
    // getParentAdapter() = null on constructor
    if (buttonBarAdapter == null)
        buttonBarAdapter = new StreamButtonBar(parentAdapter, specialLayout);
    if (photoAdapter == null)
        photoAdapter = new StreamPhoto(parentAdapter, specialLayout);
    if (linkAdapter == null)
        linkAdapter = new StreamLink(parentAdapter, specialLayout);
    if (statusAdapter == null)
        statusAdapter = new StreamStatus(parentAdapter, specialLayout);
    final StreamHolder holder = (StreamHolder) getHolder(view);
    setData(view, data);
    setData(view, holder, (Stream) data);
}
Also used : StreamButtonBar(com.abewy.android.apps.klyph.adapter.subAdapter.StreamButtonBar) StreamPhoto(com.abewy.android.apps.klyph.adapter.subAdapter.StreamPhoto) StreamStatus(com.abewy.android.apps.klyph.adapter.subAdapter.StreamStatus) StreamLink(com.abewy.android.apps.klyph.adapter.subAdapter.StreamLink) StreamHolder(com.abewy.android.apps.klyph.adapter.holder.StreamHolder)

Example 4 with StreamHolder

use of com.abewy.android.apps.klyph.adapter.holder.StreamHolder in project Klyph by jonathangerbaud.

the class StreamAdapter method attachHolder.

@Override
protected void attachHolder(View view) {
    ImageView authorProfileImage = (ImageView) view.findViewById(R.id.author_profile_image);
    TextView story = (TextView) view.findViewById(R.id.story);
    TextView postTime = (TextView) view.findViewById(R.id.post_time);
    ImageView sharedAuthorProfileImage = (ImageView) view.findViewById(R.id.shared_author_profile_image);
    TextView sharedStory = (TextView) view.findViewById(R.id.shared_story);
    TextView sharedPostTime = (TextView) view.findViewById(R.id.shared_post_time);
    TextView message = (TextView) view.findViewById(R.id.message);
    ImageView postPhoto = (ImageView) view.findViewById(R.id.post_photo);
    ImageView postVideoPlay = (ImageView) view.findViewById(R.id.post_video_play);
    TextView videoTitle = (TextView) view.findViewById(R.id.post_video_title);
    TextView videoUrl = (TextView) view.findViewById(R.id.post_video_url);
    ImageView postPicturePlay = (ImageView) view.findViewById(R.id.post_picture_play);
    ImageView postLinkBackground = (ImageView) view.findViewById(R.id.stream_link_image_background);
    TextView postName = (TextView) view.findViewById(R.id.post_name);
    TextView postCaption = (TextView) view.findViewById(R.id.post_caption);
    TextView postDescription = (TextView) view.findViewById(R.id.post_description);
    Button likeButton = (Button) view.findViewById(R.id.like_button);
    Button commentButton = (Button) view.findViewById(R.id.comment_button);
    ImageButton shareButton = (ImageButton) view.findViewById(R.id.share_button);
    ImageButton overflowButton = (ImageButton) view.findViewById(R.id.overflow_button);
    HListView streamAlbum = (HListView) view.findViewById(R.id.stream_album);
    ViewGroup streamLink = (ViewGroup) view.findViewById(R.id.stream_link);
    ViewGroup buttonBar = (ViewGroup) view.findViewById(R.id.button_bar);
    View buttonBarDivider = (View) view.findViewById(R.id.button_bar_divider);
    StreamHolder holder = new StreamHolder(authorProfileImage, story, postTime, sharedAuthorProfileImage, sharedStory, sharedPostTime, message, postPhoto, postVideoPlay, videoTitle, videoUrl, postPicturePlay, postLinkBackground, postName, postCaption, postDescription, likeButton, commentButton, shareButton, overflowButton, streamAlbum, streamLink, buttonBar, buttonBarDivider);
    setHolder(view, holder);
}
Also used : ImageButton(android.widget.ImageButton) HListView(it.sephiroth.android.library.widget.HListView) ImageButton(android.widget.ImageButton) Button(android.widget.Button) ViewGroup(android.view.ViewGroup) TextView(android.widget.TextView) ImageView(android.widget.ImageView) ImageView(android.widget.ImageView) HListView(it.sephiroth.android.library.widget.HListView) TextView(android.widget.TextView) View(android.view.View) StreamHolder(com.abewy.android.apps.klyph.adapter.holder.StreamHolder)

Aggregations

StreamHolder (com.abewy.android.apps.klyph.adapter.holder.StreamHolder)4 View (android.view.View)2 ViewGroup (android.view.ViewGroup)2 Button (android.widget.Button)2 ImageButton (android.widget.ImageButton)2 ImageView (android.widget.ImageView)2 TextView (android.widget.TextView)2 StreamButtonBar (com.abewy.android.apps.klyph.adapter.subAdapter.StreamButtonBar)2 StreamLink (com.abewy.android.apps.klyph.adapter.subAdapter.StreamLink)2 StreamPhoto (com.abewy.android.apps.klyph.adapter.subAdapter.StreamPhoto)2 StreamStatus (com.abewy.android.apps.klyph.adapter.subAdapter.StreamStatus)2 HListView (it.sephiroth.android.library.widget.HListView)2 Stream (com.abewy.android.apps.klyph.core.fql.Stream)1