我希望将以下数字转换为double类型。
Number mMax_Distance = ParseUser.getCurrentUser().getNumber("Maximum_Distance");
我正在使用Parse,在其中有一个名为Maximum_distance的列,它被分类为数字。
我需要将它转换为数字,因为我想在以下行中使用:
query.whereWithinKilometers("location", point, mMax_Distance);
mMax_Distance必须是一个双精度变量。
另一种解决方法是直接将其存储为双精度变量而不是数字。然而,它是使用一个seekbar值进行分类的,用户通过一个seekbar确定他们的最大距离,我相信seekbar只存储数字。
currentUser.put("Maximum_Distance", seekBarDistance.getProgress());
非常感谢您的帮助。如果您需要进一步解释,请让我知道。