Skip to content

Commit

Permalink
refactor: remove unused imports and simplify onClickListeners in Main…
Browse files Browse the repository at this point in the history
…Activity.kt and EncryptionActivity.kt

The unused imports in both MainActivity.kt and EncryptionActivity.kt have been removed to improve code readability. The onClickListeners in MainActivity.kt and EncryptionActivity.kt have been simplified by removing unnecessary parentheses.
  • Loading branch information
rupeshshandilya committed Apr 10, 2023
1 parent 9297807 commit dc7c0b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import android.widget.TextView
import androidx.appcompat.app.AlertDialog
import java.security.Key
import android.util.Base64
import android.util.Log
import android.widget.Toast
import java.io.File
import java.io.FileOutputStream
Expand Down
12 changes: 3 additions & 9 deletions app/src/main/java/com/example/shandilya/encrypto/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
package com.example.shandilya.encrypto

import android.Manifest
import android.content.Context

import android.content.Intent
import android.content.pm.PackageManager
import android.os.Build
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.widget.Button
import android.widget.Toast
import androidx.core.app.ActivityCompat
import androidx.core.content.ContextCompat

class MainActivity : AppCompatActivity() {

Expand All @@ -22,12 +16,12 @@ class MainActivity : AppCompatActivity() {
val encrypt = findViewById<Button>(R.id.encrypt)
val decrypt = findViewById<Button>(R.id.decrypt)

encrypt.setOnClickListener(){
encrypt.setOnClickListener{
intent = Intent(this,EncryptionActivity::class.java)
startActivity(intent)
}

decrypt.setOnClickListener(){
decrypt.setOnClickListener{
intent = Intent(this,DecryptionActivity::class.java)
startActivity(intent)
}
Expand Down

0 comments on commit dc7c0b2

Please sign in to comment.