어흑흑.. 부끄럽지만 제가 만든 어플에 제가 만든 그림을 넣고 싶어서 배경에 사진 넣는 법을 배웠어요!
drawable이라는 폴더에 png혹은 jpg파일로 그림을 넣어두고
android:background="@drawable/그림파일명"
이렇게 하는 것이라고 배우고 해 보았더니 안드로이드 스튜디오 내에서는 정상적으로 그림이 뜨는데,
제 스마트폰과 가상 스마트폰으로 테스트 해 본 결과 흰 화면만 뜨고 아무것도 나오지 않더군요.
혹시나 그림의 확장자의 문제인가 싶어 jpg png 양쪽 다 시도해보았는데도 실패.
ImageView 밑에다 적으면 되려나 싶어 다시 코딩해 보았는데도 실패.
apk로 만들어서 설치하면 되는건 아닐까 시도해 보아도 실패.
아무리 들여다 보아도 틀린 곳이 전혀 눈에 띄지를 않아서 고민입니다...
검색해보아도 다들 android:background이거 쓰더라고요..
혹시 문제가 무엇인지 아시는 분 계시다면 의견을 여쭙고 싶습니다...
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".title">
<ImageView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:background="@drawable/title_image2"/>
</android.support.constraint.ConstraintLayout>