public abstract class RenderParams
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static long |
DEFAULT_TIMEOUT |
| Constructor and Description |
|---|
RenderParams(java.lang.Object projectKey,
HardwareConfig hardwareConfig,
RenderResources renderResources,
LayoutlibCallback layoutlibCallback,
int minSdkVersion,
int targetSdkVersion,
LayoutLog log) |
RenderParams(RenderParams params)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getActivityName() |
ResourceValue |
getAppIcon()
Returns the application icon resource, or null if there is no icon.
|
java.lang.String |
getAppLabel()
Returns the application label, or null if there is no label.
|
AssetRepository |
getAssets() |
ScreenSize |
getConfigScreenSize()
Deprecated.
|
Density |
getDensity()
Deprecated.
|
<T> T |
getFlag(SessionParams.Key<T> key) |
float |
getFontScale()
Returns the user preference for the font scaling factor.
|
HardwareConfig |
getHardwareConfig() |
IImageFactory |
getImageFactory() |
LayoutlibCallback |
getLayoutlibCallback() |
java.lang.String |
getLocale() |
LayoutLog |
getLog() |
int |
getMinSdkVersion() |
int |
getOverrideBgColor()
Deprecated.
background color may only be overridden with transparent background. If for some
reason in the future one wants to override background with a specific color one can do it
in studio and drawing the image with transparent background on top.
|
java.lang.Object |
getProjectKey() |
RenderResources |
getResources() |
int |
getScreenHeight()
Deprecated.
|
int |
getScreenWidth()
Deprecated.
|
int |
getTargetSdkVersion() |
long |
getTimeout() |
float |
getXdpi()
Deprecated.
|
float |
getYdpi()
Deprecated.
|
boolean |
isBgColorOverridden()
Deprecated.
use
isTransparentBackground() instead |
boolean |
isForceNoDecor() |
boolean |
isQuickStepEnabled() |
boolean |
isRtlSupported() |
boolean |
isTransparentBackground() |
void |
setActivityName(java.lang.String activityName) |
void |
setAppIcon(ResourceValue appIcon)
Sets the application icon resource, or null if there is no icon.
|
void |
setAppLabel(java.lang.String appLabel)
Sets the application label, or null if there is no label.
|
void |
setAssetRepository(AssetRepository assetRepository) |
<T> void |
setFlag(SessionParams.Key<T> key,
T value) |
void |
setFontScale(float fontScale)
Sets user preference for the scaling factor for fonts, relative to the base density scaling.
|
void |
setForceNoDecor() |
void |
setImageFactory(IImageFactory imageFactory) |
void |
setLocale(java.lang.String locale) |
void |
setQuickStep(boolean quickStep)
Enables/disables the quick step mode in the device.
|
void |
setRtlSupport(boolean supportsRtl) |
void |
setTimeout(long timeout) |
void |
setTransparentBackground() |
public static final long DEFAULT_TIMEOUT
public RenderParams(java.lang.Object projectKey,
HardwareConfig hardwareConfig,
RenderResources renderResources,
LayoutlibCallback layoutlibCallback,
int minSdkVersion,
int targetSdkVersion,
LayoutLog log)
projectKey - An Object identifying the project. This is used for the cache mechanism.hardwareConfig - the HardwareConfig.renderResources - a RenderResources object providing access to the resources.layoutlibCallback - The LayoutlibCallback object to get information from
the project.minSdkVersion - the minSdkVersion of the projecttargetSdkVersion - the targetSdkVersion of the projectlog - the object responsible for displaying warning/errors to the user.public RenderParams(RenderParams params)
public void setTransparentBackground()
public void setTimeout(long timeout)
public void setImageFactory(IImageFactory imageFactory)
public void setAppIcon(@Nullable
ResourceValue appIcon)
public void setAppLabel(@Nullable
java.lang.String appLabel)
public void setLocale(java.lang.String locale)
public void setActivityName(java.lang.String activityName)
public void setForceNoDecor()
public void setRtlSupport(boolean supportsRtl)
public void setAssetRepository(AssetRepository assetRepository)
public void setQuickStep(boolean quickStep)
public void setFontScale(float fontScale)
android.content.res.Configuration#fontScalepublic float getFontScale()
android.content.res.Configuration#fontScalepublic java.lang.Object getProjectKey()
public HardwareConfig getHardwareConfig()
public int getMinSdkVersion()
public int getTargetSdkVersion()
@Deprecated public int getScreenWidth()
getHardwareConfig()@Deprecated public int getScreenHeight()
getHardwareConfig()@Deprecated public Density getDensity()
getHardwareConfig()@Deprecated public float getXdpi()
getHardwareConfig()@Deprecated public float getYdpi()
getHardwareConfig()public RenderResources getResources()
public AssetRepository getAssets()
public LayoutlibCallback getLayoutlibCallback()
public LayoutLog getLog()
public boolean isTransparentBackground()
@Deprecated public boolean isBgColorOverridden()
isTransparentBackground() instead@Deprecated public int getOverrideBgColor()
public long getTimeout()
public IImageFactory getImageFactory()
@Deprecated public ScreenSize getConfigScreenSize()
getHardwareConfig()@Nullable public final ResourceValue getAppIcon()
@Nullable public final java.lang.String getAppLabel()
public final java.lang.String getLocale()
public final java.lang.String getActivityName()
public final boolean isForceNoDecor()
public final boolean isRtlSupported()
public final boolean isQuickStepEnabled()
public <T> void setFlag(SessionParams.Key<T> key, T value)
public <T> T getFlag(SessionParams.Key<T> key)