本文整理了Java中android.support.v4.widget.NestedScrollView.setAlpha()
方法的一些代码示例,展示了NestedScrollView.setAlpha()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NestedScrollView.setAlpha()
方法的具体详情如下:
包路径:android.support.v4.widget.NestedScrollView
类名称:NestedScrollView
方法名:setAlpha
暂无
代码示例来源:origin: xinghongfei/LookLook
private void initView() {
mNest.setAlpha(0.5f);
mToolbar.setNavigationIcon(R.drawable.ic_arrow_back);
mToolbar.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
mNest.smoothScrollTo(0, 0);
}
});
mToolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
expandImageAndFinish();
}
});
}
代码示例来源:origin: rubensousa/Transitions
@Override
public void onTransitionStart(Transition transition) {
fab.setScaleX(0);
fab.setScaleY(0);
fab.setVisibility(View.INVISIBLE);
nestedScrollView.setAlpha(0f);
}
代码示例来源:origin: rubensousa/Transitions
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setupTransitions();
setContentView(R.layout.activity_toolbar);
appbar = (AppBarLayout) findViewById(R.id.appbar);
nestedScrollView = (NestedScrollView) findViewById(R.id.nestedScrollView);
collapsingToolbarLayout = (CollapsingToolbarLayout) findViewById(R.id.collapsingLayout);
if (savedInstanceState == null) {
nestedScrollView.setAlpha(0f);
nestedScrollView.getViewTreeObserver()
.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
if (nestedScrollView.getHeight() != 0) {
appbar.setExpanded(true);
appbar.addOnOffsetChangedListener(ToolbarActivity.this);
nestedScrollView.getViewTreeObserver()
.removeOnGlobalLayoutListener(this);
nestedScrollView.animate().setStartDelay(400).alpha(1f);
nestedScrollView.setTranslationY(nestedScrollView.getHeight() / 3);
nestedScrollView.animate().setStartDelay(400).translationY(0)
.setInterpolator(new AccelerateDecelerateInterpolator());
}
}
});
}
}
内容来源于网络,如有侵权,请联系作者删除!