2014-10-20 38 views
1

我有基於帶有固定標題的滾動視圖的對話框。我需要在外面設置取消,但它不起作用。 (當我只用滾動型無頭,setCanceledOnTouchOutside工作正確)Scrollview與固定標題(android)setCanceledOnTouchOutside不起作用

對話框佈局:

<?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="wrap_content" 
     android:paddingTop="0dp" 
     android:paddingBottom="0dp"> 
     <FrameLayout 
      android:id="@+id/shareFrameLayout" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:paddingTop="0dp"> 
      ///fixed header 
      ... 
     </FrameLayout> 
     <ScrollView 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:id="@+id/SharePostScrollView" 
      android:layout_below="@+id/shareFrameLayout"> 
      ... 
    </ScrollView> 
</RelativeLayout> 

setCanceledOnTouchOutside:(setLayout(275, 350)也不起作用)

​​3210

回答

0

固定由onViewCreated成在onStart更換代碼