• 5
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

I could list my current selected value using %s in the summary attribute of ListPreference

<ListPreference
        android:key="my_list_setting_key"
        android:title="Just title"
        android:summary="My current selected value: %s"
        android:dialogTitle="My title"
        android:entries="@array/my_list_setting_entries_key"
        android:entryValues="@array/my_list_setting_entries_value"
        android:defaultValue="default_value"/>

However for EditTextPreference, the below %s is not working.

<EditTextPreference
        android:key="my_text_setting_key"
        android:title="My title"
        android:summary="My current value : %s"
        android:dialogTitle="My title"
        android:defaultValue="default_value"/>

How could I list the current value in the EditTextPreference summary (or anywhere that is visible before opening up the dialog box)?