2011-10-04 11 views
0

두 개의 ScrollViews가 겹치는 레이아웃을 만들어야합니다. 하나는 "의견보기"버튼이있는 기사입니다. 다른보기는 투명하며 주석을 포함하며 "주석보기"버튼을 클릭하면 기사 맨 위에 표시됩니다. 문제는 댓글이 표시되고 화면을 채우지 못했을 때 화면 밖으로 화면을 터치하는 것입니다 (예 : 아래 표시된 이미지의 'Retour'버튼 아래). 이것은 아이폰 스크린 샷이며 안드로이드의 디자인은 다릅니다.) 기사를 스크롤합니다.ScrollViews 겹침 문제

enter image description here

또한, "VOIR 레 Commentaires"버튼은 심지어 그 위에 다른 레이아웃, 클릭 할 수 있습니다.

그 위에 다른보기가있는 경우 아래보기가 사용 중지되지 않는 이유는 무엇입니까 (버튼, 스크롤 ...)? 어떻게 할 수 있습니까?

아무도 도와 드릴 수 있습니까?

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

    <RelativeLayout android:id="@+id/header" 
     android:layout_width="fill_parent" android:layout_height="49dp" 
     android:background="#e7e7e8"> 

     <!-- header --> 

    </RelativeLayout> 
    <ScrollView android:id="@+id/article_scroll" 
     android:layout_width="fill_parent" android:layout_height="fill_parent" 
     android:layout_below="@id/header"> 
     <LinearLayout android:layout_width="fill_parent" 
      android:layout_height="fill_parent" android:orientation="vertical"> 

      <!-- article --> 

     </LinearLayout> 
    </ScrollView> 

    <LinearLayout android:layout_width="fill_parent" 
     android:layout_below="@id/header" android:layout_height="fill_parent" 
     android:orientation="vertical" android:background="#50000000" android:visibility="gone"> 
     <ScrollView android:id="@+id/comment_scroll" 
      android:layout_width="fill_parent" android:layout_height="fill_parent"> 

      <!-- comments --> 

     </ScrollView> 
    </LinearLayout> 
</RelativeLayout> 
+0

죄송합니다. 내 의견을 삭제했습니다 .-) –

답변

0

당신은 확실히 당신의 의견에 대한 새로운 활동을 사용하여 사용해야합니다 Transucent 테마 : 일부 대안의 테마 (예를 들어 대화)의 요구

에 맞게해야

<activity android:theme="@android:style/Theme.Translucent"> 

http://developer.android.com/guide/topics/ui/themes.html

또는 흐린 배경 : http://www.stealthcopter.com/blog/2010/01/android-blurring-and-dimming-background-windows-from-dialogs/

enter image description here

+0

감사합니다. '@android : style/Theme.Translucent.NoTitleBar.Fullscreen'을 사용했습니다. – jul

0

"Voir les Commentaires"버튼의 경우 두 번째 레이어가 표시되면 enabled = false로 설정할 수 있습니다. 그리고 나는 확실히 atm은 아니지만, 당신이 하단 ScrollView에 대해 동일하게 할 수 있다고 생각합니다.