# SettingsViewModel

class SettingsViewModel(application: Application) : AndroidViewModel
Content copied to clipboard

View model for settings fragment.

## Constructors

SettingsViewModel
Link copied to clipboard
fun SettingsViewModel(application: Application)
Content copied to clipboard

## Properties

_changeLanguageButtonEnable
Link copied to clipboard
private var _changeLanguageButtonEnable: MutableLiveData<Boolean>
Content copied to clipboard
_changeServerAddressButtonEnable
Link copied to clipboard
private var _changeServerAddressButtonEnable: MutableLiveData<Boolean>
Content copied to clipboard
_progressBarTextViewVisibility
Link copied to clipboard
private var _progressBarTextViewVisibility: MutableLiveData<Int>
Content copied to clipboard
_progressBarVisibility
Link copied to clipboard
private var _progressBarVisibility: MutableLiveData<Int>
Content copied to clipboard
_refreshServerStateButtonEnable
Link copied to clipboard
private var _refreshServerStateButtonEnable: MutableLiveData<Boolean>
Content copied to clipboard
_serverState
Link copied to clipboard
private var _serverState: MutableLiveData<String>
Content copied to clipboard
_serverStateColor
Link copied to clipboard
private var _serverStateColor: MutableLiveData<Drawable>
Content copied to clipboard
actualIpAddress
Link copied to clipboard
var actualIpAddress: String
Content copied to clipboard
actualLanguage
Link copied to clipboard
lateinit var actualLanguage: String
Content copied to clipboard
changeLanguageButtonEnable
Link copied to clipboard
val changeLanguageButtonEnable: LiveData<Boolean>
Content copied to clipboard
changeServerAddressButtonEnable
Link copied to clipboard
val changeServerAddressButtonEnable: LiveData<Boolean>
Content copied to clipboard
communicationService
Link copied to clipboard
private var communicationService: CommunicationService
Content copied to clipboard
progressBarTextViewVisibility
Link copied to clipboard
var progressBarTextViewVisibility: LiveData<Int>
Content copied to clipboard
progressBarVisibility
Link copied to clipboard
var progressBarVisibility: LiveData<Int>
Content copied to clipboard
refreshServerStateButtonEnable
Link copied to clipboard
val refreshServerStateButtonEnable: LiveData<Boolean>
Content copied to clipboard
serverState
Link copied to clipboard
val serverState: LiveData<String>
Content copied to clipboard
serverStateColor
Link copied to clipboard
val serverStateColor: LiveData<Drawable>
Content copied to clipboard
settingsSharedPreferences
Link copied to clipboard
private var settingsSharedPreferences: SettingsSharedPreferences
Content copied to clipboard

## Inherited properties

mApplication
Link copied to clipboard
private val mApplication: Application
Content copied to clipboard
mBagOfTags
Link copied to clipboard
@Nullable
private val mBagOfTags: MutableMap<String, Any>?
Content copied to clipboard
mCleared
Link copied to clipboard
private val mCleared: Boolean
Content copied to clipboard

## Functions

getActualLanguage
Link copied to clipboard
fun getActualLanguage(context: Context): String
Content copied to clipboard

Function that returns the full name of the current language, depending on the local language code.

getServerState
Link copied to clipboard
fun getServerState(activity: Activity, context: Context)
Content copied to clipboard

Get server state.

## Inherited functions

clear
Link copied to clipboard
@MainThread
fun clear()
Content copied to clipboard
getApplication
Link copied to clipboard
@NonNull
open fun <T : Application> getApplication(): T
Content copied to clipboard
getTag
Link copied to clipboard
open fun <T : Any> getTag(p0: String): T
Content copied to clipboard
onCleared
Link copied to clipboard
open fun onCleared()
Content copied to clipboard
setTagIfAbsent
Link copied to clipboard
open fun <T : Any> setTagIfAbsent(p0: String, p1: T): T
Content copied to clipboard