925 Commits

Author SHA1 Message Date
Xavier Ducrohet
d6465e10c2 CherryPick 06942bc4 from hc-mr1. do not merge.
Layoutlib - use the new getParser callback when possible.

Change-Id: I72b867aa573fcc07d610f139da3c90b1b654633c
2011-06-16 18:26:25 -07:00
Xavier Ducrohet
6b62c82848 CherryPick 988eeeb5 from hc-mr1. do not merge.
Support for custom declare-styleable attr with enum/flag in layoutlib.

Change-Id: I8a5b7cc629d61996ffade9aabd9d4d10961eb411
2011-06-16 18:26:24 -07:00
Dianne Hackborn
4bd44535fe am 810dc598: am f1c5dbbd: am abd4dffc: Merge "New orientation handling. Only impacts SDK (aapt dump badging)." into honeycomb-mr2
* commit '810dc5980c504a89974c07fcbd28a2b5dffb47de':
  New orientation handling.  Only impacts SDK (aapt dump badging).
2011-06-16 14:57:59 -07:00
Dianne Hackborn
810dc5980c am f1c5dbbd: am abd4dffc: Merge "New orientation handling. Only impacts SDK (aapt dump badging)." into honeycomb-mr2
* commit 'f1c5dbbd457bb14d3673508aaba497cdc328a1ef':
  New orientation handling.  Only impacts SDK (aapt dump badging).
2011-06-16 14:55:01 -07:00
Dianne Hackborn
abd4dffc86 Merge "New orientation handling. Only impacts SDK (aapt dump badging)." into honeycomb-mr2 2011-06-16 14:47:53 -07:00
Xavier Ducrohet
9340ab4a21 am 0be8522b: am d1abd94f: am 04ce8111: Bring in more layout lib changes from hc-mr1.
* commit '0be8522b430aca8d90023d7c7e5ef510aa48adc7':
  Bring in more layout lib changes from hc-mr1.
2011-06-16 14:04:18 -07:00
Xavier Ducrohet
0be8522b43 am d1abd94f: am 04ce8111: Bring in more layout lib changes from hc-mr1.
* commit 'd1abd94f57c0162186c57aea98790e8fa281e0a2':
  Bring in more layout lib changes from hc-mr1.
2011-06-16 13:55:30 -07:00
Xavier Ducrohet
04ce811131 Bring in more layout lib changes from hc-mr1.
fe051bb2 : Change the way the layoutlib instantiate its XmlPullParser.

A lot of the init code was duplicated so I made a ParserFactory class.

Also created an extension of the KXmlPullParser to override toString().
This allows easier debugging when dealing with multiple parsers (which
is always the case).

Also added some (disabled) debugging printf to deal with parser stack
as it can be tricky figuring out which parsers are in the stack at
which point.

8969147c : Fix case where the int[] attrs doesn't directly match a styleable.

In the case of the FastScroller the int[] is a custom mix of attr
instead of a int[] that exists as R.styleable.foo.

This makes our reflection based mechanism used to find the styleable
fail, so instead we search for each attribute separately (like
we probably should have done from the beginning).

0c264b35: Fix various cases of getDimension to report error if unit is missing.

if getDimention###() is called for a string that has no unit,
then an error is output through LayoutLog, but the rendering keeps
going by using dp as a default.

0beb7eea: Make (Bridge)TypedArray.getInteger() call out to getInt()

Only getInt() resolved attribute flags/enum and I'm not sure why
there's two to begin with.
2011-06-16 13:23:53 -07:00
Dianne Hackborn
f77ae6e65a New orientation handling. Only impacts SDK (aapt dump badging).
This is a new way of determining whether an application requires
specific orientations, done by looking at any requirements in its
activity tags.  Note that this won't catch all possible issues,
because applications can still force an orientation through Java
APIs, but the vast majority of applications that actually require
a specific orientation should be doing it this way because it the
easiest way and the only way to cleanly launch into the app from
a different orientation without doing some serious activity tricks.

Change-Id: I11d32104f6bc3d2a72aeeff1ca150b8f1c9f5588
2011-06-16 11:13:20 -07:00
Xavier Ducrohet
66743a1ec0 Fix changed native method delegates in layoutlib for ICS.
Change-Id: I49306868cd8a41b6b7d919c3e8b108d5c014530e
2011-06-15 14:43:42 -07:00
Dianne Hackborn
711516d140 resolved conflicts for merge of 77fc8b80 to master
Change-Id: I014f9a886d6f05607d2a5d101ad2052a6841ee8d
2011-06-14 12:17:35 -07:00
Dianne Hackborn
77fc8b8066 am 6c0533f9: am c5193c62: Merge "Add new landscape and portrait orientation features." into honeycomb-mr2
* commit '6c0533f994e7991b3bd60cab48362e8e2e6d86f0':
  Add new landscape and portrait orientation features.
