• Home
  • History
  • Annotate
  • only in /frameworks/base/tools/layoutlib/bridge/tests/res/testApp/MyApplication/
History log of /frameworks/base/tools/layoutlib/bridge/tests/res/testApp/MyApplication/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a4d7ad8663e624d46f53ac0e5948348348d82204 06-Apr-2016 Diego Perez <diegoperez@google.com> Fix rect shadow detection

ViewGroup_Delegate was trying to use a rect shadow even in cases where
we needed to use a path. This caused that using a ToggleButton would
throw an exception with radius < 0.
Also, changed the tests so we can detect certain render errors and
ignore other (like known fidelity warnings).

Change-Id: I900d45f9efa892ad0aebc8f4ef73fc9f21ab9d92
olden/allwidgets.png
olden/allwidgets_tab.png
rc/main/res/layout/allwidgets.xml
2605f91f705fbf51800c6fde8ee8cd5f199447b4 04-Apr-2016 Diego Perez <diegoperez@google.com> Separate inflate from render step

Up until now, createSession will always do a first render. With the new
embedded layoutlib we might want to actually call objects from the
inflated view before doing a render or even do it between renders.
This allows to avoid the first initial render unless needed.

This CL also fixes a bug that would only happen when multiple render
calls are issued. When scrolling, use scrollTo since we likely want
absolute positions, not relative.

Change-Id: I4b1d8388d7218a8de33e25cd546fd965fcb07dc7
rc/main/res/layout/scrolled.xml
5ceb30f2164c745789c13bd0060e57fa8c04a8fd 22-Mar-2016 Diego Perez <diegoperez@google.com> Add fill type support to vector drawable

The platform has added fill type to vector drawables. This CL implements
the native replacement.
Also remove a couple of delegates for classes that have been removed
from the platform.

Change-Id: Ie6ba344db9c9c2c45cd0ef4b99f11f9d8bcfd7de
olden/vector_drawable.png
rc/main/res/drawable/multi_path.xml
d15459197f71f8cc940e2b057b399117df282f2c 04-Mar-2016 Diego Perez <diegoperez@google.com> Account for parent scroll position

When calculating the ViewInfo bounding box, account for the parent
scroll position.
Also make renderAndVerify return a RenderResult to verify some data
about the result layout.

Change-Id: I965e393c49b5030c80083daf5e058fa31400ce93
olden/scrolled.png
rc/main/res/layout/scrolled.xml
566b303365078fac9a454f1595add19e02631db3 01-Mar-2016 Diego Perez <diegoperez@google.com> Add support for GradientColor in layoutlib

Change-Id: Ia9a55a9e00d7ddb5263f3dbe46b5da8dde457526
olden/vector_drawable.png
rc/main/res/color/gradient.xml
rc/main/res/drawable/multi_path.xml
b9c48d8f49d35e2682c7205a9d8d5fcc25d7c736 18-Dec-2015 Diego Perez <diegoperez@google.com> New path interpolation to paint vector drawables

Before this CL, PathMeasure_Delegate would use Path_Delegate.approximate
to get a path segment to draw. Path_Delegate.approximate uses a
flattening iterator to do the path approximation.
Unfortunately, because we do not control the stroke mode while painting,
in some cases the approximation would draw unwanted artifacts caused by
the rough approximation and the use of wrong miter values.
This CL does a much better calculation of the path and interpolates the
segments of the curves instead of replacing them with line segments.

This also fixes an issue with the calculation of empty paths.

Bug: http://b.android.com/187256

Change-Id: I450f7aa4c3d9efcbf902a40c3b4d6d388546893f
olden/vector_drawable.png
rc/main/res/drawable/multi_path.xml
rc/main/res/layout/vector_drawable.xml
0c08fc0fc58be4f52527d7a0529960752056e83b 11-Jan-2016 Deepanshu Gupta <deepanshu@google.com> Merge "Fix ninepatch scaling." into mnc-ub-dev
95e58deaa2ab56de3df827ad615f5b7799506edc 07-Dec-2015 Deepanshu Gupta <deepanshu@google.com> Fix ninepatch scaling.

Really fix the bug now. Also add tests for the same and update
allwidgets golden file for M.

Bug: http://b.android.com/187939
Change-Id: I98cd55da0561fef9d47d8759bcd287ee36d03cc2
olden/allwidgets.png
olden/allwidgets_tab.png
29ed07524ce0fc2e5950f5340d306247145d0efa 14-Oct-2015 Diego Perez <diegoperez@google.com> Add support for Choreographer animations

First step to add support for Choreographer based animations. The
Choreographer_Delegate avoid using a handler so the animation callbacks
can be called on-demand (by using doFrame). This allows things like
frame by frame animation or selecting a specific frame, and doesn't need
a separate thread to run.

