PileProject / drive

The drive project
Other
5 stars 4 forks source link

Initial value for NumberTextHolder #54

Open tiwanari opened 7 years ago

tiwanari commented 7 years ago

This came from a discussion on #51 .

Problem

Our apps have NumberTextHolder and we set the initial value of it as 0 for time in the default strings.xml. However, it seems to be surprising for users because the value becomes, for example, 0.000 (i.e., it has more precisions) after changing its value.

In the current implementation, we should stick to 0 not 0.000 because there is a locale problem (e.g., in French, 0.000 should be 0,000) and this causes a conversion exception.

What we should do

As @myusak suggested in the discussion, we can fix it by setting initial values in NumberTextHolders' constructor according to the Preference of their precision (this is a new feature). So, let's make such preference!