Doesn't change coordinate child After Scale Layout Android Java

  • Replies:0
Nasser khosravi
  • Forum posts: 1

Jul 1, 2017, 6:38:45 PM via Website

Problem: I have Custom Layout When I Scale it with following method all Child draw in right position but when i get their coordinate still they are in primary location or when i touch previous location then onClick child call it.

Question: I want know is there any easy way i can fix it by some method or it must fix it with manual way .(anyway I haven't any idea for solve this problem)

protected void dispatchDraw(Canvas canvas) {
canvas.save();
canvas.scale(mScaleFactor, mScaleFactor, mPivotX, mPivotY);
super.dispatchDraw(canvas);
canvas.restore();
}

Near one week i stuck in this problem ,any help or suggestion can be grateful.

Reply