我試圖把scrolview沒有成功.. 這個錯誤我得到: 渲染問題在渲染過程中引發異常:ScrollView只能託管一個直接孩子(詳細) 即時我得到這個時,我將linearLayout替換爲ScrolView heny suggetion?渲染問題渲染過程中出現的異常:ScrollView只能託管一個直接子(詳細)
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
android:orientation="vertical"
tools:context="com.example.jbt.mymovie.Edit_MovieScreen"
android:id="@+id/editScreenLinearLayout">
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:weightSum="100"
android:id="@+id/linearLayout">
<TextView
android:layout_width="0sp"
android:layout_height="wrap_content"
android:text="Movie Name"
android:id="@+id/SubjectTV"
android:textSize="24dp"
android:layout_weight="50" />
<EditText
android:layout_width="0sp"
android:layout_height="wrap_content"
android:id="@+id/movieNameImplement"
android:layout_weight="50"
android:text="@string/MovieNameEditText" />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Summery :"
android:id="@+id/SummeryTV"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/SummeryImplement"
android:layout_weight="10064.12"
android:text="@string/SummeryImplement" />
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:weightSum="100"
android:id="@+id/linearLayout2">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="@string/URLtextView"
android:id="@+id/URLtv"
android:textSize="18dp"
android:layout_weight="15" />
<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
android:id="@+id/UrlImplement"
android:layout_weight="60"
android:text="@string/UrlImplement" />
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/ShowButton"
android:id="@+id/ShowB"
android:onClick="showButton"
android:layout_weight="20" />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="press show to get photo"
android:id="@+id/ErrortextView"
android:layout_gravity="center_horizontal" />
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/imageButton"
android:src="@mipmap/ic_launcher"
/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:weightSum="100"
>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/OKbutton"
android:id="@+id/OKbutton"
android:layout_gravity="center|bottom"
android:onClick="onClickaddMovie"
android:layout_weight="50" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/CancelButton"
android:onClick="cancelButton"
android:id="@+id/CancelButton"
android:layout_marginLeft="28dp"
android:layout_marginStart="28dp"
android:layout_gravity="center|bottom"
android:layout_weight="50" />
</LinearLayout>
</LinearLayout>
「即時將此linearLayout替換爲ScrolView」 - 您的代碼清單中有多個'LinearLayout'。請編輯您的問題並更改代碼清單,以便將「ScrollView」放置在導致問題的位置。 – CommonsWare