Joh*_*ohn 4 java android android-fragments android-activity parse-platform
我想将以下数字转换为双数.
Number mMax_Distance = ParseUser.getCurrentUser().getNumber("Maximum_Distance");
Run Code Online (Sandbox Code Playgroud)
我正在使用Parse,在其中我有一个名为Maximum_distance的列,它被归类为数字.
我需要将其转换为数字,因为我想在以下行中使用:
query.whereWithinKilometers("location", point, mMax_Distance);
Run Code Online (Sandbox Code Playgroud)
其中mMax_Distance必须是double
另一种解决方法是将其直接存储为double而不是数字.但是,它使用搜索栏值进行分类,用户通过搜索栏确定其最大距离,我相信搜索栏只存储数字.
currentUser.put("Maximum_Distance", seekBarDistance.getProgress());
Run Code Online (Sandbox Code Playgroud)
任何帮助将不胜感激.如果您需要澄清,请告诉我.
| 归档时间: |
|
| 查看次数: |
369 次 |
| 最近记录: |