ImageView not displaying (Android) -


i have code:

<?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:id="@+id/activity_main"     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"      tools:context="com.example.ioann_000.cainstructionquiz.playactivity"     android:clickable="false"     android:animationcache="false"     android:clipchildren="false"     android:contextclickable="false"     android:filtertoucheswhenobscured="false"     android:layout_alignparentbottom="false"     android:layout_alignparentright="false"     android:saveenabled="false">       <textview         android:text="@string/cainstructionquiz"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_alignparenttop="true"         android:layout_centerhorizontal="true"         android:layout_margintop="12dp"         android:id="@+id/caintxtview"         android:textsize="30sp"         android:textcolor="@color/colorprimary"         android:textstyle="normal|italic" />      <button         android:id="@+id/exit_btn"          android:textcolor="#121111"         android:textsize="30sp"          android:layout_width="120dp"         android:background="@drawable/buttonshape"         android:shadowcolor="#a8a8a8"         android:shadowdx="7"         android:shadowdy="-2"         android:shadowradius="25"         android:layout_height="39dp"         android:layout_marginbottom="25dp"         android:layout_alignparentbottom="true"         android:layout_centerhorizontal="true"         android:text="ΕΞΟΔΟΣ"         android:elevation="0dp" />      <button         android:id="@+id/start_btn"          android:text="@string/playtxt"         android:textcolor="#121111"         android:textsize="30sp"          android:layout_width="120dp"         android:background="@drawable/buttonshape"         android:shadowcolor="#a8a8a8"         android:shadowdx="7"         android:shadowdy="-2"         android:shadowradius="25"         android:layout_height="39dp"         android:layout_marginbottom="24dp"         android:layout_above="@+id/exit_btn"         android:layout_alignstart="@+id/exit_btn" />      <imageview          android:layout_width="200dp"         app:srccompat="@drawable/maths_0"         android:id="@+id/imageview2"         android:layout_height="150dp"         android:layout_marginbottom="74dp"         android:layout_above="@+id/start_btn"         android:layout_centerhorizontal="true" />  </relativelayout> 

but imageview isnt showing... tried remake imageview nothing happens, when on design mode showing when running app, not. please? thank you!

screenshot on design mode

screenshot on run mode

add android:src="@drawable/yourimage" or android:background="@color/red" see imageview.

edit

replace app:srccompat android:src.


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -