Skip to content

Commit

Permalink
Delete old assets, add some simple form validation logic.
Browse files Browse the repository at this point in the history
  • Loading branch information
creativedrewy committed Oct 22, 2020
1 parent 917d037 commit baf97d4
Show file tree
Hide file tree
Showing 15 changed files with 12 additions and 212 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,15 @@ class EncryptDecryptFragment : Fragment() {
})

encrypt_button.setOnClickListener {
viewModel.encodeData(key_input_textview.text.toString(), data_input_textview.text.toString())
validateForm {
viewModel.encodeData(key_input_textview.text.toString(), data_input_textview.text.toString())
}
}

decrypt_button.setOnClickListener {
viewModel.decodeData(key_input_textview.text.toString(), data_input_textview.text.toString())
validateForm {
viewModel.decodeData(key_input_textview.text.toString(), data_input_textview.text.toString())
}
}

clear_everything_button.setOnClickListener {
Expand All @@ -89,4 +93,10 @@ class EncryptDecryptFragment : Fragment() {
fun handleNewIntent(intent: Intent) {
viewModel.handleIncomingData(intent)
}

private fun validateForm(onValidated: () -> Unit) {
if (key_input_textview.text.isNotEmpty() && data_input_textview.text.isNotEmpty()) {
onValidated()
}
}
}
30 changes: 0 additions & 30 deletions app/src/main/res/drawable-v24/ic_launcher_foreground.xml

This file was deleted.

170 changes: 0 additions & 170 deletions app/src/main/res/drawable/ic_launcher_background.xml

This file was deleted.

5 changes: 0 additions & 5 deletions app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml

This file was deleted.

5 changes: 0 additions & 5 deletions app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml

This file was deleted.

Binary file removed app/src/main/res/mipmap-hdpi/ic_launcher.png
Binary file not shown.
Binary file removed app/src/main/res/mipmap-hdpi/ic_launcher_round.png
Binary file not shown.
Binary file removed app/src/main/res/mipmap-mdpi/ic_launcher.png
Binary file not shown.
Binary file removed app/src/main/res/mipmap-mdpi/ic_launcher_round.png
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xhdpi/ic_launcher.png
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Binary file not shown.
Binary file not shown.

0 comments on commit baf97d4

Please sign in to comment.