mirror of
				https://github.com/yggdrasil-network/yggdrasil-android.git
				synced 2025-11-04 11:15:08 +03:00 
			
		
		
		
	Added dialog buttons for all dialogs (#44)
This commit is contained in:
		
							parent
							
								
									ce50b01781
								
							
						
					
					
						commit
						2befe4eac4
					
				
					 2 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -127,7 +127,7 @@ class DnsActivity : AppCompatActivity() {
 | 
			
		|||
                    view.findViewById<ImageButton>(R.id.deletePeerButton).tag = i
 | 
			
		||||
 | 
			
		||||
                    view.findViewById<ImageButton>(R.id.deletePeerButton).setOnClickListener { button ->
 | 
			
		||||
                        val builder: AlertDialog.Builder = AlertDialog.Builder(this)
 | 
			
		||||
                        val builder: AlertDialog.Builder = AlertDialog.Builder(ContextThemeWrapper(this, R.style.Theme_MaterialComponents_DayNight_Dialog))
 | 
			
		||||
                        builder.setTitle(getString(R.string.dns_remove_title, server))
 | 
			
		||||
                        builder.setPositiveButton(getString(R.string.remove)) { dialog, _ ->
 | 
			
		||||
                            servers.removeAt(button.tag as Int)
 | 
			
		||||
| 
						 | 
				
			
			@ -175,7 +175,7 @@ class DnsActivity : AppCompatActivity() {
 | 
			
		|||
                }
 | 
			
		||||
            }
 | 
			
		||||
            view.setOnLongClickListener {
 | 
			
		||||
                val builder: AlertDialog.Builder = AlertDialog.Builder(this)
 | 
			
		||||
                val builder: AlertDialog.Builder = AlertDialog.Builder(ContextThemeWrapper(this, R.style.Theme_MaterialComponents_DayNight_Dialog))
 | 
			
		||||
                builder.setTitle(getString(R.string.dns_server_info_dialog_title))
 | 
			
		||||
                builder.setMessage("${infoPair.first}\n\n${infoPair.second}")
 | 
			
		||||
                builder.setPositiveButton(getString(R.string.ok)) { dialog, _ ->
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -121,7 +121,7 @@ class PeersActivity : AppCompatActivity() {
 | 
			
		|||
                    view.findViewById<ImageButton>(R.id.deletePeerButton).tag = i
 | 
			
		||||
 | 
			
		||||
                    view.findViewById<ImageButton>(R.id.deletePeerButton).setOnClickListener { button ->
 | 
			
		||||
                        val builder: AlertDialog.Builder = AlertDialog.Builder(this)
 | 
			
		||||
                        val builder: AlertDialog.Builder = AlertDialog.Builder(ContextThemeWrapper(this, R.style.Theme_MaterialComponents_DayNight_Dialog))
 | 
			
		||||
                        builder.setTitle(getString(R.string.peers_remove_title, peer))
 | 
			
		||||
                        builder.setPositiveButton(getString(R.string.peers_remove)) { dialog, _ ->
 | 
			
		||||
                            config.updateJSON { json ->
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue