本文整理汇总了Java中android.widget.ImageView.getPaddingTop方法的典型用法代码示例。如果您正苦于以下问题:Java ImageView.getPaddingTop方法的具体用法?Java ImageView.getPaddingTop怎么用?Java ImageView.getPaddingTop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.widget.ImageView
的用法示例。
在下文中一共展示了ImageView.getPaddingTop方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getWindowDrawingRect
import android.widget.ImageView; //导入方法依赖的package包/类
/**
* Window上での描画領域を取得します。
* 当たり判定の矩形を表します。
*
* @param outRect 変更を加えるRect
*/
void getWindowDrawingRect(Rect outRect) {
// Gravityが逆向きなので、矩形の当たり判定も上下逆転(top/bottom)
// top(画面上で下方向)の判定を多めに設定
final ImageView iconView = hasActionTrashIcon() ? mActionTrashIconView : mFixedTrashIconView;
final float iconPaddingLeft = iconView.getPaddingLeft();
final float iconPaddingTop = iconView.getPaddingTop();
final float iconWidth = iconView.getWidth() - iconPaddingLeft - iconView.getPaddingRight();
final float iconHeight = iconView.getHeight() - iconPaddingTop - iconView.getPaddingBottom();
final float x = mTrashIconRootView.getX() + iconPaddingLeft;
final float y = mRootView.getHeight() - mTrashIconRootView.getY() - iconPaddingTop - iconHeight;
final int left = (int) (x - TARGET_CAPTURE_HORIZONTAL_REGION * mMetrics.density);
final int top = -mRootView.getHeight();
final int right = (int) (x + iconWidth + TARGET_CAPTURE_HORIZONTAL_REGION * mMetrics.density);
final int bottom = (int) (y + iconHeight + TARGET_CAPTURE_VERTICAL_REGION * mMetrics.density);
outRect.set(left, top, right, bottom);
}
示例2: getTrashIconCenterY
import android.widget.ImageView; //导入方法依赖的package包/类
/**
* 削除アイコンの中心Y座標を取得します。
*
* @return 削除アイコンの中心Y座標
*/
float getTrashIconCenterY() {
final ImageView iconView = hasActionTrashIcon() ? mActionTrashIconView : mFixedTrashIconView;
final float iconViewHeight = iconView.getHeight();
final float iconViewPaddingBottom = iconView.getPaddingBottom();
final float iconHeight = iconViewHeight - iconView.getPaddingTop() - iconViewPaddingBottom;
final float y = mRootView.getHeight() - mTrashIconRootView.getY() - iconViewHeight + iconViewPaddingBottom;
return y + iconHeight / 2;
}
示例3: getImageViewHeight
import android.widget.ImageView; //导入方法依赖的package包/类
private int getImageViewHeight(ImageView imageView) {
if (null == imageView)
return 0;
return imageView.getHeight() - imageView.getPaddingTop() - imageView.getPaddingBottom();
}
示例4: getImageViewHeight
import android.widget.ImageView; //导入方法依赖的package包/类
private int getImageViewHeight(ImageView imageView) {
return imageView.getHeight() - imageView.getPaddingTop() - imageView.getPaddingBottom();
}
示例5: getImageViewHeight
import android.widget.ImageView; //导入方法依赖的package包/类
private int getImageViewHeight(ImageView imageView) {
return null == imageView?0:imageView.getHeight() - imageView.getPaddingTop() - imageView.getPaddingBottom();
}
示例6: getImageViewHeight
import android.widget.ImageView; //导入方法依赖的package包/类
private int getImageViewHeight(ImageView imageView) {
if (imageView == null) {
return 0;
}
return (imageView.getHeight() - imageView.getPaddingTop()) - imageView.getPaddingBottom();
}