Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Merge pull request #11494 from t895/orientation-jank
Android: Rewrite Wii system updates in Kotlin
- Loading branch information
Showing
14 changed files
with
384 additions
and
513 deletions.
There are no files selected for viewing
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 was deleted.
Oops, something went wrong.
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,40 @@ | ||
| // SPDX-License-Identifier: GPL-2.0-or-later | ||
|
|
||
| package org.dolphinemu.dolphinemu.features.sysupdate.ui | ||
|
|
||
| import android.app.Dialog | ||
| import android.content.DialogInterface | ||
| import android.os.Bundle | ||
| import androidx.fragment.app.DialogFragment | ||
| import androidx.lifecycle.ViewModelProvider | ||
| import com.google.android.material.dialog.MaterialAlertDialogBuilder | ||
| import org.dolphinemu.dolphinemu.R | ||
|
|
||
| class OnlineUpdateRegionSelectDialogFragment : DialogFragment() { | ||
| override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { | ||
| val items = arrayOf( | ||
| getString(R.string.country_europe), | ||
| getString(R.string.country_japan), | ||
| getString(R.string.country_korea), | ||
| getString(R.string.country_usa) | ||
| ) | ||
| val checkedItem = -1 | ||
| return MaterialAlertDialogBuilder(requireContext()) | ||
| .setTitle(R.string.region_select_title) | ||
| .setSingleChoiceItems(items, checkedItem) { _: DialogInterface?, which: Int -> | ||
| val viewModel = | ||
| ViewModelProvider(requireActivity())[SystemUpdateViewModel::class.java] | ||
| viewModel.region = which | ||
| SystemUpdateProgressBarDialogFragment().show( | ||
| parentFragmentManager, | ||
| SystemUpdateProgressBarDialogFragment.TAG | ||
| ) | ||
| dismiss() | ||
| } | ||
| .create() | ||
| } | ||
|
|
||
| companion object { | ||
| const val TAG = "OnlineUpdateRegionSelectDialogFragment" | ||
| } | ||
| } |
This file was deleted.
Oops, something went wrong.
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,31 @@ | ||
| // SPDX-License-Identifier: GPL-2.0-or-later | ||
|
|
||
| package org.dolphinemu.dolphinemu.features.sysupdate.ui | ||
|
|
||
| import android.app.Dialog | ||
| import android.content.DialogInterface | ||
| import android.os.Bundle | ||
| import androidx.fragment.app.DialogFragment | ||
| import com.google.android.material.dialog.MaterialAlertDialogBuilder | ||
| import org.dolphinemu.dolphinemu.R | ||
|
|
||
| class SystemMenuNotInstalledDialogFragment : DialogFragment() { | ||
| override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { | ||
| return MaterialAlertDialogBuilder(requireContext()) | ||
| .setTitle(R.string.system_menu_not_installed_title) | ||
| .setMessage(R.string.system_menu_not_installed_message) | ||
| .setPositiveButton(R.string.yes) { _: DialogInterface?, _: Int -> | ||
| OnlineUpdateRegionSelectDialogFragment().show( | ||
| parentFragmentManager, | ||
| OnlineUpdateRegionSelectDialogFragment.TAG | ||
| ) | ||
| dismiss() | ||
| } | ||
| .setNegativeButton(R.string.no) { _: DialogInterface?, _: Int -> dismiss() } | ||
| .create() | ||
| } | ||
|
|
||
| companion object { | ||
| const val TAG = "SystemMenuNotInstalledDialogFragment" | ||
| } | ||
| } |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.