本文整理汇总了Java中android.support.design.widget.CoordinatorLayout.doViewsOverlap方法的典型用法代码示例。如果您正苦于以下问题:Java CoordinatorLayout.doViewsOverlap方法的具体用法?Java CoordinatorLayout.doViewsOverlap怎么用?Java CoordinatorLayout.doViewsOverlap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.support.design.widget.CoordinatorLayout
的用法示例。
在下文中一共展示了CoordinatorLayout.doViewsOverlap方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getFabTranslationYForSnackBar
import android.support.design.widget.CoordinatorLayout; //导入方法依赖的package包/类
private float getFabTranslationYForSnackBar(CoordinatorLayout parent,
FloatingActionButton fab) {
float minOffset = 0;
final List<View> dependencies = parent.getDependencies(fab);
for (int i = 0, z = dependencies.size(); i < z; i++) {
final View view = dependencies.get(i);
if (view instanceof Snackbar.SnackbarLayout && parent.doViewsOverlap(fab, view)) {
minOffset = Math.min(minOffset,
ViewCompat.getTranslationY(view) - view.getHeight());
}
}
return minOffset;
}
示例2: getFabTranslationYForSnackbar
import android.support.design.widget.CoordinatorLayout; //导入方法依赖的package包/类
private float getFabTranslationYForSnackbar(CoordinatorLayout parent,
View fab) {
float minOffset = 0;
final List<View> dependencies = parent.getDependencies(fab);
for (int i = 0, z = dependencies.size(); i < z; i++) {
final View view = dependencies.get(i);
if (view instanceof Snackbar.SnackbarLayout && parent.doViewsOverlap(fab, view)) {
minOffset = Math.min(minOffset,
ViewCompat.getTranslationY(view) - view.getHeight());
}
}
return minOffset;
}
示例3: getTranslationYForSnackbar
import android.support.design.widget.CoordinatorLayout; //导入方法依赖的package包/类
private float getTranslationYForSnackbar(CoordinatorLayout parent, CircleIndicator ci) {
float minOffset = 0;
final List<View> dependencies = parent.getDependencies(ci);
for (int i = 0, z = dependencies.size(); i < z; i++) {
final View view = dependencies.get(i);
if (view instanceof Snackbar.SnackbarLayout && parent.doViewsOverlap(ci, view)) {
minOffset =
Math.min(minOffset, ViewCompat.getTranslationY(view) - view.getHeight());
}
}
return minOffset;
}
示例4: getFabTranslationYForSnackbar
import android.support.design.widget.CoordinatorLayout; //导入方法依赖的package包/类
/**
* Find the {@code translation Y} value for any child Snackbar components.
*
* @return 0.0F if there are no Snackbar components found, otherwise returns the min offset that
* the FAB component should be animated.
*/
private float getFabTranslationYForSnackbar(CoordinatorLayout parent, View fab) {
float minOffset = 0.0F;
final List<View> dependencies = parent.getDependencies(fab);
for (View view : dependencies) {
if (view instanceof Snackbar.SnackbarLayout && parent.doViewsOverlap(fab, view)) {
minOffset = Math.min(minOffset, view.getTranslationY() - (float) view.getHeight());
}
}
return minOffset;
}
示例5: getFabTranslationYForSnackbar
import android.support.design.widget.CoordinatorLayout; //导入方法依赖的package包/类
private float getFabTranslationYForSnackbar(CoordinatorLayout parent,
FabSpeedDial fab) {
float minOffset = 0;
final List<View> dependencies = parent.getDependencies(fab);
for (int i = 0, z = dependencies.size(); i < z; i++) {
final View view = dependencies.get(i);
if (view instanceof Snackbar.SnackbarLayout && parent.doViewsOverlap(fab, view)) {
minOffset = Math.min(minOffset,
ViewCompat.getTranslationY(view) - view.getHeight());
}
}
return minOffset;
}
示例6: getTranslationYForSnackbar
import android.support.design.widget.CoordinatorLayout; //导入方法依赖的package包/类
private float getTranslationYForSnackbar(CoordinatorLayout parent, FooterLayout footerLayout) {
float minOffset = 0;
final List<View> dependencies = parent.getDependencies(footerLayout);
for (int i = 0, z = dependencies.size(); i < z; i++) {
final View view = dependencies.get(i);
if (view instanceof Snackbar.SnackbarLayout && parent.doViewsOverlap(footerLayout, view)) {
minOffset = Math.min(minOffset, ViewCompat.getTranslationY(view) - view.getHeight());
}
}
return minOffset;
}