0

クリックするとこのレイアウトにリダイレクトされるボタン付きのアプリを作成します。しかし、問題は、画像をズームできないことです。

<?xml version="1.0" encoding="utf-8"?> <LinearLayout
<Linearlayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:orientation="vertical" >

     <ImageView
     android:src="@drawable/keutamaandua"
     android:layout_width="match_parent"
     android:layout_height="match_parent" /></LinearLayout>
4

2 に答える 2

0

wrap_content親が子供を持つことはあまり意味がmatch_parentありません。実際には何の制約も与えていないからです。

おそらくmatch_parentルートレイアウトに使用する必要があります:

<?xml version="1.0" encoding="utf-8"?> <LinearLayout
<Linearlayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:orientation="vertical" >
于 2012-12-18T16:33:04.947 に答える
0

デフォルトでは、ImageView にはズーム機能がありません。この例のようにズームするか、単純なタップでズームするウィジェットを提供するライブラリを見つけることができます。

于 2012-12-18T16:33:37.363 に答える