tags:

views:

10

answers:

1

Where can I find the preference widget that is used in the Voicemail number setting in the Android emulator?

I'm implementing a feature with a very similar use case and would like to use an obviously already existing preference widget instead of creating a similar custom one by myself.

The exact "path" to the setting I mean is: Settings -> Call settings -> Voicemail settings

Thanks in advance

/Mathias

A: 

I think I found what I'm looking for when browsing the android source code.

In [platform/packages/apps/Phone.git] / res / xml / call_feature_setting.xml

I found the structure below

<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>

But how do I do to use it in my app??

Thanks

/Mathias

Mathias Larsson