2010-05-28 3 views
1

나는 탭 클릭에 대한 활동을 전환하고 이에 성공했습니다. 그러나, 내 활동 클래스 중 하나에 내가 뭐하는 거지 다음탭을 클릭 한 후 새 활동의 배경색을 설정하는 방법

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:orientation="vertical" 

android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
    android:background="#BDBDBD" 
> 

나는 단지이 레이아웃의 배경을 변경하려면 및 I : public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.main);}

main.xml에 다음과 같은있다 그대로 탭을 원한다. 그러나 currentandroid : layout_height = "fill_parent"가 main.xml에있는 경우 배경이 탭을 덮어 쓰고 탭을 볼 수 없습니다. 그리고 만약 내가 makeandroid : layout_height = "wrap_content"`나는 변화를 볼 수 없으며 탭은 여전히 ​​있습니다.

답변

0

기본보기에서 두 개의보기를 사용해보십시오. >의 LinearLayout (부모) (탭)
--->의 LinearLayout
--->

그 방법 (주요 내용)있는 LinearLayout 사용자가 설정할 수 있습니다 -

: 예를 들어

XML의 주 콘텐츠 창 배경 또는 myListView.setBackgroundColor()

관련 문제