我在我的偏好中有一个编辑框,用户可以在其中输入一个数字来增加一个计数器,但我不知道如何获取这个值并在我的主类中使用它。
在我的偏好中,我有;
android:defaultValue="1"
android:inputType="number"
android:key="incrementBy"
android:maxLength="3"
android:summary="Set the incremental value of the counter"
android:title="Increase Count by" />
我想要做的是,从此编辑框中获取用户输入并将其隐含到我的主类中的一个变量中。