Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2368] Android - add density specific icons for tableView

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:58:55.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.5.0 M04
ComponentsAndroid
Labelsandroid, defect, density, icons, tableview
ReporterThomas Huelbert
AssigneeDon Thorp
Created2011-04-15T03:17:59.000+0000
Updated2011-04-17T01:58:55.000+0000

Description

As per Don set to the m03 milestone. KS will be used for testing when implemented.

Comments

  1. Don Thorp 2011-04-15

    Now that we're supporting anyDensity=true we need to update our internal graphics to get low, med, high versions.

  2. Don Thorp 2011-04-15

    Sent request to Tyrus for the different icons needed.

  3. Don Thorp 2011-04-15

    (from [b271a1770bba16d369ef76af8dc188d405d8b97a]) [#2368 state:fixed-in-qa] added additional graphics. Detect density first time a row is created and load the appropriate graphics https://github.com/appcelerator/titanium_mobile/commit/b271a1770bba16d369ef76af8dc188d405d8b97a"> https://github.com/appcelerator/titanium_mobile/commit/b271a1770bba...

  4. Don Thorp 2011-04-15

    Note: To test this, use a custom AndroidManifest.xml and set anyDensity to true. Then look at the Tableview | Basic test to verify that the icon size is the basically the same on low, medium, and high density displays.

  5. Don Thorp 2011-04-15

    Re-opening. Fails now in anyDensity:false mode because the DisplayMetrics class doesn't inform us of the true scaling factor. Using this code fragment from Marshall's http://www.arcaner.com/2010/07/20/querying-applicationscale-in-android/"> blog post to get the applicationScale factor so I can do the right thing.

       // Note: this isn't public API, so there should be lots of error checking here
       Method gciMethod = Resources.class.getMethod("getCompatibilityInfo");
       Object compatInfo = gciMethod.invoke(view.getResources());
       float appScale = (Float)compatInfo.getClass().getField("applicationScale").get(compatInfo);
       
  6. Don Thorp 2011-04-15

    (from [70786451197cc69b6af39ae823aba6b133aeb67a]) [#2368 state:fixed-in-qa] Reworked to deal with anyDensity false and true. To test this you will need to compile KS with anyDensity both true and false and verify both states on a medium device (G1/ION) and high density device (N1, etc) https://github.com/appcelerator/titanium_mobile/commit/70786451197cc69b6af39ae823aba6b133aeb67a"> https://github.com/appcelerator/titanium_mobile/commit/70786451197c...

  7. Thomas Huelbert 2011-04-15

    G1 (1.6) on/off, G2 (2.2) on/off - Titanium SDK version: 1.5.0 (12/10/10 09:14 0c31e15) icons looked the same in all cases

JSON Source