aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xeclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PaletteControl.java7
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PreviewIconFactory.java2
-rw-r--r--layoutlib_api/src/com/android/ide/common/rendering/api/Capability.java2
3 files changed, 6 insertions, 5 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PaletteControl.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PaletteControl.java
index 69f2867..f8b3109 100755
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PaletteControl.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PaletteControl.java
@@ -324,10 +324,10 @@ public class PaletteControl extends Composite {
/** Returns true if previews in the palette should be made available */
private boolean previewsAvailable() {
- // Not layoutlib 5 -- we require transparency/custom background support to do
+ // Not layoutlib 5 -- we require custom background support to do
// a decent job with previews
LayoutLibrary layoutLibrary = mEditor.getLayoutLibrary();
- return layoutLibrary != null && layoutLibrary.supports(Capability.TRANSPARENCY);
+ return layoutLibrary != null && layoutLibrary.supports(Capability.CUSTOM_BACKGROUND_COLOR);
}
/**
@@ -805,7 +805,8 @@ public class PaletteControl extends Composite {
Integer overrideBgColor = null;
boolean hasTransparency = false;
LayoutLibrary layoutLibrary = editor.getLayoutLibrary();
- if (layoutLibrary != null && layoutLibrary.supports(Capability.TRANSPARENCY)) {
+ if (layoutLibrary != null &&
+ layoutLibrary.supports(Capability.CUSTOM_BACKGROUND_COLOR)) {
// It doesn't matter what the background color is as long as the alpha
// is 0 (fully transparent). We're using red to make it more obvious if
// for some reason the background is painted when it shouldn't be.
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PreviewIconFactory.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PreviewIconFactory.java
index e3e9e05..1b48c7c 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PreviewIconFactory.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PreviewIconFactory.java
@@ -187,7 +187,7 @@ public class PreviewIconFactory {
LayoutLibrary layoutLibrary = editor.getLayoutLibrary();
Integer overrideBgColor = null;
if (layoutLibrary != null) {
- if (layoutLibrary.supports(Capability.TRANSPARENCY)) {
+ if (layoutLibrary.supports(Capability.CUSTOM_BACKGROUND_COLOR)) {
Pair<RGB, RGB> themeColors = getColorsFromTheme();
RGB bg = themeColors.getFirst();
RGB fg = themeColors.getSecond();
diff --git a/layoutlib_api/src/com/android/ide/common/rendering/api/Capability.java b/layoutlib_api/src/com/android/ide/common/rendering/api/Capability.java
index fc390db..ff6777b 100644
--- a/layoutlib_api/src/com/android/ide/common/rendering/api/Capability.java
+++ b/layoutlib_api/src/com/android/ide/common/rendering/api/Capability.java
@@ -25,7 +25,7 @@ public enum Capability {
UNBOUND_RENDERING,
/** Ability to override the background of the rendering with transparency using
* {@link SceneParams#setCustomBackgroundColor(int)} */
- TRANSPARENCY,
+ CUSTOM_BACKGROUND_COLOR,
/** Ability to call {@link LayoutScene#render()} and {@link LayoutScene#render(long)}. */
RENDER,
/**