use of us.koller.cameraroll.ui.widget.SwipeBackCoordinatorLayout in project Camera-Roll-Android-App by kollerlukas.
the class AlbumActivity method onSwipeProcess.
@Override
public void onSwipeProcess(float percent) {
getWindow().getDecorView().setBackgroundColor(SwipeBackCoordinatorLayout.getBackgroundColor(percent));
boolean selectorModeActive = recyclerViewAdapter.isSelectorModeActive();
if (!theme.darkStatusBarIcons() && selectorModeActive) {
SwipeBackCoordinatorLayout layout = findViewById(R.id.swipeBackView);
Toolbar toolbar = findViewById(R.id.toolbar);
View rootView = findViewById(R.id.root_view);
int translationY = (int) layout.getTranslationY();
int statusBarHeight = toolbar.getPaddingTop();
if (translationY > statusBarHeight * 0.5) {
Util.setLightStatusBarIcons(rootView);
} else {
Util.setDarkStatusBarIcons(rootView);
}
}
}
Aggregations