Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想从 Edittextpreference 开始一项活动。当用户尝试点击它,或者只是点击edittextpreference时,它会触发活动。那可能吗?
非常感谢你。
在你的 PreferenceActivity
EditTextPreference pref = (EditTextPreference)findPreference("setting_key"); pref.setIntent(new Intent(this, YourActivity.class));
文档中 setIntent(intent) 的描述