@Neil Cool. I need a help. See I am using this lines of code to make appear only 3 digits after decimal point. But in a low version that method wasn't there. What is the perfect way to achieve the same. DecimalFormat decimalFormat = new DecimalFormat("##.###"); decimalFormat.setRoundingMode(RoundingMode.FLOOR); double convertedMonthValue = Double.valueOf(decimalFormat.format(originalmonthValue));
@Angel Oh... I know how to set it and use it:) Listener provides some parameters and has some task to do. When I select Item it perform operation over the parameters. After some time i want it to repeat it but programaticly ( i wish to keep data uptodate) is it possible?
@Angel "convention is same for drawable" means i have to change drawable in place of layout, like this "layout-small-ldpi" have to chane in "drawable-small-ldpi" right?
@Neil Yeah. That 3 lines throw no such method error for setroundingmode() in android 2.2 and lower. Because it is added in 2.3. So I just wanna use any other way to get the same output.
@Appu You could extend the number of digits by 1 and then trim it off
In other words, if you have 2.45678, and you want to see 2.456, you can achieve the same thing by extending it to be 2.4568, then removing the last digit 8
@Appu I mean, having ##.### format with floor rounding is the same thing as having ##.#### format without floor rounding if you remove the last digit yourself
I have been getting the following error on a mid-Android device.
Error retrieving information from server rpc:s-5:aec-0` .
It pops up when I try to download my in-app purchase product from the Play store.
I did coding from the tutorial Simple InApp Billing / Payment and updated my APK fil...
@Angel All are not alike. Think out of stereotyped way. It's quite common in rooms that every person asks some basic info casually like where are you from, your name? If you don't like to reveal, then you can say it smoothly. I don't find any reason for being harsh.
while retrieving i'm calling with number it is throwing 07-31 17:46:26.008: E/AndroidRuntime(19922): android.database.CursorIndexOutOfBoundsException: Index 0 requested, with a size of 0
@Harish That means your cursor has no data in it, but still you try to get the data. i.e., you are calling cursor.getType()..... with having no data in the cursor. You need to check whether you have data in it first by while(cursor.moveToNext()) @Kumar Okay.
@Harish Everything seems fine. Tell me one thing are you getting cursor which is not null . Just log it and let me know.
and try the below query if you are getting null db.query(DATABASE_TABLE, new String[] { KEY_ID, KEY_NAME, KEY_PH_NO, KEY_EMAIL }, KEY_NAME + "="+str , null, null, null, null);
@Harish cursor.getString(cursor.getColumnIndex(KEY_ID)); repeat this to every data you query instead of hard coding the indices. And make sure the control flows inside if condition of cur.moveToFirst and let me know quickly. @AndroidDeveloper cya
On the logCat, it says "ActivityManager: Warning: Activity not started because the current activity is being kept for the user." I'm not sure what that means, or why it is happening
@chintankhetiya No I am home :) @MahaveerMuttha Did, for switching images from left to right or left to right. But copy pasted the code due to lack of time on that day. @Rank @Kumar Bye dear
@MahaveerMuttha I have replied for your previous ping. Gesture. For the second one. No I am home actually now :) @Nathvi Howdy! It was you who remained as a stranger in spite of being said not to be :P
@MahaveerMuttha Oh! Okay. @Nathvi What is at line Activity.java:1647 It seems you defined that in other xml file and trying to access it in different activity.
@Appu, the program breaks only when I try and update the TextView objects. If I leave the TextView objects out, I can get GPS coordinates by pressing the button.
but I want the TextView objects to update continuously
@Nathvi Did you clean project? Though the problem persists, not only you even I have been facing the same issue. One view is not being updated. I don't know why?
@Nathvi I think so, even I have been facing the same issue and I think people are not gonna be ready to believe. Of course it's really a big blunder at eclipse, but still can't figure it out. Because all the views I add in other xml files later are perfectly detected but not one view in that particular xml file..
@Nathvi That's fine. I thought I got a company who has got the same issue which is very weird and strange. At least your problem is a known one and solved.