697 Commits

Author SHA1 Message Date
Deepanshu Gupta
831f3ce9b5 Add stub getThemeAttributeId() to BridgeTypedArray
The method is used to obtain theme attribute IDs for drawables for
caching.

The changeset also fixes some minor style issues found by code
inspection.

Change-Id: Ib5fe05511397b5ec7cb8e64f6b2769ec2c355f41
2014-04-01 10:17:31 -07:00
Deepanshu Gupta
779b0eea30 Merge "Fix visitFieldInsn in layoutlib_create." 2014-04-01 05:37:23 +00:00
Deepanshu Gupta
4a0f93bd32 Fix visitFieldInsn in layoutlib_create.
The bug caused some classes to be missed when computing the dependencies
of the existing classes.

Change-Id: I7285ff67e016ce5d73a8550501f49acc73cfadfa
2014-03-31 19:06:53 -07:00
Deepanshu Gupta
411b9691e3 Add missing dependency in layoutlib build file
Add missing dependency on built_ext_data

Change-Id: I4e7cca7f6cbc7f5b7416ac9b85a9aec01e61ecd4
2014-03-31 16:11:13 -07:00
Adam Lesinski
776abc24cd Uses VMRuntime.newUnpaddedArray for ideal array sizes
Bug:13028925

Change-Id: I0a9301248b10a339afbdc5e4ffe3310ac4fa1fb7
2014-03-27 11:42:10 -07:00
Dianne Hackborn
852472d9aa Fix build.
Change-Id: I1dd79e932a551bd537d2c71e8fca29a299c9312f
2014-03-24 14:53:39 -07:00
Svetoslav
1a5255d547 Fixing yet another build breackage
Change-Id: I83597d5433fc6cc380d5ec1dd6f78e115e76db5b
2014-03-20 14:54:08 -07:00
Deepanshu Gupta
a72da3aec6 Merge "Add native method delegates to layoutlib" 2014-03-14 21:16:22 +00:00
Deepanshu Gupta
103d40960d Add native method delegates to layoutlib
Add delegates for Path.native_isConvex and ICU.getCurrencyNumericCode.
The original methods were added in
5be83edd15e11420287cc0af93a95d5a6dfae68f and
d627bd4525e41b0503f94c2887c3e01618c73105 respectively.

TODO: Implement Path_Delegate.native_isConvex

Change-Id: If1046467d3950ab6955c6b81383a60fd6bd03fd2
2014-03-14 13:31:12 -07:00
Narayan Kamath
ceb2e0a605 am 1abb7e0f: am 63938750: am c0232642: am 629daddd: Merge "Fix layoutlib build."
* commit '1abb7e0f3920b31cf216b99fc83231d80dfa7ca4':
  Fix layoutlib build.
2014-03-14 17:53:05 +00:00
Narayan Kamath
6393875024 am c0232642: am 629daddd: Merge "Fix layoutlib build."
* commit 'c0232642b74517aa2717673f0811ba65c620f491':
  Fix layoutlib build.
2014-03-14 14:22:30 +00:00
Narayan Kamath
c73991bda0 Fix layoutlib build.
Was using private data structures from libcore.

Change-Id: I5bd43190081891659e18b5c871686e6078efcc81
2014-03-14 14:10:30 +00:00
Deepanshu Gupta
f978f16e50 resolved conflicts for merge of c76345a3 to klp-modular-dev-plus-aosp
Change-Id: Id0aae224e17651bc07aa3f5b1a06923603d025b8
2014-03-11 16:39:13 -07:00
Deepanshu Gupta
0d7ebc51ff Fix the delegate method signatures in LayoutLib
Change-Id: I262c285c1047958afdb024724959d5afb3552802
2014-03-05 19:23:48 -08:00
Xavier Ducrohet
5ea4be5214 am b2334254: am ec84ada6: am 5e5602da: am 0c72b769: Merge "Update layoutlib method for SystemClock"
* commit 'b2334254ef497e0dcda68d257c096516c77679a4':
  Update layoutlib method for SystemClock
2014-02-27 23:41:38 +00:00
Xavier Ducrohet
ec84ada6e8 am 5e5602da: am 0c72b769: Merge "Update layoutlib method for SystemClock"
* commit '5e5602da5fa9cd2e1d135b2310af2a8352f65e8d':
  Update layoutlib method for SystemClock
2014-02-27 23:34:34 +00:00
Deepanshu Gupta
36acf8baeb Add tests to the layoutlib eclipse project.
Specify the test folder in the layoutlib/bridge eclipse project.

Also add the sourcepath for layoutlib-api-prebuilt.jar

Change-Id: I194ed182618e564388d6df645e2de7f59897fa1e
2014-02-27 11:59:50 -08:00
Jeff Davidson
84cd55e8bc Fix SDK build broken by ag/423985
Change-Id: I85480683531468b7a8a83749d9366f5cc334bd24
2014-02-26 10:19:04 -08:00
Deepanshu Gupta
c2016d4073 Add DatePickerDialog to layoutlib
Includes android.app.DatePickerDialog in the layoutlib.jar

Bug: http://b.android.com/28318
Change-Id: I583dde4a8b88204bf98bfca8d91470e1aa4719ce
2014-02-25 15:31:49 -08:00
Deepanshu Gupta
5ac6a9e9b7 Update layoutlib method for SystemClock
Update layoutlib to reflect changes from
http://android-review.googlesource.com/83061/

Change-Id: If7326f3af2a97271ad1465382944e1f078b965d8
2014-02-24 14:22:29 -08:00
Deepanshu Gupta
9be03c4e98 Update layoutlib tests to check methods return value.
The test in layoutlib bridge has been updated to check the return
value of the delegate method match the value of the overriden method.

This changeset also fixes the problems found due to this change.

Change-Id: I87cef323c4eaee4e9f60475f01156b276593fa50
2014-02-21 16:22:10 -08:00
Deepanshu Gupta
09fcce52b4 Merge "Add ability to obtain themed Drawable from Context" 2014-02-20 18:37:50 +00:00
Xavier Ducrohet
21c5c8e600 am 9edf7a11: am 2cb9147f: am 55542ee6: am 3e637042: Merge "Set default text style in layoutlib as NORMAL [DO NOT MERGE]" into klp-dev
* commit '9edf7a1159b528afa056e0d61ee4487ed310fe4c':
  Set default text style in layoutlib as NORMAL [DO NOT MERGE]
2014-02-20 17:53:20 +00:00
Deepanshu Gupta
c139177b13 am 65521c3c: am ca4b9a77: am e92c8542: am 01825b7a: Fix sans-serif-thin and sans-serif-light fonts in layoutlib. [DO NOT MERGE]
* commit '65521c3cf169808cd02ce09a7344bc633d51c1fc':
  Fix sans-serif-thin and sans-serif-light fonts in layoutlib. [DO NOT MERGE]
2014-02-20 17:53:17 +00:00
Xavier Ducrohet
2cb9147fc4 am 55542ee6: am 3e637042: Merge "Set default text style in layoutlib as NORMAL [DO NOT MERGE]" into klp-dev
* commit '55542ee6449bd580f61bc005726b5c87773fbe25':
  Set default text style in layoutlib as NORMAL [DO NOT MERGE]
2014-02-20 17:46:05 +00:00
Deepanshu Gupta
ca4b9a77e7 am e92c8542: am 01825b7a: Fix sans-serif-thin and sans-serif-light fonts in layoutlib. [DO NOT MERGE]
* commit 'e92c8542a5cf1160a1b701b9f176af64ba46d68d':
  Fix sans-serif-thin and sans-serif-light fonts in layoutlib. [DO NOT MERGE]
2014-02-20 17:46:02 +00:00
Xavier Ducrohet
3e6370425e Merge "Set default text style in layoutlib as NORMAL [DO NOT MERGE]" into klp-dev 2014-02-20 17:41:08 +00:00
Deepanshu Gupta
01825b7aa3 Fix sans-serif-thin and sans-serif-light fonts in layoutlib. [DO NOT MERGE]
For these font families, text was always rendered as italic. This
changeset fixes the issue.

