Search in sources :

Example 1 with ContentStreamAdView

use of com.my.target.nativeads.views.ContentStreamAdView in project mytarget-android by myTargetSDK.

the class FeedAdapter method getAdView.

public View getAdView() {
    View view = null;
    switch(feedType) {
        case Type.CONTENT_WALL:
        case Type.CONTENT_WALL_VIDEO:
            view = NativeViewsFactory.getContentWallView(nativeAd, context);
            break;
        case Type.CONTENT_STREAM:
        case Type.CONTENT_STREAM_VIDEO:
        case Type.NATIVE_SLIDER:
            ContentStreamAdView contentStreamView = NativeViewsFactory.getContentStreamView(nativeAd.getBanner(), context);
            contentStreamView.loadImages();
            view = contentStreamView;
            break;
        case Type.CHAT_LIST:
            ChatListAdView chatListView = NativeViewsFactory.getChatListView(nativeAd, context);
            chatListView.loadImages();
            view = chatListView;
            break;
        case Type.NEWS_FEED:
            NewsFeedAdView newsFeedView = NativeViewsFactory.getNewsFeedView(nativeAd, context);
            newsFeedView.loadImages();
            view = newsFeedView;
            break;
    }
    return view;
}
Also used : ContentStreamAdView(com.my.target.nativeads.views.ContentStreamAdView) ChatListAdView(com.my.target.nativeads.views.ChatListAdView) ChatListAdView(com.my.target.nativeads.views.ChatListAdView) ContentStreamAdView(com.my.target.nativeads.views.ContentStreamAdView) NewsFeedAdView(com.my.target.nativeads.views.NewsFeedAdView) View(android.view.View) NewsFeedAdView(com.my.target.nativeads.views.NewsFeedAdView)

Aggregations

View (android.view.View)1 ChatListAdView (com.my.target.nativeads.views.ChatListAdView)1 ContentStreamAdView (com.my.target.nativeads.views.ContentStreamAdView)1 NewsFeedAdView (com.my.target.nativeads.views.NewsFeedAdView)1