简体   繁体   English

如何在Android的新活动中定位

[英]How to go at a position in new activity in android

Hi friends and Developer, 嗨,朋友和开发人员,

How can I go at certain position in new activity? 我该如何参加新活动的某个位置?

  1. for example when I pressed a button which will open Settings activity. 例如,当我按下将打开“设置”活动的按钮时。
  2. after my action Settings activity opened. 我的操作“设置”活动打开后。
  3. Now I want that Activity automatically scroll to the sounds position in settings where sounds related features are present. 现在,我希望“活动”自动滚动到存在与声音相关的功能的设置中的声音位置。

how can I do this?? 我怎样才能做到这一点??

Setting provider. 设置提供者。 Android Developers Android开发人员

Check that out, you can modify your intent to contain the specified setting with this. 签出,您可以修改您的意图以包含指定的设置。 ACTION_SOUND_SETTINGS might be the one. ACTION_SOUND_SETTINGS可能是一个。

如果您的“设置活动”具有项目的ListView,则可以使用:

listView.smoothScrollToPosition(indexOf(sound_item));

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM