화면을 아래로 스크롤하여 "Replied By :"섹션의 데이터를 볼 수 없습니다. 레이아웃을 스크롤 가능하게 만들려면 어떻게해야합니까?

화면을 아래로 스크롤하여 "Replied By :"섹션의 데이터를 볼 수 없습니다. 레이아웃을 스크롤 가능하게 만들려면 어떻게해야합니까?

답변:
모든 것을 다음과 같이 감싸십시오 ScrollView.
<?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">
<!-- Here you put the rest of your current view-->
</ScrollView>
David Hedlund가 말했듯이, ScrollView 하나의 항목 만 포함 할 수 있습니다. 따라서 다음과 같은 것이 있다면 :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<!-- bla bla bla-->
</LinearLayout>
다음으로 변경해야합니다.
<?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">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<!-- bla bla bla-->
</LinearLayout>
</ScrollView>
상대 레이아웃과 함께 스크롤보기를 사용하는 경우 :
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true"> <!--IMPORTANT otherwise backgrnd img. will not fill the whole screen -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:background="@drawable/background_image"
>
<!-- Bla Bla Bla i.e. Your Textviews/Buttons etc. -->
</RelativeLayout>
</ScrollView>
모든 것을 ScrollView 안에 감싸십시오.
<?xml version="1.0" encoding="utf-8"?>
<ScrollView 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"
tools:context="com.ruatech.sanikamal.justjava.MainActivity">
<!-- Here you put the rest of your current view-->
</ScrollView>
ScrollView당신이 현재 가지고하는 의견이 많은 경우에만, 한 아이를 포함 할 수 있습니다 그래서, 당신은 하나 개의보기 그룹에서 그들을 포장 할 필요가 (발언권LinearLayout)