Commit ab2dd8d amar
committed
1 parent a6a22f5 commit ab2dd8d Copy full SHA for ab2dd8d
File tree 3 files changed +35
-1
lines changed
3 files changed +35
-1
lines changed Original file line number Diff line number Diff line change 11
11
import android .widget .EditText ;
12
12
import android .widget .RadioGroup ;
13
13
import android .widget .TextView ;
14
+ import android .widget .Toast ;
14
15
15
16
public class MainActivity extends AppCompatActivity {
16
17
public static final String TAG = "CryptoTest" ;
@@ -87,7 +88,9 @@ public boolean onCreateOptionsMenu(Menu menu) {
87
88
@ Override
88
89
public boolean onOptionsItemSelected (MenuItem item ) {
89
90
switch (item .getItemId ()) {
90
- // case R.id.action_settings:
91
+ case R .id .action_settings :
92
+ showToast ("Yet to be done!!" );
93
+ return true ;
91
94
92
95
case R .id .action_about :
93
96
// popup for some info
@@ -104,4 +107,10 @@ public boolean onOptionsItemSelected(MenuItem item) {
104
107
105
108
return super .onOptionsItemSelected (item );
106
109
}
110
+
111
+ private void showToast (String msg ) {
112
+ if (!isFinishing () && null != this ) {
113
+ Toast .makeText (this , msg , Toast .LENGTH_SHORT ).show ();
114
+ }
115
+ }
107
116
}
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" utf-8" ?>
2
+ <LinearLayout xmlns : android =" http://schemas.android.com/apk/res/android"
3
+ android : layout_width =" wrap_content"
4
+ android : layout_height =" wrap_content"
5
+ android : padding =" 30dp"
6
+ android : orientation =" vertical" >
7
+
8
+ <TextView
9
+ android : layout_gravity =" center_horizontal"
10
+ android : textSize =" 17sp"
11
+ android : text =" @string/about_desc"
12
+ android : layout_width =" wrap_content"
13
+ android : layout_height =" wrap_content" />
14
+
15
+ <Button
16
+ android : layout_gravity =" center_horizontal"
17
+ android : text =" Dismiss"
18
+ android : layout_width =" wrap_content"
19
+ android : layout_height =" wrap_content" />
20
+
21
+ </LinearLayout >
Original file line number Diff line number Diff line change 2
2
<string name =" app_name" >Simple Crypto</string >
3
3
<string name =" response_text" >Output is shown below: </string >
4
4
<string name =" action_settings" >Settings</string >
5
+ <string name =" about_desc" >A simple crypto app that just uses Base64 encoding and AES to demonstrate encryption
6
+ and decryption using a key.\n\n\nIt\'s essentially a work not in progress. The code can be found below:
7
+ \n\n\n<a href =" https://github.com/amarendra/CryptoApp" >github.com/amarendra/CryptoApp</a >\n\n\n
8
+ Use this app in any way way you want. There are no restrictions.</string >
5
9
</resources >
You can’t perform that action at this time.
0 commit comments