my code is:-
Drawabel partlycloud=res.getDrawable(R.drawable.a65_color_31);
I have more images like
a65_color_31
a66_color_31
a67_color_31
a68_color_31
a69_color_31
a70_color_31
a71_color_31
If user gives input as 67 then my drawable should be
Drawabel partlycloud=res.getDrawable(R.drawable.a
Hi,
I am trying to resize an image in a textview (set using imagespan). I
tried using setbounds but the image is not reflected.
OnPreDraw - set the bounds
OnDraw - shows the image in some weird place - the updated position
isn't shown correctly.
Can someone please suggest any other option to res
I am working on a simple animation using the animation-list attribute. I
have all my sequenced images in the drawable-xhdpi folder and the first
line of my XML looks like this:
To keep things tidy, I decided to create a new folder called "seq" inside
of the drawable-xhdpi and moved my images in
Can I have sub-folders to hold my drawable resources. For example can
I store an image in, say, 'res/drawable/content/images/myimage.jpg'
and then find that resource via a call to:
id =
context.getResources().getIdentifier("com.mycompany.myprog:drawable/
content/images/myimage", null, null);
I h
Hi,
I am having an image in my drawable and drawable-xhdpi folder. When I
run the build on a hdpi device, it picks image from xhdpi folder. I am
not able to understand the reason behind it. As per my assumption it
should pick from drawable folder.
Please help.
Thanks
--
You received this messa
When using android:minSdkVersion less than 9, is it (or should it be)
standard practice to use "drawable-xhdpi-v9" instead of "drawable-xhdpi"?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-de
Hi, guys.
I load Drawables (jpeg pictures) from URLs the following way:
URL urlO = new URL(url);
URLConnection urlC = urlO.openConnection();
InputStream is = urlC.getInputStream();
return Drawable.createFromStream(is, url);
It's fun
Hi,
I am writing a GL app and, as such, am only loading drawable resources
at the last second (right before they are rendered for the first
time). The problem with this is that I need to know the size of the
image before I get to the rendering portion of code. Ideally I would
like to automatically
I am trying to scale a drawable at run time depending on the
orientation and and handset dimensions. But this does not seem to take
effect.
This is done on onPreDraw() of textview. It's a textview having text
and images.
Works fine on the 2.x handsets but does not work on the 1.6 ones.
Any ideas
Does anyone know the syntax for an XML file for a single bitmap
drawable resource? What I'm looking to do is "alias" a drawable in my
app. I have need for the same image with 2 different names, and rather
than including the image twice in my res/drawable directory, I'd
rather alias it (it's fairly
John Gaby wrote:
> Can I have sub-folders to hold my drawable resources. For example can
> I store an image in, say, 'res/drawable/content/images/myimage.jpg'
> and then find that resource via a call to:
>
> id =
> context.getResources().getIdentifier("com.mycompany.myprog:drawable/
> content/ima
>
> As per my assumption it should pick from drawable folder.
>
As per your assumption you are wrong... :-)
http://developer.android.com/guide/topics/resources/providing-resources.html#BestMatch
Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware
On Thu, Apr 2
On Sat, May 26, 2012 at 11:05 AM, Mark Carter wrote:
> When using android:minSdkVersion less than 9, is it (or should it be)
> standard practice to use "drawable-xhdpi-v9" instead of "drawable-xhdpi"?
It is not standard practice, nor would I recommend it. You use a -vNN
resource set when you need
When min level is pre-Donut, I remember there is a common approach to use
drawable-ldpi-v4, drawable-hdpi-v4, drawable-nodpi-v4 (as well as
"drawable") for similar reasons.
If I have an app with ONLY xhdpi resources and set the minimum level to 8,
then I notice the drawable-xhdpi resources are
On Sat, May 26, 2012 at 12:12 PM, Mark Carter wrote:
> When min level is pre-Donut, I remember there is a common approach to use
> drawable-ldpi-v4, drawable-hdpi-v4, drawable-nodpi-v4 (as well as
> "drawable") for similar reasons.
>
> If I have an app with ONLY xhdpi resources and set the minimum
There is no need to here, previous versions of the platform (down to API 4)
know about the density configuration and will pick the correct density for
you.
On Sat, May 26, 2012 at 9:20 AM, Mark Murphy wrote:
> On Sat, May 26, 2012 at 12:12 PM, Mark Carter
> wrote:
> > When min level is pre-Donut
Do you just mean the density configuration in general? Surely Donut did
not specifically know about xhdpi (which was only introduced in
Gingerbread)?
On 27 May 2012 10:53, Dianne Hackborn wrote:
> There is no need to here, previous versions of the platform (down to API
> 4) know about the densi
There isn't really anything special about xhdpi -- aapt just converts that
to the appropriate density value (320 for xhdpi), and the platform since
API 4 knows how to pick the best density given any numbers for screen
density and resource density.
On Sat, May 26, 2012 at 8:51 PM, Mark Carter wrot
I'm trying to get a Drawable image to show up in a String or
CharSequence and all I'm getting is the integer number of the image.
Can anyone please help me out with this?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group
Hi!
Is there a way to specify that a drawable should only be repeated vertically
and then stretched horizontally?
At the momemt I use the following which repeates the drawable both in the
vertical and horizontal direction:
http://schemas.android.com/apk/res/android";
android:src="@drawable/wal
Hi all,
I'm trying to load 4Mb of png in a parcelable arraylist.
When more than 1mb is loaded in my list I take an outofmemory
exception.
Is there a size limit for an arraylist, for. Drawable loaded in
memory, or another.
Thanks a lot for your answers.
--~--~-~--~~~--
I want to load an icon from resource and draw over it. But I cannot
get it into a canvas. Can anyone please help me with the code below.
If I uncomment c.drawColor(), I get blue color as expected. So the
problem is on icon.draw().
Drawable icon = getResources().getDrawable(R.drawable.icon
String wrote:
> Does anyone know the syntax for an XML file for a single bitmap
> drawable resource? What I'm looking to do is "alias" a drawable in my
> app. I have need for the same image with 2 different names, and rather
> than including the image twice in my res/drawable directory, I'd
> rathe
Try Html.fromHtml("Here is an http://www.foo.com/something.png\\";>") and using that
SpannedString result in your TextView. I might have the Java quoting
rules messed up here, as I'm typing that from memory.
On Wed, Apr 20, 2011 at 2:04 PM, pennstate24 wrote:
> I'm trying to get a Drawable image
The Notification API allows to set a drawable resource id for the icon
of a notification. This drawable resource id is used to put the icon
in the status bar and in the expanded window shade.
This is a limitation if the icon images are to be represented by a
Drawable or from a content provider at
Hi,
I'm having a problem with displaying a drawable. I have a ImageButton
and a LayerDrawable. I set up an array of Drawable that has one
Drawable for the background (index 0) and one for the image (index 1).
The button would display different background on different states of
the button. What I'
Hi there,
So I have this game running on Android 1.6, and I put the different
density images in their respective folders
res/drawable-hdpi/image.png
res/drawable-mdpi/image.png
res/drawable-ldpi/image.png
I made each image a different color so I can tell if it is loading the
right image. When I
Hi,
I'm trying to add a drawable to a layout, using an ImageView, but the
drawable doesn't maintain its size and is rendered at 1dp x 1dp.
I've called ImageView.setAdjustViewBounds as per the android
documentation but this doesn't seem to help. The Drawable is only
visible when the ImageView's he
Posted this on SO, but not getting much help, so thought I'd ask here. You
can see all of the details on SO, but basically I have a drawable selector
for my ListView that works fine in previous versions of Android except for
Jelly Bean. I've narrowed it down to either "state_selected" or
"sta
I am trying to get an app that currently runs just fine on hdpi and
lower devices to work on the new XOOM that has xhdpi. I have a png
image in my /drawable folder and a replacement in the /drawble-hdpi-v6
folder. On the XOOM, the version in the /drawable folder is getting
picked up. I tried cre
I found two interesting drawables in ApiDemos:
http://schemas.android.com/apk/res/android";>
http://schemas.android.com/apk/res/
android">
I found no documentation for this kind of drawable.
In ItemizedOverlay we can use drawables with state_focused is handled.
I tr
You told it you don't support densities with android:anyDensity="false".
Thus it will run your app as if it is the original density, mdpi. In some
cases the framework may be able to actually load the correct density
resource and seamlessly use it while you still think you are running in
mdpi... b
Hi everyone,
Drawable resource is set as background for second layouts (Second
activity).
My problem is, I get Drawable from resources end set color filter to
that, than I set this drawable to layout (First activity).
On second activity I don't set color filter but background remain the
same.
Xoom is not xhdpi. It is mdpi.
On Thu, Feb 24, 2011 at 3:34 PM, Mark Nuetzmann wrote:
> I am trying to get an app that currently runs just fine on hdpi and
> lower devices to work on the new XOOM that has xhdpi. I have a png
> image in my /drawable folder and a replacement in the /drawble-hdpi-
This question is linked with the answers in the following question:
http://stackoverflow.com/questions/4259851/error-removing-bitmapsandroid/4260269#4260269
Is there any advantage of using Drawable over Bitmap in Android in
terms of memory de-allocation ?
I was looking at Romain Guy project Shel
Hi
I am not able to show the icon at the startup time in my emulator
This is the code what i have in manifest.xml
and I have logo.png in drawble folder.
But still i am not getting that icon it is diaplying simply blank
block image.
Can any one help me in this
--~--~-~--~~
I have a question that I hope someone can help me out with. I have an
app that I started in 1.6. It used images that were specific to
portrait and landscape layouts. I put these in the corresponding
drawable folders, for example:
drawable/image01,png
drawable-land/image01.png
when I created a ne
You shouldn't modify a Drawable without first calling .mutate() on it (and
using the Drawable that is returned, no the original).
On Fri, Nov 19, 2010 at 6:39 AM, viktor wrote:
> Hi everyone,
>
> Drawable resource is set as background for second layouts (Second
> activity).
>
> My problem is, I
Hi Allm
I have an image which I have in form of a stream. I want to create a
drawable from this stream so that I can set it as background for my
view or ImageView which occupies the whole device screen. I did the
below code to achieve the same but facing some issues
Drawable.createFromResourceStr
Hi All,
I have an image which I have in form of a stream. I want to create a
drawable from this stream so that I can set it as background for my
view or ImageView which occupies the whole device screen. I did the
below code to achieve the same but facing some issues
Drawable.createFromResourceStr
I've been struggling with this strange problem for quite some time. A
brief summary of the issue is this:
"An ImageView's Drawable in portrait orientation with a certain bounds
set on it, on changing orientation and returning to portrait, does not
retain the set bounds. Instead it reverts to its o
41 matches
Mail list logo