use of com.ferg.awfulapp.widget.PageBar in project Awful.apk by Awful.
the class ThreadDisplayFragment method onCreateView.
// --------------------------------
@Override
public View onCreateView(LayoutInflater aInflater, ViewGroup aContainer, Bundle aSavedState) {
View result;
try {
result = inflateView(R.layout.thread_display, aContainer, aInflater);
} catch (InflateException e) {
if (webViewIsMissing(e)) {
return null;
} else {
throw e;
}
}
pageBar = (PageBar) result.findViewById(R.id.page_bar);
pageBar.setListener(new PageBar.PageBarCallbacks() {
@Override
public void onPageNavigation(boolean nextPage) {
turnPage(nextPage);
}
@Override
public void onRefreshClicked() {
refresh();
}
@Override
public void onPageNumberClicked() {
displayPagePicker();
}
});
getAwfulActivity().setPreferredFont(pageBar.getTextView());
mThreadView = (AwfulWebView) result.findViewById(R.id.thread);
initThreadViewProperties();
mUserPostNotice = (TextView) result.findViewById(R.id.thread_userpost_notice);
refreshProbationBar();
// FAB
mFAB = (FloatingActionButton) result.findViewById(R.id.just_post);
mFAB.setOnClickListener(onButtonClick);
mFAB.setVisibility(View.GONE);
return result;
}
Aggregations