私は一定の限界を超えて伸びない垂直線形レイアウトを持っています。LinearLayoutの最大高さはありますか?
これは、だから私の考えがあることである(それは全幅と巨大でなければなりません)これはノートリミングが設定されたレイアウトであるImageViewの http://tinypic.com/r/20nm6s/5
に http://tinypic.com/r/vzk7kw/5
centerCropとレイアウトです私のレイアウトで見ていない暗黙的な最大高さですが、どこにあるのかわかりません。私のエラーを見つけられますか?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@drawable/dropshadow"
>
<TextView
android:id="@+id/heading"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
/>
<ImageView
android:id="@+id/featuredimage"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:maxHeight="1000dp"
android:scaleType="centerCrop"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
/>
</LinearLayout>
</RelativeLayout>
投稿コードにLinearLayoutを使用している点はありません。相対レイアウトを使用すると、それを達成することができます。 – dcanh121
イメージの実際のピクセルサイズはどのくらいですか?イメージをロードして設定するコードを投稿できますか? –
'ScrollView'に' maxHeight'を提供する解決策が見つかりました。このソリューションは、あらゆるタイプのビューにも使用できます。 http://chintanrathod.com/maxheightscrollview-in-android-using-android-studio/ –