Replace hardcoded strings with strings from resources

This commit is contained in:
Alex Sytnyk 2018-07-02 11:58:39 +03:00
parent 734b53abd6
commit add6499830
2 changed files with 3 additions and 2 deletions

View file

@ -1,4 +1,5 @@
<resources>
<string name="shared_string_install">Install</string>
<string name="shared_string_share">Share</string>
<string name="shared_string_back">Back</string>
<string name="visible_time_for_all">Visible time for all</string>

View file

@ -391,8 +391,8 @@ class MainActivity : AppCompatActivity(), TelegramListener, ActionButtonsListene
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
val builder = AlertDialog.Builder(requireContext())
builder.setView(R.layout.install_osmand_dialog)
.setNegativeButton("Cancel", null)
.setPositiveButton("Install") { _, _ ->
.setNegativeButton(R.string.shared_string_cancel, null)
.setPositiveButton(R.string.shared_string_install) { _, _ ->
val intent = Intent()
intent.data = Uri.parse("market://details?id=net.osmand.plus")
startActivity(intent)