2016-01-13 69 views
0

我试图在我的首选项屏幕中添加页脚,但其中的按钮没有响应。另外,当我调用EditTextPreference时,我的页脚也会移动..任何想法?页脚在PreferenceScreen中未响应

这里是我的xml文件

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent"> 

    <include layout="@layout/footer"/> 
    <RelativeLayout 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_above="@+id/footer"> 
     <ListView 
      android:id="@+id/android:list" 
      android:layout_width="match_parent" 
      android:layout_height="1dp" 
      android:layout_weight="1" > 
     </ListView> 
    </RelativeLayout> 
</RelativeLayout> 

回答

0

使用您的布局这样的..

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent"> 


    <include 
      android:id="@+id/your_footer" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:layout_alignParentBottom="true" 
      layout="@layout/footer" /> 
    <RelativeLayout 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_above="@+id/your_footer"> 
     <ListView 
      android:id="@+id/android:list" 
      android:layout_width="match_parent" 
      android:layout_height="1dp" 
      android:layout_weight="1" > 
     </ListView> 
    </RelativeLayout> 
</RelativeLayout>