Java Code Examples for android.widget.ImageView.getPaddingRight()

The following are Jave code examples for showing how to use getPaddingRight() of the android.widget.ImageView class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: FLFloatingButton   File: TrashView.java   View Source Code Vote up 7 votes
/**
 * 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);
}
 
Example 2
Project: FLFloatingButton   File: TrashView.java   View Source Code Vote up 6 votes
/**
 * 削除アイコンの中心X座標を取得します。
 *
 * @return 削除アイコンの中心X座標
 */
float getTrashIconCenterX() {
    final ImageView iconView = hasActionTrashIcon() ? mActionTrashIconView : mFixedTrashIconView;
    final float iconViewPaddingLeft = iconView.getPaddingLeft();
    final float iconWidth = iconView.getWidth() - iconViewPaddingLeft - iconView.getPaddingRight();
    final float x = mTrashIconRootView.getX() + iconViewPaddingLeft;
    return x + iconWidth / 2;
}
 
Example 3
Project: ClouldReader   File: PhotoViewAttacher.java   View Source Code Vote up 5 votes
private int getImageViewWidth(ImageView imageView) {
    if (null == imageView)
        return 0;
    return imageView.getWidth() - imageView.getPaddingLeft() - imageView.getPaddingRight();
}
 
Example 4
Project: GitHub   File: PhotoViewAttacher.java   View Source Code Vote up 5 votes
private int getImageViewWidth(ImageView imageView) {
    if (null == imageView)
        return 0;
    return imageView.getWidth() - imageView.getPaddingLeft() - imageView.getPaddingRight();
}
 
Example 5
Project: yyox   File: PhotoViewAttacher.java   View Source Code Vote up 5 votes
private int getImageViewWidth(ImageView imageView) {
    return imageView.getWidth() - imageView.getPaddingLeft() - imageView.getPaddingRight();
}
 
Example 6
Project: Hotspot-master-devp   File: PhotoViewAttacher.java   View Source Code Vote up 5 votes
private int getImageViewWidth(ImageView imageView) {
    return imageView.getWidth() - imageView.getPaddingLeft() - imageView.getPaddingRight();
}
 
Example 7
Project: Watermark   File: PhotoViewAttacher.java   View Source Code Vote up 5 votes
private int getImageViewWidth(ImageView imageView) {
    if (null == imageView)
        return 0;
    return imageView.getWidth() - imageView.getPaddingLeft() - imageView.getPaddingRight();
}
 
Example 8
Project: PhotoPickApp   File: PhotoViewAttacher.java   View Source Code Vote up 5 votes
private int getImageViewWidth(ImageView imageView) {
    return imageView.getWidth() - imageView.getPaddingLeft() - imageView.getPaddingRight();
}
 
Example 9
Project: PhotoPickApp   File: PhotoViewAttacher.java   View Source Code Vote up 5 votes
private int getImageViewWidth(ImageView imageView) {
    return imageView.getWidth() - imageView.getPaddingLeft() - imageView.getPaddingRight();
}
 
Example 10
Project: tvConnect_android   File: PhotoViewAttacher.java   View Source Code Vote up 5 votes
private int getImageViewWidth(ImageView imageView) {
    if (null == imageView)
        return 0;
    return imageView.getWidth() - imageView.getPaddingLeft() - imageView.getPaddingRight();
}
 
Example 11
Project: DailyStudy   File: PhotoViewAttacher.java   View Source Code Vote up 5 votes
private int getImageViewWidth(ImageView imageView) {
    if (null == imageView)
        return 0;
    return imageView.getWidth() - imageView.getPaddingLeft() - imageView.getPaddingRight();
}
 
Example 12
Project: PicShow-zhaipin   File: PhotoViewAttacher.java   View Source Code Vote up 5 votes
private int getImageViewWidth(ImageView imageView) {
    if (null == imageView)
        return 0;
    return imageView.getWidth() - imageView.getPaddingLeft() - imageView.getPaddingRight();
}
 
Example 13
Project: UiLib   File: PhotoViewAttacher.java   View Source Code Vote up 5 votes
private int getImageViewWidth(ImageView imageView) {
    return null == imageView?0:imageView.getWidth() - imageView.getPaddingLeft() - imageView.getPaddingRight();
}
 
Example 14
Project: boohee_v5.6   File: PhotoViewAttacher.java   View Source Code Vote up 5 votes
private int getImageViewWidth(ImageView imageView) {
    if (imageView == null) {
        return 0;
    }
    return (imageView.getWidth() - imageView.getPaddingLeft()) - imageView.getPaddingRight();
}
 
Example 15
Project: NeiHanDuanZiTV   File: PhotoViewAttacher.java   View Source Code Vote up 5 votes
private int getImageViewWidth(ImageView imageView) {
    return imageView.getWidth() - imageView.getPaddingLeft() - imageView.getPaddingRight();
}
 
Example 16
Project: android-project-gallery   File: PhotoViewAttacher.java   View Source Code Vote up 5 votes
private int getImageViewWidth(ImageView imageView) {
    if (null == imageView)
        return 0;
    return imageView.getWidth() - imageView.getPaddingLeft() - imageView.getPaddingRight();
}
 
Example 17
Project: Recognize-it   File: PhotoViewAttacher.java   View Source Code Vote up 5 votes
private int getImageViewWidth(ImageView imageView) {
    if (null == imageView)
        return 0;
    return imageView.getWidth() - imageView.getPaddingLeft() - imageView.getPaddingRight();
}