本文整理汇总了Java中fr.castorflex.android.smoothprogressbar.SmoothProgressBar.progressiveStart方法的典型用法代码示例。如果您正苦于以下问题:Java SmoothProgressBar.progressiveStart方法的具体用法?Java SmoothProgressBar.progressiveStart怎么用?Java SmoothProgressBar.progressiveStart使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类fr.castorflex.android.smoothprogressbar.SmoothProgressBar
的用法示例。
在下文中一共展示了SmoothProgressBar.progressiveStart方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onPreExecute
import fr.castorflex.android.smoothprogressbar.SmoothProgressBar; //导入方法依赖的package包/类
public void onPreExecute(View rootView) {
this.rootView = rootView;
// initialize article views
mArticleTextView = (TextView) rootView.findViewById(R.id.article_body);
mArticlePubDateView = (TextView) rootView.findViewById(R.id.pubDateView);
mSubtitleLayout = (RelativeLayout) rootView.findViewById(R.id.subtitleLayout);
mScrollToReadLayout = (LinearLayout) rootView.findViewById(R.id.scrollToReadLayout);
mArticleFooter = (LinearLayout) rootView.findViewById(R.id.article_footer);
// Progress Bar
detailViewProgress = (SmoothProgressBar) rootView.findViewById(R.id.detailViewProgressBar);
detailViewProgress.progressiveStart();
}
示例2: onCreateView
import fr.castorflex.android.smoothprogressbar.SmoothProgressBar; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_novel_item_list,container,false);
rootView.setTag(type); // set TAG
// init values
listNovelItemAid = null;
listNovelItemInfo = null;
currentPage = 1; // default 1
totalPage = 0; // default 0
mLayoutManager = null;
mLayoutManager = new LinearLayoutManager(getActivity());
mLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
mRecyclerView = null;
mRecyclerView = (RecyclerView) rootView.findViewById(R.id.novel_item_list);
mRecyclerView.setHasFixedSize(false); // set variable size
mRecyclerView.setItemAnimator(new DefaultItemAnimator());
mRecyclerView.setLayoutManager(mLayoutManager);
mRecyclerView.setAdapter(new RecyclerView.Adapter() {
@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
return null;
}
@Override
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
}
@Override
public int getItemCount() {
return 0;
}
});
// List request
if(type.equals(searchType)) {
// update UI
spb = (SmoothProgressBar) getActivity().findViewById(R.id.spb);
spb.progressiveStart();
// excute task
Toast.makeText(getActivity(),"search",Toast.LENGTH_SHORT).show();
AsyncGetSearchResultList asyncGetSearchResultList = new AsyncGetSearchResultList();
asyncGetSearchResultList.execute(key);
}
else {
// Listener
mRecyclerView.addOnScrollListener(new MyOnScrollListener());
mRecyclerView.addOnScrollListener(new OnHidingScrollListener());
AsyncGetNovelItemList asyncGetNovelItemList = new AsyncGetNovelItemList();
asyncGetNovelItemList.execute(currentPage);
}
return rootView;
}