アンドロイドスタジオのスクロールビューにimageviewを配置しようとしていますが、スクロールビューに画像ビューをドラッグアンドドロップできません。スクロールビューアンドロイドスタジオに画像ビューを配置できません
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#ccc"
android:gravity="center"
android:orientation="vertical"
android:paddingTop="30dp">
<LinearLayout
android:id="@+id/content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:background="#ffffff"
android:gravity="center"
android:orientation="vertical"
android:textColor="#ffffff">
<TextView
android:id="@+id/homepagetxt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:textColor="#000000"
android:textStyle="italic" />
</LinearLayout>
</ScrollView>
私はリニアレイアウトにそれを置くことができますが、それは私の画面のレイアウトを台無しに:
は、ここに私のコードです。 しかし、私はスクロールビューでは、直線レイアウトの終了タグの後のようにそれを置くことはできません。
スクロールビューにイメージビューを置くことには何か制限はありますか?
ご返信いただければ幸いです。
oh ..別の線形レイアウトとスクロールビューを含む線形レイアウトを使用することはできますか? –
リニア(または相対)レイアウトに複数の直接子を含めることができますが、スクロールビューには直接子を1つしか持たないため、はいです。 –
どうもありがとうございました。 –