Package org.robolectric.res
Class Qualifiers
java.lang.Object
org.robolectric.res.Qualifiers
public class Qualifiers extends Object
Android qualifers as defined by
https://developer.android.com/guide/topics/resources/providing-resources.html
-
Constructor Summary
Constructors Modifier Constructor Description protected
Qualifiers(String qualifiers, ResTable_config config)
-
Method Summary
Modifier and Type Method Description static String
addPlatformVersion(String qualifiers, int apiLevel)
Deprecated.Figure something else out.static String
addScreenWidth(String qualifiers, int screenWidth)
Deprecated.UseConfiguration.screenWidthDp
instead.static String
addSmallestScreenWidth(String qualifiers, int smallestScreenWidth)
Deprecated.UseConfiguration.smallestScreenWidthDp
instead.static Qualifiers
fromParentDir(Path parentDir)
ResTable_config
getConfig()
static String
getOrientation(String qualifiers)
Deprecated.UseConfiguration.orientation
instead.static int
getPlatformVersion(String qualifiers)
Deprecated.UseBuild.VERSION.SDK_INT
instead.static int
getScreenWidth(String qualifiers)
Deprecated.UseConfiguration.screenWidthDp
instead.static int
getSmallestScreenWidth(String qualifiers)
Deprecated.UseConfiguration.smallestScreenWidthDp
instead.static Qualifiers
parse(String qualifiers)
static Qualifiers
parse(String qualifiers, boolean applyVersionForCompat)
String
toString()
-
Constructor Details
-
Method Details
-
parse
-
parse
-
getConfig
-
toString
-
fromParentDir
-
getPlatformVersion
Deprecated.UseBuild.VERSION.SDK_INT
instead. -
getSmallestScreenWidth
Deprecated.UseConfiguration.smallestScreenWidthDp
instead. -
addPlatformVersion
Deprecated.Figure something else out.If the Config already has a version qualifier, do nothing. Otherwise, add a version qualifier for the target api level (which comes from the manifest or Config.sdk()). -
addSmallestScreenWidth
@Deprecated public static String addSmallestScreenWidth(String qualifiers, int smallestScreenWidth)Deprecated.UseConfiguration.smallestScreenWidthDp
instead.If the Config already has asw
qualifier, do nothing. Otherwise, add asw
qualifier for the given width. -
getScreenWidth
Deprecated.UseConfiguration.screenWidthDp
instead. -
addScreenWidth
Deprecated.UseConfiguration.screenWidthDp
instead. -
getOrientation
Deprecated.UseConfiguration.orientation
instead.
-