Commit Graph

143 Commits

Author SHA1 Message Date
Jeff Sharkey
0f1c3af76b Hide Preference title when empty.
Change-Id: I1c1d73f5a4647657c7da65c72192fbac061fe259
2012-04-03 20:46:42 -07:00
Amith Yamasani
2d43d283fc Handle the case of Preference lists that have header views inserted at the top.
Without this change, wrong Preference is returned when you select one.
Subtract the number of headers from the index before querying the adapter.
Needed for:
Bug: 5203189

Change-Id: Iba7277789ebbd7e3e9954931b1ea06c7e34f3c15
2011-09-29 15:16:16 -07:00
Amith Yamasani
72e6bece43 Launch nested preferences with the same theme as parent activity.
Bug: 5351628
Change-Id: Id67b81558bc6e010d6f024cdb8117424aa6b62f0
2011-09-23 10:43:40 -07:00
Adam Powell
c82c7a5403 Fix bug 5067075 - missing scrollbar when entering long signatures
Let DialogPreferences decide their own IME adjust mode as normal
rather than forcing adjustPan.

Change-Id: Ib53e9f648342430640469a0682308b056e7ef991
2011-08-28 14:36:05 -07:00
Adam Powell
94f67e2af6 Fix bug 5205275 - SwitchPreference doesn't allow Switch to slide back
and forth.

Also have the SwitchPreference's Switch widget's onClick listener
toggle the switch rather than invoke the preference's own onClick
method. This will allow subclasses to assign different behavior to
clicking the preference itself if desired.

Change-Id: I97e3b7a786e9f0e8bdc03c0ed6001caa7dcd991b
2011-08-23 21:17:07 -07:00
Jeff Sharkey
ce4a193ea8 Preferences padding and scrollbars to match spec.
Adjust preferences ListView to use direct padding instead of applying
to outer parent.  Also display scrollbars outsideOverlay on small
screens.

Change-Id: I750c53d2452d8842d487a091075c32f009f2c2fc
2011-08-17 16:31:24 -07:00
Amith Yamasani
5d36715a76 am 648dc03c: am 4dbd1bc6: am 5f074067: am 712a8cca: Merge "VolumePreference.onActivityStop only stops playback"
* commit '648dc03cd038a726b25929f9ffc142eb16e891e8':
  VolumePreference.onActivityStop only stops playback
2011-08-12 16:26:57 -07:00
Amith Yamasani
648dc03cd0 am 4dbd1bc6: am 5f074067: am 712a8cca: Merge "VolumePreference.onActivityStop only stops playback"
* commit '4dbd1bc6ae84cb4d0cd28922e917473ec6e53517':
  VolumePreference.onActivityStop only stops playback
2011-08-12 13:16:21 -07:00
Amith Yamasani
023f8e00fd Pass in the title of the preference as a title for the ringtone picker dialog.
Bug: 5135537
Change-Id: I988c4c6b800466a5f28e41b452a91a5424c7d58b
2011-08-10 16:25:31 -07:00
Svetoslav Ganov
7650259a59 Improving accessibility feedback for two state widgets.
1. Added population of sensible text for the state of the
   two state controls such as CheckBox, Switch, etc. This
   is important since if they are in a layout manager which
   fires an accessibility event there should be a description
   of the widget.

bug:5092552

Change-Id: Ie3ca955653563496b84db379ae23a23fe88089a8
2011-07-29 10:45:05 -07:00
Svetoslav Ganov
a28a16d1c2 Updating the data base upgrade/creation code for the new touch exploraion setting.
1. Update the database creation/upgrade code to take care of the new setting
   to enable touch exploration.

2. Made the tocuh exploration settings persistent to the cloud.

Change-Id: Ie24e9184b4a21869432d11d207cb6464fadbac3b
2011-07-28 11:26:02 -07:00
Svetoslav Ganov
2182a3b642 Merge "TwoStatePreference does not fire click events." 2011-07-23 19:38:47 -07:00
Svetoslav Ganov
5c3ea06a7a TwoStatePreference does not fire click events.
1. Event were send in onBindView but since we have fixed the bug
   of unattached views firing accessibility events and there is
   no guarantee that the view is attached in onBindView no events
   were sent. Now posting a runnable so on the next run the UI
   tread will send the event i.e. after the view is bound and
   attached.

