ScrollFullScreen is scroll to full screen library like Google I/O 2014 App. It supports ListView, ScrollView, WebView.
ScrollFullScreen does not provide full screen behevior. You should implement your own beheivior to listener.
ScrollDetector scrollDetector = new ScrollDetector(new OnFullScreenListener() {
@Override
public void onFullScreenStarted() {
// Implement full screen beheivior
getSupportActionBar().hide();
}
@Override
public void onFullScreenFinished() {
getSupportActionBar().show();
}
});
Instance ListViewAdapter and set OnScreenListener to ListView.
ListView listView = getListView();
ListViewAdapter listViewAdapter = new ListViewAdapter.Builder(scrollDetector).build();
listView.setOnScrollListener(listViewAdapter); // ListViewAdapter implements AbsListView.OnScrollListener
Use ScrollViewAdapter and add OnScrollChangedListener to ScrollView's ViewTreeObserver.
WebView webView = (WebView)findViewById(R.id.webview);
ScrollViewAdapter scrollViewAdapter = new ScrollViewAdapter.Builder(webView, scrollDetector).build();
webView.getViewTreeObserver().addOnScrollChangedListener(scrollViewAdapter); // ScrollViewAdapter implements ViewTreeObserver.OnScrollChangedListener
- ListView
- Android 2.3 or later
- ScrollView, WebView
- Android 4.0 or later
We are planing to upload maven later.