Bug 9258 - Android.Preferences.Preference.SetTitle/SetSummary
Summary: Android.Preferences.Preference.SetTitle/SetSummary
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Android
Classification: Xamarin
Component: BCL Class Libraries ()
Version: 4.4.x
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-01-04 06:12 UTC by Goncalo Oliveira
Modified: 2013-01-04 06:15 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NOT_REPRODUCIBLE

Description Goncalo Oliveira 2013-01-04 06:12:45 UTC
Seems like you can only set preference instance title and summary using a resource id.

        [Register( "setSummary", "(I)V", "GetSetSummary_IHandler" )]
        public virtual void SetSummary( int summaryResId );
        [Register( "setTitle", "(I)V", "GetSetTitle_IHandler" )]
        public virtual void SetTitle( int titleResId );


This is kind of a dead end to me because I don't use the resources for texts. My translations are downloaded and stored in a database. There should be a [string] signature method.

The android documentation does mentions a [CharSequence] signature method.

public void setTitle (CharSequence title)
public void setSummary (CharSequence summary)

http://developer.android.com/reference/android/preference/Preference.html#setTitle(java.lang.CharSequence)
http://developer.android.com/reference/android/preference/Preference.html#setSummary(java.lang.CharSequence)
Comment 1 Goncalo Oliveira 2013-01-04 06:15:32 UTC
Erm... Just realized there's a Title and Summary property.
Was looking in the wrong place. Oops.