2011-06-14 11:40:06 -07:00
Dianne Hackborn
e289bff0ec Add new landscape and portrait orientation features.
Updates aapt to know about these.  Also updates aapt badging to:

- No longer crash due to the change to how we match unspecified
configuration resources.
- Report the new "smallest screen" supported screen configs.
- Infer old screen size buckets based on new smallest width attrs.
- Report all of the different labels and icons in an app.

Change-Id: I7376042b817391bd070f549cebbc7f03be4635c8
2011-06-14 11:23:52 -07:00
Dianne Hackborn
ef42dace44 am f14dff12: am c6adfed6: am f795e9a8: Okay *now* really enforce the limit on non-public styles.
* commit 'f14dff1219d2a87340dccad657f666f5451d8c6e':
  Okay *now* really enforce the limit on non-public styles.
2011-06-10 14:08:41 -07:00
Dianne Hackborn
173e4c79b4 am 9980043e: am 820caf7b: am 8821ba86: Ummm... f*, stop breaking the build.
* commit '9980043e930f877c4cd066de2b3d57dce4fc926e':
  Ummm...  f*, stop breaking the build.
2011-06-10 13:00:41 -07:00
Dianne Hackborn
6b592723c9 resolved conflicts for merge of f51ded0f to master
Change-Id: Ida356524a68aeb2b9b0013dfbb6ab4bd11e616e2
2011-06-10 12:45:36 -07:00
Xavier Ducrohet
2dcb6e80b9 am 48305f32: am 2e0f7118: am 8ee28811: Merge changes Idbb70f53,I10426a3f into honeycomb-mr2
* commit '48305f327ff3839ddbfa5a6fb42a57150a69480c':
  Merge 06942bc4 from hc-mr1.
  Merge 988eeeb5 from hc-mr1.
2011-06-10 10:31:52 -07:00
Dianne Hackborn
f14dff1219 am c6adfed6: am f795e9a8: Okay *now* really enforce the limit on non-public styles.
* commit 'c6adfed6dcea8482e482db58bd396ea8de08426a':
  Okay *now* really enforce the limit on non-public styles.
2011-06-10 07:45:38 -07:00
Dianne Hackborn
9980043e93 am 820caf7b: am 8821ba86: Ummm... f*, stop breaking the build.
* commit '820caf7b04f1e5c83599437e9e783e91322eb4f9':
  Ummm...  f*, stop breaking the build.
2011-06-09 16:18:07 -07:00
Dianne Hackborn
f795e9a86d Okay *now* really enforce the limit on non-public styles.
Change-Id: Ie8df6acf7cc3dec00f615b2fa9a5122ec79a0aae
2011-06-09 16:17:53 -07:00
Dianne Hackborn
8821ba8606 Ummm... f*, stop breaking the build.
Change-Id: I6a42cb60e7cebda6d17222e6af1f327889323c40
2011-06-09 16:09:15 -07:00
Dianne Hackborn
f51ded0f8f am a8d7ea06: am 220cd77d: Merge "Enforce public resource restriction on bag parents." into honeycomb-mr2
* commit 'a8d7ea067cf22baeee2ff0a33e5a8c5a35936942':
  Enforce public resource restriction on bag parents.
2011-06-09 16:06:07 -07:00
Dianne Hackborn
426431adcc Enforce public resource restriction on bag parents.
Need to put some more styles in the SDK to avoid breaking apps.

Also, welcome Android 3.2.

Change-Id: Ia31d07c9b1b91ad868d8630437fdc1b5ae24f37d
2011-06-09 15:27:39 -07:00
Xavier Ducrohet
48305f327f am 2e0f7118: am 8ee28811: Merge changes Idbb70f53,I10426a3f into honeycomb-mr2
* commit '2e0f71181792780b55826bcc562ae79951e76f1b':
  Merge 06942bc4 from hc-mr1.
  Merge 988eeeb5 from hc-mr1.
2011-06-09 12:49:55 -07:00
Xavier Ducrohet
45b662e1bc Merge 06942bc4 from hc-mr1.
Layoutlib - use the new getParser callback when possible.

Change-Id: Idbb70f5391addd539afa5c2f5b55c70beefed223
2011-06-08 17:11:40 -07:00
Xavier Ducrohet
beb5fb622b Merge 988eeeb5 from hc-mr1.
Support for custom declare-styleable attr with enum/flag in layoutlib.

Change-Id: I10426a3f2c76bed207c03fab7885b4269337a70f
2011-06-08 17:10:11 -07:00
Xavier Ducrohet
f18e311ee5 am abc83871: am f6e47999: am 2a6dc7f1: Merge "Import the Layoutlib from hc-mr1." into honeycomb-mr2
* commit 'abc838716816107754ab0479242d03807ce79fc2':
  Import the Layoutlib from hc-mr1.
2011-06-07 17:17:11 -07:00
Xavier Ducrohet
abc8387168 am f6e47999: am 2a6dc7f1: Merge "Import the Layoutlib from hc-mr1." into honeycomb-mr2
* commit 'f6e479993e7c85265692829990ceb3879fbce424':
  Import the Layoutlib from hc-mr1.
2011-06-06 18:11:33 -07:00
Xavier Ducrohet
67f09cd090 am d6ce6791: Merge "Cherrypick d1ed33c4 from hc-mr1. do not merge." into gingerbread
* commit 'd6ce6791f26fd0a7cf89ded2847011a4894013e1':
  Cherrypick d1ed33c4 from hc-mr1. do not merge.
2011-06-06 18:08:40 -07:00
Xavier Ducrohet
ab3f5779ae am ee1b4976: Merge changes I035c48b9,Ib302af47,Iebda5ea6 into gingerbread
* commit 'ee1b497648a0c3c03b09c4739619f23315d491fb':
  Cherrypick 5b61ea6b from hc-mr1
  LayoutLib: enable the LAYOUT_ONLY capability.
  Merge dba35f1b from honeycomb-mr1. do not merge.
2011-06-06 18:08:32 -07:00
Xavier Ducrohet
fb93ce9684 Import the Layoutlib from hc-mr1.
This is squash commit of all the missing patches.

Change-Id: Ie081c46a173290646deddbde503a720d50c4400f
2011-06-03 19:38:14 -07:00
Xavier Ducrohet
156a211b21 Cherrypick d1ed33c4 from hc-mr1. do not merge.
Fix zombie threads in the Layoutlib.

Some widgets can create (indirectly) HandlerThread which are started
but never stopped.

This patch use the delegate methods to override the thread run method
to record which threads are started to be able to call quit() on them
after a render.

Note that we should really fix layoutlib_create to be able to call
the default implementation from a delegate to remove code duplication.

Change-Id: Iaf5432623e9704bb3114a8e0583c8553282c205e
2011-06-03 18:37:09 -07:00
Xavier Ducrohet
21726044a9 Cherrypick 5b61ea6b from hc-mr1
Fix drawCircle in layoutlib.

Change-Id: I035c48b925cad246ed821e9e59a93d37174982ef
2011-06-03 16:02:12 -07:00
Dianne Hackborn
8a7d44e824 resolved conflicts for merge of 54cb63e2 to master
Change-Id: I5b741a1781e3f76c03fc1534ffce871117effd10
2011-06-02 16:44:52 -07:00
Xavier Ducrohet
f174cd86bd LayoutLib: enable the LAYOUT_ONLY capability.
Change-Id: Ib302af47d2a83a7ac3def6256bf0b892823f594f
2011-06-02 16:38:38 -07:00
Xavier Ducrohet
8f17523dca Merge dba35f1b from honeycomb-mr1. do not merge.
Change-Id: Iebda5ea67fd40cac76a8ca3fe3c3cd4ee95ddebe
LayoutLib: Properly configure KXmlParser to read UTF8
2011-06-01 18:32:57 -07:00
Dianne Hackborn
54cb63e26e am 528c49f1: am b96cbbd1: Add "tv" density for 720p screens.
* commit '528c49f112dce5f9687f30a9751e783196eca0c6':
  Add "tv" density for 720p screens.
2011-05-27 14:27:46 -07:00
Dianne Hackborn
b96cbbd11c Add "tv" density for 720p screens.
Change-Id: I028969b007f2fceea66947d77a2ae31ef1d1a630
2011-05-27 13:40:26 -07:00
Jeff Brown
7d0fb57044 am 16330e24: am 94e838f6: Merge "Improve VelocityTracker numerical stability. (DO NOT MERGE)" into honeycomb-mr2
* commit '16330e249663fed890df0e95fce4016c2971120a':
  Improve VelocityTracker numerical stability. (DO NOT MERGE)
2011-05-25 14:42:06 -07:00
Xavier Ducrohet
228e471627 am 34f5991e: Merge 6103e22c from honeycomb-mr1. do not merge.
* commit '34f5991ebe8b203f1720caf95889c15dd131d86e':
  Merge 6103e22c from honeycomb-mr1. do not merge.
2011-05-24 12:28:38 -07:00
Dianne Hackborn
e2c7715c77 resolved conflicts for merge of bbca8133 to master
Change-Id: I81493674dceab848e41d380a77a37e5a9be06db6
2011-05-24 11:27:11 -07:00
Xavier Ducrohet
34f5991ebe Merge 6103e22c from honeycomb-mr1. do not merge.
LayoutLib: custom styles override the default style instead of replacing it.

Intead of reading either the custom or the default style for a widget, we
read both and use the values from the custom style if it exists, or
from the default style otherwise.

Change-Id: Ibcec2e9b1e8a95295ab26ede145c287ff2f30be4
2011-05-24 10:55:30 -07:00
Xavier Ducrohet
af83d4ecff am c7b87766: Merge 2402ad60 from honeycomb-mr1. do not merge.
* commit 'c7b87766b21fe5cf2f644efa8753b936d413dc9a':
  Merge 2402ad60 from honeycomb-mr1. do not merge.
2011-05-24 10:54:35 -07:00
Xavier Ducrohet
c7b87766b2 Merge 2402ad60 from honeycomb-mr1. do not merge.
LayoutLib: Fix Canvas_Delegate.native_concat().

Change-Id: I863c43d65a929816ac7c9e69addcc647dac1878b
2011-05-23 17:51:22 -07:00
Jeff Brown
5b2b4d9c0a Improve VelocityTracker numerical stability. (DO NOT MERGE)
Replaced VelocityTracker with a faster and more accurate
native implementation.  This avoids the duplicate maintenance
overhead of having two implementations.

The new algorithm requires that the sample duration be at least
10ms in order to contribute to the velocity calculation.  This
ensures that the velocity is not severely overestimated when
samples arrive in bursts.

The new algorithm computes the exponentially weighted moving
average using weights based on the relative duration of successive
sample periods.

The new algorithm is also more careful about how it handles
individual pointers going down or up and their effects on the
collected movement traces.  The intent is to preserve the last
known velocity of pointers as they go up while also ensuring
that other motion samples do not count twice in that case.

Bug: 4086785
Change-Id: I95054102397c4b6a9076dc6a0fc841b4beec7920
2011-05-23 17:19:59 -07:00
Dianne Hackborn
bbca81334e am 4bb78889: am 40277df7: Merge "Add "television" mode." into honeycomb-mr2
* commit '4bb78889d04594c01a6af7f6d38c1764e9f575f9':
  Add "television" mode.
2011-05-23 16:16:54 -07:00
Dianne Hackborn
e360bb6bd8 Add "television" mode.
Change-Id: Ida1fdb61b036a8b489dbeda196fb4bc82e651b2b
2011-05-23 15:11:08 -07:00
Xavier Ducrohet
5b9ec6871a am 4c1e73b6: Merge e57aa434 from honeycomb-mr1. do not merge.
* commit '4c1e73b69a13a4f24a8fc123f599a9e9d8505525':
  Merge e57aa434 from honeycomb-mr1. do not merge.
2011-05-23 09:52:55 -07:00
Xavier Ducrohet
041fd74bea am f791863f: Merge "Merge 05b7b69c from honeycomb-mr1. do not merge." into gingerbread
* commit 'f791863f0ac67ab6abd7410d5807d716cffc5b72':
  Merge 05b7b69c from honeycomb-mr1. do not merge.
2011-05-23 09:52:52 -07:00
Xavier Ducrohet
9d9a7466cd am bb43828a: Merge "Merge 2fae858d from Honeycomb-mr1. do not merge." into gingerbread
* commit 'bb43828aa749e71d4e52ba69db01b83c83a755b5':
  Merge 2fae858d from Honeycomb-mr1. do not merge.
2011-05-23 09:52:41 -07:00