Zoom и Pinch ImageView. Вопрос
Добавлено: 02 июл 2015, 14:14
Всем привет.
Ребята, очень нужна помощь.
Есть ImageView. Там картинка.
Просто надо её увеличить и уменьшить. Когда увеличена, то двигать пальцем
в пределах ImageView.
Дайте простой рабочий пример.
Вот мой layout
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<HorizontalScrollView
android:id="@+id/hor_scroll_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
<LinearLayout
android:id="@+id/linear_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
</LinearLayout>
</HorizontalScrollView>
<ImageView
android:id="@+id/selected"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="@drawable/ic_launcher"
android:contentDescription="@string/PhotoImageView"
/>
</LinearLayout>
Здесь в горизонтале список картинок.
ниже сам ImageView
при нажатии на картинку в горизонтале, она грузится в ImageView.
Спасибо!
Ребята, очень нужна помощь.
Есть ImageView. Там картинка.
Просто надо её увеличить и уменьшить. Когда увеличена, то двигать пальцем
в пределах ImageView.
Дайте простой рабочий пример.
Вот мой layout
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<HorizontalScrollView
android:id="@+id/hor_scroll_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
<LinearLayout
android:id="@+id/linear_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
</LinearLayout>
</HorizontalScrollView>
<ImageView
android:id="@+id/selected"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="@drawable/ic_launcher"
android:contentDescription="@string/PhotoImageView"
/>
</LinearLayout>
Здесь в горизонтале список картинок.
ниже сам ImageView
при нажатии на картинку в горизонтале, она грузится в ImageView.
Спасибо!