ZhihuSectionDetailViewModel.java 文件源码

java
阅读 21 收藏 0 点赞 0 评论 0

项目:LiteReader 作者:
private void initArticles(List<ZhihuStoryItem> items) {
    for (ZhihuStoryItem item : items)
        getAdapter().add(new ZhihuStoryItemViewModel(item)
                .onAction(new Action3<String, Integer, Integer>() {
                    @Override
                    public void call(String id, Integer touchX, Integer touchY) {
                        Intent intent = ZhihuStoryDetailActivity.intentFor(getContext());
                        intent.putExtra(Constant.EXTRA_ZHIHU_STORY_ID, id);
                        intent.putExtra(Constant.EXTRA_TOUCH_X, touchX);
                        intent.putExtra(Constant.EXTRA_TOUCH_Y, touchY);
                        getContext().startActivity(intent);
                    }
                }));
    getAdapter().add(new BlankViewModel(R.dimen.common_gap));
    getAdapter().notifyDataSetChanged();

}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号