From 26947f6f7ad8b544a8d20f3397f157d079c7362e Mon Sep 17 00:00:00 2001 From: Soren Stoutner Date: Tue, 14 Jan 2020 15:05:11 -0700 Subject: [PATCH] Convert AboutViewSourceDialog to Kotlin. https://redmine.stoutner.com/issues/518 --- .idea/gradle.xml | 4 +- app/build.gradle | 12 +- app/src/free/res/values-fr/strings.xml | 2 +- app/src/free/res/values/strings.xml | 2 +- .../main/assets/de/about_changelog_dark.html | 8 +- .../main/assets/de/about_changelog_light.html | 8 +- .../main/assets/de/about_licenses_dark.html | 4 +- .../main/assets/de/about_licenses_light.html | 4 +- .../main/assets/en/about_changelog_dark.html | 6 +- .../main/assets/en/about_changelog_light.html | 6 +- .../main/assets/en/about_licenses_dark.html | 4 +- .../main/assets/en/about_licenses_light.html | 4 +- .../main/assets/es/about_changelog_dark.html | 8 +- .../main/assets/es/about_changelog_light.html | 8 +- .../main/assets/es/about_licenses_dark.html | 4 +- .../main/assets/es/about_licenses_light.html | 4 +- .../main/assets/fr/about_changelog_dark.html | 8 +- .../main/assets/fr/about_changelog_light.html | 8 +- .../main/assets/fr/about_licenses_dark.html | 4 +- .../main/assets/fr/about_licenses_light.html | 4 +- .../main/assets/it/about_changelog_dark.html | 8 +- .../main/assets/it/about_changelog_light.html | 8 +- .../main/assets/it/about_licenses_dark.html | 4 +- .../main/assets/it/about_licenses_light.html | 4 +- .../main/assets/ru/about_changelog_dark.html | 6 +- .../main/assets/ru/about_changelog_light.html | 6 +- .../main/assets/ru/about_licenses_dark.html | 4 +- .../main/assets/ru/about_licenses_light.html | 4 +- .../main/assets/ru/guide_proxies_dark.html | 4 +- .../main/assets/ru/guide_proxies_light.html | 4 +- .../main/assets/tr/about_changelog_dark.html | 6 +- .../main/assets/tr/about_changelog_light.html | 6 +- .../main/assets/tr/about_licenses_dark.html | 4 +- .../main/assets/tr/about_licenses_light.html | 4 +- .../dialogs/AboutViewSourceDialog.java | 88 ------- .../dialogs/AboutViewSourceDialog.kt | 78 ++++++ .../layout/view_source_coordinatorlayout.xml | 4 +- app/src/main/res/values-v21/styles.xml | 223 ------------------ app/src/main/res/values/styles.xml | 21 +- build.gradle | 4 +- 40 files changed, 192 insertions(+), 410 deletions(-) delete mode 100644 app/src/main/java/com/stoutner/privacybrowser/dialogs/AboutViewSourceDialog.java create mode 100644 app/src/main/java/com/stoutner/privacybrowser/dialogs/AboutViewSourceDialog.kt delete mode 100644 app/src/main/res/values-v21/styles.xml diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 39e8a677..0d3cc348 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -3,9 +3,6 @@ diff --git a/app/build.gradle b/app/build.gradle index ff5a8a82..5ca89f82 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,5 +1,5 @@ /* - * Copyright © 2016-2019 Soren Stoutner . + * Copyright © 2016-2020 Soren Stoutner . * * This file is part of Privacy Browser . * @@ -18,6 +18,8 @@ */ apply plugin: 'com.android.application' +apply plugin: 'kotlin-android-extensions' +apply plugin: 'kotlin-android' android { compileSdkVersion 29 @@ -64,6 +66,10 @@ android { } } +repositories { + mavenCentral() +} + dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') @@ -73,12 +79,16 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0' + implementation "androidx.core:core-ktx:1.1.0" implementation 'androidx.drawerlayout:drawerlayout:1.0.0' implementation 'androidx.preference:preference:1.1.0' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0' implementation 'androidx.viewpager:viewpager:1.0.0' implementation 'androidx.webkit:webkit:1.1.0' + // Include the Kotlin standard libraries + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61" + // Include the Google material library. implementation 'com.google.android.material:material:1.0.0' diff --git a/app/src/free/res/values-fr/strings.xml b/app/src/free/res/values-fr/strings.xml index 80d4ae22..ac061319 100644 --- a/app/src/free/res/values-fr/strings.xml +++ b/app/src/free/res/values-fr/strings.xml @@ -1,7 +1,7 @@ + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 694ed6b6..6bbaedf5 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -1,7 +1,7 @@ - + @@ -31,11 +32,11 @@ @style/PrivacyBrowserAppBarLight @color/blue_700 @style/PrivacyBrowserTabLayoutDialogLight + @color/blue_800 @color/gray_500 @color/blue_700 @color/white @color/blue_800 - @color/blue_800 @color/blue_700 @color/red_a700 @color/blue_700 @@ -48,15 +49,17 @@ diff --git a/build.gradle b/build.gradle index 3286a50c..46d1616d 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ /* - * Copyright © 2016-2019 Soren Stoutner . + * Copyright © 2016-2020 Soren Stoutner . * * This file is part of Privacy Browser . * @@ -20,12 +20,14 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { + ext.kotlin_version = '1.3.61' repositories { jcenter() google() } dependencies { classpath 'com.android.tools.build:gradle:3.5.3' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files -- 2.45.2