HeaderElevationController.java 文件源码

java
阅读 40 收藏 0 点赞 0 评论 0

项目:FlickLauncher 作者:
public ControllerV16(View header) {
    Resources res = header.getContext().getResources();
    mScrollToElevation = res.getDimension(R.dimen.all_apps_header_scroll_to_elevation);

    mShadow = new View(header.getContext());
    mShadow.setBackground(new GradientDrawable(
            GradientDrawable.Orientation.TOP_BOTTOM, new int[] {0x1E000000, 0x00000000}));
    mShadow.setAlpha(0);

    FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(
            FrameLayout.LayoutParams.MATCH_PARENT,
            res.getDimensionPixelSize(R.dimen.all_apps_header_shadow_height));
    lp.topMargin = ((FrameLayout.LayoutParams) header.getLayoutParams()).height;

    ((ViewGroup) header.getParent()).addView(mShadow, lp);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号