bug:5008841

Change-Id: I4ed914f7fb65d6896f0c55e7c46e6508d2b2f11f
2011-07-22 18:58:28 -07:00
Dianne Hackborn
34905a9808 Fix issue #5021385: Title of any Settings subscreen changes...
...to "Settings" when orientation changes

Change-Id: Ib6387b9813329174013452bcdf323cedc4b29664
2011-07-21 17:30:57 -07:00
John Reck
595d2bdc16 Implement SeekBarPreference.onGetDefaultValue
Bug: 5036325

Change-Id: I1db0ed3809b862a547e5fda40027852f8b46aa38
2011-07-15 15:48:01 -07:00
Gilles Debunne
31e92e4f19 Merge "Support for arbitrary ListAdapter in PreferenceActivity." 2011-06-21 11:16:35 -07:00
John Reck
014fea2a66 Inline SeekBarPreference
Dialog-based SeekBarPreference renamed to SeekBarDialogPreference
 New inline SeekBarPreference added

Change-Id: I7a5d8f7aa554c4af4086a9bcc74cf07879c8523c
2011-06-16 12:34:02 -07:00
Gilles Debunne
39725ac96b Support for arbitrary ListAdapter in PreferenceActivity.
Now relies on the adapter defined using setListAdapter instead of relying
on the original mAdapter field that was hiding the one defined in ListActivity

Change-Id: I6bab7b858d215bf6a33b3666528ba0f463dfec45
2011-06-15 10:41:52 -07:00
Amith Yamasani
0daf40ca9a am 2bcd9c6e: am eb5e633a: am 608a200d: Merge "Stability fixes for PreferenceFragments." into honeycomb-mr2
* commit '2bcd9c6e7b4fe6c465811e9b8ac48acec23cb341':
  Stability fixes for PreferenceFragments.
2011-06-14 20:56:23 -07:00
Amith Yamasani
c56fc753e2 Stability fixes for PreferenceFragments.
Unregister the click listener as early as possible, so that clicks
don't get delivered after the activity is detached.

Bug: 4599586

This should also fix: 4603030, 4601105, 4598715, 4598712.

Change-Id: I7bcff719bed14ea61b482bd6d29ae1fa5e322e41
2011-06-14 15:07:49 -07:00
Adam Powell
be0a453505 Add SwitchPreference
Change-Id: I073e9bfba8c4e1a625c27f976f71ea56a81ba20f
2011-06-08 18:25:27 -07:00
Amith Yamasani
405c1af756 Manual merge. Preference activity changes to work on smaller tablet screens and phones.
Padding around fragments and to the left of preference items
adjusted for different display sizes.

Change-Id: I2d29e5525c381092a3f1d2fb1265ce07db893d78
2011-05-26 15:20:14 -07:00
Amith Yamasani
6ea08998ee More preference item visual adjustments for smaller tablets. DO NOT MERGE
Use medium text size for locale picker.
Hide icon region if there's no icon.

Bug: 4462313

Change-Id: I8062646f31bfec753bcd476f54c8ab5b66375b5e
2011-05-24 15:50:36 -07:00
Amith Yamasani
1d2385d08a DO NOT MERGE. Preference activity changes to work on smaller tablet screens.
Breadcrumbs move to the action bar on certain configs.

Padding around fragments and to the left of preference items
adjusted for different display sizes.

Change-Id: Ie899f9742f4ebd7044f158b1c7db06df82ad2d75
2011-05-23 16:53:16 -07:00
Justin Koh
ece60fb243 Framework: fixed bug in multiselectlistpreference.
Fixed bug in multiselectlistpreference where the entries were being used instead of the entry values.  This change make the behavior match the documentation.

TESTED = runs on M4 with test app.

Change-Id: Ib337f78399e032ef50aabce0fb8aa38251d73c18
2011-04-22 16:41:10 -07:00
Dianne Hackborn
e72f237def More work on making prefs work well on small screens.
Tweak padding so layouts now look decent, a few extensions so that
the correct title can be shown.