The CL also changes the System and SystemClock implementations to allow
to set specific times. Because animations heavily rely on the system
time, this allows controlling it. It can also be useful to ensure that
the rendering produces a deterministic result when using controls like
the Calendar widget.

Change-Id: Iff221d2698a82075cafbb60f341be01741f7aa13
olden/animated_vector.png
olden/animated_vector_1.png
rc/main/res/layout/indeterminate_progressbar.xml
89a045c31f4f08bc0d9d533ef47f321e6423f656 03-Aug-2015 Deepanshu Gupta <deepanshu@google.com> Revert to using AppTheme for LayoutLib tests.

Use AppTheme for all tests other than testExpand. AppTheme contains an
attribute needed by testArrayCheck. Also, since the AppTheme extends
Theme.Material.Light.DarkActionBar, other tests should be unaffected.

Also, update the golden image for the testArrayCheck.

Change-Id: Ib5f53f3b029c5aceef2b622e5ac63952d6b1972a
olden/array_check.png
c2622d8923d961e20e3141950d8a90e6dd989c91 31-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Update test image for upated nav icons.

The image shows the nav icons to be separated by a significant distance.
This is because the switch to wide-screen layout happens based on
shortest width. The layout has a small shortest width and hence it uses
the phone layout for a horizontal nav bar and it doesn't look nice. Real
devices will never have this config, so it's okay.

Change-Id: Ic494ee7fdfb1116db39bcab6d6ee7a1e514b23df
olden/expand_horz_layout.png
b9935889b1be2aac4a47d1acbf7547a832edf9f3 21-Jul-2015 Diego Perez <diegoperez@google.com> resolved conflicts for merge of 112d8a36 to mnc-dev

Change-Id: Ic9511a57db8a96f54dba0704800789a8602b9dd2
4362443cd9a5df6c5cc012881a0aaf96c927b923 02-Jun-2015 Diego Perez <diegoperez@google.com> Render to measured size when using expand mode

When using RenderingMode.V_SCROLL or RenderingMode.H_SCROLL, if the
screen size is smaller than the measured size but as large as the
desired size, the layout will render incorrectly and won't expand.
This changes that to expand to at least the size of the screen.

Added tests for the V_SCROLL and H_SCROLL modes.

Bug: http://b.android.com/174928
Change-Id: I22686903560775e2e4f362af1d7b50c9b985467d
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$layout.class
olden/expand_horz_layout.png
olden/expand_vert_layout.png
rc/main/res/layout/expand_horz_layout.xml
rc/main/res/layout/expand_layout.xml
rc/main/res/layout/expand_vert_layout.xml
642cff50f8f7a67eed09eac1e56d7133b26a192c 23-May-2015 Deepanshu Gupta <deepanshu@google.com> LayoutLib: Support getting resource arrays.

- Don't crash when Resources.get<Type>Array() is called.
- If the IDE supports it, actually return the value.
- Add tests for getArray.
- Update test app to latest gradle plugin version.
- Switch to using AppTheme for tests, since the tests depend on some
custom theme attributes. The AppTheme now inherits from
Material.Light.DarkActionBar, so other tests should be unaffected.

Depends on a newer version of sdk-common, which fixes the parsing of
array resource in value files.

Bug: 12372031
Change-Id: I313b61511e98ac1402d75056ebfdeeb005ebb96d
uild.gradle
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/ArraysCheckWidget.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/MyActivity.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$array.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$attr.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$dimen.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$drawable.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$id.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$integer.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$layout.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$menu.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$string.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$style.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R.class
olden/array_check.png
rc/main/java/com/android/layoutlib/test/myapplication/ArraysCheckWidget.java
rc/main/res/layout/array_check.xml
rc/main/res/values/arrays.xml
rc/main/res/values/attrs.xml
rc/main/res/values/styles.xml
139d6ff12d395a888624113fdd2521861b47d761 14-May-2015 Deepanshu Gupta <deepanshu@google.com> 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
olden/allwidgets.png
d77b9ed7dcc42efca33b225c4594a30aab9e709c 12-May-2015 Deepanshu Gupta <deepanshu@google.com> Add missing delegates for M preview.

- Remove ICU dependency (use the version bundled with platform).
- Restructure intelliJ project to move dependencies to module.
- Minor fixes to layoutlib tests.

TODO:
- Load ICU data.
- Hyphenator doesn't work.
- High quality line breaker not present.

Change-Id: I965e096e17bfc97ee995a649c3f4f6f64bb4f70d
olden/allwidgets.png
a035dfbf8ddfc8d301dd96088eb50e8c2e63e487 17-Apr-2015 Deepanshu Gupta <deepanshu@google.com> More layoutlib tests.

- Add another layout including more widgets and thus testing layoutlib
better.
- Update targetSdk Version to 22.
- Handling of dynamic ids (@+id/) in LayoutLibTestCallback is buggy.
Since this is not a problem in Studio, and this is not testing the
callback, work around the issue by declaring the ids in
values/ids.xml.

