I have the following xml code in Android Studio:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:orientation = "vertical"
android:weightSum = "1">
<ImageView
app:srcCompat = "@mipmap/logon_img"
android:id = "@+id/imageView"
android:layout_gravity = "center_horizontal"
android:contentDescription="@string/app_name"
android:layout_width = "match_parent"
android:layout_weight = "0.38"
android:layout_height = "100dp"/>
<TextView
android:id = "@+id/login"
android:layout_gravity = "center_horizontal"
android:textSize = "30sp"
android:textAlignment = "center"
android:textStyle = "normal|bold"
android:textColor = "@color/Red"
android:text = "@string/typeUserName"
android:layout_weight = "0.00"
android:layout_width = "350dp"
android:layout_height = "wrap_content"/>
<EditText
android:layout_height = "wrap_content"
android:inputType = "textPersonName"
android:ems = "10"
android:id = "@+id/account"
android:layout_gravity = "center_horizontal"
android:textAlignment = "center"
android:textSize = "20sp"
android:layout_width = "300dp"
tools:ignore = "LabelFor"/>
<TextView
android:text = "@string/password"
android:layout_width = "350dp"
android:layout_height = "wrap_content"
android:id = "@+id/textView2"
android:layout_weight = "0.00"
android:layout_gravity = "center_horizontal"
android:textSize = "30sp"
android:textAlignment = "center"
android:textStyle = "normal|bold"
android:textColor = "@color/Red"/>
<EditText
android:layout_width = "300dp"
android:layout_height = "wrap_content"
android:inputType = "textPassword"
android:ems = "10"
android:id = "@+id/password"
android:layout_gravity = "center_horizontal"
android:textAlignment = "center"
android:textSize = "20sp"
tools:ignore = "LabelFor"/>
<Button
android:text = "@android:string/ok"
android:layout_height = "wrap_content"
android:id = "@+id/button"
android:layout_gravity = "center_horizontal"
android:layout_width = "200dp"
android:textSize = "20sp"
/>
</LinearLayout>
The component in question is ImageView, it just does not appear on the emulator or my cell phone, but there is an empty space reserved for it on the screen. I looked for the problem several times and the vast majority of them was the huge size of the image, which is not my case because its size is 256x256. Here's a screenshot of the emulator and layout.
minSdkVersion 19
targetSdkVersion 25
com.android.support:appcompat-v7:25.0.0