Bug: http://b.android.com/57221
Change-Id: Ic8a299bd1e555f5bb914cd3d2fe72917ec7f471a
(cherry picked from commit e327212adde1136807bbdf052e8cc3861f8a6aba)
2014-02-19 20:17:47 +00:00
Deepanshu Gupta
13aea18b34 Set default text style in layoutlib as NORMAL [DO NOT MERGE]
If a style doesn't specify text style (normal/bold/italic/bold-italic)
then default to normal instead of throwing an error.

Bug: http://b.android.com/61358
Change-Id: I0138c73807a5ff6e4d938a99ece3044333110aa1
(cherry picked from commit 0acfb16dcd95468fe032204f54618e86becfd1eb)
2014-02-19 20:17:00 +00:00
Deepanshu Gupta
be727079a5 Merge "Set default text style in layoutlib as NORMAL" 2014-02-19 20:16:09 +00:00
Deepanshu Gupta
0acfb16dcd Set default text style in layoutlib as NORMAL
If a style doesn't specify text style (normal/bold/italic/bold-italic)
then default to normal instead of throwing an error.

Bug: http://b.android.com/61358
Change-Id: I0138c73807a5ff6e4d938a99ece3044333110aa1
2014-02-19 11:05:02 -08:00
Deepanshu Gupta
e327212add Fix sans-serif-thin and sans-serif-light fonts in layoutlib.
For these font families, text was always rendered as italic. This
changeset fixes the issue.

Bug: http://b.android.com/57221
Change-Id: Ic8a299bd1e555f5bb914cd3d2fe72917ec7f471a
2014-02-19 10:53:27 -08:00
Deepanshu Gupta
8250a825c3 Add ability to obtain themed Drawable from Context
This is to fix the rendering in layoutlib broken due to
8eea3ea5591e59f55cbb4f6b2b7e9363a285ced3

Change-Id: I3da6691ad86502bd4fa4b302deb381a840b94655
2014-02-18 20:21:24 -08:00
Deepanshu Gupta
98f33350b1 Fix native methods
Fix native method signatures as changed by the following commits:
56f57ccbd4fbbf4d572cc966d1cb76d7ae7ad334
76d3a1b8d035d27bc80b0f2fc480a903bd001514

Change-Id: I5db31d3665a5e8c84c107cf84ec3bd5ccfb9a9fe
2014-02-18 13:08:07 -08:00
Deepanshu Gupta
857ba4af85 Fix layoutlib by avoiding Java7 calls
This change also fixes a NPE in TypedArray caused by changes in the
framework.

Change-Id: Ie64237c567fa16c35c807db22ce9a4b609ee411d
2014-02-17 10:43:01 -08:00
Deepanshu Gupta
eaddb84962 am f7193bf8: am d9f9da39: am 56b86deb: am 1c91b1f7: am 45dbfcc7: Improve text rendering and measurement.
* commit 'f7193bf89780039cf924dd7d1bb67f4830517231':
  Improve text rendering and measurement.
2014-02-10 20:04:05 +00:00
Deepanshu Gupta
f7193bf897 am d9f9da39: am 56b86deb: am 1c91b1f7: am 45dbfcc7: Improve text rendering and measurement.
* commit 'd9f9da396b41f394991f676bc74dcfc59c7070a8':
  Improve text rendering and measurement.
2014-02-10 19:56:58 +00:00
Deepanshu Gupta
56b86debcf am 1c91b1f7: am 45dbfcc7: Improve text rendering and measurement.
* commit '1c91b1f7a2da5e5b1996217228399ef958c2be0c':
  Improve text rendering and measurement.
2014-02-10 19:50:58 +00:00
Deepanshu Gupta
45dbfcc781 Improve text rendering and measurement.
1. Fix a bug where baseline of the run was modified while rendering
resulting in crooked text in some cases.

2. Use GlyphVector.getLogicalBounds() for text measurement which is more
accurate than getVisualBounds().

3. This change also optimizes text rendering by not computing the advances
for individual glyphs when not needed.

