mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-15 10:27:17 +01:00
25 lines
942 B
Java
25 lines
942 B
Java
package androidx.appcompat.widget;
|
|
|
|
import android.view.View;
|
|
import android.view.ViewParent;
|
|
import android.view.inputmethod.EditorInfo;
|
|
import android.view.inputmethod.InputConnection;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
/* loaded from: classes.dex */
|
|
class AppCompatHintHelper {
|
|
private AppCompatHintHelper() {
|
|
}
|
|
|
|
public static InputConnection onCreateInputConnection(InputConnection inputConnection, EditorInfo editorInfo, View view) {
|
|
if (inputConnection != null && editorInfo.hintText == null) {
|
|
for (ViewParent parent = view.getParent(); parent instanceof View; parent = parent.getParent()) {
|
|
if (parent instanceof WithHint) {
|
|
editorInfo.hintText = ((WithHint) parent).getHint();
|
|
return inputConnection;
|
|
}
|
|
}
|
|
}
|
|
return inputConnection;
|
|
}
|
|
}
|