android - Image displays in design view, but doesn't show up in emulator or on the phone -
displaying image on android:
image displays fine in design view of eclipse
, doesn't show in emulator or on phone. here layout snippet:
<imageview android:id="@+id/imageview1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_above="@+id/yyy" android:layout_below="@+id/textxxx" android:layout_centerhorizontal="true" android:layout_marginbottom="10dp" android:layout_margintop="10dp" android:contentdescription="trouble" android:ems="10" android:src="@drawable/xxx_yyy" android:visibility="visible" android:scaletype="fitcenter"/>
ideally, situation should not happen. if happening can re-check these lines :
enable layout boundaries : if device
developer mode enabled
settings -> developer options -> show layout boundaryelse go settings -> phone -> click 5 times on baseband version , device
developer mode enabled
, execute above stepusing this, layout display boundary lines on edges. if layout being hidden on device or emulator other large layouts can check easily. if boundaries not visible, layout not on
foreground
now, need check other overlapping layoutsyou can set
background
color of layout , outside part of layout. i.e. layout hasbackground
green (00ff00) , outside part hasbackground
red (ff0000). helps identify our layout is.
Comments
Post a Comment