小编PAP*_*PER的帖子

单击放大Imageview

你好Stackoverflow的朋友.我只是想知道是否有人可以帮助我.

我创建了一个包含大量图像的应用程序,图像目前非常小,但我希望它们在点击后进行扩展.有没有办法做到这一点?我的应用程序大约持有50 xml,并且在类中相同.但它拥有大约100张图片,有没有简单的方法来做到这一点?

我的XML的一个例子

<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="match_parent"
    android:background="#808080"
    android:orientation="vertical" >

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="499dp"
        android:orientation="vertical" >

 <ImageView
     android:id="@+id/Logo"
     android:layout_width="120dp"
     android:layout_height="wrap_content"
     android:layout_marginLeft="255dp"
     android:layout_marginTop="3dp"
     android:src="@drawable/logov2" />


            <TextView
                android:id="@+id/title"
                android:layout_width="210dp"
                android:layout_height="84dp"
                android:layout_marginLeft="40dp"
                android:layout_marginTop="-90dp"
                android:gravity="center"
                android:text="@string/seatedcablerows"
                android:textColor="#FFFFFF"
                android:textSize="32sp" />

            <ImageView
                android:id="@+id/blackline"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dp"
                android:src="@drawable/blackline" />

               <TextView
                   android:id="@+id/textView1"
                   android:layout_width="95dp"
                   android:layout_height="wrap_content"
                   android:layout_marginTop="3dp"
                   android:layout_marginLeft="15dp"
                   android:text="@string/startphase"
                   android:textAppearance="?android:attr/textAppearanceSmall"
                   android:textColor="#ffffff"
                   android:textSize="16sp" />

                  <TextView
                      android:id="@+id/textView2"
                      android:layout_width="121dp"
                      android:layout_height="wrap_content"
                      android:layout_marginLeft="130dp"
                      android:layout_marginTop="-20dp"
                      android:text="@string/middlephase"
                      android:textAppearance="?android:attr/textAppearanceSmall"
                      android:textColor="#ffffff"
                      android:textSize="16sp" />

      <TextView
                   android:id="@+id/textView3"
                   android:layout_width="95dp"
                   android:layout_height="wrap_content"
                   android:layout_marginTop="-20dp"
                   android:layout_marginLeft="260dp"
                   android:text="@string/endphase"
                   android:textAppearance="?android:attr/textAppearanceSmall"
                   android:textColor="#ffffff"
                   android:textSize="16sp" />
            <ImageView
                android:id="@+id/imageView1" …
Run Code Online (Sandbox Code Playgroud)

eclipse android android-image android-imageview

3
推荐指数
1
解决办法
2万
查看次数