Change-Id: Ieace16bf4962d66564c6e2f67fb588e582943850
2011-03-18 12:54:26 -07:00
Dianne Hackborn
437c2c1620 Merge "Add new PreferenceActivity API for settings." 2011-03-15 16:52:40 -07:00
Dianne Hackborn
b1a6e439f6 Add new PreferenceActivity API for settings.
Need to redirect to a different activity when on non-xlarge screens.

Change-Id: I8cf4793b117325604d29ecc4478dbf10322a4689
2011-03-15 16:23:01 -07:00
Svetoslav Ganov
1686e9afd4 CheckBoxPreferences do not fire accessibility events
bug:4091160

We no longer allow not shown views to fire accessibility
events. Therefore, CheckBoxPreference can no longer ask its
associated checkbox to fire an accessibility event because
the latter is not attached to the view hierarchy
(i.e. not shown) by the time the CheckBoxPreference has a
chance to send an accessibility event. Instead the
CheckBoxPreference itself is responsible for firing the event.

Change-Id: Ia742882b13bf6c441cc76fa1e84b47a55cee601c
2011-03-15 12:30:20 -07:00
Dianne Hackborn
cf407ad88b Fix issues #4087362 and #4087356
4087362: Provide a safer way to call DialogFragment.dismiss()
4087356: PreferenceActivity.invalidateHeaders() can cause
IllegalStateException: Can not perform this action after onSaveInstanceState

These are very safe; the first is just a new public API that
allows you to use an existing feature in DialogFragment, and the
second just uses the version of commit that avoids the failure if
happening at a point where the operation would be lost if restored
from the last state (which is no big deal for preferences).

Change-Id: I53971c9fb1efdcd599694cdcd4585b81afc156b8
2011-03-11 13:48:32 -08:00
Amith Yamasani
81d860013c Fix a race condition when entering and exiting a preference fragment quickly.
Bug: 3413715

Fragment was going through STARTED/RESUMED/STARTED/CREATED very quickly and
bindPreferences() was a delayed call that happened after mView was nullified.
Removing the MSG_BIND_PREFERENCES when view is destroyed.

Change-Id: Iec43102c004a266c412b993f17e1a8c1699fb0b1
2011-03-02 16:11:31 -08:00
Jim Miller
0d47ac1176 Merge "Fix 3419077: Allow subclasses to change SeekBarPreference action buttons." into honeycomb 2011-02-03 18:39:39 -08:00
Eric Laurent
0f31fe0968 Issue 3371080: fix volume update in mute state.
VolumePreference should take the stream mute state into account
when updating the progress bar if a change is received by
the content observer

Change-Id: Ia1a8af9d4cc349d2d57753d865e8d2e58daf04f1
2011-02-03 17:34:39 -08:00
Jim Miller
4c8aafe300 Fix 3419077: Allow subclasses to change SeekBarPreference action buttons.
Change-Id: I2c624c3693fe06d9d3db3c203c7d4fc7a80b79d9
2011-02-03 16:17:41 -08:00
Samuel Asteberg
a458868fd4 VolumePreference.onActivityStop only stops playback
In VolumePreference.onActivityStop, the cleanup has
been replaced with only stopping ringtone playback
for the seekbar. This will avoid problems when switching
between applications that previously lead to inconsistencies
in the ring volume dialog.

Change-Id: Ia751fe0893610c4f5650eb07705481400642a84e
2011-02-03 14:30:58 +01:00
Amith Yamasani
998127c804 Enable subclass of SeekBarVolumizer to provide a custom file for sample playback.
Bug: 3409194
Change-Id: I8a408a69fd14cf9058afe01ac5c46d0f5afc1503
2011-01-31 20:28:03 -08:00
Adam Powell
1264c33163 Fix bug 3362375 - API REVIEW: remove unused public 'up' id
Fix bug 3362453 - API REVIEW: android.app.ActionBar

Change-Id: I4e0233cd9355a47682bfe7b4a7fda39801586f1a
2011-01-20 13:25:08 -08:00
Mathias Jeppsson
1560003d4a Fixing memory leak in PreferenceScreen.
Every time the PreferenceScreen is displayed a new ListView is
created and bound to the adapter. As the same adapter is used during
the lifetime of PreferenceScreen and the listviews never gets
unbound, the adapter will contain a list of unused views. The old view
should be unbound from adapter when we create a new view.

Change-Id: I13e2d0dc79c8ff79b58efa650653e3f84c6e53c5
2011-01-18 13:20:34 -08:00
Mathias Jeppsson
190acd4dd0 Fixing memory leak in PreferenceScreen.
Every time the PreferenceScreen is displayed a new ListView is
created and bound to the adapter. As the same adapter is used during
the lifetime of PreferenceScreen and the listviews never gets
unbound, the adapter will contain a list of unused views. The old view
should be unbound from adapter when we create a new view.

Change-Id: I13e2d0dc79c8ff79b58efa650653e3f84c6e53c5
2011-01-18 14:34:52 +01:00
Dianne Hackborn
327fbd2c8f Fix a bunch of API review bugs.
3362464 API REVIEW: android.content potpourri
3362445 API REVIEW: Fragment transaction stuff
3362428 API REVIEW: Fragment stuff
3362418 API REVIEW: Loader stuff
3362414 API REVIEW: android.content.pm.ActivityInfo

Change-Id: I6475421a4735759b458acb67df4380cc6234f147
2011-01-17 16:23:42 -08:00
Dianne Hackborn
db7f38673c Merge "Start renaming FragmentTransaction.openTransaction() to beginTransaction()." into honeycomb 2011-01-17 12:33:50 -08:00
Dianne Hackborn
48e7b45869 Start renaming FragmentTransaction.openTransaction() to beginTransaction().
Change-Id: Ib4a6d824b33cca699b7b25159c491fb610d5f5da
2011-01-17 12:28:35 -08:00
Amith Yamasani
e494662c99 Add back legacy layout for preference framework for compatibility.
Bug: 3184831

Copied holo layouts to *_holo.xml and restored the old layouts for
non-holo (pre-honeycomb) apps to use so that their layout assumptions
aren't messed up.

Change-Id: If4dcef16191a47a4b101da6bfb0c2df1757d1ae4
2011-01-16 17:19:08 -08:00
Amith Yamasani
c9ecb73ccd Add a way to insert a parent bread crumb so that deep linked settings can navigate up.
Bug: 3236568

This adds a way to insert a title as well as get a callback when that title is clicked.
It is not really on the backstack and clicks must be handled via the listener interface.
2010-12-14 15:17:32 -08:00
Amith Yamasani
3e86040439 Potential fix for Settings screen ClassCast exception on the phone.
Bug: 3273396
Change-Id: I92477dc8d5e864027923c52545069710dff3575a
2010-12-10 14:23:39 -08:00
Amith Yamasani
74402cfe4e Remove the OnItemClick listener when the fragment is destroyed.
Bug: 3228510

This probably fixes a lot of other monkey bugs in Settings.
2010-12-09 11:22:15 -08:00
Amith Yamasani
3c9f519f89 Move the breadcrumbs to the right pane.
Bug: 3236568
2010-12-08 23:44:38 -08:00
Jim Miller
c57406cdfa Fix 3148496: Update PreferenceActivity to handle single-pane fragments.
This fixes a couple of bugs I found while updating SecuritySettings.

Change-Id: I9881cff71799ddf3c1d1493c2f7f3bfb31ca7774
2010-12-08 16:33:34 -08:00
Dianne Hackborn
9d0718042f Fix issues #3257701 and #3267312
3257701 Preference headers have duplicated "title" and "summary" if
        title is not loaded from a resource
3267312 Fragment.onConfigurationChanged doesn't get called

Change-Id: I76e346ba88aa632ebb9aa413a2ce2645ebf357cd
2010-12-08 14:52:58 -08:00
Adam Powell
7e06ea80f7 Fix bug 3245210 - Bad window style for action modes for light holo dialog theme
Also fixed some issues with the overlay action mode window styles.

Change-Id: Ie4cf43f6ccf720ef0090ca8bd667fb6d78152f93
2010-12-05 18:29:10 -08:00