This file contains hidden or 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
@echo off | |
:: change the path below to match your installed version | |
SET AndroidStudioPath=C:\Program Files\Android\Android Studio\bin\studio64.exe | |
echo Adding file entries | |
@reg add "HKEY_CLASSES_ROOT\*\shell\AndroidStudio" /t REG_SZ /v "" /d "Open with AndroidStudio" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\AndroidStudio" /t REG_EXPAND_SZ /v "Icon" /d "%AndroidStudioPath%,0" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\AndroidStudio\command" /t REG_SZ /v "" /d "%AndroidStudioPath% \"%%1\"" /f | |
This file contains hidden or 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
sealed class UiText { | |
class DynamicText(val text: String) : UiText() | |
class ResourceText(@StringRes val stringRes: Int) : UiText() | |
} | |
fun UiText.getString(context: Context) = when (this) { | |
is UiText.DynamicText -> text | |
is UiText.ResourceText -> context.getString(stringRes) |