Add support for saving and using the Preference's key value

- modify the SQlite data model
- update Index code for managing the key value
- pass the key when launching a Fragment or and Activity
- implement a small animation for highlighting the Preference
from a Search result

Change-Id: I617643a4e5e3b752ece8f45ce7d5429037e479da
This commit is contained in:
Fabrice Di Meglio
2014-04-04 19:07:50 -07:00
parent 3586acab85
commit c1457323d2
5 changed files with 100 additions and 19 deletions

View File

@@ -145,6 +145,11 @@ public class SettingsActivity extends Activity
*/
public static final String EXTRA_SHOW_FRAGMENT_ARGUMENTS = ":settings:show_fragment_args";
/**
* Fragment "key" argument passed thru {@link #EXTRA_SHOW_FRAGMENT_ARGUMENTS}
*/
public static final String EXTRA_FRAGMENT_ARG_KEY = ":settings:fragment_args_key";
/**
* When starting this activity, the invoking Intent can contain this extra
* boolean that the header list should not be displayed. This is most often
@@ -461,6 +466,7 @@ public class SettingsActivity extends Activity
final String initialTitle = getIntent().getStringExtra(EXTRA_SHOW_FRAGMENT_TITLE);
mInitialTitle = (initialTitle != null) ? initialTitle : getTitle();
setTitle(mInitialTitle);
switchToFragment( initialFragmentName, initialArguments, true, false,
mInitialTitle, false);
} else {