Commit b3d089ce authored by Govind Dixit's avatar Govind Dixit

made requested changes

parent 9063863c
...@@ -254,7 +254,13 @@ class MainActivity : AppCompatActivity(), MainView, HasActivityInjector, ...@@ -254,7 +254,13 @@ class MainActivity : AppCompatActivity(), MainView, HasActivityInjector,
fun setCheckedNavDrawerItem(@IdRes item: Int) = view_navigation.setCheckedItem(item) fun setCheckedNavDrawerItem(@IdRes item: Int) = view_navigation.setCheckedItem(item)
override fun showProgress() { override fun showProgress() {
progressDialog = ProgressDialog.show(this, getString(R.string.app_name), getString(R.string.msg_log_out), true, false) progressDialog = ProgressDialog.show(
this,
getString(R.string.app_name),
getString(R.string.msg_log_out),
true,
false
)
} }
override fun hideProgress() { override fun hideProgress() {
...@@ -268,22 +274,28 @@ class MainActivity : AppCompatActivity(), MainView, HasActivityInjector, ...@@ -268,22 +274,28 @@ class MainActivity : AppCompatActivity(), MainView, HasActivityInjector,
val builder = AlertDialog.Builder(this) val builder = AlertDialog.Builder(this)
builder.setTitle("Choose Language") builder.setTitle("Choose Language")
builder.setSingleChoiceItems(languages, -1) { dialog, which -> builder.setSingleChoiceItems(languages, -1) { dialog, which ->
if (which == 0) { when(which){
0->{
setLocale("en") setLocale("en")
recreate() recreate()
} else if (which == 1) { }
1->{
setLocale("hi") setLocale("hi")
recreate() recreate()
} else if (which == 2) { }
2->{
setLocale("ja") setLocale("ja")
recreate() recreate()
} else if (which == 3) { }
3->{
setLocale("ru") setLocale("ru")
recreate() recreate()
} else if (which == 4) { }
4->{
setLocale("it") setLocale("it")
recreate() recreate()
} }
}
dialog.dismiss() dialog.dismiss()
} }
val mdialog = builder.create() val mdialog = builder.create()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment