2012-02-29 3 views
1
나는 안드로이드 지원 패키지의 V4를 사용하고

을의 행동과 다음과 같은 레이아웃은 슬라이드 식 contentviews 해당 스크롤 TabBar의 +를 표시합니다 :이상한 다시 그리기 안드로이드

<?xml version="1.0" encoding="utf-8"?> 
<TabHost 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@android:id/tabhost" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent"> 

<LinearLayout 
      android:orientation="vertical" 
      android:layout_width="fill_parent" 
      android:layout_height="fill_parent"> 
    <LinearLayout 
       android:orientation="horizontal" 
       android:layout_width="fill_parent" 
       android:gravity="center_vertical" 
       android:layout_height="wrap_content"> 
     <HorizontalScrollView 
          android:layout_width="wrap_content" 
          android:id="@+id/horizontalScrollView" 
          android:orientation="horizontal" 
          android:layout_height="wrap_content" 
          android:fillViewport="true" 
          android:scrollbars="none"> 
      <TabWidget 
        android:id="@android:id/tabs" 
        android:orientation="horizontal" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content"/> 

     </HorizontalScrollView> 
    </LinearLayout> 
    <FrameLayout 
      android:id="@android:id/tabcontent" 
      android:layout_width="0dp" 
      android:layout_height="0dp" 
      android:layout_weight="0"/> 
    <android.support.v4.view.ViewPager 
      android:id="@+id/viewPager" 
      android:layout_width="fill_parent" 
      android:layout_height="0dp" 
      android:layout_weight="1"/> 
</LinearLayout> 
</TabHost> 

그것은 말할 수 잘 작동을 90 %지만 10 %를 단지 돈 u를 다시 그리지 마라. 요소의 무효화조차도 문제를 해결하지 못합니다. 이제 가장 이상한 부분 : 휴대 전화를 잠그고 다시 잠그면 모든 것이 예상대로 작동하고 매력처럼 작동합니다.

예 : 새 탭 + 조각을 추가합니다. - Tab + Fragment를 추가하면 해당 탭의 모든 메소드가 호출되지만 UI는 검정색입니다. lock + unlock = 모든 것이 다시 정상입니다.

조각에 userinput 처리. (사진보기) Userinput on Fragment

알림 : 나는 이미 모든 요소의 무효화를 테스트했지만 작동하지 않습니다.

이 문제를 해결하려면 어떻게해야합니까?

미리 감사드립니다.

답변

0

탭 호스트에 메모리 리크가있었습니다.