2013-03-21 110 views
0

ScrollView無法使用。我嘗試了不同的組合,沒有運氣。有人能指出我哪裏會出錯嗎?ScrollView無法使用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" 
    android:orientation="vertical" 
    android:fillViewport="true" > 

    <LinearLayout 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:orientation="vertical" > 

     <LinearLayout 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:background="#333333" 
      android:orientation="horizontal" > 

      <ImageView 
       android:layout_width="48dp" 
       android:layout_height="48dp" 
       android:src="@drawable/ic_launcher" /> 

      <com.appsolute.ultimateproject.TypedfacedTextView 
       xmlns:android="http://schemas.android.com/apk/res/android" 
       xmlns:font="http://schemas.android.com/apk/res/com.appsolute.ultimateproject" 
       android:id="@+id/overview" 
       android:layout_width="wrap_content" 
       android:layout_height="match_parent" 
       android:gravity="center" 
       android:textAppearance="?android:attr/textAppearanceMedium" 
       android:textColor="#ffffff" 
       font:typeface="Roboto-Condensed.ttf" /> 
     </LinearLayout> 

     <ListView 
      xmlns:android="http://schemas.android.com/apk/res/android" 
      android:id="@android:id/list" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:background="#ffffff" 
      android:paddingLeft="@dimen/list_padding" 
      android:paddingRight="@dimen/list_padding" /> 

     <LinearLayout 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:background="#333333" 
      android:orientation="horizontal" 
      android:paddingTop="10dp" > 

      <com.appsolute.ultimateproject.TypedfacedTextView 
       xmlns:android="http://schemas.android.com/apk/res/android" 
       xmlns:font="http://schemas.android.com/apk/res/com.appsolute.ultimateproject" 
       android:id="@+id/header" 
       android:layout_width="wrap_content" 
       android:layout_height="match_parent" 
       android:gravity="center" 
       android:paddingBottom="2dp" 
       android:textAppearance="?android:attr/textAppearanceSmall" 
       android:textColor="#ffffff" 
       font:typeface="Roboto-Condensed.ttf" /> 
     </LinearLayout> 

     <LinearLayout 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:orientation="horizontal" 
      android:paddingTop="10dp" > 

      <ImageView 
       android:layout_width="48dp" 
       android:layout_height="48dp" 
       android:src="@drawable/ic_action_person" /> 

      <com.appsolute.ultimateproject.TypedfacedTextView 
       xmlns:android="http://schemas.android.com/apk/res/android" 
       xmlns:font="http://schemas.android.com/apk/res/com.appsolute.ultimateproject" 
       android:id="@+id/header" 
       android:layout_width="wrap_content" 
       android:layout_height="match_parent" 
       android:gravity="center" 
       android:textAppearance="?android:attr/textAppearanceSmall" 
       font:typeface="Roboto-Condensed.ttf" /> 
     </LinearLayout> 

     <View 
      android:layout_width="wrap_content" 
      android:layout_height="1dp" 
      android:background="#333333" 
      android:padding="1dp" /> 

     <LinearLayout 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:orientation="horizontal" 
      android:paddingTop="1dp" > 

      <ImageView 
       android:layout_width="48dp" 
       android:layout_height="48dp" 
       android:src="@drawable/ic_action_fav" /> 

      <com.appsolute.ultimateproject.TypedfacedTextView 
       xmlns:android="http://schemas.android.com/apk/res/android" 
       xmlns:font="http://schemas.android.com/apk/res/com.appsolute.ultimateproject" 
       android:id="@+id/favorites" 
       android:layout_width="wrap_content" 
       android:layout_height="match_parent" 
       android:gravity="center" 

       android:textAppearance="?android:attr/textAppearanceSmall" 
       font:typeface="Roboto-Condensed.ttf" /> 
     </LinearLayout> 

     <View 
      android:layout_width="wrap_content" 
      android:layout_height="1dp" 
      android:background="#333333" 
      android:padding="1dp" /> 

     <LinearLayout 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:orientation="horizontal" 
      android:paddingTop="1dp" > 

      <ImageView 
       android:layout_width="48dp" 
       android:layout_height="48dp" 
       android:src="@drawable/ic_action_save" /> 

      <com.appsolute.ultimateproject.TypedfacedTextView 
       xmlns:android="http://schemas.android.com/apk/res/android" 
       xmlns:font="http://schemas.android.com/apk/res/com.appsolute.ultimateproject" 
       android:id="@+id/saved" 
       android:layout_width="wrap_content" 
       android:layout_height="match_parent" 
       android:gravity="center" 
       android:textAppearance="?android:attr/textAppearanceSmall" 
       font:typeface="Roboto-Condensed.ttf" /> 
     </LinearLayout> 
    </LinearLayout> 

</ScrollView> 

我已經使用了fillViewport並且還做了底層內容包裝。請幫忙。

回答

相關問題