Android :: Negative Resource Id Value
Sep 15, 2010
Is it possible that a resource id (such as a generated id for a string resource) can be a negative int?Often, when defining a method that accepts a resource id, I want the caller to be able to specify a "null" value.For primitives this is not possible, but I'm wondering whether "any negative value" may be a good approach? Alternatively I suppose it would be OK to specify the argument as an Integer and take advantage of auto-boxing.Thoughts?
View 3 Replies
Aug 3, 2010
I have an XML resource file:
<resources> <section>
<category value="1" resourceId="@xml/categoryData1" />
<category value="2" resourceId="@xml/categoryData2" />
<category value="3" resourceId="@xml/categoryData3" />
</section> </resources>
Using XmlPullParser, on the START_TAG, I can use:
int value = parser.getAttributeIntValue(null, "value", 0);
to get values 1, 2, 3...however:
int resourceId = parser.getAttributeIntValue(null, "resourceId", 0);
doesn't work...it just yields the default value 0, or whatever I change the default value (3rd parameter) to be. Does anyone know what I am doing wrong or if this is possible?
View 1 Replies
View Related
Oct 28, 2010
I am trying to run this code, but get an error.
The debugger shows the following:
CODE:.......................
View 1 Replies
View Related
May 16, 2010
In an Android manifest, how can I use a negative match in the android:pathPattern? I'd like to use a pathPattern that matches on all URLs except for a specific hostname, if it's possible.
View 1 Replies
View Related
Nov 26, 2010
I have 2 email accounts that I check on my Samsung Captivate, and I'm having problems with both of them. When I click the Email icon and view both of these accounts, one account shows -1/1 messages and the other shows -1/25 messages. If I get on Yahoo and Gmail and check they show the correct amount. Yahoo has showed this for a few days, and Gmail just started today.Can anyone tell me what is wrong and why they show a negative amount of messages?
View 1 Replies
View Related
Sep 9, 2010
Is it possible to add drawables to the positive, negative and neutral buttons of an AlertDialog? If yes, then how?
View 1 Replies
View Related
Jun 26, 2010
I think it is interesting that you can't say 1 bad thing about this phone or everyone in this forum will either say "bye" or "trade the phone then" or whatever it is. I have the Hero and when people brought up negative things about the phone i agreed with some and disagreed with others. There is no perfect phone out there and when people are shopping for new phones it is good to hear the good and bad then they can make their decision on which one to buy. I would like to see some "real" likes and dislikes on this phone to make an educated decision. Then i can decide if i should pull the trigger on the powerfull EVO wait to possibly get a 2Ghz phone released sometime this year by motorola?
View 36 Replies
View Related
Aug 2, 2010
I recently picked up my EVO, and am loving it. Does anyone know if there are negative effects to leaving the phone on the charger? At work, I'm primarily in my office, and could leave the phone on the charger during the day and then it would always be full when I leave in the afternoon.
View 18 Replies
View Related
Jul 17, 2010
Not sure what I did, but on powering up, I had trouble getting it to turn on. Maybe I double pressed the powere button after the power on had started, but as soon as the droid eyeball screen came up, all images on the screen were in negative. This continued through the home screen loading until I turned the phone off and restarted, getting normal colors.
View 6 Replies
View Related
Aug 2, 2010
I am trying to increase my volume for the handset. I have the original factory codes set at:
0 = -16db
1 = -12db
2 = -8db
3 = -4db
4 = 0
5 = 4
When I go into the master settings to change the RX volume codes, I can not figure out how to make a negative number. Can someone help me get in the right direction to change the volume settings? My volume is so low, I can barely hear when on the phone.
View 1 Replies
View Related
Nov 17, 2010
There are a lot of threads popping up due to the OTA install. I noticed it included Slacker radio and a vCast Apps app. Has anyone successfully moved/removed these apks without any negative side effects?
View 1 Replies
View Related
May 3, 2010
I'm am considering to buy the i7500. Here in Croatia it's pretty affordable with a 2 year contract.
Now I realize, from reading this forum, that this phone has a lot of problems. Unfortunately, I don't understand all the technical talk.
So to keep it simple I would just like to know which of the negative aspects mentioned in gsmarena have been solved with Galaxo 1.6.3. as oposed to the 1.5 you get when you buy the phone? I understand, obviously, that FM radio and other hardware missing cannot be solved.
No smart dialing
Camera features are a bit outdated
No videocalling
No multi-touch gestures
No Flash support in the web browser
No DivX/XviD video support or a third-party application to play that
No FM radio
No TV-out port
No voice dialing
Somewhat limited 3rd party software availability
No Bluetooth file transfers (not without rooting)
No tethering (not without a custom ROM)
My question is probably annoying and noob-like, but thanks in advance to anyone willing to answer me.
View 40 Replies
View Related
Oct 24, 2010
The X10 mini is a very cute phone, but also a very strange one!
I own the phone since July, and I would like to share my opinion about it with you!
Negative Points:
1) Bluetooth is not functional. Totally wrong!
2) I can't charge it when is turned off! It always turns on automatically!
3) The alarm is ringing every time it likes! if you snooze it continues ringing every 10 minutes! If you deactivate it with slide bar, then it is not ringing again next morning! You have to set it up again!
4) 5megapixel camera without zoom? it is unacceptable!
5) I can't organize my files into visible folders! All my photos, my videos or my music are presented altogether. Although I have made folders in the Videos and into Album application, the phone is still showing the files altogether! I have downloaded some applications about it (ASTRO, FileExplorer, AndExplprer) but they seem to be useless!
Positive Points:
1) Very good screen. Very good touch procedure. (I would like to have the zoom function of the i-phone)
2) Very good colors
3) Very good video player!
4) Cute!
5) Small!
6) Beautiful!
View 16 Replies
View Related
Sep 6, 2010
I am using the function decodeResource(Resources res, int id, BitmapFactory.Options opt).I am using it in the following way:
BitmapFactory.decodeResource(getResources(), R.drawable.image,opt);
My question is instead of using R.drawable.image which is an image in resdrawable folder, I want to use a image from sdcard.Is it possible? How to get the resource id of an image in the sdcard?
View 3 Replies
View Related
Oct 11, 2010
I do have a lot of language specific resources. There's one point in my Android apps where I do get a resource value and need to translate this value into the matching id. The value is not neccessarily in the language specific file for the current language (en/de/...). It's somewhere in there ... and it's unique.
After reading the docs and this thread "http://stackoverflow.com/questions/3476430/get-resource-id-by-passing-name-as-a-parameter-in-android" I thought that "getIdentifier(String name, String defType, String defPackage)" is the correct way to go but I can't get it to work. The result is always "0".
This code is part of an activity and I'm on Android 2.2.
Is it possible that Android doesn't take all resource files into account and searches just in the current language specific one?
For an example
CODE:....
To make things clear. I don't want to mis-use string resources as a database. It's only one part that occurs on very rare situations.
View 1 Replies
View Related
Jul 25, 2010
I will admit - I've never had a smart phone. Never. I was going to get one last year, but waited b/c I heard 2010 was 'the year of the smart phone' - and I'm glad I waited.Though I'd have to see it in person to know for sure, but I'm almost positive that DroidX will be my first smartphone. I'm VERY excited, but I want to make sure that I'm educated enough to use it for all it's worth (ie: my mom has had every iphone, but just leared to text message last month).Is there some place/book/thread/site that I can study which would tell me about smartphones from the very most basic all the way to the more advanced? I'm a smart girl, but I have to start somewhere!
View 1 Replies
View Related
Mar 18, 2010
When I use the first,app will crash in emulator but the second run well, how can I fix the first. Code...
View 1 Replies
View Related
Jul 20, 2010
If I am not wrong with the way android:sharedUserId is intended to work, then my question is how to avoid overlapping resource IDs? appt seems to aways start IDs at the same initial value (i.e. drawables at 0x7f020000), so there will be sort of conflict or ambiguation. As for now I failed to get that cleared w/o digging in OS sources. Or I miss anything, like magic "undocumented" appt option (not that aapt is documented at all)?
View 5 Replies
View Related
Sep 4, 2010
My application has resource conflict problem. Did some investigation, seems like all the resources within the apk file are cached after they are loaded on demand. The cache is stored in Resources.java mDrawableCache. The key to retrieve the drawable from this cache is combining the data and assertCookie fields of TypedValue class. In my application, there are 2 resources, ex. a color background and image drawable, evaluated to the SAME key value.. So just wondering, how can it happen?BTW, I am using eclair SDK.
View 2 Replies
View Related
Jul 19, 2010
Can this kind of files (buttons) be used to create android applications, or you must use predefined buttons?
http://graphicriver.net/item/tabletphone-user-interface-professional-.
View 2 Replies
View Related
Oct 13, 2009
I had imported several .png files with names like 1.png, 2.png untill 59.png in my Android Project.But it gives this error:
Description Resource Path Location Type Syntax error on token "48", invalid VariableDeclaratorId R.java / TVGidsBelgie/gen/com/woutergo/tvgids line 14 Java Problem
How can i solve this?
View 4 Replies
View Related
Nov 15, 2009
we can let aapt not compress the resource via command -0. which api can be used to check the resource is compress or not?
View 2 Replies
View Related
Oct 3, 2010
I'm sure this is simple, but I've got myself confused over it.I have an image resource, such as R.drawable.myimage, and I want to convert this into a URI.I tried:
Uri selectedImage = Uri.parse("android.resource://com.my.package/" + resourceId);
but this just returns a NullPointer. The resourceId needs to be dynamic (so I can pass any image to it), not just a hardcoded "myImage".Any help please?
View 6 Replies
View Related
Jun 15, 2010
How can i get the resource id of an image if i know its name (in android)
View 1 Replies
View Related
Sep 21, 2010
I am looking for an efficient way to find out if a resource (mostly a drawable) is used in java or in an XML file.
The problem is, that on my current project the drawables are changed often and now I have some drawables, which might never be used.
Is there a tool/way to find those unused drawables without search each filename in the whole project?
View 2 Replies
View Related
Nov 17, 2010
I have an apk (App1) that has a raw resource (res/raw/mytextfile.txt) and I would like to read that text file from another apk (App2). I define a content provider in App1 and I override the openFile(Uri, String) method as follows:
CODE:.......
App2 does the following to try to get access to mytextfile.txt:
CODE:.........
However, when I read and write out the contents of the BufferedReader, I get way more than just the contents of mytextfile.txt.
I played with this some more and found that the file desriptor returned to App2 is pointing to the App1 apk file. I wrote out the contents of the BufferedReader to a file and did a binary comparison to App1.apk. The two files were identical.
View 1 Replies
View Related
Sep 2, 2009
Is there a way to get the resource id associated with an ImageView?
you can set one using -- ImageView.setImageResource() --
sure what be nice if there was a -- ImageView.getImageResource().
View 2 Replies
View Related
Jul 8, 2010
In android docs, it is said that 140 still is ldpi, but when I change dpi to 140, I find mdpi resource is retrieved, can someone have idea? thanks a lot. btw, I read the code about how to get resource, seems ldpi's max dpi value is 131.25? Does google post the wrong doc?
View 1 Replies
View Related
Sep 10, 2009
I have requirement to implement button in lockscreen. So i have added new image here *frameworksasecore es drawable.* And i have modified the Keyguard_screen_lock.xml. Here i have added the ImageButton view. And i have even modified the strings.xml to display different string. As in the following discussion it has told like this. *You must not add public resources because it would change the public API and thus make your Android phone/device potentially incompatible with other Android devicesYou must not add public resources because it would change the public API and thus make your Android phone/device potentially incompatible with other Android devices.* ** *Please find the previous discussion in the bellow link*
View 2 Replies
View Related
May 24, 2010
I got "no resource found that matches the given name(at 'id' with value @id+/textview')" my main.xml file looks like this: <?xml version="1.0" encoding="utf-8"?> <TextView xmlns:android=" http://schemas.android.com /apk/res/android" android:id="@id+/textview" android:layout_width="fill_parent" android:layout_ height="fill_parent" android:text="@string/greetings"/> Any idea what I am missing? 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
View 3 Replies
View Related