This repository has been archived by the owner on May 26, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add hasHint(resId: Int) and hasError(resId: Int) for KEditTextLayout
* Added hasHint(@StringRes resId: Int) * Update hint * Add hasError(@StringRes resId: Int) * Add hasError(@StringRes resId: Int) tests * Extract getResource Co-authored-by: Konstantin Aksenov <aksenov.kostya@gmail.com>
- Loading branch information
Showing
5 changed files
with
31 additions
and
2 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
kakao/src/main/kotlin/com/agoda/kakao/common/utilities/ContextUtils.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.agoda.kakao.common.utilities | ||
|
||
import android.content.Context | ||
import androidx.annotation.StringRes | ||
import androidx.test.platform.app.InstrumentationRegistry | ||
|
||
fun getResourceString(@StringRes resId: Int): String { | ||
val targetContext: Context = InstrumentationRegistry.getInstrumentation().targetContext | ||
return targetContext.resources.getString(resId) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<string name="hint">This is the HINT!</string> | ||
<string name="error">This is the ERROR!</string> | ||
</resources> |