如何將scrollview插入到此目錄中,並且仍然保留我的應用程序的標題?此外,所有教程似乎都要求您切換到LinearLayout,並且LinearLayout使我很難格式化需要包含在活動中的所有按鈕和文本框。我需要設計一個帶有滾動視圖的android活動
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="washingtondeli.groupboxlunchesestimateandordering.CapitolhillActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Capitol Hill Picnic Box Lunch"
android:id="@+id/capitolhilltitle"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />
</RelativeLayout>
出了什麼問題?只需將您的TextView包裝在scrollView中即可。此外,習慣使用LinearLayouts,通常它們會更加一致地在不同的設備上查看RelativeLayouts。 – Vucko
看看這個問題:http://stackoverflow.com/questions/6674341/how-to-use-scrollview-in-android – KevinTheGreat