From 4f81180977225b7cd4bf86f0f006adf9d41457d5 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 14 Nov 2016 19:58:17 +0100 Subject: [PATCH] remove Butterknife --- app/build.gradle | 4 ---- .../notes/activities/LicenseActivity.kt | 1 - .../notes/activities/MainActivity.kt | 7 ++----- app/src/main/res/layout/activity_license.xml | 16 +--------------- app/src/main/res/values-de/strings.xml | 2 +- app/src/main/res/values-it/strings.xml | 1 - app/src/main/res/values-ja/strings.xml | 1 - app/src/main/res/values-pt-rPT/strings.xml | 2 +- app/src/main/res/values-sv/strings.xml | 1 - app/src/main/res/values/strings.xml | 3 --- build.gradle | 1 - 11 files changed, 5 insertions(+), 34 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 1fd7de87..f7ed3948 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,5 +1,4 @@ apply plugin: 'com.android.application' -apply plugin: 'android-apt' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' @@ -34,13 +33,10 @@ android { dependencies { compile 'com.android.support:appcompat-v7:23.4.0' - compile 'com.jakewharton:butterknife:8.0.1' compile 'com.github.yukuku:ambilwarna:2.0.1' compile 'com.android.support:design:23.4.0' compile 'com.facebook.stetho:stetho:1.4.1' compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - - apt 'com.jakewharton:butterknife-compiler:8.0.1' } buildscript { diff --git a/app/src/main/kotlin/com/simplemobiletools/notes/activities/LicenseActivity.kt b/app/src/main/kotlin/com/simplemobiletools/notes/activities/LicenseActivity.kt index b6433758..124bd5b1 100644 --- a/app/src/main/kotlin/com/simplemobiletools/notes/activities/LicenseActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/notes/activities/LicenseActivity.kt @@ -11,7 +11,6 @@ class LicenseActivity : SimpleActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_license) - license_butterknife_title.setOnClickListener { openUrl(R.string.butterknife_url) } license_ambilwarna_title.setOnClickListener { openUrl(R.string.ambilwarna_url) } } diff --git a/app/src/main/kotlin/com/simplemobiletools/notes/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/notes/activities/MainActivity.kt index 3360fe2c..b725aabf 100644 --- a/app/src/main/kotlin/com/simplemobiletools/notes/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/notes/activities/MainActivity.kt @@ -11,8 +11,6 @@ import android.view.View import android.view.WindowManager import android.view.inputmethod.InputMethodManager import android.widget.EditText -import butterknife.ButterKnife -import butterknife.OnClick import com.simplemobiletools.notes.R import com.simplemobiletools.notes.Utils import com.simplemobiletools.notes.databases.DBHelper @@ -30,11 +28,11 @@ class MainActivity : SimpleActivity(), OpenNoteDialog.OpenNoteListener { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) - ButterKnife.bind(this) mDb = DBHelper.newInstance(applicationContext) mNotes = mDb.getNotes() updateSelectedNote(config.currentNoteId) + notes_fab.setOnClickListener { displayNewNoteDialog() } } override fun onResume() { @@ -116,8 +114,7 @@ class MainActivity : SimpleActivity(), OpenNoteDialog.OpenNoteListener { Utils.updateWidget(applicationContext) } - @OnClick(R.id.notes_fab) - fun fabClicked(view: View) { + fun displayNewNoteDialog() { val newNoteView = layoutInflater.inflate(R.layout.new_note, null) AlertDialog.Builder(this).apply { diff --git a/app/src/main/res/layout/activity_license.xml b/app/src/main/res/layout/activity_license.xml index d2bc73a3..2db912a3 100644 --- a/app/src/main/res/layout/activity_license.xml +++ b/app/src/main/res/layout/activity_license.xml @@ -1,7 +1,7 @@ @@ -17,20 +17,6 @@ android:layout_height="wrap_content" android:text="@string/notice"/> - - - - Diese App nutzt die folgenden Drittanbieterbibliotheken, die mein Leben einfacher machen. Danke. Drittanbieterlizenzen - Butter Knife (View Injector) AmbilWarna (Color Picker) + diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 4cf6d7ed..5dff2a2f 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -46,7 +46,6 @@ Questa app usa le seguenti librerie di terze parti per semplificarmi la vita. Grazie. Licenze di terze parti - Butter Knife (view injector) AmbilWarna (color picker) diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index b983a2f9..0d2dba72 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -46,7 +46,6 @@ このアプリは、私の暮らしにゆとりを持たせるために、次のサードパーティのライブラリーを使用しています。 ありがとうございます。 サードパーティー ライセンス - Butter Knife (ビュー インジェクター) AmbilWarna (カラー ピッカー) diff --git a/app/src/main/res/values-pt-rPT/strings.xml b/app/src/main/res/values-pt-rPT/strings.xml index 95f1b261..9d2a2871 100644 --- a/app/src/main/res/values-pt-rPT/strings.xml +++ b/app/src/main/res/values-pt-rPT/strings.xml @@ -46,6 +46,6 @@ Esta aplicação usa as seguintes bibliotecas de terceiros para facilitar a minha vida. Obrigado. Licenças de terceiros - Butter Knife (injetor de vistas) AmbilWarna (seletor de cores) + diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 071e55a5..0fdb39e9 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -46,7 +46,6 @@ Denna app använder följande tredjepartsbibliotek för att göra mitt liv enklare. Tack. Tredjepartslicenser - Butter Knife (view injector) AmbilWarna (color picker) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ad464640..1c5f8842 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -47,9 +47,6 @@ This app uses the following third party libraries to make my life easier. Thank you. Third party licences - Butter Knife (view injector) - Copyright 2013 Jake Wharton\n\nLicensed 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\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless 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. - https://github.com/JakeWharton/butterknife AmbilWarna (color picker) Copyright 2009-2015 Yuku\n\nLicensed 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\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless 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. https://github.com/yukuku/ambilwarna diff --git a/build.gradle b/build.gradle index 803ef01b..c20bca14 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,6 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:2.2.2' - classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files