ADD week 5
This commit is contained in:
		| @@ -0,0 +1,29 @@ | ||||
| package androidx.appcompat.widget; | ||||
|  | ||||
| import android.view.View; | ||||
| import android.view.ViewParent; | ||||
| import android.view.inputmethod.EditorInfo; | ||||
| import android.view.inputmethod.InputConnection; | ||||
|  | ||||
| /* loaded from: classes.dex */ | ||||
| class AppCompatHintHelper { | ||||
|     static InputConnection onCreateInputConnection(InputConnection inputConnection, EditorInfo editorInfo, View view) { | ||||
|         if (inputConnection != null && editorInfo.hintText == null) { | ||||
|             ViewParent parent = view.getParent(); | ||||
|             while (true) { | ||||
|                 if (!(parent instanceof View)) { | ||||
|                     break; | ||||
|                 } | ||||
|                 if (parent instanceof WithHint) { | ||||
|                     editorInfo.hintText = ((WithHint) parent).getHint(); | ||||
|                     break; | ||||
|                 } | ||||
|                 parent = parent.getParent(); | ||||
|             } | ||||
|         } | ||||
|         return inputConnection; | ||||
|     } | ||||
|  | ||||
|     private AppCompatHintHelper() { | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user