1556 Commits

Author SHA1 Message Date
Deepanshu Gupta
1b87390c94 Overflow menu popup for Action Bar in Layoutlib [DO NOT MERGE]
Adds MenuBuilderAccessor in addition to the cherry-picked changes.

Change-Id: Ib7cc314079099c010f7d53849e204db36c410357
(cherry-picked from commit 929eea6bc1824bf98d244550c0984ecf8ea98811)
2014-04-15 20:02:49 -07:00
Deepanshu Gupta
4ccc4bd54f Action bar rendering in layoutlib [DO NOT MERGE]
This also makes a couple of changes to the framework:
1. ShareActionProvider - Use edit mode to execute activity chooser code.
2. ActionBarImpl - add a new constructor for use by layoutlib.

This also relies on some changes to the plugin to pass the correct params.

Change-Id: Ia30fef816afd91ec1e439734d56b59b1323bfee2
(cherry-picked from 14bf0cef7eeed572a67c29a328581afac4decc20)
2014-04-15 20:02:48 -07:00
Deepanshu Gupta
acf0bce09f Support custom views using TimePickerDialog [DO NOT MERGE]
Bug: http://b.android/com/61515

Change-Id: I0dc3357be0c058adde9d3ea5b6796004b786fd34
(cherry picked from commit 86e5218220a0e01f7eb574a2480bd91f9ebfae35)
2014-04-15 19:53:54 -07:00
Deepanshu Gupta
849a8208c8 Add DatePickerDialog to layoutlib [DO NOT MERGE]
Includes android.app.DatePickerDialog in the layoutlib.jar

Bug: http://b.android.com/28318
Change-Id: I583dde4a8b88204bf98bfca8d91470e1aa4719ce
(cherry picked from commit c2016d4073c61e87439d4fa14837b397a3c1630a)
2014-04-10 00:21:57 +00:00
Deepanshu Gupta
e345507ca4 Add missing dependency in layoutlib build file [DO NOT MERGE]
Add missing dependency on built_ext_data

Change-Id: I4e7cca7f6cbc7f5b7416ac9b85a9aec01e61ecd4
(cherry picked from commit 411b9691e39c0bdd0dafdda7db2737b99b45769e)
2014-03-31 23:15:52 +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
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
3bf38b4165 Merge "Add methods for Time_Delegate" into klp-dev 2014-02-06 02:06:02 +00:00
Deepanshu Gupta
0db6e6a567 Merge "Optimize layout rendering in layoutlib" into klp-dev 2014-02-06 02:05:42 +00:00
Deepanshu Gupta
a955314d90 Merge "Add missing files to fix libphonenumber for layoutlib." into klp-dev 2014-02-06 02:05:21 +00:00
Deepanshu Gupta
fd8cba3ab8 Merge "Fix the measurement of text bounds." into klp-dev 2014-02-06 02:04:49 +00:00
Deepanshu Gupta
8a892279bd Fix a bug in Nine Patch library.
The nine patches were not drawn correctly if they were not positioned at
the top left corner of the canvas.

Bug: http://b.android.com/29959
Change-Id: Icfed522ea07322a3ee9f3955067d3da26c4b0b5b
2014-02-05 17:16:35 -08:00
Deepanshu Gupta
eb3c5459eb Add methods for Time_Delegate
Bug: http://b.android.com/65359
Change-Id: I7c2d09286d6bcd9899444aaa5a4a5a342e39d923
2014-01-31 19:24:06 -08:00
Deepanshu Gupta
35d56c0d67 Optimize layout rendering in layoutlib
The height of a layout should be zero if it is assigned a layout_weight.
This way, the layout is measured only once and prevents spurious errors.

Bug: https://code.google.com/p/android/issues/detail?id=58398
Change-Id: If49a7480e5eb82cb86780e00f2f5b65ee053fc2a
2014-01-20 17:02:37 -08:00
Deepanshu Gupta
58037a4404 Add missing files to fix libphonenumber for layoutlib.
Change-Id: I8102da6c1c4625e887293a8823770d199521c53f
2014-01-17 18:26:38 -08:00
Deepanshu Gupta
5ad7c183f3 Fix the measurement of text bounds.
Bug: 12366230
Change-Id: I203b678363dc7b688c744503ee10216baca658a9
2014-01-07 12:07:45 -08:00
Deepanshu Gupta
24541255c3 Update delegate methods in layoutlib.
Change-Id: I1f0fc274b6a74dbcf0ed46175c4a2fa4c2dd9a63
2013-11-25 19:59:54 -08:00
Deepanshu Gupta
0baec410c2 Update ICU_Delegate methods. DO NOT MERGE
Bug: 11435966
Change-Id: Ib8ed2011fe62b2496795075b33b9ca7d5907b87a
2013-11-18 10:20:37 -08:00
Deepanshu Gupta
1f92d7fc0f Add libphonenumber to layoutlib.jar. DO NOT MERGE
Issue: http://b.android.com/59497
Change-Id: Ief11e602703b6041db66241f1699cc1de72e65a5
2013-11-13 18:15:51 +05:30
Deepanshu Gupta
d0581d271e Fix NPE in layoutlib. DO NOT MERGE
Change-Id: I36623304d83b344ea078044001577b8005a63c02
2013-11-13 18:15:51 +05:30
Deepanshu Gupta
78cfdf31b7 Update changed delegate method in Bitmap_Delegate. DO NOT MERGE
Issue: https://code.google.com/p/android/issues/detail?id=60167
Change-Id: I3e1d6b9d52ca899889ba758b0ea91bd742cf5005
2013-11-13 18:15:51 +05:30
Craig Mautner
5d9f547720 Relayout windows that handle their own config change.
If a window claims to handle its own configuration change then we
won't destroy and recreate its window on a configuration change.
Normally that recreation triggers the first layout following
orientation change because mHaveFrame is false. Windows that handle
their own configuration changes never got a relayout pass following a
change in orientation.

This change passes the configuration changes that an application
handles into the AppWindowToken. If the app says it handles
orientation or screen size changes then a relayout will occur when the
configuration has changed.

Fixes bug 11647107.

Change-Id: Ie8d49fd050442ebbdcf0b805087894e3a2fc4be9
2013-11-12 14:02:52 -08:00
Deepanshu Gupta
f4800bc3b1 Fix text size in Fake Action Bar
The density multiplier was being applied twice to the title text in
the fake action bar.

Bug: 11436018
Change-Id: Id74c11037cb43d01f6cd79126623c84edfc37aaf
2013-11-08 16:43:07 +05:30
Marco Nelissen
738ffdc9da Add a method to set a list of uids for a wake lock
Cherrypicked from master.

b/9464621

Change-Id: Ia6a9d36d55129ae87d3ec070fbf10dc02f4b6cb4
2013-10-25 12:49:55 -07:00
Adam Lesinski
7d292145f1 Merge "Prune unneeded density resources from APK" into klp-dev 2013-10-18 20:36:58 +00:00
Deepanshu Gupta
45f5cd49fa Layoutlib Create: Remove references to java package class Objects.
Remove references to Java 7 class java.util.Objects and replace it with
a new class that can be loaded on Java 6.

Change-Id: Ibbd9b20b8bc89e247f1d0c48d743d06d1a4f0704
2013-10-17 20:06:44 -07:00
Deepanshu Gupta
6c3a638dd8 Merge "Fix layoutlib for KK" into klp-dev 2013-10-18 02:07:30 +00:00
Deepanshu Gupta
272d1bce79 Layoutlib: Add DateIntervalFormat_Delegate required by CalendarView
Change-Id: Ica79267a4eb231db833cb0232cfacf419fe73de3
2013-10-17 11:28:48 -07:00
Deepanshu Gupta
4fc655dd03 am 873c76d0: am fb1ee08c: am a49c3585: Merge "Fix CalendarView to show the right month and year label." into jb-mr2-dev
* commit '873c76d0475def6f89fe02458828a549a7a7b5a2':
  Fix CalendarView to show the right month and year label.
2013-10-17 09:09:19 -07:00
Deepanshu Gupta
38d097b6d1 am 92a80b18: am 9b827a7d: am ec555902: Merge "Layoutlib: Update the wifi icon in the status bar." into jb-mr2-dev
* commit '92a80b1830082d109be4902c357424535305130d':
  Layoutlib: Update the wifi icon in the status bar.
2013-10-17 09:09:16 -07:00
Deepanshu Gupta
ca429e08fe am 9568ad39: am 94e5ada7: am 81f74f4b: Fix DatePicker and Calendar widget in layoutlib.
* commit '9568ad393194cbd42866e64dada88207b44462a6':
  Fix DatePicker and Calendar widget in layoutlib.
2013-10-17 09:09:12 -07:00
Deepanshu Gupta
198537c22c am 7dc35060: am df076962: am 1cf5df38: Layoutlib Create: Remove references to non-std Java classes.
* commit '7dc35060a828c473dcc75d13d31edaa75768a40f':
  Layoutlib Create: Remove references to non-std Java classes.
2013-10-17 09:09:08 -07:00
Deepanshu Gupta
873c76d047 am fb1ee08c: am a49c3585: Merge "Fix CalendarView to show the right month and year label." into jb-mr2-dev
* commit 'fb1ee08ca4424969c148760937d18ec0e3de206c':
  Fix CalendarView to show the right month and year label.
2013-10-17 09:06:46 -07:00
Deepanshu Gupta
92a80b1830 am 9b827a7d: am ec555902: Merge "Layoutlib: Update the wifi icon in the status bar." into jb-mr2-dev
* commit '9b827a7d6dcb8c60411a24e2c8970f3fc24f0380':
  Layoutlib: Update the wifi icon in the status bar.
2013-10-17 09:06:42 -07:00
Deepanshu Gupta
9568ad3931 am 94e5ada7: am 81f74f4b: Fix DatePicker and Calendar widget in layoutlib.
* commit '94e5ada7d629f125262fcc052cf15355a34a678a':
  Fix DatePicker and Calendar widget in layoutlib.
2013-10-17 09:06:39 -07:00
Deepanshu Gupta
7dc35060a8 am df076962: am 1cf5df38: Layoutlib Create: Remove references to non-std Java classes.
* commit 'df0769628e2bfcefb5f78375b74775b3a825ca9f':
  Layoutlib Create: Remove references to non-std Java classes.
2013-10-17 09:06:34 -07:00
Deepanshu Gupta
a49c358576 Merge "Fix CalendarView to show the right month and year label." into jb-mr2-dev 2013-10-17 16:01:08 +00:00
Deepanshu Gupta
ec55590216 Merge "Layoutlib: Update the wifi icon in the status bar." into jb-mr2-dev 2013-10-17 16:00:57 +00:00
Deepanshu Gupta
39e7583539 Fix layoutlib for KK
Fix a NPE, update the native methods for NinePatch and update an ICU
method to return the right value as required by DatePicker widget.

Bug: 11140701
Change-Id: Id92fc5359acf6dde1bcdbc781aaf637fdb6eecbf
2013-10-16 21:49:02 -07:00
Deepanshu Gupta
81f74f4bc9 Fix DatePicker and Calendar widget in layoutlib.
Issue: https://code.google.com/p/android/issues/detail?id=59732
Change-Id: I281b3fdad88c591281a3645592c84f3e2cb61d09
2013-10-16 15:09:52 -07:00
Deepanshu Gupta
083e3caf66 Fix CalendarView to show the right month and year label.
Change-Id: I95431f1054678d4192bd1621c1f69b29268f55e9
2013-10-16 15:09:52 -07:00
Deepanshu Gupta
1cf5df38f4 Layoutlib Create: Remove references to non-std Java classes.
Do not add the non-standard Java classes. Updates the references to all
non-standard classes to new classes in
com.android.tools.layoulib.create package. This also treats
java.lang.AutoCloseable which is part of Java 7 similarly so that we can
still run on Java 6.

Change-Id: Iac5b272652e2780c9bb72d19f415d150948ca589
2013-10-16 15:09:50 -07:00
Adam Lesinski
9438c2df13 Prune unneeded density resources from APK
When a preferred density is specified, prune all but the
closest matching density when the exact density resource does not
exist.

If a preferred density resource does not exist and a higher density
resource exists, prune all but the resource with the next highest
density relative to the preferred density.

If a preferred density resource does not exist and there is no
higher density resource, prune all but the resource with the next
lowest density relative to the preferred density.

bug:11224465
Change-Id: I99b3950fe3d8116a5625968ed383442315ae8526
2013-10-15 17:18:51 -07:00
Deepanshu Gupta
9cb5f5b523 Layoutlib: Update the wifi icon in the status bar.
Issue: https://code.google.com/p/android/issues/detail?id=60993

Change-Id: Ia43ed40b42c79f67dcd5809b827d4fecbc823c25
2013-10-14 10:35:46 -07:00
Alan Viverette
6930d3805e Merge "Ignore certain WindowManager flags when touch exploration is enabled" into klp-dev 2013-10-08 00:47:23 +00:00
Alan Viverette
5a0f4eccfb Ignore certain WindowManager flags when touch exploration is enabled
Specifically, ignore any flags that alter the visibility of the navigation
bar and transparency.

BUG: 11082573
Change-Id: I17264dc55a1c6c3cb9b9cf92d5121799cecee5b8
2013-10-07 15:12:57 -07:00
Adam Lesinski
2b8e82fd51 AAPT emits error for res with no 'default' product
Rather than ignoring resources that do not match the specified
product, we keep track of the ignored ones and make sure that
some variant of the resource that matches the product was processed.

bug:10860838
Change-Id: I804cd04a053269a35b7e1c1cc743b77493337bf9
2013-10-04 15:14:09 -07:00
Marco Nelissen
fb45a2e9cd Merge "Fix layoutlib build" into klp-dev 2013-10-03 20:51:36 +00:00