J'ai une activité qui montre l'aperçu de la caméra, et un ImageView de la dernière image prise.Redimensionner la hauteur d'ImageView avec le doigt
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/stitch_preview"
android:layout_width="fill_parent"
android:layout_height="128dp"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:scaleType="center"
android:visibility="gone"/>
<SurfaceView
android:id="@+id/camera_preview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@+id/stitch_preview"/>
En ce moment, le ImageView est fixé à hauteur 128dp
. Il est difficile de redimensionner cette vue en faisant glisser votre doigt vers le bas sur l'ImageView.
Je cherchais divers indices, mais tout ce que je trouve concerne une vue cachée. Je n'arrive pas à trouver un exemple de redimensionnement d'une vue déjà visible.
Tutorial for doing a pull-down "view" in android?
How to resize a custom view programmatically?