Skip to content

Commit

Permalink
Merge pull request #972 from mikepenz/develop
Browse files Browse the repository at this point in the history
dev -> main
  • Loading branch information
mikepenz committed Feb 7, 2021
2 parents 2b9f1c2 + c0d0773 commit 51742ea
Show file tree
Hide file tree
Showing 19 changed files with 19 additions and 85 deletions.
10 changes: 2 additions & 8 deletions README.md
@@ -1,4 +1,4 @@
# FastAdapter [![Status](https://travis-ci.org/mikepenz/FastAdapter.svg?branch=develop)](https://travis-ci.org/mikepenz/FastAdapter) [![Download](https://api.bintray.com/packages/mikepenz/maven/com.mikepenz%3Afastadapter/images/download.svg)](https://bintray.com/mikepenz/maven/com.mikepenz%3Afastadapter/_latestVersion)
# FastAdapter

The FastAdapter is here to simplify creating adapters for RecyclerViews. Don't worry about the adapter anymore. Just write the logic for how your view/item should look like, and you are done.
It's blazingly fast, minimizing the code you need to write, and is easy to extend.
Expand Down Expand Up @@ -48,7 +48,7 @@ It's blazingly fast, minimizing the code you need to write, and is easy to exten

## Latest releases 🛠

- Kotlin | [v5.3.3](https://github.com/mikepenz/FastAdapter/tree/v5.3.3)
- Kotlin | [v5.3.4](https://github.com/mikepenz/FastAdapter/tree/v5.3.4)
- Java && AndroidX | [v3.3.1](https://github.com/mikepenz/FastAdapter/tree/v3.3.1)
- Java && AppCompat | [v3.2.9](https://github.com/mikepenz/FastAdapter/tree/v3.2.9)

Expand Down Expand Up @@ -326,12 +326,6 @@ Mike Penz:
- ItemAnimators https://github.com/mikepenz/ItemAnimators
- MaterialDrawer https://github.com/mikepenz/MaterialDrawer

Other Libs:
- Butterknife https://github.com/JakeWharton/butterknife
- Glide https://github.com/bumptech/glide
- MaterialScrollBar https://github.com/krimin-killr21/MaterialScrollBar
- StickyRecyclerHeadersAdapter https://github.com/timehop/sticky-headers-recyclerview


# Developed By

Expand Down
14 changes: 3 additions & 11 deletions app/build.gradle
Expand Up @@ -58,8 +58,8 @@ android {
}

buildFeatures {
viewBinding = true
dataBinding = true
viewBinding true
dataBinding true
}
}

Expand All @@ -68,9 +68,7 @@ kapt {
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}"

implementation 'com.android.support:multidex:1.0.3'
implementation 'androidx.multidex:multidex:2.0.1'

implementation project(':fastadapter')
implementation project(':fastadapter-extensions-binding')
Expand All @@ -83,8 +81,6 @@ dependencies {
implementation project(':fastadapter-extensions-utils')
implementation project(':fastadapter-extensions-paged')

implementation "androidx.appcompat:appcompat:${versions.appcompat}"
implementation "androidx.recyclerview:recyclerview:${versions.recyclerView}"
implementation "androidx.cardview:cardview:${versions.cardview}"
implementation "com.google.android.material:material:${versions.material}"

Expand Down Expand Up @@ -130,10 +126,6 @@ dependencies {
//https://github.com/krimin-killr21/MaterialScrollBar
implementation 'com.github.turing-tech:MaterialScrollBar:13.3.4'

//https://github.com/JakeWharton/butterknife
implementation 'com.jakewharton:butterknife:10.2.3'
kapt 'com.jakewharton:butterknife-compiler:10.2.3'

//used to load the images in the ImageListSample
//https://github.com/coil-kt/coil
implementation 'io.coil-kt:coil:1.1.1'
Expand Down
Expand Up @@ -5,7 +5,6 @@ import android.view.MenuItem
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import androidx.recyclerview.widget.GridLayoutManager
import butterknife.ButterKnife
import com.mikepenz.fastadapter.app.adapters.MopubFastItemAdapter
import com.mikepenz.fastadapter.app.databinding.ActivitySampleBinding
import com.mikepenz.fastadapter.app.items.LetterItem
Expand All @@ -24,8 +23,6 @@ class MopubAdsActivity : AppCompatActivity() {
setContentView(it.root)
}

ButterKnife.bind(this)

// Handle Toolbar
setSupportActionBar(binding.toolbar)

Expand Down
Expand Up @@ -11,7 +11,6 @@ import androidx.annotation.IntRange
import androidx.appcompat.app.AppCompatActivity
import androidx.recyclerview.widget.DefaultItemAnimator
import androidx.recyclerview.widget.LinearLayoutManager
import butterknife.ButterKnife
import com.mikepenz.fastadapter.FastAdapter
import com.mikepenz.fastadapter.IAdapter
import com.mikepenz.fastadapter.adapters.ItemAdapter
Expand Down Expand Up @@ -67,8 +66,6 @@ class SortActivity : AppCompatActivity() {
setContentView(it.root)
}

ButterKnife.bind(this)

// Handle Toolbar
setSupportActionBar(binding.toolbar)

Expand Down
Expand Up @@ -6,7 +6,6 @@ import androidx.appcompat.app.AppCompatActivity
import androidx.recyclerview.widget.DefaultItemAnimator
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import butterknife.ButterKnife
import com.mikepenz.fastadapter.adapters.ItemAdapter
import com.mikepenz.fastadapter.app.adapters.MopubFastItemAdapter
import com.mikepenz.fastadapter.app.adapters.StickyHeaderAdapter
Expand All @@ -33,8 +32,6 @@ class StickyHeaderMopubAdsActivity : AppCompatActivity() {
setContentView(it.root)
}

ButterKnife.bind(this)

// Handle Toolbar
setSupportActionBar(binding.toolbar)

Expand Down
Expand Up @@ -6,7 +6,6 @@ import android.widget.ImageView
import android.widget.TextView
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.RecyclerView
import butterknife.ButterKnife
import coil.clear
import coil.load
import com.mikepenz.aboutlibraries.util.getThemeColor
Expand Down Expand Up @@ -109,15 +108,12 @@ class SimpleImageItem : BaseItem<SimpleImageItem.ViewHolder>() {
* our ViewHolder
*/
class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
var view: FrameLayout
var view: FrameLayout = view as FrameLayout
var imageView: ImageView = view.findViewById(R.id.item_image_img)
var imageName: TextView = view.findViewById(R.id.item_image_name)
var imageDescription: TextView = view.findViewById(R.id.item_image_description)

init {
ButterKnife.bind(this, view)
this.view = view as FrameLayout

//optimization to preset the correct height for our device
val screenWidth = view.context.resources.displayMetrics.widthPixels
val finalHeight = (screenWidth / 1.5).toInt() / 2
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Expand Up @@ -4,8 +4,8 @@ buildscript {

ext {
release = [
versionName: "5.3.3",
versionCode: 5033
versionName: "5.3.4",
versionCode: 5034
]

setup = [
Expand Down
4 changes: 0 additions & 4 deletions fastadapter-extensions-binding/build.gradle
Expand Up @@ -38,10 +38,6 @@ android {
dependencies {
implementation project(':fastadapter')

implementation "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}"

implementation "androidx.annotation:annotation:${versions.androidX}"
implementation "androidx.recyclerview:recyclerview:${versions.recyclerView}"
compileOnly "androidx.databinding:viewbinding:${setup.gradleTools}"
}

Expand Down
7 changes: 1 addition & 6 deletions fastadapter-extensions-diff/build.gradle
Expand Up @@ -38,12 +38,7 @@ android {
dependencies {
implementation project(':fastadapter')

implementation "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}"

implementation "androidx.recyclerview:recyclerview:${versions.recyclerView}"
implementation "androidx.annotation:annotation:${versions.androidX}"

testImplementation 'junit:junit:4.13'
testImplementation 'junit:junit:4.13.1'
testImplementation 'org.mockito:mockito-all:1.10.19'
testImplementation "org.robolectric:robolectric:${versions.roboelectric}"
testImplementation 'com.squareup.assertj:assertj-android:1.2.0'
Expand Down
5 changes: 0 additions & 5 deletions fastadapter-extensions-drag/build.gradle
Expand Up @@ -35,11 +35,6 @@ android {

dependencies {
implementation project(':fastadapter')

implementation "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}"

implementation "androidx.recyclerview:recyclerview:${versions.recyclerView}"
implementation "androidx.annotation:annotation:${versions.androidX}"
}

if (project.hasProperty('pushall') || project.hasProperty('library_extensions_drag_only')) {
Expand Down
8 changes: 1 addition & 7 deletions fastadapter-extensions-expandable/build.gradle
Expand Up @@ -36,13 +36,7 @@ android {
dependencies {
implementation project(':fastadapter')

implementation "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}"

implementation "androidx.appcompat:appcompat:${versions.appcompat}"
implementation "androidx.recyclerview:recyclerview:${versions.recyclerView}"
implementation "androidx.annotation:annotation:${versions.androidX}"

testImplementation 'junit:junit:4.13'
testImplementation 'junit:junit:4.13.1'
testImplementation 'org.mockito:mockito-all:1.10.19'
testImplementation "org.robolectric:robolectric:${versions.roboelectric}"

Expand Down
4 changes: 1 addition & 3 deletions fastadapter-extensions-paged/build.gradle
Expand Up @@ -38,9 +38,7 @@ android {
dependencies {
implementation project(':fastadapter')

implementation "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}"

api "androidx.paging:paging-runtime:${versions.paging}"
api "androidx.paging:paging-runtime-ktx:${versions.paging}"
}

if (project.hasProperty('pushall') || project.hasProperty('library_extensions_paged_only')) {
Expand Down
5 changes: 0 additions & 5 deletions fastadapter-extensions-scroll/build.gradle
Expand Up @@ -35,11 +35,6 @@ android {

dependencies {
implementation project(':fastadapter')

implementation "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}"

implementation "androidx.recyclerview:recyclerview:${versions.recyclerView}"
implementation "androidx.annotation:annotation:${versions.androidX}"
}

if (project.hasProperty('pushall') || project.hasProperty('library_extensions_scroll_only')) {
Expand Down
5 changes: 0 additions & 5 deletions fastadapter-extensions-swipe/build.gradle
Expand Up @@ -35,11 +35,6 @@ android {

dependencies {
implementation project(':fastadapter')

implementation "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}"

implementation "androidx.recyclerview:recyclerview:${versions.recyclerView}"
implementation "androidx.annotation:annotation:${versions.androidX}"
}

if (project.hasProperty('pushall') || project.hasProperty('library_extensions_swipe_only')) {
Expand Down
4 changes: 0 additions & 4 deletions fastadapter-extensions-ui/build.gradle
Expand Up @@ -33,11 +33,7 @@ android {
dependencies {
implementation project(':fastadapter')

implementation "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}"

implementation "androidx.recyclerview:recyclerview:${versions.recyclerView}"
implementation "com.google.android.material:material:${versions.material}"
implementation "androidx.annotation:annotation:${versions.androidX}"
}

if (project.hasProperty('pushall') || project.hasProperty('library_extensions_ui_only')) {
Expand Down
4 changes: 0 additions & 4 deletions fastadapter-extensions-utils/build.gradle
Expand Up @@ -36,11 +36,7 @@ dependencies {
implementation project(':fastadapter-extensions-swipe')
implementation project(':fastadapter-extensions-drag')

implementation "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}"

implementation "androidx.recyclerview:recyclerview:${versions.recyclerView}"
implementation "com.google.android.material:material:${versions.material}"
implementation "androidx.annotation:annotation:${versions.androidX}"
}

if (project.hasProperty('pushall') || project.hasProperty('library_extensions_utils_only')) {
Expand Down
10 changes: 4 additions & 6 deletions fastadapter/build.gradle
Expand Up @@ -38,13 +38,11 @@ android {
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}"
api "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}"
api "androidx.recyclerview:recyclerview:${versions.recyclerView}"
api "androidx.appcompat:appcompat:${versions.appcompat}"

implementation "androidx.appcompat:appcompat:${versions.appcompat}"
implementation "androidx.recyclerview:recyclerview:${versions.recyclerView}"
implementation "androidx.annotation:annotation:${versions.androidX}"

testImplementation 'junit:junit:4.13'
testImplementation 'junit:junit:4.13.1'
testImplementation 'org.mockito:mockito-all:1.10.19'
testImplementation "org.robolectric:robolectric:${versions.roboelectric}"
testImplementation 'com.squareup.assertj:assertj-android:1.2.0'
Expand Down
4 changes: 4 additions & 0 deletions gradle-release.gradle
Expand Up @@ -79,7 +79,11 @@ afterEvaluate { project ->
asNode().appendNode('description', POM_DESCRIPTION)
asNode().appendNode('url', POM_SCM_URL)
asNode().children().last() + pomConfig

// we want dependencies as compile, to ensure they are transitively resolved
asNode().dependencies.'*'.findAll() { it.scope.text() == 'runtime' }.each { it.scope*.value = 'compile' }
}

}
}

Expand Down
1 change: 0 additions & 1 deletion gradle.properties
Expand Up @@ -18,5 +18,4 @@ POM_DEVELOPER_ID=mikepenz
POM_DEVELOPER_NAME=Mike Penz
android.useAndroidX=true
android.enableJetifier=true
android.jetifier.blacklist=butterknife-compiler
org.gradle.jvmargs=-Xmx4G

0 comments on commit 51742ea

Please sign in to comment.