Search in sources :

Example 1 with TagCloudLinkView

use of com.ns.developer.tagview.widget.TagCloudLinkView in project zype-android by zype.

the class SummaryFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    super.onCreateView(inflater, container, savedInstanceState);
    final View view = inflater.inflate(R.layout.fragment_summary, container, false);
    Cursor cursor = CursorHelper.getVideoCursor(getActivity().getContentResolver(), videoId);
    if (cursor != null) {
        if (cursor.moveToFirst()) {
            VideoData video = VideoHelper.objectFromCursor(cursor);
            ((TextView) view.findViewById(R.id.textVideoTitle)).setText(video.getTitle());
            ((TextView) view.findViewById(R.id.textVideoDescription)).setText(video.getDescription());
        // TagCloudLinkView tagCloudView = (TagCloudLinkView) view.findViewById(R.id.tag_cloud);
        // hide keywords
        /* if (video.getKeywords() != null) {
                    for (int i = 0; i < video.getKeywords().size(); i++) {
                        tagCloudView.add(new Tag(i, video.getKeywords().get(i)));
                    }
                    tagCloudView.drawTags();
                    tagCloudView.setOnTagSelectListener(new TagCloudLinkView.OnTagSelectListener() {
                        @Override
                        public void onTagSelected(Tag tag, int i) {
//                            UiUtils.showWarningSnackbar(view, tag.getText());
                        }
                    });
                }*/
        } else {
            throw new IllegalStateException("DB not contains video with ID=" + videoId);
        }
        cursor.close();
    }
    return view;
}
Also used : VideoData(com.zype.android.webapi.model.video.VideoData) TextView(android.widget.TextView) Cursor(android.database.Cursor) TextView(android.widget.TextView) TagCloudLinkView(com.ns.developer.tagview.widget.TagCloudLinkView) View(android.view.View)

Aggregations

Cursor (android.database.Cursor)1 View (android.view.View)1 TextView (android.widget.TextView)1 TagCloudLinkView (com.ns.developer.tagview.widget.TagCloudLinkView)1 VideoData (com.zype.android.webapi.model.video.VideoData)1