저는 Android 개발의 초보자입니다. Button과 ImageView를 FrameLayout에 넣으려고하지만 보이지 않습니다 (레이아웃에는 존재하지만 그려지지 않습니다).FrameLayout의 요소가 보이지 않습니다.
내 레이아웃 :
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/OuterFrame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:foreground="@drawable/flb1_off">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/show_dialog"
android:id="@+id/showDialogBtn"
android:onClick="showDialog"
android:layout_gravity="center"
android:background="#123456"
android:textColor="@color/abc_background_cache_hint_selector_material_dark"
android:visibility="visible" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/flb"
android:layout_gravity="bottom"
android:contentDescription="@string/content_desc" />
</LinearLayout>
이
이 API 버전은 19 흥미로운 일이이 작품을 좋아는 clickHandler 그 버튼하지만 버튼 자체가 보이지 않습니다.
나는 모든 자식을 단일 하위보기로 놓았지만, here과 같이 성공했지만 성공하지 못했습니다.
내가 뭘 잘못하고있어?
'android : foreground = "@ drawable/flb1_off"'이 문제라고 생각합니다. –
@SHAHMDMONIRULISLAM, 네 말이 맞아! 대체 안드로이드 : 전경 to android : 배경 고정! – Nicolas
답변을 추가했습니다. 수락 해 주시겠습니까? @ 니콜라스 –