Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想选择相机视图的特定部分。我正在考虑绘制一个可重新调整大小的矩形/圆形,其大小可以通过触摸动态更改。
覆盖 onDraw 方法
private void onDraw(Canvas c){ invalidate(); super.onDraw(); //detect position of two fingers touching screen to define the corners of your rectangle //draw your rectangle }