[TIMOB-3161] Android: Add Multiple Density Images for Cancel Button
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T02:01:04.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.7.0, Sprint 2011-11 |
Components | Android |
Labels | android, enterprise, feature, release-1.7.0, reported-1.6.0, rplist |
Reporter | Dawson Toth |
Assignee | Don Thorp |
Created | 2011-04-15T03:38:22.000+0000 |
Updated | 2011-04-17T02:01:04.000+0000 |
Description
Problem
The built in Cancel button, visible when you add a search bar to an app, doesn't support multiple densities right now. So when you view it on a high density display, it is much smaller than it should be.
Solution
Add multiple images for the various densities.
Where Is It
Looking at the source, it is located here:
android/modules/ui/src/ti/modules/titanium/ui/widget/searchbar/cancel.png
Sample Code
Taken from our documentation:
var search = Titanium.UI.createSearchBar({
barColor:'#000',
showCancel:true,
height:"43dp",
top:0,
});
Associated Helpdesk Ticket
http://developer.appcelerator.com/helpdesk/view/73761">http://developer.appcelerator.com/helpdesk/view/73761
This ticket requires #3163 to be fixed to implement correctly.
https://github.com/appcelerator/titanium_mobile/commit/7a2cf1fad5f2f75a209259947de730298160f8e4"> https://github.com/appcelerator/titanium_mobile/commit/7a2cf1fad5f2...
In the sample code above, i changed height:43 to height:"43dp", since if you use anyDensity="true" and go on a high density device, the searchbar at "43" is going to look shorter than at "43dp".
Tested with Titanium SDK version: 1.7.0 (03/22/11 09:36 42d2187) on
Emulator WVGA800 2.1
Nexus S 2.3.2