-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/feature/BDBD-269' into stage/san…
…dbox
- Loading branch information
Showing
10 changed files
with
81 additions
and
75 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
app/src/main/kotlin/com/fakedevelopers/bidderbidder/HiltApplication.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 |
---|---|---|
@@ -1,14 +1,28 @@ | ||
package com.fakedevelopers.bidderbidder | ||
|
||
import android.app.Application | ||
import android.text.Spannable | ||
import android.text.SpannableStringBuilder | ||
import android.text.style.ForegroundColorSpan | ||
import com.orhanobut.logger.AndroidLogAdapter | ||
import com.orhanobut.logger.Logger | ||
import dagger.hilt.android.HiltAndroidApp | ||
|
||
@HiltAndroidApp | ||
class HiltApplication : Application() { | ||
|
||
override fun onCreate() { | ||
super.onCreate() | ||
Logger.addLogAdapter(AndroidLogAdapter()) | ||
} | ||
|
||
fun setPartialTextColor(text: CharSequence, colorId: Int, start: Int, end: Int) = | ||
SpannableStringBuilder(text).apply { | ||
setSpan( | ||
ForegroundColorSpan(applicationContext.getColor(colorId)), | ||
start, | ||
end, | ||
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE | ||
) | ||
} | ||
} |
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
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
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