0

I have created preference screen with below data, I want to add a button, how can I add a button in preference screen. I tried using Button directly in code but it gave an exception. Please help me out with this.

    <PreferenceCategory android:title="All numbers">

        <SwitchPreference
                android:key="switch_key"
                android:defaultValue="false"
                android:disableDependentsState="true"
                android:title="Block all calls:"/>

    </PreferenceCategory>
<PreferenceCategory android:title="Individual numbers">

    <SwitchPreference
            android:key="individual_number"
            android:defaultValue="false"
            android:dependency="switch_key"
            android:title="Block selected calls:"/>
    <EditTextPreference
            android:title="Number 1"
            android:dependency="individual_number"
            android:key="first_number"
            android:inputType="number"/>
</PreferenceCategory>

Psypher
  • 10,717
  • 12
  • 59
  • 83
  • I got it resolved, this is the solution http://stackoverflow.com/q/2697233/1908328 – Psypher Aug 14 '13 at 14:33
  • Got resolution from below question: [www.stackoverflow.com/q/2697233/1908328](https://stackoverflow.com/q/2697233/1908328) – Psypher Aug 10 '14 at 20:00

0 Answers0