关于EditTextPreference的一个难题

傻强啊 2012-03-12 07:00:16
如图所示的一个对话框。在preference.xml中的定义如下:
<EditTextPreference
android:dialogLayout="@layout/custom_preference_dialoglayout"
android:key="password_st"
android:summary="@string/mode_hint_pwd_st"
android:title="@string/mode_content_pwd_st" />

cusom_preference_dialoglayout如下:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="8dp" >
<EditText
android:id="@+id/idFsSettingOldPwd"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:hint="@string/oldpwd_hint_st"
android:maxLines="1"
android:singleLine="true" />
<EditText
android:id="@+id/idFsSettingNewPwd1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:hint="@string/newpwd_hint_st"
android:maxLines="1"
android:singleLine="true" />
<EditText
android:id="@+id/idFsSettingNewPwd2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:hint="@string/newpwd2_hint_st"
android:maxLines="1"
android:singleLine="true" />
</LinearLayout>
请问下该如何在PreferenceActivity中获取三个输入框输入的值呢。谢谢各位了。
...全文
393 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
安卓机器人 2012-03-12
  • 打赏
  • 举报
回复
在onBindView中获取。

80,493

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