本文整理匯總了Java中com.github.clans.fab.FloatingActionMenu.setTranslationY方法的典型用法代碼示例。如果您正苦於以下問題:Java FloatingActionMenu.setTranslationY方法的具體用法?Java FloatingActionMenu.setTranslationY怎麽用?Java FloatingActionMenu.setTranslationY使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.github.clans.fab.FloatingActionMenu
的用法示例。
在下文中一共展示了FloatingActionMenu.setTranslationY方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onDependentViewChanged
import com.github.clans.fab.FloatingActionMenu; //導入方法依賴的package包/類
@Override
public boolean onDependentViewChanged(
final CoordinatorLayout parent, final FloatingActionMenu child, final View dependency) {
log(TAG, INFO, "onDependentViewChanged: " + dependency);
final List<View> list = parent.getDependencies(child);
int bottomMargin = ((ViewGroup.MarginLayoutParams) child.getLayoutParams()).bottomMargin;
float t = 0;
boolean result = false;
for (View dep : list) {
if (Snackbar.SnackbarLayout.class.isInstance(dep)) {
t += dep.getTranslationY() - dep.getHeight();
result = true;
} else if (BottomNavigation.class.isInstance(dep)) {
BottomNavigation navigation = (BottomNavigation) dep;
t += navigation.getTranslationY() - navigation.getHeight() + bottomMargin;
result = true;
}
}
child.setTranslationY(t);
return result;
}
示例2: onDependentViewChanged
import com.github.clans.fab.FloatingActionMenu; //導入方法依賴的package包/類
@Override
public boolean onDependentViewChanged(CoordinatorLayout parent, FloatingActionMenu child, View dependency)
{
float translationY = Math.min(0, dependency.getTranslationY() - dependency.getHeight());
child.setTranslationY(translationY);
return true;
}
示例3: onDependentViewChanged
import com.github.clans.fab.FloatingActionMenu; //導入方法依賴的package包/類
@Override
public boolean onDependentViewChanged(CoordinatorLayout parent, FloatingActionMenu child, View dependency) {
float translationY = Math.min(0, dependency.getTranslationY() - dependency.getHeight());
child.setTranslationY(translationY);
return true;
}
示例4: updateFabTranslationForSnackbar
import com.github.clans.fab.FloatingActionMenu; //導入方法依賴的package包/類
private void updateFabTranslationForSnackbar(FloatingActionMenu child, View dependency) {
float translationY = Math.min(0, dependency.getTranslationY() - dependency.getHeight());
child.setTranslationY(translationY);
}