Reputation: 103
android:background="@drawable/bkg1"
Android studio show the image,but when app run on phone, doesn't show.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:background="@drawable/bkg1" >
Upvotes: 0
Views: 1521
Reputation:
Please try to create any other thing on this layout like create button. if button is not visible than your layout is not set. and if it visible than try to change image or uninstall the apk from device and build project than run.
Upvotes: 1
Reputation: 241
Problem could be in the picture so try to use this code (if it shows the red background then consider using another picture)
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent" android:background="#c04444">
Upvotes: 1