diff --git a/app/build.gradle b/app/build.gradle
index e239197..af19b16 100755
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -55,10 +55,10 @@ dependencies {
})
implementation 'com.android.support:appcompat-v7:28.0.0'
testImplementation 'junit:junit:4.12'
- implementation project(path: ':library')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'commons-io:commons-io:2.5'
-// implementation "com.stringcare:library:$stringcare_version"
+ // implementation project(path: ':library')
+ implementation "com.stringcare:library:$stringcare_version"
}
diff --git a/app/src/main/java/com/efraespada/stringobfuscator/MainActivity.java b/app/src/main/java/com/efraespada/stringobfuscator/MainActivity.java
index 89bdf6a..cfb0e6c 100755
--- a/app/src/main/java/com/efraespada/stringobfuscator/MainActivity.java
+++ b/app/src/main/java/com/efraespada/stringobfuscator/MainActivity.java
@@ -30,17 +30,17 @@ protected void onCreate(Bundle savedInstanceState) {
final SCTextView tvAuto = findViewById(R.id.auto_tv);
findViewById(R.id.btn_change).setOnClickListener(v -> {
if (tvAuto.isHtmlEnabled()) {
- tvAuto.htmlEnabled(!tvAuto.isHtmlEnabled());
- } else if (tvAuto.isVisible()){
- tvAuto.visible(!tvAuto.isVisible());
- } else if (!tvAuto.isVisible()){
- tvAuto.visible(!tvAuto.isVisible());
- tvAuto.htmlEnabled(!tvAuto.isHtmlEnabled());
+ tvAuto.setHtmlSupport(!tvAuto.isHtmlEnabled());
+ } else if (tvAuto.isRevealingValue()) {
+ tvAuto.setRevealed(!tvAuto.isRevealingValue());
+ } else if (!tvAuto.isRevealingValue()) {
+ tvAuto.setRevealed(!tvAuto.isRevealingValue());
+ tvAuto.setHtmlSupport(!tvAuto.isHtmlEnabled());
}
});
boolean equals = SC.reveal(R.string.hello_world_b).equals(getString(R.string.hello_world_a));
- String areEquals = "Same result: " + equals;
+ String areEquals = "Same result: " + equals;
((TextView) findViewById(R.id.same_value)).setText(areEquals);
String jsonObjectName = SC.reveal(R.string.asset_json_file);
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 63eca97..69297f6 100755
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -38,8 +38,8 @@
android:padding="25dp"
android:text="@string/hello"
android:textColor="@android:color/black"
- app:html="true"
- app:visible="false" />
+ app:htmlSupport="true"
+ app:reveal="true" />
+ app:htmlSupport="false"
+ app:reveal="true" />
+ app:reveal="true" />
Boolean = { true }
): JSONObject = SC.asset().json(this, predicate)
@@ -52,3 +53,31 @@ fun String.asyncBytes(
predicate: () -> Boolean = { true },
bytes: (bytes: ByteArray) -> Unit
) = SC.asset().asyncBytes(this, predicate, bytes)
+
+// param
+fun String.json(
+ predicate: Boolean = true
+): JSONObject = SC.asset().json(this, predicate)
+
+fun String.asyncJson(
+ predicate: Boolean = true,
+ json: (json: JSONObject) -> Unit
+) = SC.asset().asyncJson(this, { predicate }, json)
+
+fun String.jsonArray(
+ predicate: Boolean = true
+): JSONArray = SC.asset().jsonArray(this, predicate)
+
+fun String.asyncJsonArray(
+ predicate: Boolean = true,
+ json: (json: JSONArray) -> Unit
+) = SC.asset().asyncJsonArray(this, { predicate }, json)
+
+fun String.bytes(
+ predicate: Boolean = true
+): ByteArray = SC.asset().bytes(this, predicate)
+
+fun String.asyncBytes(
+ predicate: Boolean = true,
+ bytes: (bytes: ByteArray) -> Unit
+) = SC.asset().asyncBytes(this, { predicate }, bytes)
diff --git a/library/src/main/res/values/attrs.xml b/library/src/main/res/values/attrs.xml
index e3f62b2..0eebe92 100644
--- a/library/src/main/res/values/attrs.xml
+++ b/library/src/main/res/values/attrs.xml
@@ -1,8 +1,8 @@
-
-
+
+
\ No newline at end of file