Change-Id: I457c105e8556c4df13cd86da2250fe5fd37843a8
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/MyActivity.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$id.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$layout.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$menu.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$string.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$style.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R.class
olden/allwidgets.png
rc/main/res/layout/allwidgets.xml
rc/main/res/values/ids.xml
54862febaf519281ac61ebe31caf49c69820449a 15-Apr-2015 Deepanshu Gupta <deepanshu@google.com> Update golden image for tests.

Change-Id: If07edcbfb7016a6b80f4bd00cffab494f74bfc03
olden/activity.png
ec8df9af2f35eb5be4df01d66b1add4a4e7546c7 26-Mar-2015 Deepanshu Gupta <deepanshu@google.com> Fix tests for Java 6.

- Change the guava version used to match the one included in the SDK.
The test server uses the same. However, the command line build still
uses the guava present at platform/external/guava, which is compiled
with Java 7. Thus, running the tests from inside the IDE can be done
via Java 6.
- Rebuilt the test app classes with Java 6 compatibility.
- Change similarity threshold to prevent differences due to some locale
settings different java versions.

Change-Id: Ic71d43256a8cf6f9df296e63550667a202c7105f
uild.gradle
uild/intermediates/classes/androidTest/debug/com/android/layoutlib/test/myapplication/test/BuildConfig.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/BuildConfig.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/CustomCalendar.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/CustomDate.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/MyActivity.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$attr.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$dimen.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$drawable.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$id.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$layout.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$menu.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$string.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$style.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R.class
84e550f5e6b286f6f2194d0a01b460df331dae03 18-Mar-2015 Deepanshu Gupta <deepanshu@google.com> Fix layoutlib tests.

The date picker and calendar widgets show the current date. Comparing
widgets showing current date with a static golden image wasn't the best
idea.

- Change the widgets to custom widgets that set a predefined date/time
so that the rendering is independent of the system date.
- Change the layout slightly to make it look nicer.
- Update gradle plugin version.

Change-Id: Ia3fb4965a372a28087a0d8c9df40fd6779df6050
uild.gradle
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/BuildConfig.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/CustomCalendar.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/CustomDate.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/MyActivity.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$attr.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$dimen.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$drawable.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$id.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$layout.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$menu.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$string.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$style.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R.class
olden/activity.png
radle/wrapper/gradle-wrapper.properties
rc/androidTest/java/com/android/layoulib/test/myapplication/ApplicationTest.java
rc/main/java/com/android/layoutlib/test/myapplication/CustomCalendar.java
rc/main/java/com/android/layoutlib/test/myapplication/CustomDate.java
rc/main/res/layout/layout.xml
58df125bbc76fd71a9c056c6b6108fc149733b0e 07-Dec-2014 Deepanshu Gupta <deepanshu@google.com> Add image comparison to LayoutLib tests.

The LayoutLib rendering tests now compares the rendered image with a
golden file from a previous execution. This will help catch any
unexpected changes in the final rendering.

Change-Id: I80251a778e89df7d7ec13863a8f299967f3d747d
olden/activity.png
eae390a94ee63676bc6cbe3b36dbe5bb48e82f6b 02-Jan-2015 Deepanshu Gupta <deepanshu@google.com> Add DatePicker, CalendarView to LayoutLib tests

Change-Id: Ice8c41ff90ccb0ffe90fcbfcccc91ea24225a3d9
rc/main/res/layout/layout.xml
86eb8b4e29b1ad889fc814bae723d4d6e491f53f 31-Jul-2014 Deepanshu Gupta <deepanshu@google.com> Add testing framework to LayoutLib.

This change adds an end to end test which loads the framework resources
and a test app and ensures that no exceptions or warnings are thrown.

The change also adds project configuration for intelliJ.

Change-Id: I7b67c0f1a2af2dac95df7f3231cab537b9826d7d
gitignore
uild.gradle
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/BuildConfig.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/MyActivity.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$attr.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$dimen.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$drawable.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$id.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$layout.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$menu.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$string.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R$style.class
uild/intermediates/classes/debug/com/android/layoutlib/test/myapplication/R.class
radle.properties
radle/wrapper/gradle-wrapper.jar
radle/wrapper/gradle-wrapper.properties
radlew
radlew.bat
roguard-rules.pro
rc/androidTest/java/com/android/layoulib/test/myapplication/ApplicationTest.java
rc/main/AndroidManifest.xml
rc/main/java/com/android/layoutlib/test/myapplication/MyActivity.java
rc/main/res/drawable/ic_launcher.xml
rc/main/res/layout/activity.xml
rc/main/res/layout/layout.xml
rc/main/res/menu/my.xml
rc/main/res/values/dimens.xml
rc/main/res/values/strings.xml
rc/main/res/values/styles.xml