<?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" android:background="#ffffff">
<!-- Title -->
<RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content"
android:background="#ffffff">
<TextView android:id="@+id/txt_driver_title"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:gravity="center_horizontal"
android:textColor="#444444" android:textSize="18sp"/>
<ImageButton android:id="@+id/btn_driver_close"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_centerVertical="true"
android:layout_marginRight="10dp" android:layout_marginTop="10dp" android:layout_marginBottom="10dp"
android:background="@drawable/btn_dialog_close"/>
</RelativeLayout>
<LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content"
android:orientation="horizontal">
<Button android:id="@+id/btn_work_on" style="@style/driver_tab" android:text="출근"
android:layout_marginRight="2dp"/>
<Button android:id="@+id/btn_work_off" style="@style/driver_tab" android:text="퇴근"/>
</LinearLayout>
<FrameLayout android:background="#000000"
android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:id="@+id/txt_work_on" android:visibility="gone"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:textColor="#ffffff" android:text="출근했습니다."
android:layout_marginTop="15dp" android:textSize="15sp"/>
<TextView android:id="@+id/txt_work_off" android:visibility="gone"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:textColor="#ffffff" android:text="퇴근했습니다."
android:layout_marginTop="15dp" android:textSize="15sp"/>
</FrameLayout>
</LinearLayout>
xml 에서 레이아웃 이렇게 구현 해놓고 dialog 를 커스텀해서 보여주게 됩니다. 문제는 FrameLayout 부분인데요
상단 버튼 2개가 눌렸을경우 동적으로 frameLayout 부분 내부 TextView 를 gone 하고 visible 하는대요
결국 글씨가 2개가 바껴서 보이게 되죠 .
허나 글씨부분이 그냥 검게만 보이게 됩니다 . dialog 특성때문에 뒷 배경을 투명을 줘도 동일하고 white로 줘도 동일하네요 . 전체 Linear에 background 를 줘도 동일하구요 . 혹 문제아시는 분 계신가요 ?