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 methods
|
abstract Unit |
Adds a new compatible screen.
|
Inherited functions
|
From class Split
Unit |
exclude(vararg excludes: String)
Excludes some values
|
Unit |
include(vararg includes: String)
Includes some values
|
Unit |
reset()
Resets the list of included split configuration.
Use this before calling include, in order to manually configure the list of configuration
to split on, rather than excluding from the default list.
|
|
Public methods
compatibleScreens
@Incubating abstract fun compatibleScreens(vararg sizes: String): Unit
Adds a new compatible screen.
Properties
compatibleScreens
abstract val compatibleScreens: MutableSet<String>
A list of compatible screens.
This will inject a matching <compatible-screens><screen ...>
node in the manifest.
This is optional.
isStrict
abstract var isStrict: Boolean
TODO: Document.
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```\ninterface DensitySplit : Split\n```\n\n|---------------------------------------------|\n| [com.android.build.api.dsl.DensitySplit](#) |\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 methods ||\n|---------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [compatibleScreens](#compatibleScreens(kotlin.String))`(`vararg` `sizes:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Adds a new compatible screen. |\n\n| ### Inherited functions ||\n|---|---|\n| From class [Split](/reference/tools/gradle-api/7.1/com/android/build/api/dsl/Split) |------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [exclude](/reference/tools/gradle-api/7.1/com/android/build/api/dsl/Split#exclude(kotlin.String))`(`vararg` `excludes:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Excludes some values \u003cbr /\u003e | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [include](/reference/tools/gradle-api/7.1/com/android/build/api/dsl/Split#include(kotlin.String))`(`vararg` `includes:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Includes some values \u003cbr /\u003e | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [reset](/reference/tools/gradle-api/7.1/com/android/build/api/dsl/Split#reset())`()` Resets the list of included split configuration. Use this before calling include, in order to manually configure the list of configuration to split on, rather than excluding from the default list. \u003cbr /\u003e | ||\n\n| ### Properties ||\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------|\n| abstract [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](#compatibleScreens:kotlin.collections.MutableSet) A list of compatible screens. |\n| abstract [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [isStrict](#isStrict:kotlin.Boolean) TODO: Document. |\n\n| ### Inherited properties ||\n|---|---|\n| From class [Split](/reference/tools/gradle-api/7.1/com/android/build/api/dsl/Split) |------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------| | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [isEnable](/reference/tools/gradle-api/7.1/com/android/build/api/dsl/Split#isEnable:kotlin.Boolean) Whether to split in this dimension. \u003cbr /\u003e | ||\n\nPublic methods\n--------------\n\n### compatibleScreens\n\n```\n@Incubating abstract fun compatibleScreens(vararg sizes: String): Unit\n```\n\nAdds a new compatible screen.\n\nProperties\n----------\n\n### compatibleScreens\n\n```\nabstract val 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.\nThis is optional. \n\n### isStrict\n\n```\nabstract var isStrict: Boolean\n```\n\nTODO: Document."]]