summaryrefslogtreecommitdiffstats
path: root/chips/src/com/android
Commit message (Collapse)AuthorAgeFilesLines
* Remove chips from frameworks/exScott Kennedy2014-03-2614-5769/+0
| | | | | | It's now its own project in frameworks/opt/chips Change-Id: I0fc5731e3eaff21b5b026746f91b9cdace90f214
* Call super.onAttached/onDetachedFromWindowTony Mantler2014-03-121-0/+2
| | | | | | b/13342458 Change-Id: I0c68789c350bb252018691cff7975e0f49f0e10b
* fix visibilityMike Schneider2014-03-051-1/+1
| | | | Change-Id: Iabce2e83df084a8bb1312a7e8246bb6fc9818ebd
* Fix redrawing chips with recipientEditText onSizeChanged when it has left ↵Kevin Lin2014-02-281-1/+2
| | | | | | and right padding. Change-Id: I4021ddc0359f6e7a807ba4b10d12c80fc01c25a4
* Fix build with VisibleRecipientChipKevin Lin2014-02-271-0/+5
| | | | Change-Id: Iea5154938872a56cb082b2814c446a6a741006f9
* Added support to choose vertical alignment for image spans.Kevin Lin2014-02-262-5/+30
| | | | | | TESTED=phone Change-Id: I582224467b4626afd1414889166f4fbbc773897f
* BaseRecipientAdapter does not need to be abstractScott Kennedy2014-02-181-2/+1
| | | | | | | | It works fine if you use BRA as your adapter, so there's no point making people instantiate it as new BRA() { }; Bug: 8885347 Change-Id: Icdd8d3032a10fabd30a9a80b99204b20bdea9cd9
* Fix directory lookupsScott Kennedy2014-02-0510-110/+303
| | | | | | | | | | | | | The previous "fix" disabled the lookups. Now we will do the lookups, with the proper lookup key and directory id. We also do a much better job of showing directory images. Bug: 11693322 Bug: 12793279 Change-Id: I372711fd7b485f3183516fce2b11f9eff46a9b23
* Change to scrollToBottomView to be protected instead of private.Kevin Lin2014-02-041-1/+5
| | | | Change-Id: Ibad81543afc87f20cf8d479fd28ac1efde6195f4
* Fix chips library bugs related to setting the threshold to 1.Kevin Lin2014-02-031-0/+3
| | | | | | | | | - Dropdown not being dismissed after having at least one chip and typing a character and deleting it. - Selecting a chip, deleting it by pressing backspace, and entering another character brings the deleted chip back. TESTED=chips on bigtop app Change-Id: I09233ffa7dfe1f64ae9efe4a392fa84b64b8b10a
* Fix a small bugScott Kennedy2014-01-281-2/+2
| | | | Change-Id: I92babdcb1488195a073d2393b03083c8c74f740f
* Fixed NPE in BaseRecipientAdapter when constraint is null.Kevin Lin2014-01-281-1/+4
| | | | | BUG=12766155 Change-Id: I99cf03e33738ad804e35e7134c9d9a97c84be183
* Support RTL in chips library.Andrew Sapperstein2014-01-271-8/+22
| | | | | | Fixes b/12569794. Change-Id: I927a5d3e0d4af42a3ca3fbbb87ba201fe7bb830e
* Main changes to the chips library:Kevin Lin2014-01-245-296/+472
| | | | | | | | | | | | | | | | | | | | | | | Changed attribute styles - Added an avatar position (left, right) inside the chip - Added a disableDelete boolean - Removed chipsAlternateLayout Changed how to layout contacts in autocomplete list. Added a separate class to handle layout and binding information. (This way clients can extend this class and have a customizable layout) This new class lives inside RecipientEditTextView and is passed onto each adapter. Merged code paths for createSelectedChip and createUnselectedChip. Merged code paths for getView() in each of the 3 adapters by using DropdownChipLayouter. All tests still pass since this CL is mostly infrastructure layout changes. There are some non-backwards compatible changes with this if other clients are using this library. BaseRecipientAdapter no longer has protected methods to override the layout and id's. The attribute file no longer has chipsAlternateLaytout. Both these features can still be used through the new DropdownChipLayouter class. Change-Id: I4496232eddd194be2df6a047f75637114f2eaa52
* am 3e8176df: Don\'t show the alternates dialog for GAL contactsScott Kennedy2013-11-148-20/+61
|\ | | | | | | | | * commit '3e8176df16950c067bcb1b37e62b2fc07d74065a': Don't show the alternates dialog for GAL contacts
| * Don't show the alternates dialog for GAL contactsScott Kennedy2013-11-148-20/+61
| | | | | | | | | | | | | | | | | | | | | | There's a bug in the chips code that causes this to show either no alternates, or a different person, which is scaring people. The proper future fix is to store some more information about GAL contacts so we can do a proper lookup. Bug: 11535331 Change-Id: Id8b6fc834446afe33bd6ec4e99b3d2b75b985bde
* | am e444c661: am eaf43ea2: Don\'t show pop-ups and dialogs if we\'re not ↵Tony Mantler2013-10-151-0/+21
|\| | | | | | | | | | | | | attached to a valid window. * commit 'e444c661c53b942eea0daa120b3e5dcc58a0bdbe': Don't show pop-ups and dialogs if we're not attached to a valid window.
| * am eaf43ea2: Don\'t show pop-ups and dialogs if we\'re not attached to a ↵Tony Mantler2013-10-151-0/+21
| |\ | | | | | | | | | | | | | | | | | | valid window. * commit 'eaf43ea2c3b00af22f0aa106fd3dde142f52d471': Don't show pop-ups and dialogs if we're not attached to a valid window.
| | * Don't show pop-ups and dialogs if we're not attached to a valid window.Tony Mantler2013-10-151-0/+21
| | | | | | | | | | | | | | | | | | b/11229200 Change-Id: Ic44da79e441017ac4ccdb4a254c13965da0cc2f9
* | | Merge chips from jb-ub-mail-ur11 into klp-ub-devScott Kennedy2013-10-102-10/+11
|/ / | | | | | | Change-Id: Ied8877d7613ca1dbb5047a0c8c611a1138fc47e3
* | am 3be35a39: Remove some unused resources and importsScott Kennedy2013-08-221-1/+0
|\| | | | | | | | | * commit '3be35a398afee202a794134920782db901ee36cd': Remove some unused resources and imports
| * Remove some unused resources and importsScott Kennedy2013-08-221-1/+0
| | | | | | | | Change-Id: Ifc9bbd7fa53972b4d2bd61d04a426017a6bd63f5
* | am 30d26326: Add directory photo supportJay Shrauner2013-08-091-14/+46
|\| | | | | | | | | * commit '30d26326568cb888430468370df6f6ab2ec12767': Add directory photo support
| * Add directory photo supportJay Shrauner2013-08-091-14/+46
| | | | | | | | | | | | | | Load photos for directory thumbnail URIs by streaming directly from the URI. Bug:7882158 Change-Id: Ifdf354c392b9aaff7c8fd6b73dc9bfe891825329 (cherry picked from commit 53d11c53b83bffe7607cffde994f505e775bcdbe)
* | am bc742af5: Make Chips work on API 11+Scott Kennedy2013-08-062-3/+50
|\| | | | | | | | | * commit 'bc742af5bb568ed39dc37764587120928d068330': Make Chips work on API 11+
| * Make Chips work on API 11+Scott Kennedy2013-08-022-3/+50
| | | | | | | | | | | | | | | | By using the support library, and copying a few methods from TextView into RecipientEditTextView, we can support chips back to API 11. Bug: 8744878 Change-Id: I2d9bb43e71556504e929dcdccff9dae347020f28
* | resolved conflicts for merge of b6c18ed6 to masterScott Kennedy2013-08-011-4/+0
|\| | | | | | | Change-Id: I7617af351d1fa7e4ce9ff401beffe21690b429d3
| * Remove an unnecessary null checkScott Kennedy2013-08-011-4/+0
| | | | | | | | | | Bug: 9497893 Change-Id: Ib363fc4b93a53c343e0e4cd4766038fee8324850
* | am ad1d181c: Don\'t bother storing a null value in the cacheScott Kennedy2013-07-301-2/+4
|\| | | | | | | | | * commit 'ad1d181cd21ee598512c142150e79be754209548': Don't bother storing a null value in the cache
| * Don't bother storing a null value in the cacheScott Kennedy2013-07-291-2/+4
| | | | | | | | | | | | | | It serves very little purpose, and it causes an NPE. Bug: 9286049 Change-Id: I8c95d8ded2bebdc9b904ef788cbc70865144213e
* | Support an External Dictionary of ContactsAlon Albert2013-07-213-33/+74
|/ | | | | | | | | | | | | | | | | | | | | | | | | Allow support for an external custom source of contacts. By making some classes & methods protected rather than private, it's possible to allow for a derived class to extend the Chips behavior to load contacts from an arbitrary source. Most of the changes here are just access modifier changes but there's one more substantial change: Intruduced BaseRecipientAdapter#getMatchingRecipients() which matches generated recipients with proper chips recipients from the external sources. Ideally RecipientAlternatesAdapter#getMatchingRecipients() should reside in the adaper too but the goal of this CL was to do this minimal modifications. There's also a small change that beileve was a bug in IndividualReplacementTask: The matchesFound() callback gets a list of matches found. It then iterates all the original recipients and looks for those that have matches and replaces them. So far so good but, if the original recipient doesn't have a match and is not a phone number, the old code still replaces it with itself when it can simply skip it I think. Change-Id: I24e89f93ec15154ed8912664cd061fa2b5b18bd8
* Prepare to remove a null checkScott Kennedy2013-06-191-0/+1
| | | | | | | | | | | I am fairly convinced that the fix for 9408464 will also fix the underlying problem of this adapter being null. If this log method is ever called, then I'll know it didn't work, but I believe this will never be called. Bug: 9497893 Change-Id: I08518ceecee6985462d0165fb16b1dea95181b07
* Fix a NPEScott Kennedy2013-06-071-27/+33
| | | | | | | | We may not get a cursor back from query(), and if that happens, we shouldn't try to use the null cursor. Bug: 9287151 Change-Id: Ie91d8003f51ea160e5b709a5cd6bcabefc3c687a
* Prevent NPE in chipsAlice Yang2013-04-261-3/+7
| | | | | | Bug 8733626 Change-Id: Id74ed7de4f16f9a7e716b4e9f2152dded97a91e9
* Prevent IOOB exceptionPaul Westbrook2013-04-221-1/+2
| | | | | | | | | | The chips code was expecting a space after an email address when replacing it with a chip. If there is no extra space (which can happen when receiving an intent) don't walk off the end of the string Bug: 8635860 Change-Id: I1d40a08f1cbf11740172b0ea62ab11d656fb23f9
* Merge "Messaging crash on selecting a contact from the auto complete list in ↵Tom Taylor2013-04-151-0/+3
|\ | | | | | | landscape mode" into jb-mr2-dev
| * Messaging crash on selecting a contact from the auto complete list in ↵Tom Taylor2013-04-101-0/+3
| | | | | | | | | | | | | | | | landscape mode Bug 8540624 Change-Id: If95d1d35cfd0018280ba31a6ef66e9f42f8e1980
* | Don't do chip resolving in placeScott Kennedy2013-04-111-11/+11
|/ | | | | | | | | Make a copy of the text, and do the replacements in this copy, so that we aren't calling back to any TextView watchers. This speeds up the process by over 90%. Bug: 8513563 Change-Id: Iff289f8fe24792f1aef657a9b5b4f3457bcbb946
* am da491f04: Prevent a potential ANRScott Kennedy2013-04-051-30/+39
|\ | | | | | | | | * commit 'da491f048fb33b572713b4287436c1cac6898670': Prevent a potential ANR
| * Prevent a potential ANRScott Kennedy2013-04-051-30/+39
| | | | | | | | | | | | | | | | Move this code into an AsyncTask, since createAlternatesAdapter() can take a while to return. Bug: 8519276 Change-Id: I7b3f30ab13ed894e80ac26c365dcb3cbe178dd37
* | StringIndexOutOfBoundsException in Chips during monkey runTom Taylor2013-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | Bug 8478568 The code was looking for a comma and not finding one, but since the length of the token was zero, the "if" clause was executed and tried to make a substring of length -1. Change-Id: Ic876fd6b5880c452b27083fb23cf78da994e0225
* | am f5ecf6ad: Add unit test for creating fake phone entriesScott Kennedy2013-03-221-1/+2
|\| | | | | | | | | * commit 'f5ecf6ad067fb1036199ad5125949aae7ffd9689': Add unit test for creating fake phone entries
| * Add unit test for creating fake phone entriesScott Kennedy2013-03-221-1/+2
| | | | | | | | | | | | | | | | There was a problem with numbers formatted like: "(888) 555-1234". Bug: 8449554 Change-Id: Ic70998104bd5151aba2dca5202bc4f99ced362be
| * Cherry-pick: Area code gets eaten in ChipsTom Taylor2013-03-212-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | Bug 8436028 New code for tokenizing an address stripped the area code from a manually entered phone number. When chips is in "phone number" mode, call a new function (essentially the old function before the change) to create a fake entry directly from the phone number. Cherry-pick of: I2d62ff24aacd8eadb9086840bd4d003cf39db177 Change-Id: I08d98c2e358fc1b8a70bacf358497a511fd71069
| * ArrayIndexOutOfBoundsException in RecipientEntry.constructFakeEntryTom Taylor2013-03-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | Bug 8423230 Fix a monkey bug that is showing up a lot in MR2. Use the original address when tokenizing an address fails to return anything. Cherry-pick of: I4ac42f81aa6e4cbdad058f73bb3a1fd62ab2e138 Change-Id: I0f41f3e169086dcd89e51cdf211985e9bf1a3ade
| * Cherry-pick Fix a Dead Loop issue in RecipientEditTextViewjli119X2013-03-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From AOSP: I01183680289919105dadc28ffd40c8e60dfd6b7e The old code logic will cause dead loop when pasting phone number to recipient. Change-Id: I608f1bf2a5d5651f51be419f7b6125358f2389e2 Author: Jianping Li <jianpingx.li@intel.com> Signed-off-by: Jianping Li <jianpingx.li@intel.com> Signed-off-by: Shuo Gao <shuo.gao@intel.com> Signed-off-by: Bruce Beare <bruce.j.beare@intel.com> Signed-off-by: Jack Ren <jack.ren@intel.com> Author-tracking-BZ: 58793
* | Area code gets eaten in ChipsTom Taylor2013-03-212-1/+11
| | | | | | | | | | | | | | | | | | | | | | Bug 8436028 New code for tokenizing an address stripped the area code from a manually entered phone number. When chips is in "phone number" mode, call a new function (essentially the old function before the change) to create a fake entry directly from the phone number. Change-Id: I2d62ff24aacd8eadb9086840bd4d003cf39db177
* | ArrayIndexOutOfBoundsException in RecipientEntry.constructFakeEntryTom Taylor2013-03-191-1/+1
| | | | | | | | | | | | | | | | | | Bug 8423230 Fix a monkey bug that is showing up a lot in MR2. Use the original address when tokenizing an address fails to return anything. Change-Id: I4ac42f81aa6e4cbdad058f73bb3a1fd62ab2e138
* | am e46cb66d: Always close this cursorScott Kennedy2013-03-141-4/+11
|\| | | | | | | | | * commit 'e46cb66d4265b6fb8800f9120086151b36011f0f': Always close this cursor
| * Always close this cursorScott Kennedy2013-03-131-4/+11
| | | | | | | | | | | | Bug: 8375851 Change-Id: I6aa528091615319722ea7b101bb1cda42c97d122