2011-10-20 4 views
0

CustomView 아래에 TextView를 어떻게 표시합니까? 지금 TextView는 CustomView 텍스트 위에 있습니다.사용자 정의보기 맨 위에 TextView

<RelativeLayout 
android:id="@+id/gamelayout" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
xmlns:android="http://schemas.android.com/apk/res/android"> 
<com.sample.CustomView 
android:id="@+id/customview" 
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
android:layout_gravity="top" 
/> 
<TextView 
android:id="@+id/displayMetrics" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
android:padding="5sp" 
android:textColor="#000000" 
android:text="METRICS"></TextView> 
</RelativeLayout> 

답변

0

한 가지 방법은 레이아웃에서 선언을 이동하여 TextView이 먼저 오도록하는 것입니다.

+0

전환 할 때 TextView가 사라졌습니다. – David

+0

@David : 사용자 정의보기 아래에 있습니다. 투명하지는 않습니다. –

관련 문제