Skip to content

Commit ab2dd8d

Browse files
author
amar
committed
some minor changes
1 parent a6a22f5 commit ab2dd8d

File tree

3 files changed

+35
-1
lines changed

3 files changed

+35
-1
lines changed

app/src/main/java/amar/im/cryptoapp/MainActivity.java

+10-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import android.widget.EditText;
1212
import android.widget.RadioGroup;
1313
import android.widget.TextView;
14+
import android.widget.Toast;
1415

1516
public class MainActivity extends AppCompatActivity {
1617
public static final String TAG = "CryptoTest";
@@ -87,7 +88,9 @@ public boolean onCreateOptionsMenu(Menu menu) {
8788
@Override
8889
public boolean onOptionsItemSelected(MenuItem item) {
8990
switch (item.getItemId()) {
90-
// case R.id.action_settings:
91+
case R.id.action_settings:
92+
showToast("Yet to be done!!");
93+
return true;
9194

9295
case R.id.action_about:
9396
// popup for some info
@@ -104,4 +107,10 @@ public boolean onOptionsItemSelected(MenuItem item) {
104107

105108
return super.onOptionsItemSelected(item);
106109
}
110+
111+
private void showToast(String msg) {
112+
if (!isFinishing() && null != this) {
113+
Toast.makeText(this, msg, Toast.LENGTH_SHORT).show();
114+
}
115+
}
107116
}
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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>

app/src/main/res/values/strings.xml

+4
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@
22
<string name="app_name">Simple Crypto</string>
33
<string name="response_text">Output is shown below: </string>
44
<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>
59
</resources>

0 commit comments

Comments
 (0)