在Android开发中,有时利用seekbar实现相关的图片的旋转与缩放;
这里就简单介绍一下,如何利用seekbar实现图片的放大与缩小;以及旋转。
这是布局代码:
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<ImageView
android:id="@+id/iv_1"
android:layout_width="250dp"
android:layout_height="250dp"
android:layout_marginTop="16dp"
android:src="@drawable/onmk"
android:adjustViewBounds="true"
android:layout_gravity="center"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_1"
android:layout_width="