本文整理汇总了Java中com.crazyhitty.chdev.ks.rssmanager.RssReader类的典型用法代码示例。如果您正苦于以下问题:Java RssReader类的具体用法?Java RssReader怎么用?Java RssReader使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RssReader类属于com.crazyhitty.chdev.ks.rssmanager包,在下文中一共展示了RssReader类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadFeedsAsync
import com.crazyhitty.chdev.ks.rssmanager.RssReader; //导入依赖的package包/类
public void loadFeedsAsync(final OnFeedsLoadedListener onFeedsLoadedListener, List<SourceItem> sourceItems) {
this.onFeedsLoadedListener = onFeedsLoadedListener;
String[] urlList = new String[sourceItems.size()];
String[] sourceList = new String[sourceItems.size()];
String[] categories = new String[sourceItems.size()];
int[] categoryImgIds = new int[sourceItems.size()];
for (int i = 0; i < urlList.length; i++) {
urlList[i] = sourceItems.get(i).getSourceUrl();
sourceList[i] = sourceItems.get(i).getSourceName();
categories[i] = sourceItems.get(i).getSourceCategoryName();
categoryImgIds[i] = sourceItems.get(i).getSourceCategoryImgId();
}
Log.e("url", urlList[0]);
RssReader rssReader = new RssReader(mContext, urlList, sourceList, categories, categoryImgIds, this);
rssReader.readRssFeeds();
}
示例2: onRefresh
import com.crazyhitty.chdev.ks.rssmanager.RssReader; //导入依赖的package包/类
@Override
public void onRefresh() {
if (snackbar != null)
snackbar.dismiss();
swipeContainer.setRefreshing(true);
String feed = getResources().getStringArray(R.array.dist_urls)[selected_distro];
// anybody knows how to skip this step? super annoying
String[] feeds = {feed};
new RssReader(this).showDialog(false).urls(feeds).parse(this);
}