Saturday, February 19, 2011

[android-developers] Re: ImageView hardcoded into layout referencing drawable resources

Fair enough. My project has such a folder, but of course I suppose it
is only accessed when the app is run on certain devices.

Thanks.

Cheers!

On Feb 19, 4:25 pm, Justin Anderson <magouyaw...@gmail.com> wrote:
> Drawables in the "drawable-hdpi" folder are only available on high-density
> devices.  When you say you "don't see it" are you sure you are on a
> high-density device?
>
> See here for more info:http://developer.android.com/guide/topics/resources/providing-resourc...
>
> Hope that helps,
> Justin
>
> On Sat, Feb 19, 2011 at 5:17 PM, Keith Wiley <kbwi...@gmail.com> wrote:
> > If I reference a drawable in the "drawable" directory, I see the image
> > in my layout, but if I reference a drawable in the "drawable-hdpi"
> > directory, I don't see it (but I don't get an error of any sort
> > either).  I want to include the app icon on the splash screen, and
> > would prefer to use the high-res icon.
>
> > This works:
> >                        <ImageView
> >                                android:layout_width="wrap_content"
> > android:layout_height="wrap_content"
> >                                android:layout_gravity="center"
> > android:layout_marginRight="20dip"
> >                                android:src="@drawable/app_icon" />
>
> > This doesn't:
> >                        <ImageView
> >                                android:layout_width="wrap_content"
> > android:layout_height="wrap_content"
> >                                android:layout_gravity="center"
> > android:layout_marginRight="20dip"
> >                                android:src="@drawable-hdpi/app_icon" />
>
> > Thoughts?
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscribe@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
>

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment