26 Commits

Author SHA1 Message Date
Deepanshu Gupta
71dc5ee224 Fix nav bar spacing for tablets.
Change-Id: Ieee2c2174a3041a0f967cc75bbe74d8bf882ced7
2015-05-18 11:58:31 -07:00
Deepanshu Gupta
139d6ff12d Update nav bar icons.
- Add a script to copy the icons from the original source.
- Update layout used for the navigation bar to be closer to the original
  layout.
- Update test image with the latest rendering.
- Add a nexus 5 landscape device config to help with testing.

Change-Id: I0b6674955e0970a6a8cce148b1b7aa61e1752ccd
2015-05-13 20:48:58 -07:00
Deepanshu Gupta
796e9b7f99 Add primitive shadows support to LayoutLib
The shadows rendered are not the same as rendered by the framework. The
main purpose of the shadows here is let the user know when shadows will
be cast.

Currently rectangular shadows are available in only two intensities. Any
elevation below 10dp uses one shadow and any elevation over 10 dp uses
the other.

Also, even though the code for arbitrary shapes exist, it doesn't quite
work yet. No shadows are visible when that code is run.

Change-Id: Ie8235ffccf1d3809713f5d8f82afde434817d6b2
2014-11-07 22:26:11 +00:00
Deepanshu Gupta
553a4e9138 Add time to status bar and fix wifi icon.
Add vector drawable for wifi icon. Also add time to the status bar.

Change-Id: I01da833087a607e9bb6ff085929e3844990179f8
2014-08-18 16:46:29 -07:00
Deepanshu Gupta
6e8a98c8b7 am a4ceb9e6: am 32faabbe: Layoutlib: Update wifi and battery icon for KK
* commit 'a4ceb9e64cd1ee6302e41c7799ebb6610af96d0e':
  Layoutlib: Update wifi and battery icon for KK
2014-08-18 18:06:07 +00:00
Deepanshu Gupta
32faabbe14 Layoutlib: Update wifi and battery icon for KK
Change-Id: Ic5c80e83366bb7672049a6bf726d11cf6717f400
(cherry picked from commit 59eedf528ca29a32b6d7f358f5076929f8fbb164)
2014-08-16 01:11:26 +00:00
Deepanshu Gupta
84cc05cacd Add KitKat wifi and battery icons.
This adds wifi and battery icons for Gingerbread and KitKat. This also
improves the icon resolution code by extracting it out in its own class.
The resources are now organized such that each API level resource
directory is used as a backup for all API levels lower than itself.

Change-Id: I937c83638adcc9fa8cd407e0a3023c3abe95530d
2014-08-13 23:13:33 +00:00
Deepanshu Gupta
1076be31f1 Update system icon resolution in LayoutLib.
This fixes some bugs with the resolution of icons for Status Bar and
Navigation Bar by separating the icons into v21 and v11 directories. An
icon is searched in v21 directory by default. For simulating older
platforms, v11 directory is searched first and then v21 is used as a
fallback.

This also adds xxhdpi versions of home, back and recent icons.

Change-Id: Ia6eafc83856eacafc4fb0b13d87793d4aa24f106
2014-06-27 11:52:45 -07:00
Deepanshu Gupta
42c7ce02f4 Add navigtaion bar icons to simulate older platforms.
LayoutLib can simulate older versions of the platform to a very limited
extent. This change adds the old navigtaion bar icons back and moves the
latest ones to directories suffixed with "-v21". The code handles this
resolution in a very crude way.

This also removes a bunch of unused code and fixes some style warnings.

Change-Id: Ib6e7bfd8dfb34b2ccd87f660ca979eb5ef14bae7
2014-06-23 14:49:01 -07:00
Deepanshu Gupta
17f6f35f90 Material navigation bar for layoutlib.
Change-Id: Id65600e5f4ffb3cd0f90c3c710f88d9b668f754f
2014-06-18 15:27:02 -07:00
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
929eea6bc1 Add overflow menu popup for Action Bar in Layoutlib
Change-Id: Ib7cc314079099c010f7d53849e204db36c410357
2014-04-14 15:26:56 -07:00
Deepanshu Gupta
14bf0cef7e Action bar rendering in layoutlib
This also makes a couple of changes to the framework:
1. ShareActionProvider - Use edit mode to execute activity chooser code.
2. WindowDecorActionBar - 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
2014-04-10 10:44:45 -07:00
Deepanshu Gupta
03a057c1af Manual merge of changes from frameworks/base/tools
Manually merge of following changes:
9cb5f5b5233f2331748d108d71f4b685762f32a7
1cf5df38f4bdafa1beb2674ca548ad6d9650766b
083e3caf66c21f7cc9511db479726c38d90e2d2f
81f74f4bc96ea4266cebe1b785d095558f540800
39e75835399f4d979cf82069dae2bd1ec496fb81
272d1bce798a5fef42cc2ee31f629d00c89f66eb
45f5cd49fa898a59484edfd8e291dbe10df82db2

Change-Id: Ie21ca480ac117e16e28eb554474835b762ccb104
2014-01-27 10:31:09 -08:00
Deepanshu Gupta
8930cb4f37 Fix layout rendering for RTL locales
This changeset adds the framework resources for RTL locales and mirrors
the layout if the application is RTL aware.
Use ICU to check the character orientation of the locale - right to left
or left to right. Set the layout direction on the top level layout
accordingly. Also, load the RTL resources for Nav Bar when the locale is
RTL.

Change-Id: Icbb57ee2ac7c6d8dfc34c2f04dce34d820b9b1ed
2014-01-27 10:31:04 -08:00
Adam Lesinski
282e181b58 Revert "Move frameworks/base/tools/ to frameworks/tools/"
This reverts commit 9f6a119c8aa276432ece4fe2118bd8a3c9b1067e.
2014-01-27 10:31:04 -08: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
Deepanshu Gupta
88db0ee2af Fix layout rendering for RTL locales
This changeset adds the framework resources for RTL locales and mirrors
the layout if the application is RTL aware.

Use ICU to check the character orientation of the locale - right to left
or left to right. Set the layout direction on the top level layout
accordingly. Also, load the RTL resources for Nav Bar when the locale is
RTL.

Change-Id: I1ed0d516ab64120a0abca413ba678036661508f8
2013-09-04 14:23:53 -07:00
Mike Lockwood
9f6a119c8a Move frameworks/base/tools/ to frameworks/tools/
Change-Id: I3ffafdab27cc4aca256c3a5806b630795b75d5c8
2013-08-28 09:44:17 -07:00
Xavier Ducrohet
891b703f7b Update layoutlib for jb mr1.
Status bar displayed on all devices.
Update logic for displaying nav bar to whether or not
device has soft button.

Update navigation buttons to new look.
Remove battery and signal from navigation bar.

Change-Id: I8241d71269a17126218a3062ba727e379a8e6c25
2012-10-17 17:15:31 -07:00
Xavier Ducrohet
7396348dfc Setup ActionBars in layoutlib the same way the platform does it.
Instead of using a simple ImageView for the icon, this uses the platform
layout/action_bar_home which uses a custom class to position and resize
the icon (and also supports the Up icon that we don't yet support).

This ensures that the icon is properly positionned and sized like
on devices.

Change-Id: I57432afa82d257bb043247001320b368045d7f55
2012-02-06 15:11:12 -08:00
Xavier Ducrohet
77eaa10949 new button graphics for layoutlib.
Change-Id: I12a6bf9df87552321452ca3344449814cd3102bb
2011-07-11 14:40:48 -07:00
Xavier Ducrohet
c6083f2c9e LayoutLib: misc fixes.
- implement some Paint methods that are needed for 2.x
- fix the phone system bar to display the icons on the right.

Change-Id: I3a938b14ec9a449dbc23a33303a3c8405a5369a8
2011-02-23 12:00:42 -08:00
Xavier Ducrohet
13bdc3355c LayoutLib: improved rendering for system/title/action bars.
Change-Id: I926531e9ad4a7b98e04e23cac3837794f7c89449
2011-02-06 10:58:16 -08:00
Xavier Ducrohet
bbbb832602 LayoutLib: render system/title/action bars.
Also a few generic fixes in the layoutlib itself to support
this.

Change-Id: Ie3f24c9056bd3cc72f39f8a4f2c0861be15bff55
2011-02-04 10:46:21 -08:00