use of com.ferg.awfulapp.webview.AwfulWebView in project Awful.apk by Awful.
the class MessageFragment method onCreateView.
public View onCreateView(LayoutInflater aInflater, ViewGroup aContainer, Bundle aSavedState) {
super.onCreateView(aInflater, aContainer, aSavedState);
mPrefs = AwfulPreferences.getInstance(getActivity());
setRetainInstance(true);
View result = aInflater.inflate(R.layout.private_message_fragment, aContainer, false);
messageWebView = (AwfulWebView) result.findViewById(R.id.messagebody);
mHideButton = (ImageButton) result.findViewById(R.id.hide_message);
mHideButton.setOnClickListener(this);
mRecipient = (EditText) result.findViewById(R.id.message_user);
mSubject = (EditText) result.findViewById(R.id.message_subject);
mUsername = (TextView) result.findViewById(R.id.username);
mPostdate = (TextView) result.findViewById(R.id.post_date);
mTitle = (TextView) result.findViewById(R.id.message_title);
messageComposer = (MessageComposer) getChildFragmentManager().findFragmentById(R.id.message_composer_fragment);
mBackground = result;
updateColors(result, mPrefs);
messageWebView.setJavascriptHandler(new WebViewJsInterface());
if (pmId <= 0) {
messageWebView.setVisibility(GONE);
} else {
syncPM();
}
return result;
}
use of com.ferg.awfulapp.webview.AwfulWebView 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;
}
use of com.ferg.awfulapp.webview.AwfulWebView in project Awful.apk by Awful.
the class PreviewFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View dialogView = inflateView(R.layout.post_preview, container, inflater);
progressBar = (ProgressBar) dialogView.findViewById(R.id.preview_progress);
postPreView = (AwfulWebView) dialogView.findViewById(R.id.post_pre_view);
configureWebView();
getDialog().setCanceledOnTouchOutside(true);
postPreView.setContent(getBlankPage());
return dialogView;
}
Aggregations