Change-Id: I66792c4d8f50eaf29afa70bccca1e6c812a3fa28
2014-02-06 16:27:14 -08:00
Deepanshu Gupta
6886e3ac18 am 7bd287b7: am ea2ec77f: am 3adb34ee: am 9fcfbfe2: am 3bf38b41: Merge "Add methods for Time_Delegate" into klp-dev
* commit '7bd287b70a1c95c96663a6028e9809fd3844f55a':
  Add methods for Time_Delegate
2014-02-06 03:15:37 +00:00
Deepanshu Gupta
f7994e89e9 am 6a9cbd5a: am a0023027: am 23de8dc2: am 28e049ef: am 0db6e6a5: Merge "Optimize layout rendering in layoutlib" into klp-dev
* commit '6a9cbd5a2d56782e94b870735df51d32314684d8':
  Optimize layout rendering in layoutlib
2014-02-06 03:15:33 +00:00
Deepanshu Gupta
a859670d0a am f9021e48: am bd762373: am 096e4359: am f2f108fe: am a955314d: Merge "Add missing files to fix libphonenumber for layoutlib." into klp-dev
* commit 'f9021e48bedc9fda9bff4e33244e689fb06e8ecb':
  Add missing files to fix libphonenumber for layoutlib.
2014-02-06 03:15:30 +00:00
Deepanshu Gupta
3a9d89e288 am 1bcc286d: am db0427a0: am 5800b19a: am 50b0ce4e: am fd8cba3a: Merge "Fix the measurement of text bounds." into klp-dev
* commit '1bcc286def646f98747bce2c4dedb0737d5fcf9d':
  Fix the measurement of text bounds.
2014-02-06 03:15:26 +00:00
Deepanshu Gupta
1c06469101 am 1bceb982: am 650d30c5: am b156c019: am d5129e75: am 8a892279: Fix a bug in Nine Patch library.
* commit '1bceb9823f7af258489c91fa201214805744fa4a':
  Fix a bug in Nine Patch library.
2014-02-06 03:15:22 +00:00
Deepanshu Gupta
7bd287b70a am ea2ec77f: am 3adb34ee: am 9fcfbfe2: am 3bf38b41: Merge "Add methods for Time_Delegate" into klp-dev
* commit 'ea2ec77f9538de2ea795d3e257f19e8cff659665':
  Add methods for Time_Delegate
2014-02-06 03:06:38 +00:00
Deepanshu Gupta
6a9cbd5a2d am a0023027: am 23de8dc2: am 28e049ef: am 0db6e6a5: Merge "Optimize layout rendering in layoutlib" into klp-dev
* commit 'a0023027e5b7245e2cef304d96826a7ae1c361aa':
  Optimize layout rendering in layoutlib
2014-02-06 03:06:35 +00:00
Deepanshu Gupta
f9021e48be am bd762373: am 096e4359: am f2f108fe: am a955314d: Merge "Add missing files to fix libphonenumber for layoutlib." into klp-dev
* commit 'bd762373964eb3cb71bdd79cbf82c27faa22699d':
  Add missing files to fix libphonenumber for layoutlib.
2014-02-06 03:06:32 +00:00
Deepanshu Gupta
1bcc286def am db0427a0: am 5800b19a: am 50b0ce4e: am fd8cba3a: Merge "Fix the measurement of text bounds." into klp-dev
* commit 'db0427a0ac986e0823e7bbe9b7c12a97aabe133e':
  Fix the measurement of text bounds.
2014-02-06 03:06:29 +00:00
Deepanshu Gupta
1bceb9823f am 650d30c5: am b156c019: am d5129e75: am 8a892279: Fix a bug in Nine Patch library.
* commit '650d30c5ec3c0b345651a56c45eb334fabf51b17':
  Fix a bug in Nine Patch library.
2014-02-06 03:06:26 +00:00
Deepanshu Gupta
3adb34ee07 am 9fcfbfe2: am 3bf38b41: Merge "Add methods for Time_Delegate" into klp-dev
* commit '9fcfbfe296d7033ee031171f61b3a33044abee42':
  Add methods for Time_Delegate
2014-02-06 02:59:51 +00:00