안드로이드 개발 질문/답변
(글 수 45,052)
<?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="@drawable/top_bg" >
<include
android:id="@+id/top"
android:layout_width="fill_parent"
android:layout_height="61px"
layout="@layout/top" />
<FrameLayout
android:id="@+id/mainLayoutFrame"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@+id/mainLayoutFrame"
android:layout_marginTop="61px" >
<LinearLayout
android:id="@+id/mainLayoutMenu"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/mainLayoutMenu" android:layout_gravity="bottom">
<ImageButton
android:id="@+id/main_Menu1"
android:layout_width="120px"
android:layout_height="98px"
android:background="@drawable/fo_off" >
</ImageButton>
<ImageButton
android:id="@+id/main_Menu2"
android:layout_width="120px"
android:layout_height="98px"
android:background="@drawable/ev_off" >
</ImageButton>
<ImageButton
android:id="@+id/main_Menu3"
android:layout_width="120px"
android:layout_height="98px"
android:background="@drawable/sa_off" >
</ImageButton>
<ImageButton
android:id="@+id/main_Menu4"
android:layout_width="120px"
android:layout_height="98px"
android:background="@drawable/es_off" >
</ImageButton>
</LinearLayout>
</FrameLayout>
<FrameLayout
android:id="@+id/mainLayoutcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@+id/mainLayoutFrame" >
<include
android:id="@+id/main_tab1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
layout="@layout/main_tab1" />
<include
android:id="@+id/main_tab2"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
layout="@layout/main_tab2" />
<include
android:id="@+id/main_tab3"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
layout="@layout/main_tab3" />
<include
android:id="@+id/main_tab4"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
layout="@layout/main_tab4" />
</FrameLayout>
</RelativeLayout>
소스에러가 안나고 실행되고 클릭하면 내용이 안뿌려지는데..
웹뷰뿐만아니라 TextView조차 못뿌리는데
이거 레이어 위치가 잘 못되서 가려진거 아닌가요??
아 그리고 첨부이미지에서 TOP메뉴 뒤로가기버튼 이미지데두리 하얀게 나오는건 왜그런거죠??




일단 레이아웃이 잘못된게 맞는거 같구요...
xml 가장 하단의 FrameLayout이 ... 논리적으로 보면 탭버튼 눌렀을때 나오는 내용뷰인거 같은데
전체를 차지하는 mainLayoutFrame의 below에 배치되어있으니 안나오는게 당연합니다.
그리고 back버튼의 경우
imagebutton의 src에 이미지를 넣으신듯합니다.
이런 경우 이미지를 background로 바꾸시거나....
background 이미지를 지정하여 (투명한 색이나 @null이나...)아무것도 안나오게 하시던가.. 둘중 하나로 해결하시면 됩니다.