xml 파일에 이미지를 추가했습니다. 이것은 내가 사용하고있는 코드입니다 :Android 레이아웃 - 이미지가 추가 공간을 차지합니다
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<ImageView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:src="@drawable/topbar_logo2x"
android:scaleType="fitStart" />
<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:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<View
android:layout_width="fill_parent"
android:layout_height="0.5dip"
android:background="#000" />
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="0dip"
android:layout_marginRight="0dip" />
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</LinearLayout>
</TabHost>
</LinearLayout>
내 TabHost가 정확하게 내 이미지 위에 오길 원합니다. I에 유래 몇 가지 답변을 선택하면 Sndroid는 scaleType
의 한 선언을 허용 할 것이다, 나는 내가 같은 이미지 뷰에 모두 android:scaleType="fitStart"
및 android:scaleType="fitEnd"
을 사용하고자하고 이렇게 할 수없는
android:scaleType="fitStart"
을 사용하는 명시된 답변을 얻었다 . 코드의 변경으로 어떻게 동일한 결과를 얻을 수 있습니까? 저를 도울 다른 명령이 있습니까?
그래서'TabHost'가'ImageView'보다 위에있게하고 싶습니까? Howabout은 XML에서'TabHost'를 위로 움직입니까? –
아니요. Jarno 없음, 내 이미지가 페이지 (회사 로고) 상단에 있고 TabHost가 뒤에 붙음 – Vinoth
Jarno가 없습니다. 내 이미지가 페이지 상단 (회사 로고)에오고 TabHost 뒤에는 – Vinoth