private void adjustBounds() { if (mCollapsingTextHelper == null || getEditText() == null) { return; } try { mBounds.left = getEditText().getLeft() + getEditText().getPaddingLeft(); mRecalculateMethod.invoke(mCollapsingTextHelper); } catch (InvocationTargetException | IllegalAccessException | IllegalArgumentException e) { // No need to overreact here - this will result in the animation rendering differently e.printStackTrace(); } }
canvas.drawLine(rightSecond, topFirst, rightSecond, bottomFirst, mPaint); final int leftUpperEdit = mUpperEditText.getLeft(); final int topUpperEdit = mUpperEditText.getTop(); final int middleUpperEdit = (mUpperEditText.getBottom() - mUpperEditText topUpperEdit + middleUpperEdit, mPaint); final int leftLowerEdit = mLowerEditText.getLeft(); final int topLowerEdit = mLowerEditText.getTop(); final int middleLowerEdit = (mLowerEditText.getBottom() - mLowerEditText
public void onFocusChange(View v, boolean hasFocus) { if(etUserName.hasFocus()) { left = etUserName.getLeft(); bottom = etUserName.getTop(); if (bottom > sh / 3) { System.out.println("Umn Bottom :: " + bottom); scrlv.scrollTo(left, (sh/3)); left = etUserName.getLeft(); bottom = etUserName.getTop(); System.out.println("Umn Left :: " + left); public void onFocusChange(View v, boolean hasFocus) { if(etPhoneNo.hasFocus()) { left = etPhoneNo.getLeft(); bottom = etPhoneNo.getTop(); if (bottom > sh / 3) { System.out.println("Phno Bottom :: " + bottom); scrlv.scrollTo(0, (sh/3)); left = etPhoneNo.getLeft(); bottom = etPhoneNo.getTop(); System.out.println("Phno Left :: " + left);
protected void onLayout(boolean changed, int left, int top, int right, int bottom) { super.onLayout(changed, left, top, right, bottom); if (getEditText() != null) { mTextX = getEditText().getLeft() + getEditText().getCompoundPaddingLeft(); mTextY = getPaddingTop(); } }
button2.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { EditText button3; EditText button4; button3 = (EditText) findViewById(R.id.button3); button4 = (EditText) findViewById(R.id.button4); int top3 = button3.getTop(); int bot3 = button3.getBottom(); int left3 = button3.getLeft(); int right3 = button3.getRight(); int top4 = button4.getTop(); int bot4 = button4.getBottom(); int left4 = button4.getLeft(); int right4 = button4.getRight(); button4.setTop(top3); button4.setBottom(bot3); button4.setLeft(left3); button4.setRight(right3); button3.setTop(top4); button3.setBottom(bot4); button3.setLeft(left4); button3.setRight(right4); } });
button2.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { EditText button3; EditText button4; button3 = (EditText) findViewById(R.id.button3); button4 = (EditText) findViewById(R.id.button4); int top3 = button3.getTop(); int bot3 = button3.getBottom(); int left3 = button3.getLeft(); int right3 = button3.getRight(); int top4 = button4.getTop(); int bot4 = button4.getBottom(); int left4 = button4.getLeft(); int right4 = button4.getRight(); button4.setTop(top3); button4.setBottom(bot3); button4.setLeft(left3); button4.setRight(right3); button3.setTop(top4); button3.setBottom(bot4); button3.setLeft(left4); button3.setRight(right4); } });