Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3161] Android: Add Multiple Density Images for Cancel Button

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T02:01:04.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.7.0, Sprint 2011-11
ComponentsAndroid
Labelsandroid, enterprise, feature, release-1.7.0, reported-1.6.0, rplist
ReporterDawson Toth
AssigneeDon Thorp
Created2011-04-15T03:38:22.000+0000
Updated2011-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

Comments

  1. Don Thorp 2011-04-15

    This ticket requires #3163 to be fixed to implement correctly.

  2. Bill Dawson 2011-04-15

    https://github.com/appcelerator/titanium_mobile/commit/7a2cf1fad5f2f75a209259947de730298160f8e4"> https://github.com/appcelerator/titanium_mobile/commit/7a2cf1fad5f2...

  3. Bill Dawson 2011-04-15

    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".

  4. Natalie Huynh 2011-04-15

    Tested with Titanium SDK version: 1.7.0 (03/22/11 09:36 42d2187) on
    Emulator WVGA800 2.1
    Nexus S 2.3.2

JSON Source