use of com.github.ksoichiro.android.observablescrollview.ObservableWebView in project Android-ObservableScrollView by ksoichiro.
the class ViewPagerTab2WebViewFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_webview, container, false);
final ObservableWebView webView = (ObservableWebView) view.findViewById(R.id.scroll);
webView.loadUrl("file:///android_asset/lipsum.html");
Activity parentActivity = getActivity();
webView.setTouchInterceptionViewGroup((ViewGroup) parentActivity.findViewById(R.id.container));
if (parentActivity instanceof ObservableScrollViewCallbacks) {
webView.setScrollViewCallbacks((ObservableScrollViewCallbacks) parentActivity);
}
return view;
}
use of com.github.ksoichiro.android.observablescrollview.ObservableWebView in project Android-ObservableScrollView by ksoichiro.
the class HandleTouchWebViewActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_handletouchwebview);
ObservableWebView webView = (ObservableWebView) findViewById(R.id.scroll);
webView.setScrollViewCallbacks(this);
webView.loadUrl("file:///android_asset/handletouch.html");
}
use of com.github.ksoichiro.android.observablescrollview.ObservableWebView in project Android-ObservableScrollView by ksoichiro.
the class ViewPagerTab2WebViewFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_webview, container, false);
final ObservableWebView webView = (ObservableWebView) view.findViewById(R.id.scroll);
webView.loadUrl("file:///android_asset/lipsum.html");
Activity parentActivity = getActivity();
webView.setTouchInterceptionViewGroup((ViewGroup) parentActivity.findViewById(R.id.container));
if (parentActivity instanceof ObservableScrollViewCallbacks) {
webView.setScrollViewCallbacks((ObservableScrollViewCallbacks) parentActivity);
}
return view;
}
use of com.github.ksoichiro.android.observablescrollview.ObservableWebView in project Android-ObservableScrollView by ksoichiro.
the class ActionBarControlWebViewActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_actionbarcontrolwebview);
ObservableWebView webView = (ObservableWebView) findViewById(R.id.web);
webView.setScrollViewCallbacks(this);
webView.loadUrl("file:///android_asset/lipsum.html");
}
use of com.github.ksoichiro.android.observablescrollview.ObservableWebView in project UltimateAndroid by cymcsg.
the class ToolbarControlWebViewActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.observable_scroll_view_activity_toolbarcontrolwebview);
setSupportActionBar((Toolbar) findViewById(R.id.toolbar));
mHeaderView = findViewById(R.id.header);
ViewCompat.setElevation(mHeaderView, getResources().getDimension(R.dimen.toolbar_elevation));
mToolbarView = findViewById(R.id.toolbar);
mScrollView = (ObservableScrollView) findViewById(R.id.scroll);
mScrollView.setScrollViewCallbacks(mScrollViewScrollCallbacks);
ObservableWebView mWebView = (ObservableWebView) findViewById(R.id.web);
mWebView.setScrollViewCallbacks(mWebViewScrollCallbacks);
mWebView.loadUrl("file:///android_asset/lipsum.html");
}
Aggregations