# WindowWidthSizeClass

# WindowWidthSizeClass

Artifact:[androidx.window:window-core](https://developer.android.com/jetpack/androidx/releases/window)  
[View Source](https://cs.android.com/search?q=file:androidx/window/core/layout/WindowWidthSizeClass.kt+class:androidx.window.core.layout.WindowWidthSizeClass)  
Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/window#1.1.0)  
Deprecated in[1.4.0](https://developer.android.com/jetpack/androidx/releases/window#1.4.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/window/core/layout/WindowWidthSizeClass "View this page in Java")
Common/All
  - Cmn  

  ```
  class WindowWidthSizeClass
  ```

*** ** * ** ***

| **This class is deprecated.**   
| WindowWidthSizeClass will not be developed further, use WindowSizeClass instead.

A class to represent the width size buckets for a viewport. The possible values are[COMPACT](https://developer.android.com/reference/kotlin/androidx/window/core/layout/WindowWidthSizeClass#COMPACT()),[MEDIUM](https://developer.android.com/reference/kotlin/androidx/window/core/layout/WindowWidthSizeClass#MEDIUM()), and[EXPANDED](https://developer.android.com/reference/kotlin/androidx/window/core/layout/WindowWidthSizeClass#EXPANDED()).[WindowWidthSizeClass](https://developer.android.com/reference/kotlin/androidx/window/core/layout/WindowWidthSizeClass)should not be used as a proxy for the device type. It is possible to have resizeable windows in different device types. The viewport might change from a[COMPACT](https://developer.android.com/reference/kotlin/androidx/window/core/layout/WindowWidthSizeClass#COMPACT())all the way to an[EXPANDED](https://developer.android.com/reference/kotlin/androidx/window/core/layout/WindowWidthSizeClass#EXPANDED())size class.

## Summary

|                                             ### Public companion properties                                             |
|-------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----|
| [WindowWidthSizeClass](https://developer.android.com/reference/kotlin/androidx/window/core/layout/WindowWidthSizeClass) | [COMPACT](https://developer.android.com/reference/kotlin/androidx/window/core/layout/WindowWidthSizeClass#COMPACT()) **This property is deprecated.**WindowWidthSizeClass not be developed further.   | Cmn |
| [WindowWidthSizeClass](https://developer.android.com/reference/kotlin/androidx/window/core/layout/WindowWidthSizeClass) | [EXPANDED](https://developer.android.com/reference/kotlin/androidx/window/core/layout/WindowWidthSizeClass#EXPANDED()) **This property is deprecated.**WindowWidthSizeClass not be developed further. | Cmn |
| [WindowWidthSizeClass](https://developer.android.com/reference/kotlin/androidx/window/core/layout/WindowWidthSizeClass) | [MEDIUM](https://developer.android.com/reference/kotlin/androidx/window/core/layout/WindowWidthSizeClass#MEDIUM()) **This property is deprecated.**WindowWidthSizeClass not be developed further.     | Cmn |

|                                        ### Public functions                                         |
|-----------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----|
| `open operator `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | ~~[equals](https://developer.android.com/reference/kotlin/androidx/window/core/layout/WindowWidthSizeClass#equals(kotlin.Any))~~`(other: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?)` **This function is deprecated.**WindowWidthSizeClass will not be developed further, use WindowSizeClass instead. | Cmn |
| `open `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                  | ~~[hashCode](https://developer.android.com/reference/kotlin/androidx/window/core/layout/WindowWidthSizeClass#hashCode())~~`()` **This function is deprecated.**WindowWidthSizeClass will not be developed further, use WindowSizeClass instead.                                                                                            | Cmn |
| `open `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)            | ~~[toString](https://developer.android.com/reference/kotlin/androidx/window/core/layout/WindowWidthSizeClass#toString())~~`()` **This function is deprecated.**WindowWidthSizeClass will not be developed further, use WindowSizeClass instead.                                                                                            | Cmn |

## Public companion properties

### COMPACT

Cmn  
Added in[1.4.0](https://developer.android.com/jetpack/androidx/releases/window#1.4.0)  
Deprecated in[1.4.0](https://developer.android.com/jetpack/androidx/releases/window#1.4.0)  

```
val COMPACT: WindowWidthSizeClass
```
| **This property is deprecated.**   
| WindowWidthSizeClass not be developed further.

A bucket to represent a compact width window, typical for a phone in portrait.  

### EXPANDED

Cmn  
Added in[1.4.0](https://developer.android.com/jetpack/androidx/releases/window#1.4.0)  
Deprecated in[1.4.0](https://developer.android.com/jetpack/androidx/releases/window#1.4.0)  

```
val EXPANDED: WindowWidthSizeClass
```
| **This property is deprecated.**   
| WindowWidthSizeClass not be developed further.

A bucket to represent an expanded width window, typical for a large tablet or desktop form-factor.  

### MEDIUM

Cmn  
Added in[1.4.0](https://developer.android.com/jetpack/androidx/releases/window#1.4.0)  
Deprecated in[1.4.0](https://developer.android.com/jetpack/androidx/releases/window#1.4.0)  

```
val MEDIUM: WindowWidthSizeClass
```
| **This property is deprecated.**   
| WindowWidthSizeClass not be developed further.

A bucket to represent a medium width window, typical for a phone in landscape or a tablet.

## Public functions

### equals

Cmn  

```
open operator fun [equals](https://developer.android.com/reference/kotlin/androidx/window/core/layout/WindowWidthSizeClass#equals(kotlin.Any))(other: Any?): Boolean
```
| **This function is deprecated.**   
WindowWidthSizeClass will not be developed further, use WindowSizeClass instead.  

### hashCode

Cmn  

```
open fun [hashCode](https://developer.android.com/reference/kotlin/androidx/window/core/layout/WindowWidthSizeClass#hashCode())(): Int
```
| **This function is deprecated.**   
WindowWidthSizeClass will not be developed further, use WindowSizeClass instead.  

### toString

Cmn  

```
open fun [toString](https://developer.android.com/reference/kotlin/androidx/window/core/layout/WindowWidthSizeClass#toString())(): String
```
| **This function is deprecated.**   
| WindowWidthSizeClass will not be developed further, use WindowSizeClass instead.