Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
faramarzaf committed Jan 25, 2021
2 parents 0e82e68 + a84c8ce commit 162bcfb
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 4 deletions.
4 changes: 2 additions & 2 deletions af-android-sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
defaultConfig {
minSdkVersion 21
targetSdkVersion 29
versionCode 1022
versionName "1.0.22"
versionCode 1023
versionName "1.0.23"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'
multiDexEnabled true
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package com.faramarzaf.sdk.af_android_sdk.core.helper

import android.content.Context
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.DividerItemDecoration
import androidx.recyclerview.widget.RecyclerView

/**
* @author Faramarz Afzali
* 25/Jan/2021
*/

class RecyclerviewHelper {

companion object {

@JvmStatic
fun setRecyclerviewDivider(context: Context, recyclerView: RecyclerView) {
recyclerView.addItemDecoration(DividerItemDecoration(context, DividerItemDecoration.VERTICAL))
}

@JvmStatic
fun setRecyclerviewDivider(context: Context, recyclerView: RecyclerView, resId: Int) {
val divider = DividerItemDecoration(context, DividerItemDecoration.VERTICAL)
divider.setDrawable(ContextCompat.getDrawable(context, resId)!!)
recyclerView.addItemDecoration(divider)
}

}

}
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId "com.faramarzaf.sdk.android"
minSdkVersion 21
targetSdkVersion 29
versionCode 1022
versionName "1.0.22"
versionCode 1023
versionName "1.0.23"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

}
Expand Down

0 comments on commit 162bcfb

Please sign in to comment.