2

I´m new in Java and Android Studio and tried to use a png in my test-application. Since I own a AMD processor I have to use my real device (Galaxy S6) to run it. Strangely, the Image that I used shows up in Android Studio, plus it´s in the right size. Anyways, it´s not showing up on my device, theres only the white background.

Code: (content.main.xml)

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    tools:context="com.example.chris.startbildschirm.MainActivity"
    tools:showIn="@layout/activity_main">

    <ImageView
        android:layout_width="300dp"
        android:layout_height="300dp"
        android:id="@+id/imageView"
        android:layout_centerVertical="true"
        android:layout_centerHorizontal="true"
        android:src="@drawable/logo"/>
</RelativeLayout>
hawk
  • 21
  • 4

0 Answers0