Hi,
I have an xml file named "my_layerlist.xml" in the drawable
and drawable-hdpi folder, which contains a layler-list. Then I want to get
the instance of the layler list by:
LayerDrawable layerDrawable =
(LayerDrawable)Resources.GetDrawable(Resource.Drawable.my_layerlist);
I got this error:
An
Try cleaning your proj/solution
On Jul 23, 2013 8:58 AM, "Kai Xin" wrote:
> Hi,
>
> I have an xml file named "my_layerlist.xml" in the drawable
> and drawable-hdpi folder, which contains a layler-list. Then I want to get
> the instance of the layler list by:
>
> LayerDrawable layerDrawable =
> (
I cleaned and rebuilt it but still got the error.
On Tue, Jul 23, 2013 at 2:06 PM, Samus Arin wrote:
> Try cleaning your proj/solution
> On Jul 23, 2013 8:58 AM, "Kai Xin" wrote:
>
>> Hi,
>>
>> I have an xml file named "my_layerlist.xml" in the drawable
>> and drawable-hdpi folder, which conta
Ok, let me check closer for you...
On Jul 23, 2013 9:44 AM, "Kai Xin" wrote:
> I cleaned and rebuilt it but still got the error.
>
>
> On Tue, Jul 23, 2013 at 2:06 PM, Samus Arin wrote:
>
>> Try cleaning your proj/solution
>> On Jul 23, 2013 8:58 AM, "Kai Xin" wrote:
>>
>>> Hi,
>>>
>>> I have
Are u sure your not confusing the drawable layout file name with the
id-string of the root view inside the layout file (just a precautionary
question)
On Jul 23, 2013 9:44 AM, "Kai Xin" wrote:
> I cleaned and rebuilt it but still got the error.
>
>
> On Tue, Jul 23, 2013 at 2:06 PM, Samus Arin w
Oh, try using GetResource(...) instead of GetDrawable(...)
On Tue, Jul 23, 2013 at 9:47 AM, Samus Arin wrote:
> Are u sure your not confusing the drawable layout file name with the
> id-string of the root view inside the layout file (just a precautionary
> question)
> On Jul 23, 2013 9:44 AM, "
Sorry, scratch that, I was confusing SetBackgroundResources() vs
SetBackgroundDrawable()
On Tue, Jul 23, 2013 at 9:50 AM, Samus Arin wrote:
> Oh, try using GetResource(...) instead of GetDrawable(...)
>
>
> On Tue, Jul 23, 2013 at 9:47 AM, Samus Arin wrote:
>
>> Are u sure your not confusing t
yes, my_layerlist is the xml file name.
Resources does not have the method GetResource() ?
On Tue, Jul 23, 2013 at 2:50 PM, Samus Arin wrote:
> Oh, try using GetResource(...) instead of GetDrawable(...)
>
>
> On Tue, Jul 23, 2013 at 9:47 AM, Samus Arin wrote:
>
>> Are u sure your not confus
I just scanned my entire solution (its an enterprise class tablet app), and
I'm not using Resource.GetDrawable() (it's commented out a few times, so I
may have had trouble with it too)...
Are you looking to manipulate the layout or something, like maybe change
some of its properties based on run-t
http://stackoverflow.com/questions/10852711/getdrawable-returning-null
On Tue, Jul 23, 2013 at 10:01 AM, Samus Arin wrote:
> I just scanned my entire solution (its an enterprise class tablet app),
> and I'm not using Resource.GetDrawable() (it's commented out a few times,
> so I may have had tr
yes I want to programmatically change the bitmap drawable in the layerlist.
But I do not want to create the whole layerlist in code. So I am trying to
get an instance of laylerlist from the xml and then update the bitmap
drawable in the layer.
On Tue, Jul 23, 2013 at 3:01 PM, Samus Arin wrote:
http://stackoverflow.com/questions/8859888/strange-exception-about-resource-not-found
On Tue, Jul 23, 2013 at 10:03 AM, Samus Arin wrote:
> http://stackoverflow.com/questions/10852711/getdrawable-returning-null
>
>
> On Tue, Jul 23, 2013 at 10:01 AM, Samus Arin wrote:
>
>> I just scanned my en
Just for the hell of it, try making all 4 of the density folders:
Drawable-xhdpi, Drawable-hdpi, Drawable-mdpi, Drawable-ldpi,
On Tue, Jul 23, 2013 at 10:06 AM, Samus Arin wrote:
>
> http://stackoverflow.com/questions/8859888/strange-exception-about-resource-not-found
>
>
> On Tue, Jul 23, 2013
Just for the hell of it, try making all 4 of the density folders:
Drawable-xhdpi, Drawable-hdpi, Drawable-mdpi, Drawable-ldpi and putting the
my_list.xml in each.
On Tue, Jul 23, 2013 at 10:06 AM, Samus Arin wrote:
>
> http://stackoverflow.com/questions/8859888/strange-exception-about-resource-
http://stackoverflow.com/questions/10852711/getdrawable-returning-null
http://stackoverflow.com/questions/8859888/strange-exception-about-resource-not-found
On Tue, Jul 23, 2013 at 10:11 AM, Samus Arin wrote:
> Just for the hell of it, try making all 4 of the density folders:
> Drawable-xhdpi,
try on an emulator too (if your deploying to hardware currently), or
different emulator profiles (or different hardware platforms if available).
On Tue, Jul 23, 2013 at 10:12 AM, Samus Arin wrote:
> http://stackoverflow.com/questions/10852711/getdrawable-returning-null
>
> http://stackoverflow.
I tried for the hell of it but did not have any luck...
And if I use the GetDrawable() to get an image, it is working. If I use it
to get the layler-list, it dose not work.
On Tue, Jul 23, 2013 at 3:10 PM, Samus Arin wrote:
> Just for the hell of it, try making all 4 of the density folders:
> D
Man, I've ran into so many mysteries such as that... I don't want to talk
smack, b/c I highly respect the MonoDroid/Xamarin team for what they did,
but I'm fairly certain the Mono "layer" introduces many undocumented bugs
such as this. I've spent a 1/4 of my dev time this past year tracking stuff
l
Maybe you can try grabbing a reference to the layer list by "extracting" it
from the view that host's it (ala .FindViewById type method).
On Tue, Jul 23, 2013 at 10:29 AM, Samus Arin wrote:
> Man, I've ran into so many mysteries such as that... I don't want to talk
> smack, b/c I highly respect
Could be a security issue (try chmod ing the file).
On Jul 23, 2013 7:08 AM, "JLee" wrote:
> I think, the following code worked in the past but now I get an error when
> setting the timestamps (Invalide Parameter).
>
> FileInfo fi = new FileInfo(file);
> fi.Attributes = FileAttributes.Normal; <-w
The layer list is used as background of some controls. So FindViewById
could not find it.
Like you said, to make it work first, I will try some work around e.g.
create the whole layer-list in the code rather than using the layerlist xml
file
Thanks a lot for help.
On Tue, Jul 23, 2013 at 3:36 P
You may want to make that a last resort, creating a pure code class (ie,
non-xml), since the layout-inflation process assigns the attributes
specified to the classes properties. This assingment is NOT a trivial
matter, and sometimes is a royal pain (especially if your reading
attributes defined in
22 matches
Mail list logo