KeyBoardUtil
Class Initialize
class KeyBoardUtil(val activity : AppCompatActivity)
| Name | Description | Type |
|---|
| activity | activity ที่มีการ extends AppCompatActivity | AppCompatActivity |
Variables class
| Name | Description | Type | Default | Variable Type |
|---|
| imm | InputMethodManager ที่ไว้เข้าถึง Soft Keyboard | InputMethodManager | activity.getSystemService(Activity.INPUT_METHOD_SERVICE) as InputMethodManager | var |
| view | view ที่ focus อยู่ เพื่อสั่งงาน Soft Keyboard | View | activity.currentFocus ?: View(activity) | var |
Method Overview
| Name | Description | Return |
|---|
| hideKeyboard() | ซ่อน Soft Keyboard | Bololean |
Method Details
fun hideKeyboard() : Boolean
ซ่อน Soft Keyboard
Returns
| Type | Description |
|---|
| Boolean | Return true เมื่อเสร็จสิ้น และ Return false เมื่อผิดพลาด |