I just realized i might have posted this question in the wrong group,
hence I try again.
I'm writing an app where the user should be able to enter a phone
number, or choose one from Contacts.
I've found a preference widget that does exactly what I want. The
problem is that I don't know how to use it in my app.
Is it even possible?
The widget I'm talking about is
com.android.phone.EditPhoneNumberPreference
I found it browsing the source at source.android.com
in [platform/packages/apps/Phone.git] / res / xml /
call_feature_setting.xml
<PreferenceScreen android:key="button_voicemail_setting_key"
android:title="@string/voicemail_settings"
android:persistent="false">
<!-- Note for all com.android.phone.EditPhoneNumberPreference
objects
The last several attributes are for use with the EditText field
in the dialog. These attributes are forwarded to that field
when the edittext is created. The attributes include:
1. android:singleLine
2. android:autoText
3. android:background -->
<com.android.phone.EditPhoneNumberPreference
android:key="button_voicemail_key"
android:title="@string/voicemail_settings_number_label"
android:persistent="false"
android:dialogTitle="@string/voicemail"
phone:confirmMode="confirm"
android:singleLine="true"
android:autoText="false" />
</PreferenceScreen>
Since I'm quite lazy I prefer to reuse existing code instead of
rewriting things myself.
Is there a way to accomplish the above without duplicating the
EditPhoneNumberPreference functionality in a custom preference?
/Mathias
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en