Stay organized with collections
Save and categorize content based on your preferences.
DensitySplit
interface DensitySplit : Split
DSL object for configuring per-density splits options.
See APK Splits.
Summary
Public functions |
Unit |
Adds a new compatible screen.
|
Public functions
Public properties
compatibleScreens
val compatibleScreens: MutableSet<String>
A list of compatible screens.
This will inject a matching <compatible-screens><screen ...>
node in the manifest. This is optional.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# DensitySplit\n============\n\n\n```\ninterface DensitySplit : Split\n```\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nDSL object for configuring per-density splits options.\n\nSee [APK Splits](https://developer.android.com/studio/build/configure-apk-splits.html).\n\nSummary\n-------\n\n| ### Public functions ||\n|------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [compatibleScreens](/reference/tools/gradle-api/8.0/com/android/build/api/dsl/DensitySplit#compatibleScreens(kotlin.Array))`(vararg sizes: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Adds a new compatible screen. |\n\n| ### Public properties ||\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|\n| [MutableSet](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)`\u003c`[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`\u003e` | [compatibleScreens](/reference/tools/gradle-api/8.0/com/android/build/api/dsl/DensitySplit#compatibleScreens()) A list of compatible screens. |\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [isStrict](/reference/tools/gradle-api/8.0/com/android/build/api/dsl/DensitySplit#isStrict()) TODO: Document. |\n\n| ### Inherited functions ||\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| From class [com.android.build.api.dsl.Split](/reference/tools/gradle-api/8.0/com/android/build/api/dsl/Split) |------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [exclude](/reference/tools/gradle-api/8.0/com/android/build/api/dsl/Split#exclude(kotlin.Array))`(vararg excludes: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Excludes some values | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [include](/reference/tools/gradle-api/8.0/com/android/build/api/dsl/Split#include(kotlin.Array))`(vararg includes: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Includes some values | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [reset](/reference/tools/gradle-api/8.0/com/android/build/api/dsl/Split#reset())`()` Resets the list of included split configuration. | |\n\n| ### Inherited properties ||\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| From class [com.android.build.api.dsl.Split](/reference/tools/gradle-api/8.0/com/android/build/api/dsl/Split) |------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------| | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [isEnable](/reference/tools/gradle-api/8.0/com/android/build/api/dsl/Split#isEnable()) Whether to split in this dimension. | |\n\nPublic functions\n----------------\n\n### compatibleScreens\n\n```\nfun compatibleScreens(vararg sizes: String): Unit\n```\n\nAdds a new compatible screen.\n\nPublic properties\n-----------------\n\n### compatibleScreens\n\n```\nval compatibleScreens: MutableSet\u003cString\u003e\n```\n\nA list of compatible screens.\n\nThis will inject a matching `\u003ccompatible-screens\u003e\u003cscreen ...\u003e` node in the manifest. This is optional. \n\n### isStrict\n\n```\nvar isStrict: Boolean\n```\n\nTODO: Document."]]