# TypeBuilders.StringLayoutConstraint

# TypeBuilders.StringLayoutConstraint

Artifact:[androidx.wear.protolayout:protolayout](https://developer.android.com/jetpack/androidx/releases/wear-protolayout)  
[View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/TypeBuilders.java+class:androidx.wear.protolayout.TypeBuilders.StringLayoutConstraint)  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/wear/protolayout/TypeBuilders.StringLayoutConstraint "View this page in Java")

<br />

```
@RequiresSchemaVersion(major = 1, minor = 200)
class TypeBuilders.StringLayoutConstraint
```

<br />

*** ** * ** ***

A type for specifying layout constraints when using[StringProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/TypeBuilders.StringProp)on a data bindable layout element.

## Summary

|                                                                                                                                                        ### Nested types                                                                                                                                                        |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `class `[TypeBuilders.StringLayoutConstraint.Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/TypeBuilders.StringLayoutConstraint.Builder) Builder for[StringLayoutConstraint](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/TypeBuilders.StringLayoutConstraint). |

|                                ### Public functions                                 |
|-------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [equals](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/TypeBuilders.StringLayoutConstraint#equals(java.lang.Object))`(o: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?)`                |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)         | [getAlignment](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/TypeBuilders.StringLayoutConstraint#getAlignment())`()` Gets angular alignment of the actual content within the space reserved by value.                    |
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)   | [getPatternForLayout](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/TypeBuilders.StringLayoutConstraint#getPatternForLayout())`()` Gets the text string to use as the pattern for the largest text that can be laid out. |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)         | [hashCode](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/TypeBuilders.StringLayoutConstraint#hashCode())`()`                                                                                                             |
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)   | [toString](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/TypeBuilders.StringLayoutConstraint#toString())`()`                                                                                                             |

## Public functions

### equals

```
fun equals(o: Any?): Boolean
```  

### getAlignment

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)  

```
fun getAlignment(): Int
```

Gets angular alignment of the actual content within the space reserved by value.  

### getPatternForLayout

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)  

```
fun getPatternForLayout(): String
```

Gets the text string to use as the pattern for the largest text that can be laid out. Used to ensure that the layout is of a known size during the layout pass.  

### hashCode

```
fun hashCode(): Int
```  

### toString

```
fun toString(): String
```