Skip to content

Commit 443647d

Browse files
committed
plugin not working with parenthesis
1 parent 6667378 commit 443647d

File tree

3 files changed

+29
-8
lines changed

3 files changed

+29
-8
lines changed

sample/src/main/java/com/efraespada/stringobfuscator/MainActivity.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,16 @@ protected void onCreate(Bundle savedInstanceState) {
2121
message += " is ";
2222
message += SC.getString(stringId);
2323

24-
// secret
24+
// secret var
2525
String mySecret = "lalilulelo";
2626

2727
message += "\n\nFor Metal Gear lovers:\n\n\"Snake, the password is " + SC.encryptString(message)
2828
+ "\n\n.. or " + SC.decryptString(SC.encryptString(mySecret)) + "\"";
2929

30-
((TextView) findViewById(R.id.example)).setText(message);
30+
((TextView) findViewById(R.id.example_a)).setText(message);
31+
32+
String numbers = getString(R.string.test_a) + " is " + SC.getString(R.string.test_a);
33+
((TextView) findViewById(R.id.example_b)).setText(numbers);
34+
3135
}
3236
}

sample/src/main/res/layout/activity_main.xml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,29 @@
1111
android:background="@android:color/background_light"
1212
tools:context="com.efraespada.stringobfuscator.MainActivity">
1313

14-
<TextView
15-
android:id="@+id/example"
16-
android:layout_width="wrap_content"
14+
<LinearLayout
15+
android:layout_width="match_parent"
1716
android:layout_height="wrap_content"
18-
android:layout_centerInParent="true"
19-
android:textColor="@android:color/black"
20-
android:text="" />
17+
android:orientation="vertical"
18+
android:layout_centerInParent="true">
19+
20+
<TextView
21+
android:id="@+id/example_a"
22+
android:layout_width="wrap_content"
23+
android:layout_height="wrap_content"
24+
android:layout_gravity="center_horizontal"
25+
android:textColor="@android:color/black"
26+
android:text="" />
27+
28+
<TextView
29+
android:id="@+id/example_b"
30+
android:layout_width="wrap_content"
31+
android:layout_height="wrap_content"
32+
android:layout_gravity="center_horizontal"
33+
android:textColor="@android:color/black"
34+
android:text="" />
35+
36+
</LinearLayout>
2137

2238

2339
</RelativeLayout>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<resources>
22
<string name="hello" hidden="true">hello world!</string>
33
<string name="app_name">String Obfuscator Sample</string>
4+
<string name="test_a" hidden="true">test (hi)</string>
45
</resources>

0 commit comments

Comments
 (0)