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" />