Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Ctors](https://developer.android.com/reference/android/text/InputFilter.AllCaps#pubctors) \| [Methods](https://developer.android.com/reference/android/text/InputFilter.AllCaps#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/text/InputFilter.AllCaps#inhmethods)

# InputFilter.AllCaps

*** ** * ** ***

` public static class InputFilter.AllCaps `   
` extends https://developer.android.com/reference/java/lang/Object ` ` implements https://developer.android.com/reference/android/text/InputFilter `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.text.InputFilter.AllCaps |

<br />

*** ** * ** ***

This filter will capitalize all the lowercase and titlecase letters that are added through edits. (Note that if there are no lowercase or titlecase letters in the input, the text would not be transformed, even if the result of capitalization of the string is different from the string.)

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/text/InputFilter.AllCaps#AllCaps()() ` |
| ` https://developer.android.com/reference/android/text/InputFilter.AllCaps#AllCaps(java.util.Locale)(https://developer.android.com/reference/java/util/Locale locale) ` Constructs a locale-specific AllCaps filter, to make sure capitalization rules of that locale are used for transforming the sequence. |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/text/InputFilter.AllCaps#filter(java.lang.CharSequence,%20int,%20int,%20android.text.Spanned,%20int,%20int)(https://developer.android.com/reference/java/lang/CharSequence source, int start, int end, https://developer.android.com/reference/android/text/Spanned dest, int dstart, int dend) ` This method is called when the buffer is going to replace the range `dstart ... dend` of `dest` with the new text from the range `start ... end` of `source`. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.
From interface ` https://developer.android.com/reference/android/text/InputFilter ` ` abstract https://developer.android.com/reference/java/lang/CharSequence` ` https://developer.android.com/reference/android/text/InputFilter#filter(java.lang.CharSequence,%20int,%20int,%20android.text.Spanned,%20int,%20int)(https://developer.android.com/reference/java/lang/CharSequence source, int start, int end, https://developer.android.com/reference/android/text/Spanned dest, int dstart, int dend) `

This method is called when the buffer is going to replace the range `dstart ... dend` of `dest` with the new text from the range `start ... end` of `source`.

## Public constructors

### AllCaps

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AllCaps ()
```

<br />

<br />

### AllCaps

Added in [API level 27](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AllCaps (Locale locale)
```

Constructs a locale-specific AllCaps filter, to make sure capitalization rules of that locale are used for transforming the sequence.

<br />

| Parameters ||
|---|---|
| `locale` | `Locale`: This value cannot be `null`. <br /> |

## Public methods

### filter

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public CharSequence filter (CharSequence source, 
                int start, 
                int end, 
                Spanned dest, 
                int dstart, 
                int dend)
```

This method is called when the buffer is going to replace the range `dstart ... dend` of `dest` with the new text from the range `start ... end` of `source`. Return the CharSequence that you would like to have placed there instead, including an empty string if appropriate, or `null` to accept the original replacement. Be careful to not to reject 0-length replacements, as this is what happens when you delete text. Also beware that you should not attempt to make any changes to `dest` from this method; you may only examine it for context. Note: If <var translate="no">source</var> is an instance of `https://developer.android.com/reference/android/text/Spanned` or `https://developer.android.com/reference/android/text/Spannable`, the span objects in the <var translate="no">source</var> should be copied into the filtered result (i.e. the non-null return value). `https://developer.android.com/reference/android/text/TextUtils#copySpansFrom(android.text.Spanned,%20int,%20int,%20java.lang.Class,%20android.text.Spannable,%20int)` can be used for convenience if the span boundary indices would be remaining identical relative to the source.

<br />

| Parameters ||
|---|---|
| `source` | `CharSequence` <br /> |
| `start` | `int` <br /> |
| `end` | `int` <br /> |
| `dest` | `Spanned` <br /> |
| `dstart` | `int` <br /> |
| `dend` | `int` <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | <br /> |