Skip to content

Commit

Permalink
compile with SdkVersion 27 (Android Oreo)
Browse files Browse the repository at this point in the history
  • Loading branch information
abertschi committed Jan 27, 2018
1 parent 1e2bc6a commit 2adf1f7
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 15 deletions.
9 changes: 4 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ apply plugin: 'kotlin-android'


android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
compileSdkVersion 27
defaultConfig {
applicationId "ch.abertschi.adfree"
minSdkVersion 21
targetSdkVersion 25
versionCode 17
versionName "0.0.4.3"
targetSdkVersion 27
versionCode 18
versionName "0.0.4.4"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import android.text.Html
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.TextView
import ch.abertschi.adfree.BuildConfig
import ch.abertschi.adfree.R
Expand Down Expand Up @@ -58,15 +59,15 @@ class AboutActivity : Fragment(), AboutView {
versionView?.typeface = typeFace
versionView?.text = "v${BuildConfig.VERSION_NAME} / ${BuildConfig.VERSION_CODE}"

view?.findViewById(R.id.twitter).onClick {
view.findViewById<ImageView>(R.id.twitter).onClick {
val browserIntent = Intent(Intent.ACTION_VIEW,
Uri.parse("https://twitter.com/andrinbertschi"))
Uri.parse("https://twitter.com/andrinbertschi?rel=adfree"))
this.getContext().startActivity(browserIntent)
}

view?.findViewById(R.id.website).onClick {
view.findViewById<ImageView>(R.id.website).onClick {
val browserIntent = Intent(Intent.ACTION_VIEW,
Uri.parse("http://abertschi.ch"))
Uri.parse("http://abertschi.ch?rel=adfree"))
this.getContext().startActivity(browserIntent)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

package ch.abertschi.adfree.view.setting

import android.annotation.SuppressLint
import android.content.Context
import android.content.Intent
import android.graphics.Typeface
Expand All @@ -16,6 +17,7 @@ import android.text.Html
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.LinearLayout
import android.widget.Spinner
import android.widget.TextView
Expand Down Expand Up @@ -73,6 +75,7 @@ class SettingsActivity : Fragment(), SettingsView, AnkoLogger, PluginActivityAct
pluginViewContainer?.addView(view)
}

@SuppressLint("ClickableViewAccessibility")
override fun onViewCreated(view: View?, savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
this.rootView = view
Expand Down Expand Up @@ -106,10 +109,10 @@ class SettingsActivity : Fragment(), SettingsView, AnkoLogger, PluginActivityAct
}
}
}
view.findViewById(R.id.try_plugin_button).setOnClickListener {
view.findViewById<ImageView>(R.id.try_plugin_button).setOnClickListener {
settingPresenter.tryPlugin()
}
view.findViewById(R.id.setting_spinner_item_container)
view.findViewById<LinearLayout>(R.id.setting_spinner_item_container)
?.setOnTouchListener { v, event ->
spinner?.performClick()
false
Expand Down
5 changes: 3 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.1.1'
ext.kotlin_version = '1.2.20'
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.android.tools.build:gradle:3.0.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'org.codehaus.groovy:groovy-android-gradle-plugin:1.2.0'

Expand All @@ -25,6 +25,7 @@ allprojects {
}
maven {
url "https://maven.google.com"
name 'Google'
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sat Apr 15 14:03:49 CEST 2017
#Fri Jan 26 20:43:37 CET 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip

0 comments on commit 2adf1f7

Please sign in to comment.