diff --git a/app/src/main/java/to/dev/dev_android/view/main/view/CustomWebViewClient.kt b/app/src/main/java/to/dev/dev_android/view/main/view/CustomWebViewClient.kt index 89577d5..daca2fa 100644 --- a/app/src/main/java/to/dev/dev_android/view/main/view/CustomWebViewClient.kt +++ b/app/src/main/java/to/dev/dev_android/view/main/view/CustomWebViewClient.kt @@ -2,6 +2,7 @@ package to.dev.dev_android.view.main.view import android.content.Context import android.content.Intent +import android.graphics.Color import android.net.Uri import android.os.Build import android.view.View @@ -14,6 +15,7 @@ import to.dev.dev_android.databinding.ActivityMainBinding class CustomWebViewClient(private val context: Context, private val binding: ActivityMainBinding) : WebViewClient() { private val overrideUrlList = listOf( + "://dev.to", "api.twitter.com/oauth", "api.twitter.com/account/login_verification", "github.com/login", @@ -37,21 +39,17 @@ class CustomWebViewClient(private val context: Context, private val binding: Act } } - if (url.contains("://dev.to")) { - return false - } else { - for (i in 0 until overrideUrlList.size) { - if (url.contains(overrideUrlList[i])) { - return false - } + for (i in 0 until overrideUrlList.size) { + if (url.contains(overrideUrlList[i])) { + return false } - val builder = CustomTabsIntent.Builder() - builder.setToolbarColor(-0x1000000) - val customTabsIntent = builder.build() - customTabsIntent.launchUrl(context, Uri.parse(url)) - return true } + val builder = CustomTabsIntent.Builder() + builder.setToolbarColor(Color.parseColor("#00000000")) + val customTabsIntent = builder.build() + customTabsIntent.launchUrl(context, Uri.parse(url)) + return true } private fun openBrowser(url: String): Boolean { diff --git a/baseui/build.gradle b/baseui/build.gradle index 2ab16cd..0536891 100644 --- a/baseui/build.gradle +++ b/baseui/build.gradle @@ -6,8 +6,6 @@ apply plugin: 'kotlin-kapt' android { compileSdkVersion 28 - - defaultConfig { minSdkVersion 19 targetSdkVersion 28 @@ -15,7 +13,6 @@ android { versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } buildTypes { @@ -49,5 +46,4 @@ dependencies { testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test:runner:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' - } diff --git a/build.gradle b/build.gradle index 5c11a3b..9ec821b 100644 --- a/build.gradle +++ b/build.gradle @@ -1,13 +1,13 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.3.30' + ext.kotlin_version = '1.3.31' repositories { google() jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.4.0' + classpath 'com.android.tools.build:gradle:3.4.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong @@ -24,7 +24,7 @@ allprojects { tasks { wrapper { - gradleVersion = "5.4" + gradleVersion = "5.4.1" distributionType = Wrapper.DistributionType.ALL } } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 87b738c..5c2d1cf 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ed5aaee..ee69dd6 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index af6708f..b0d6d0a 100755 --- a/gradlew +++ b/gradlew @@ -1,5 +1,21 @@ #!/usr/bin/env sh +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + ############################################################################## ## ## Gradle start up script for UN*X @@ -28,7 +44,7 @@ APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m"' +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" diff --git a/gradlew.bat b/gradlew.bat index 0f8d593..15e1ee3 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,3 +1,19 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem http://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + @if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome