use of com.github.ksoichiro.android.observablescrollview.ObservableWebView in project Android-ObservableScrollView by ksoichiro.
the class WebViewActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_webview);
ObservableWebView scrollable = (ObservableWebView) findViewById(R.id.scrollable);
scrollable.setScrollViewCallbacks(this);
scrollable.loadUrl("file:///android_asset/lipsum.html");
}
use of com.github.ksoichiro.android.observablescrollview.ObservableWebView in project Android-ObservableScrollView by ksoichiro.
the class SlidingUpWebViewActivity method createScrollable.
@Override
protected ObservableWebView createScrollable() {
ObservableWebView webView = (ObservableWebView) findViewById(R.id.scroll);
webView.setScrollViewCallbacks(this);
webView.loadUrl("file:///android_asset/lipsum.html");
return webView;
}
use of com.github.ksoichiro.android.observablescrollview.ObservableWebView in project Android-ObservableScrollView by ksoichiro.
the class StickyHeaderWebViewActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_stickyheaderwebview);
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");
}
use of com.github.ksoichiro.android.observablescrollview.ObservableWebView in project Android-ObservableScrollView by ksoichiro.
the class ToolbarControlWebViewActivity method createScrollable.
@Override
protected ObservableWebView createScrollable() {
ObservableWebView webView = (ObservableWebView) findViewById(R.id.scrollable);
webView.loadUrl("file:///android_asset/lipsum.html");
return webView;
}
use of com.github.ksoichiro.android.observablescrollview.ObservableWebView in project Android-ObservableScrollView by ksoichiro.
the class ViewPagerTabFragmentWebViewFragment 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");
Fragment parentFragment = getParentFragment();
ViewGroup viewGroup = (ViewGroup) parentFragment.getView();
if (viewGroup != null) {
webView.setTouchInterceptionViewGroup((ViewGroup) viewGroup.findViewById(R.id.container));
if (parentFragment instanceof ObservableScrollViewCallbacks) {
webView.setScrollViewCallbacks((ObservableScrollViewCallbacks) parentFragment);
}
}
return view;
}
Aggregations