Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7849247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:27:29+00:00 2026-06-02T18:27:29+00:00

In android phone this method works fine. It takes any double number and changes

  • 0

In android phone this method works fine. It takes any double number and changes to two decimals after dot. But in galaxy tab, number changes to not 0.00, but 0,00. So, when I convert from String to double, I get exception. Why is it acting like that?
screenshot

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T18:27:29+00:00Added an answer on June 2, 2026 at 6:27 pm

    Its because of the locality of your tablet, with the locality set on the tablet the numerical seperator is ,, while on other localities (your phone for example) it is ..

    You can change the locality using this piece of code:

    DecimalFormatSymbols otherSymbols = new DecimalFormatSymbols(Local.GERMAN);
    otherSymbols.setDecimalSeparator(',');
    otherSymbols.setGroupingSeparator('.'); 
    DecimalFormat df = new DecimalFormat(formatString, otherSymbols);
    

    Current local can be gotten using Locale.LOCALITY which can be found in java.util.Local

    Here is a workaround for you if you prefer.
    Here is a very nice question with related answers (including the one I put here) for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code on my Android phone. URI uri = new URI(url); HttpPost
I've been coding for my Android phone lately, and i've been wondering... is this
I want to develop an application for Android, Ios and Windows Phone. This application
I have an app that appears to work fine on an android 2.3.5 phone,
I have a custom 9-patch image for my spinner. This image works fine on
I need to connect from my Android phone to a Windows PC share and
I created an Android project in AIDE on my android phone running ICS and
I am writing a code where the android phone is the client trying to
how to Run Android Apk file automatically when android phone get unlock. Which BroadCast
I need to export an SQLite database from an Android phone to a computer.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.