Search in sources :

Example 1 with PageBar

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;
}
Also used : PageBar(com.ferg.awfulapp.widget.PageBar) InflateException(android.view.InflateException) View(android.view.View) WebView(android.webkit.WebView) TextView(android.widget.TextView) AwfulWebView(com.ferg.awfulapp.webview.AwfulWebView)

Aggregations

InflateException (android.view.InflateException)1 View (android.view.View)1 WebView (android.webkit.WebView)1 TextView (android.widget.TextView)1 AwfulWebView (com.ferg.awfulapp.webview.AwfulWebView)1 PageBar (com.ferg.awfulapp.widget.PageBar)1