本文介绍了从嵌套的Andr​​oid preferenceScreen返回previous preferenceScreen的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编程方式创建一组嵌套 preferenceScreen 取值。当用户潜入这些屏幕之一,水龙头东西在那里,我要回去了previous preferenceScreen (即父)。

I am programmatically creating a nested set of PreferenceScreens. When the user dives into one of these screens, and taps something in there, I want to go back to the previous PreferenceScreen, (i.e. the "parent").

我找不到这方面的消息,并要求完成()没有做的工作,但距离,而返回的所有 preferenceScreen 的S只是一个替代。

I couldn't find any information on this, and calling finish() doesn't do the job but rather returns from ALL the PreferenceScreens instead of just one.

推荐答案

我正好符合这个问题,只是找到了解决办法。您可以覆盖在preferenceActivity在preferenceTreeClick的方法。调用参数preferenceScreen的getDialog方法,然后调用该对话框的解雇方式。就这样,快乐!

I just meet the problem and just found the solution.You can override the method onPreferenceTreeClick in PreferenceActivity.call the param preferenceScreen's getDialog method, then call the dialog's dismiss method.just like this, joy!

这篇关于从嵌套的Andr​​oid preferenceScreen返回previous preferenceScreen的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-21 13:29