当前位置: 首页>>代码示例>>Java>>正文


Java RevealFrameLayout类代码示例

本文整理汇总了Java中io.codetail.widget.RevealFrameLayout的典型用法代码示例。如果您正苦于以下问题:Java RevealFrameLayout类的具体用法?Java RevealFrameLayout怎么用?Java RevealFrameLayout使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


RevealFrameLayout类属于io.codetail.widget包,在下文中一共展示了RevealFrameLayout类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import io.codetail.widget.RevealFrameLayout; //导入依赖的package包/类
public void init() {
    if (isInEditMode()) return;
    LayoutInflater layoutInflater = LayoutInflater.from(getContext());
    drawerMode = Setup.Companion.appSettings().getDrawerStyle();
    switch (drawerMode) {
        case DrawerMode.HORIZONTAL_PAGED:
            drawerViewPaged = (AppDrawerPaged) layoutInflater.inflate(R.layout.view_app_drawer_paged, this, false);
            addView(drawerViewPaged);
            layoutInflater.inflate(R.layout.view_drawer_indicator, this, true);
            break;
        case DrawerMode.VERTICAL:
            drawerViewGrid = (AppDrawerVertical) layoutInflater.inflate(R.layout.view_app_drawer_vertical, this, false);
            int marginHorizontal = Tool.INSTANCE.dp2px(Setup.Companion.appSettings().getVerticalDrawerHorizontalMargin(), getContext());
            int marginVertical = Tool.INSTANCE.dp2px(Setup.Companion.appSettings().getVerticalDrawerVerticalMargin(), getContext());
            RevealFrameLayout.LayoutParams lp = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
            lp.leftMargin = marginHorizontal;
            lp.rightMargin = marginHorizontal;
            lp.topMargin = marginVertical;
            lp.bottomMargin = marginVertical;
            addView(drawerViewGrid, lp);
            break;
    }
}
 
开发者ID:OpenLauncherTeam,项目名称:openlauncher,代码行数:24,代码来源:AppDrawerController.java

示例2: ViewHolder

import io.codetail.widget.RevealFrameLayout; //导入依赖的package包/类
public ViewHolder(View contentView) {
    super(contentView);
    card = (CardView) contentView.findViewById(R.id.card);
    chartlet = (ImageView) contentView.findViewById(R.id.chartlet_review);
    download = (TextView) contentView.findViewById(R.id.download_btn);
    mReveal = (RevealFrameLayout) card.getParent();

}
 
开发者ID:Skykai521,项目名称:RecyclerView-Animation-Demo,代码行数:9,代码来源:StickerRecyclerView.java

示例3: setContentView

import io.codetail.widget.RevealFrameLayout; //导入依赖的package包/类
@Override
public void setContentView(final View userView) {
    int viewRootId = getResources().getIdentifier("activity_circular_reveal", "layout", getPackageName());
    super.setContentView(viewRootId);

    final RevealFrameLayout revealFrameLayout = (RevealFrameLayout)findViewById(R.id.ripples_effect_activity_root);
    revealFrameLayout.addView(userView);

    int[] clickPoint = getIntent().getIntArrayExtra("start_point");
    if(null != clickPoint){
        mClickPoint = clickPoint;
    }

    final DisplayMetrics dm = new DisplayMetrics();
    WindowManager wm = (WindowManager) this.getSystemService(Context.WINDOW_SERVICE);
    wm.getDefaultDisplay().getMetrics(dm);

    revealFrameLayout.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
        @Override
        public boolean onPreDraw() {
            revealFrameLayout.getViewTreeObserver().removeOnPreDrawListener(this);
            int finalRadius = Math.max(dm.widthPixels, dm.heightPixels);
            SupportAnimator animator =
                    ViewAnimationUtils.createCircularReveal(userView, mClickPoint[0], mClickPoint[1], 0, finalRadius);
            animator.setInterpolator(new AccelerateDecelerateInterpolator());
            animator.setDuration(circularRevealDuration);
            animator.start();
            return false;
        }
    });
}
 
开发者ID:ayaseruri,项目名称:CircularRevealActivity,代码行数:32,代码来源:CircularRevealActivity.java


注:本文中的io.codetail.widget.RevealFrameLayout类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。