am d985e3b6
: Merge changes Ib5f53f3b,I7debf3ee,Ic494ee7f,Ia8d223ae,Iff7dbbf6 into mnc-dev
* commit 'd985e3b61990837711d1f26def51caa76b9be473':
Revert to using AppTheme for LayoutLib tests.
Fix Matrix_Delegate.native_getValues()
Update test image for upated nav icons.
Fix typo: s/FullScreen/Fullscreen/ in LayoutLib.
Fix bugs introduced in 78aa664
.
This commit is contained in:
@ -673,7 +673,7 @@ public final class Matrix_Delegate {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
System.arraycopy(d.mValues, 0, d.mValues, 0, MATRIX_SIZE);
|
System.arraycopy(d.mValues, 0, values, 0, MATRIX_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@LayoutlibDelegate
|
@LayoutlibDelegate
|
||||||
|
@ -36,7 +36,6 @@ import java.awt.geom.PathIterator;
|
|||||||
import java.awt.geom.Point2D;
|
import java.awt.geom.Point2D;
|
||||||
import java.awt.geom.Rectangle2D;
|
import java.awt.geom.Rectangle2D;
|
||||||
import java.awt.geom.RoundRectangle2D;
|
import java.awt.geom.RoundRectangle2D;
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delegate implementing the native methods of android.graphics.Path
|
* Delegate implementing the native methods of android.graphics.Path
|
||||||
@ -504,13 +503,13 @@ public final class Path_Delegate {
|
|||||||
switch (type) {
|
switch (type) {
|
||||||
case PathIterator.SEG_MOVETO:
|
case PathIterator.SEG_MOVETO:
|
||||||
case PathIterator.SEG_LINETO:
|
case PathIterator.SEG_LINETO:
|
||||||
store(coords, tmp, 1, isFirstPoint);
|
store(tmp, coords, 1, isFirstPoint);
|
||||||
break;
|
break;
|
||||||
case PathIterator.SEG_QUADTO:
|
case PathIterator.SEG_QUADTO:
|
||||||
store(coords, tmp, 2, isFirstPoint);
|
store(tmp, coords, 2, isFirstPoint);
|
||||||
break;
|
break;
|
||||||
case PathIterator.SEG_CUBICTO:
|
case PathIterator.SEG_CUBICTO:
|
||||||
store(coords, tmp, 3, isFirstPoint);
|
store(tmp, coords, 3, isFirstPoint);
|
||||||
break;
|
break;
|
||||||
case PathIterator.SEG_CLOSE:
|
case PathIterator.SEG_CLOSE:
|
||||||
// No points returned.
|
// No points returned.
|
||||||
@ -528,14 +527,14 @@ public final class Path_Delegate {
|
|||||||
|
|
||||||
private static void store(float[] src, float[] dst, int count, boolean isFirst) {
|
private static void store(float[] src, float[] dst, int count, boolean isFirst) {
|
||||||
if (isFirst) {
|
if (isFirst) {
|
||||||
dst[0] = 0;
|
dst[0] = 0; // fraction
|
||||||
dst[1] = src[0];
|
dst[1] = src[0]; // abscissa
|
||||||
dst[2] = src[1];
|
dst[2] = src[1]; // ordinate
|
||||||
}
|
}
|
||||||
if (count > 1 || !isFirst) {
|
if (count > 1 || !isFirst) {
|
||||||
dst[3] = 1;
|
dst[3] = 1;
|
||||||
dst[4] = src[2 * count];
|
dst[4] = src[2 * count - 2];
|
||||||
dst[5] = src[2 * count + 1];
|
dst[5] = src[2 * count - 1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ class Layout extends RelativeLayout {
|
|||||||
// Theme attributes used for configuring appearance of the system decor.
|
// Theme attributes used for configuring appearance of the system decor.
|
||||||
private static final String ATTR_WINDOW_FLOATING = "windowIsFloating";
|
private static final String ATTR_WINDOW_FLOATING = "windowIsFloating";
|
||||||
private static final String ATTR_WINDOW_BACKGROUND = "windowBackground";
|
private static final String ATTR_WINDOW_BACKGROUND = "windowBackground";
|
||||||
private static final String ATTR_WINDOW_FULL_SCREEN = "windowFullScreen";
|
private static final String ATTR_WINDOW_FULL_SCREEN = "windowFullscreen";
|
||||||
private static final String ATTR_NAV_BAR_HEIGHT = "navigation_bar_height";
|
private static final String ATTR_NAV_BAR_HEIGHT = "navigation_bar_height";
|
||||||
private static final String ATTR_NAV_BAR_WIDTH = "navigation_bar_width";
|
private static final String ATTR_NAV_BAR_WIDTH = "navigation_bar_width";
|
||||||
private static final String ATTR_STATUS_BAR_HEIGHT = "status_bar_height";
|
private static final String ATTR_STATUS_BAR_HEIGHT = "status_bar_height";
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 5.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 636 B After Width: | Height: | Size: 566 B |
@ -329,8 +329,8 @@ public class Main {
|
|||||||
.setNavigation(Navigation.NONAV);
|
.setNavigation(Navigation.NONAV);
|
||||||
|
|
||||||
SessionParams params = getSessionParams(parser, customConfigGenerator,
|
SessionParams params = getSessionParams(parser, customConfigGenerator,
|
||||||
layoutLibCallback, "Theme.Material.NoActionBar.Fullscreen", RenderingMode.V_SCROLL,
|
layoutLibCallback, "Theme.Material.NoActionBar.Fullscreen", false,
|
||||||
22);
|
RenderingMode.V_SCROLL, 22);
|
||||||
|
|
||||||
renderAndVerify(params, "expand_vert_layout.png");
|
renderAndVerify(params, "expand_vert_layout.png");
|
||||||
|
|
||||||
@ -342,8 +342,8 @@ public class Main {
|
|||||||
parser = new LayoutPullParser(APP_TEST_RES + "/layout/" +
|
parser = new LayoutPullParser(APP_TEST_RES + "/layout/" +
|
||||||
"expand_horz_layout.xml");
|
"expand_horz_layout.xml");
|
||||||
params = getSessionParams(parser, customConfigGenerator,
|
params = getSessionParams(parser, customConfigGenerator,
|
||||||
layoutLibCallback, "Theme.Material.NoActionBar.Fullscreen", RenderingMode
|
layoutLibCallback, "Theme.Material.NoActionBar.Fullscreen", false,
|
||||||
.H_SCROLL, 22);
|
RenderingMode.H_SCROLL, 22);
|
||||||
|
|
||||||
renderAndVerify(params, "expand_horz_layout.png");
|
renderAndVerify(params, "expand_horz_layout.png");
|
||||||
}
|
}
|
||||||
@ -390,7 +390,7 @@ public class Main {
|
|||||||
// TODO: Set up action bar handler properly to test menu rendering.
|
// TODO: Set up action bar handler properly to test menu rendering.
|
||||||
// Create session params.
|
// Create session params.
|
||||||
SessionParams params = getSessionParams(parser, ConfigGenerator.NEXUS_5,
|
SessionParams params = getSessionParams(parser, ConfigGenerator.NEXUS_5,
|
||||||
layoutLibCallback, "Theme.Material.Light.DarkActionBar", RenderingMode.NORMAL, 22);
|
layoutLibCallback, "AppTheme", true, RenderingMode.NORMAL, 22);
|
||||||
renderAndVerify(params, goldenFileName);
|
renderAndVerify(params, goldenFileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -399,12 +399,12 @@ public class Main {
|
|||||||
*/
|
*/
|
||||||
private SessionParams getSessionParams(LayoutPullParser layoutParser,
|
private SessionParams getSessionParams(LayoutPullParser layoutParser,
|
||||||
ConfigGenerator configGenerator, LayoutLibTestCallback layoutLibCallback,
|
ConfigGenerator configGenerator, LayoutLibTestCallback layoutLibCallback,
|
||||||
String themeName, RenderingMode renderingMode, int targetSdk) {
|
String themeName, boolean isProjectTheme, RenderingMode renderingMode, int targetSdk) {
|
||||||
FolderConfiguration config = configGenerator.getFolderConfig();
|
FolderConfiguration config = configGenerator.getFolderConfig();
|
||||||
ResourceResolver resourceResolver =
|
ResourceResolver resourceResolver =
|
||||||
ResourceResolver.create(sProjectResources.getConfiguredResources(config),
|
ResourceResolver.create(sProjectResources.getConfiguredResources(config),
|
||||||
sFrameworkRepo.getConfiguredResources(config),
|
sFrameworkRepo.getConfiguredResources(config),
|
||||||
themeName, false);
|
themeName, isProjectTheme);
|
||||||
|
|
||||||
return new SessionParams(
|
return new SessionParams(
|
||||||
layoutParser,
|
layoutParser,
|
||||||
|
Reference in New Issue
Block a user