本文整理匯總了Java中android.widget.ImageView.getPaddingBottom方法的典型用法代碼示例。如果您正苦於以下問題:Java ImageView.getPaddingBottom方法的具體用法?Java ImageView.getPaddingBottom怎麽用?Java ImageView.getPaddingBottom使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類android.widget.ImageView
的用法示例。
在下文中一共展示了ImageView.getPaddingBottom方法的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();
}