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


Java View.getPaddingBottom方法代码示例

本文整理汇总了Java中android.view.View.getPaddingBottom方法的典型用法代码示例。如果您正苦于以下问题:Java View.getPaddingBottom方法的具体用法?Java View.getPaddingBottom怎么用?Java View.getPaddingBottom使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.view.View的用法示例。


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

示例1: drawHorizontal

import android.view.View; //导入方法依赖的package包/类
public void drawHorizontal(Canvas c, RecyclerView parent) {

        final int childCount = parent.getChildCount();

        // 在每一个子控件的底部画线
        for (int i = 0; i < childCount; i++) {
            final View child = parent.getChildAt(i);

            final int left = child.getLeft() + child.getPaddingLeft();
            final int right = child.getWidth() + child.getLeft() - child.getPaddingRight();
            final int top = child.getBottom() - mDivider.getIntrinsicHeight() - child.getPaddingBottom();
            final int bottom = top + mDivider.getIntrinsicHeight();
            mDivider.setBounds(left, top, right, bottom);
            mDivider.draw(c);
        }
    }
 
开发者ID:popo1379,项目名称:popomusic,代码行数:17,代码来源:MyItemDecoration.java

示例2: SmartViewHolder

import android.view.View; //导入方法依赖的package包/类
public SmartViewHolder(View itemView, AdapterView.OnItemClickListener mListener) {
    super(itemView);
    this.mListener = mListener;
    itemView.setOnClickListener(this);

    /**
     * 设置水波纹背景
     */
    if (itemView.getBackground() == null) {
        TypedValue typedValue = new TypedValue();
        Resources.Theme theme = itemView.getContext().getTheme();
        int top = itemView.getPaddingTop();
        int bottom = itemView.getPaddingBottom();
        int left = itemView.getPaddingLeft();
        int right = itemView.getPaddingRight();
        if (theme.resolveAttribute(android.R.attr.selectableItemBackground, typedValue, true)) {
            itemView.setBackgroundResource(typedValue.resourceId);
        }
        itemView.setPadding(left, top, right, bottom);
    }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:22,代码来源:SmartViewHolder.java

示例3: applyPadding

import android.view.View; //导入方法依赖的package包/类
/**
 * apply padding in view
 */
public static void applyPadding(View view, DynamicProperty property, int position) {
    if (view != null) {
        switch (property.type) {
            case DIMEN: {
                int[] padding = new int[] {
                  view.getPaddingLeft(),
                  view.getPaddingTop(),
                  view.getPaddingRight(),
                  view.getPaddingBottom()
                };
                padding[position] = property.getValueInt();
                view.setPadding(padding[0], padding[1], padding[2], padding[3]);
            }
            break;
        }
    }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:21,代码来源:DynamicHelper.java

示例4: SmartViewHolder

import android.view.View; //导入方法依赖的package包/类
public SmartViewHolder(View itemView, AdapterView.OnItemClickListener mListener) {
    super(itemView);

    /**
     * 设置水波纹背景
     */
    if (itemView.getBackground() == null) {
        TypedValue typedValue = new TypedValue();
        Resources.Theme theme = itemView.getContext().getTheme();
        int top = itemView.getPaddingTop();
        int bottom = itemView.getPaddingBottom();
        int left = itemView.getPaddingLeft();
        int right = itemView.getPaddingRight();
        if (theme.resolveAttribute(android.R.attr.selectableItemBackground, typedValue, true)) {
            itemView.setBackgroundResource(typedValue.resourceId);
        }
        itemView.setPadding(left, top, right, bottom);
    }
}
 
开发者ID:qianxinyi,项目名称:DripUltraRefreshWithLoad,代码行数:20,代码来源:SmartViewHolder.java

示例5: getAllChildrenHeightSum

import android.view.View; //导入方法依赖的package包/类
private int getAllChildrenHeightSum(boolean withPadding, boolean withMargin) {
    final int childCount = getChildCount();
    int height = 0;
    for (int i = 0; i < childCount; i++) {
        View child = getChildAt(i);
        if (child.getVisibility() == GONE)
            continue;

        int margin = ((MarginLayoutParams) child.getLayoutParams()).topMargin +
                ((MarginLayoutParams) child.getLayoutParams()).bottomMargin;

        height += child.getMeasuredHeight() +
                (withPadding ? child.getPaddingTop() + child.getPaddingBottom() : 0) +
                (withMargin ? margin : 0);
    }
    return Math.max(height, 0);
}
 
开发者ID:nowandfurure,项目名称:richeditor,代码行数:18,代码来源:LuBottomMenu.java

示例6: getItemsHeight

import android.view.View; //导入方法依赖的package包/类
/**
 * 获取指定区域item的高度
 **/
public int getItemsHeight(int start, int end) {
    int height = 0;
    if (start > end || end > datas.size() - 1) {
        return height;
    }
    start = start < 0 ? 0 : start;
    RecyclerView.LayoutManager layoutManager = mListFragment.getLayoutManager();
    for (int i = start; i <= end; i++) {
        View item = layoutManager.findViewByPosition(i);
        if (item != null) {
            ViewGroup.MarginLayoutParams layoutParams = (ViewGroup.MarginLayoutParams) item.getLayoutParams();
            height += item.getHeight() + item.getPaddingBottom() + item.getPaddingTop() + layoutParams.topMargin + layoutParams.bottomMargin /*item.getBottom() - item.getTop()*/;
                /*int desiredWidth = View.MeasureSpec.makeMeasureSpec(item.getWidth(), View.MeasureSpec.AT_MOST);
                item.measure(desiredWidth, 0); // 计算子项View 的宽高
                height += item.getMeasuredHeight();*/
        }
    }

    return height;
}
 
开发者ID:LingjuAI,项目名称:AssistantBySDK,代码行数:24,代码来源:ChatListAdapter.java

示例7: standUp

import android.view.View; //导入方法依赖的package包/类
/**
 * @return the animation builder
 */
public AnimationBuilder standUp() {
    for (View view : views) {
        float x = (view.getWidth() - view.getPaddingLeft() - view.getPaddingRight()) / 2
                + view.getPaddingLeft();
        float y = view.getHeight() - view.getPaddingBottom();
        pivotX(x, x, x, x, x);
        pivotY(y, y, y, y, y);
        rotationX(55, -30, 15, -15, 0);
    }
    return this;
}
 
开发者ID:junchenChow,项目名称:exciting-app,代码行数:15,代码来源:AnimationBuilder.java

示例8: prepare

import android.view.View; //导入方法依赖的package包/类
@Override
public void prepare(View target) {
    float x = (target.getWidth() - target.getPaddingLeft() - target.getPaddingRight()) / 2
            + target.getPaddingLeft();
    float y = target.getHeight() - target.getPaddingBottom();
    getAnimatorAgent().playTogether(
            ObjectAnimator.ofFloat(target, "rotation", 12, -12, 3, -3, 0),
            ObjectAnimator.ofFloat(target, "pivotX", x, x, x, x, x),
            ObjectAnimator.ofFloat(target, "pivotY", y, y, y, y, y)
    );
}
 
开发者ID:weileng11,项目名称:KUtils-master,代码行数:12,代码来源:WaveAnimator.java

示例9: prepare

import android.view.View; //导入方法依赖的package包/类
@Override
protected void prepare(AnimatorSet animatorSet, View target) {
    float x = target.getPaddingLeft();
    float y = target.getHeight() - target.getPaddingBottom();
    animatorSet.playTogether(
            ObjectAnimator.ofFloat(target, "alpha", 1, 0),
            ObjectAnimator.ofFloat(target, "rotation", 0, 90),
            ObjectAnimator.ofFloat(target, "pivotX", x, x),
            ObjectAnimator.ofFloat(target, "pivotY", y, y)
    );
}
 
开发者ID:alibaba,项目名称:LuaViewPlayground,代码行数:12,代码来源:RotateOutDownLeftAnimatorDecoration.java

示例10: prepare

import android.view.View; //导入方法依赖的package包/类
@Override
public void prepare(View target) {
    float x = target.getPaddingLeft();
    float y = target.getHeight() - target.getPaddingBottom();
    getAnimatorAgent().playTogether(
            ObjectAnimator.ofFloat(target, "alpha", 1, 0),
            ObjectAnimator.ofFloat(target, "rotation", 0, 90),
            ObjectAnimator.ofFloat(target, "pivotX", x, x),
            ObjectAnimator.ofFloat(target, "pivotY", y, y)
    );
}
 
开发者ID:weileng11,项目名称:KUtils-master,代码行数:12,代码来源:RotateOutDownLeftAnimator.java

示例11: prepare

import android.view.View; //导入方法依赖的package包/类
@Override
public void prepare(View target) {
    float x = (target.getWidth() - target.getPaddingLeft() - target.getPaddingRight()) / 2
            + target.getPaddingLeft();
    float y = target.getHeight() - target.getPaddingBottom();
    getAnimatorAgent().playTogether(
            ObjectAnimator.ofFloat(target, "pivotX", x, x, x, x, x),
            ObjectAnimator.ofFloat(target, "pivotY", y, y, y, y, y),
            ObjectAnimator.ofFloat(target, "rotationX", 55, -30, 15, -15, 0)
    );
}
 
开发者ID:devzwy,项目名称:KUtils,代码行数:12,代码来源:StandUpAnimator.java

示例12: prepare

import android.view.View; //导入方法依赖的package包/类
@Override
public void prepare(View target) {
    float x = target.getWidth() - target.getPaddingRight();
    float y = target.getHeight() - target.getPaddingBottom();
    getAnimatorAgent().playTogether(
            ObjectAnimator.ofFloat(target, "rotation", -90, 0),
            ObjectAnimator.ofFloat(target, "alpha", 0, 1),
            ObjectAnimator.ofFloat(target, "pivotX", x, x),
            ObjectAnimator.ofFloat(target, "pivotY", y, y)
    );
}
 
开发者ID:weileng11,项目名称:KUtils-master,代码行数:12,代码来源:RotateInUpRightAnimator.java

示例13: prepare

import android.view.View; //导入方法依赖的package包/类
@Override
protected void prepare(AnimatorSet animatorSet, View target) {
    float x = target.getWidth() - target.getPaddingRight();
    float y = target.getHeight() - target.getPaddingBottom();
    animatorSet.playTogether(
            ObjectAnimator.ofFloat(target, "rotation", 90, 0),
            ObjectAnimator.ofFloat(target, "alpha", 0, 1),
            ObjectAnimator.ofFloat(target, "pivotX", x, x),
            ObjectAnimator.ofFloat(target, "pivotY", y, y)
    );
}
 
开发者ID:alibaba,项目名称:LuaViewPlayground,代码行数:12,代码来源:RotateInDownRightAnimatorDecoration.java

示例14: prepare

import android.view.View; //导入方法依赖的package包/类
@Override
protected void prepare(AnimatorSet animatorSet, View target) {
    float x = target.getPaddingLeft();
    float y = target.getHeight() - target.getPaddingBottom();
    animatorSet.playTogether(
            ObjectAnimator.ofFloat(target, "rotation", -90, 0),
            ObjectAnimator.ofFloat(target, "alpha", 0, 1),
            ObjectAnimator.ofFloat(target, "pivotX", x, x),
            ObjectAnimator.ofFloat(target, "pivotY", y, y)
    );
}
 
开发者ID:alibaba,项目名称:LuaViewPlayground,代码行数:12,代码来源:RotateInDownLeftAnimatorDecoration.java

示例15: prepare

import android.view.View; //导入方法依赖的package包/类
@Override
public void prepare(View target) {
    float x = target.getWidth() - target.getPaddingRight();
    float y = target.getHeight() - target.getPaddingBottom();
    getAnimatorAgent().playTogether(
            ObjectAnimator.ofFloat(target, "alpha", 1, 0),
            ObjectAnimator.ofFloat(target, "rotation", 0, 90),
            ObjectAnimator.ofFloat(target, "pivotX", x, x),
            ObjectAnimator.ofFloat(target, "pivotY", y, y)
    );
}
 
开发者ID:weileng11,项目名称:KUtils-master,代码行数:12,代码来源:RotateOutUpRightAnimator.java


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