это мой первый вопрос! У меня есть активность (MainActivity) и View (PanZoomView), которые можно масштабировать. МакетАктивность/взаимодействие с холстом
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<com.example.canvastest.PanZoomView
android:id="@+id/zoomview"
android:layout_width="300dp"
android:layout_height="300dp" />
<TextView
android:id="@+id/tv_mPosX"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello_world" />
<TextView
android:id="@+id/tv_mPosY"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello_world" />
</LinearLayout>
Я хочу установить строки tv_mPosX/Y в соответствии с коэффициентом масштабирования (mScaleFactor), которое вычисляется по мнению:
public class PanZoomView extends View {
protected Drawable mSampleImage;
protected Context mContext;
protected float mPosX;
protected float mPosY;
//
public float mScaleFactor = 1.f;
...
Где/Как я могу справиться с этим?
Спасибо всем, Риккардо