View getLeft - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for View getLeft method.

This code example shows how to use the following methods:getHeight, getLeft, getParent, getTop, getWidth
            computeRect(mBefore, view);
        } 
    } 
    private void invalidateAfterUpdate() { 
        View view = mView.get();
        if (view == null || view.getParent() == null) {
            return; 
        } 
 
        final RectF after = mAfter;
        computeRect(after, view);
        after.union(mBefore);
 
        ((View)view.getParent()).invalidate(
                (int) Math.floor(after.left),
                (int) Math.floor(after.top),
                (int) Math.ceil(after.right),
                (int) Math.ceil(after.bottom));
    } 
 

8
CodeRank
This code example shows how to use the following methods:getHeight, getLeft, getWidth, layout
        public void onClick(View v) {
            move(this.v);
        } 
 
        public void move(View v) {
            v.layout(v.getLeft() + dx, 0, v.getLeft() + dx + v.getWidth(), v.getHeight());
            ViewUtils.printView("menu", v);
        } 
    } 
 
    @Override 
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.animation_stacked_frames);
 
        mFrameLayout = (FrameLayout) this.findViewById(R.id.flipper);
        menu = mFrameLayout.findViewById(R.id.menu);
        app = mFrameLayout.findViewById(R.id.app);
 
        ViewUtils.printView("menu", menu);
8
CodeRank
This code example shows how to use the following methods:getBottom, getLeft, getRight, getTop
This code example shows how to use the following methods:getHeight, getLeft, getParent, getTop, getWidth
                (int) FloatMath.ceil(after.bottom));
    } 
 
    private void computeRect(final RectF r, View view) {
        // compute current rectangle according to matrix transformation 
        final float w = view.getWidth();
        final float h = view.getHeight();
 
        // use a rectangle at 0,0 to make sure we don't run into issues with scaling 
        r.set(0, 0, w, h);
 
        final Matrix m = mTempMatrix;
        m.reset();
        transformMatrix(m, view);
        mTempMatrix.mapRect(r);
 
        r.offset(view.getLeft(), view.getTop());
 
        // Straighten coords if rotations flipped them 
        if (r.right < r.left) {

8
CodeRank
This code example shows how to use the following methods:getBottom, getLeft, getRight
This code example shows how to use the following methods:getHeight, getLeft, getParent, getTop, getWidth
            if (view != null)
                computeRect(mBefore, view);
        } 
 
        private void computeRect(final RectF r, View view) {
            final float w = view.getWidth();
            final float h = view.getHeight();
 
            r.set(0, 0, w, h);
 
            final Matrix m = mTempMatrix;
            m.reset();
            transformMatrix(m, view);
            mTempMatrix.mapRect(r);
 
            r.offset(view.getLeft(), view.getTop());
        } 
 
        private void transformMatrix(Matrix m, View view) {
            m.postTranslate(mTranslationX, mTranslationY);

8
CodeRank
This code example shows how to use the following methods:getLeft, invalidate, offsetLeftAndRight
This code example shows how to use the following methods:getBottom, getHeight, getLayoutParams, getLeft, getRight
 
        Paint childPaint = this.createPaint(0xffffff00);
        Paint layoutPaint = this.createPaint(0xff00ff00);
        Paint newLinePaint = this.createPaint(0xffff0000);
 
        LayoutParams lp = (LayoutParams) child.getLayoutParams();
 
        if (lp.horizontalSpacing > 0) {
            float x = child.getRight();
            float y = child.getTop() + child.getHeight() / 2.0f;
            canvas.drawLine(x, y, x + lp.horizontalSpacing, y, childPaint);
            canvas.drawLine(x + lp.horizontalSpacing - 4.0f, y - 4.0f, x + lp.horizontalSpacing, y, childPaint);
            canvas.drawLine(x + lp.horizontalSpacing - 4.0f, y + 4.0f, x + lp.horizontalSpacing, y, childPaint);
        } else if (this.horizontalSpacing > 0) {
            float x = child.getRight();
            float y = child.getTop() + child.getHeight() / 2.0f;
            canvas.drawLine(x, y, x + this.horizontalSpacing, y, layoutPaint);
            canvas.drawLine(x + this.horizontalSpacing - 4.0f, y - 4.0f, x + this.horizontalSpacing, y, layoutPaint);
            canvas.drawLine(x + this.horizontalSpacing - 4.0f, y + 4.0f, x + this.horizontalSpacing, y, layoutPaint);
        } 

7
CodeRank
This code example shows how to use the following methods:getLeft, getRight, getTop
This code example shows how to use the following methods:getBottom, getLeft, getRight, getTop
		} 
		return true; 
	} 
     
    private boolean isInside(Button but, float x, float y) {
    	return (but.getTop()<y && but.getBottom()>y &&
    		but.getLeft()<x && but.getRight()>x);
    } 
} 
7
CodeRank

Related View getLeft Questions & Answers:

getLeft Method Overview
Left position of this view relative to its parent.
See Code Examples for other Android View Methods: