Giter VIP home page Giter VIP logo

recycler-view-divider's Introduction

RecyclerViewDivider

Build Status RecyclerViewDivider

A RecyclerView's divider which can be customized with simple properties or advanced ones.

It supports:

  • LinearLayoutManager
  • GridLayoutManager
  • StaggeredGridLayoutManager

Usage

A basic version of the divider can be attached to a RecyclerView in these ways:

// Default configuration.
recyclerView.addDivider()

OR

// Custom configuration.
context.dividerBuilder()
    // [...]
    .build()
    .addTo(recyclerView)

Each divider can be customized with various properties. These properties can have a common value for every divider or a specific value related to a divider instance.

For further information, check the wiki.

Compatibility

Android SDK: RecyclerViewDivider requires a minimum API level of 14 (the same of RecyclerView).

AndroidX: this library requires AndroidX. To use it in a project without AndroidX, refer to the version 2.x

Integration

You can download a jar from GitHub's releases page or grab it from mavenCentral().

Gradle

Maven Central

dependencies {
    implementation 'com.github.fondesa:recycler-view-divider:x.x.x'
}

recycler-view-divider's People

Contributors

fondesa avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

recycler-view-divider's Issues

Sometimes extra space available at the top of view item

Description

Sometimes extra space available at the top of view item. I have RecyclerView inside RecyclerView. It reproduces in the inner RecyclerView.


RecyclerViewDivider version:

implementation 'com.github.fondesa:recycler-view-divider:3.1.0'

API level:

API level of my emulator 27

How to reproduce it:

I don't know how to reproduce. But the last time I compiled project everything was OK. Than send emulator to background. After about 10 minutes I came back to emulator, than I tried to expand inner recycler view item, than I saw this bug.

Sample code:

This is code of the outer RecyclerView

class GroupAdapter @Inject constructor() : RecyclerView.Adapter<GroupAdapter.GroupViewHolder>() {

    val items = ArrayList<Pair<Group, List<Service>>>()
    val icons =
        arrayListOf(R.drawable.ic_globe_1, R.drawable.ic_envelope_1, R.drawable.ic_outgoing_call)
    val viewPool = RecyclerView.RecycledViewPool()

    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): GroupViewHolder {
        return GroupViewHolder(
            ViewHolderGroupBinding.inflate(
                LayoutInflater.from(parent.context),
                parent,
                false
            )
        )
    }

    override fun getItemCount() = items.size

    override fun onBindViewHolder(holder: GroupViewHolder, position: Int) {
        holder.bind(items[position], icons[position % icons.size])
    }

    inner class GroupViewHolder(val binding: ViewHolderGroupBinding) :
        RecyclerView.ViewHolder(binding.root) {
        fun bind(item: Pair<Group, List<Service>>, icon: Int) {
            binding.item = item.first
            binding.ivIcon.setImageResource(icon)

            val adapter = ServiceAdapter()
            adapter.items.addAll(item.second)
            val childLayoutManager =
                LinearLayoutManager(binding.root.context, LinearLayoutManager.VERTICAL, false)
            childLayoutManager.initialPrefetchItemCount = item.second.size
            binding.rvServices.layoutManager = childLayoutManager
            binding.rvServices.adapter = adapter
            binding.rvServices.setRecycledViewPool(viewPool)

            binding.root.context.getDrawable(R.drawable.divider_background)?.let {
                RecyclerViewDivider.with(binding.root.context)
                    .drawable(it)
                    .hideLastDivider()
                    .build()
                    .addTo(binding.rvServices)
            }

            binding.root.setOnClickListener {
                item.first.isExpanded = !item.first.isExpanded
                notifyItemChanged(adapterPosition)
            }
        }
    }
}

This is code of inner RecyclerView

class ServiceAdapter : RecyclerView.Adapter<ServiceAdapter.ServiceViewHolder>() {

    val items = ArrayList<Service>()

    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ServiceViewHolder {
        return ServiceViewHolder(
            ViewHolderServiceBinding.inflate(
                LayoutInflater.from(
                    parent.context
                ), parent, false
            )
        )
    }

    override fun getItemCount() = items.size

    override fun onBindViewHolder(holder: ServiceViewHolder, position: Int) {
        holder.bind(items[position])
    }

    class ServiceViewHolder(val binding: ViewHolderServiceBinding) :
        BaseViewHolder<Service>(binding.root) {
        override fun bind(item: Service) {
            binding.item = item
            binding.tvPrice.text = "${item.price} Coin"
        }
    }
}

使用说明可以详细一些么

使用说明可以详细一些么,目前提供的使用说明不是很详细。想要使用又看不到。有这么多人收藏肯定是一个好的框架,也很希望可以运用到它。

Re-adds divider on refresh

Can you create a method of removing itemdecoration on pull to refresh? Currently when a recyclerview is refreshed it adds the divider along with the existing one.

Add .colorRes, .drawableRes methods

Hello!
Builder for RecyclerViewDivider have context, so you can add method that can make code more clean

RecyclerViewDivider.with(context).color(ContextCompat.getColor(context, R.color.divider)).build()

will be:

RecyclerViewDivider.with(context).colorRes(R.color.divider).build()

visibilityProvider is not working fine with GridLayoutMananger

Description

With multiple columns,the cell in middle column is bigger than the sidles.

RecyclerViewDivider version:
version:3.3.0
API level:

androidx:1.1.0
ANDROID_BUILD_MIN_SDK_VERSION   : 23,
ANDROID_BUILD_TARGET_SDK_VERSION: 29,
ANDROID_COMPILE_SDK_VERSION     : 29,

How to reproduce it:

  • Use GridLayoutManager with VERTICAL

  • spanCount is 3

  • add the divider as the follwing sample code

as the uppper steps ,it will reporduce.
remove visibilityProvider method,it works fine.

Sample code:

recycler.addItemDecoration(new DividerBuilder(getContext())
                .colorRes(R.color.transparent)
                .visibilityProvider(new VisibilityProvider() {
                    @Override
                    public boolean isDividerVisible(@NotNull Grid grid, @NotNull Divider divider) {
                        return true;
                    }
                })
                .sizeProvider(new SizeProvider() {
                    int dp16 = Tool.dimens().dp2px(16);
                    @Override
                    public int getDividerSize(@NotNull Grid grid, @NotNull Divider
                            divider, @NotNull Drawable drawable) {
                        return dp16;
                    }
                }) . build());

Stack trace:

Paste the stack trace here.

Maybe introduce a caching mechanism on DividerItemDecoration

It would be nice to find a reliable way to cache the Grid and the Divider instances used in DividerItemDecoration.getItemOffsets() and DividerItemDecoration.onDraw().

In case, add a method on DividerBuilder to toggle this feature.
Should it be enabled or disabled by default?

[Suggestion] Each item's divider has same size

Make each item's divider has same size, this is good for use ConstraintLayout's layout_constraintDimensionRatio. Otherwise, the height of each item is inconsistent
such as:

<ConstraintLayout>
    <View app:layout_constraintDimensionRatio="1:1" />
</ConstraintLayout>
val left = (lineAccumulatedSpan - 1) * size / spanCount
val right = size - lineAccumulatedSpan * size / spanCount
when {
    // LinearLayoutManager or GridLayoutManager with 1 column
    spanCount == 1 || spanSize == spanCount -> setRect(0, 0, 0, size)
    // first element in the group
    lineAccumulatedSpan == spanSize -> setRect(left, 0, right, size)
    // last element in the group
    lineAccumulatedSpan == spanCount -> setRect(left, 0, right, size)
    // element in the middle
    else -> setRect(left, 0, right, size)
}

sample:
column: 3,
divider size: 26px
your code: [0-13] [13-13] [13-0]
my code: [0-18] [8-9] [17-0]

Can SizeManager add item position?

object : SizeManager {
    override fun itemSize(drawable: Drawable, orientation: Int, groupCount: Int, groupIndex: Int): Int {
        // I want to know which item is
    }
}

StaggeredGridLayoutManager

QQ截图20191023160222
Horizontal and Vertical space size is not euqal.
RecyclerViewDivider.with(rv.getContext())
.insetManager(new DefaultInsetManager())
.hideLastDivider()
.size(size)
.color(ResUtils.getColor(color))
.build().addTo(rv);

Equal Spacing

Hey, how would i go about equal spacing?

I need to use a recyclerview to use the drag/move ItemTouchHelper functionality, but i would like the items to be spaced out equally in the recyclerview (match_parent) - no scrolling?

Is there a setting or how would i do this?

ItemDecoration 绘制问题

如果在 adapter 中设置 item 的背景色,divider 使用的也是背景色,会导致 item 背景色盖住 divider 的,我猜应该重写 ItemDecoration 的 onDrawOver 方法 而不是 onDraw ?

"GridLayoutManager.multipleSpanGrid" It takes too much time with a large data set

val dataList = MutableList<Any>(1000) { index ->
    A()
}

dataList.add(0, B())

val layoutManager = GridLayoutManager(requireActivity(), 3)

layoutManager.spanSizeLookup = object : GridLayoutManager.SpanSizeLookup() {
    override fun getSpanSize(position: Int): Int {
        return when (dataList.getItem(position)) {
            B -> 3
            else -> 1
        }
    }
}

requireActivity().dividerBuilder()
    .showFirstDivider()
    .showSideDividers()
    .size(8.dp)
    .asSpace()
    .build()
    .addTo(recyclerView)

StaggeredDividerItemDecoration bug

6item is big than 5item,
for example: if i set space 10
5item offsetleft+offsetRight=10+5=15
6item offsetleft+offsetRight=5+5=10
so 6item is big than 5item
微信截图_20200521165646
TIM截图20200521165547

How to set float size decoration?

Sometimes the required decoration height is not an integer 。

Can the

DividerBuilder.size(size: Int, sizeUnit: Int = TypedValue.COMPLEX_UNIT_PX) 

be adjusted to

DividerBuilder.size(size: Float, sizeUnit: Int = TypedValue.COMPLEX_UNIT_PX) 

Request: use the default divider of the OS

Currently we have to do it on our own, otherwise we get a very white one.

Example of such workaround:

    obtainStyledAttributes(intArrayOf(android.R.attr.listDivider)).use { typedArray ->
        typedArray.getDrawable(0)?.let { RecyclerViewDivider.with(this).drawable(it).build().addTo(recyclerView) }
    }

Crash: The grid doesn't contain the item at position...

Description

After upgrading from v3.3.0 to v3.4.0, we received a lot about the following crashes

RecyclerViewDivider version:
v3.4.0

API level:
26,27,28,29,30

Stack trace:

java.lang.IndexOutOfBoundsException: The grid doesn't contain the item at position 48.
       at com.fondesa.recyclerviewdivider.DividersAroundCellKt.lineAndCellRelativeIndexesOf(DividersAroundCellKt.java:55)
       at com.fondesa.recyclerviewdivider.DividersAroundCellKt.dividersAroundCell(DividersAroundCellKt.java:26)
       at com.fondesa.recyclerviewdivider.DividerItemDecoration.drawDividers(DividerItemDecoration.java:113)
       at com.fondesa.recyclerviewdivider.DividerItemDecoration.onDraw(DividerItemDecoration.java:103)
       at com.fondesa.recyclerviewdivider.BaseDividerItemDecoration.onDraw(BaseDividerItemDecoration.java:105)
       at androidx.recyclerview.widget.RecyclerView.onDraw(RecyclerView.java:4494)
       at android.view.View.draw(View.java:21618)
       at androidx.recyclerview.widget.RecyclerView.draw(RecyclerView.java:4429)
       at android.view.View.updateDisplayListIfDirty(View.java:20483)
       at android.view.View.draw(View.java:21350)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4446)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4205)
       at android.view.View.draw(View.java:21621)
       at android.view.View.updateDisplayListIfDirty(View.java:20483)
       at android.view.View.draw(View.java:21350)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4446)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4205)
       at android.view.View.draw(View.java:21621)
       at android.view.View.updateDisplayListIfDirty(View.java:20483)
       at android.view.View.draw(View.java:21350)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4446)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4205)
       at android.view.View.draw(View.java:21621)
       at androidx.viewpager.widget.ViewPager.draw(ViewPager.java:2426)
       at android.view.View.updateDisplayListIfDirty(View.java:20483)
       at android.view.View.draw(View.java:21350)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4446)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4205)
       at android.view.View.draw(View.java:21621)
       at androidx.core.widget.NestedScrollView.draw(NestedScrollView.java:1998)
       at android.view.View.updateDisplayListIfDirty(View.java:20483)
       at android.view.View.draw(View.java:21350)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4446)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4205)
       at android.view.View.updateDisplayListIfDirty(View.java:20474)
       at android.view.View.draw(View.java:21350)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4446)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4205)
       at android.view.View.updateDisplayListIfDirty(View.java:20474)
       at android.view.View.draw(View.java:21350)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4446)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4205)
       at android.view.View.draw(View.java:21621)
       at android.view.View.updateDisplayListIfDirty(View.java:20483)
       at android.view.View.draw(View.java:21350)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4446)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4205)
       at android.view.View.updateDisplayListIfDirty(View.java:20474)
       at android.view.View.draw(View.java:21350)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4446)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4205)
       at android.view.View.updateDisplayListIfDirty(View.java:20474)
       at android.view.View.draw(View.java:21350)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4446)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4205)
       at android.view.View.draw(View.java:21621)
       at android.view.View.updateDisplayListIfDirty(View.java:20483)
       at android.view.View.draw(View.java:21350)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4446)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4205)
       at android.view.View.updateDisplayListIfDirty(View.java:20474)
       at android.view.View.draw(View.java:21350)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4446)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4205)
       at android.view.View.updateDisplayListIfDirty(View.java:20474)
       at android.view.View.draw(View.java:21350)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4446)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4205)
       at android.view.View.updateDisplayListIfDirty(View.java:20474)
       at android.view.View.draw(View.java:21350)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4446)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4205)
       at android.view.View.updateDisplayListIfDirty(View.java:20474)
       at android.view.View.draw(View.java:21350)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4446)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4205)
       at android.view.View.draw(View.java:21621)
       at com.android.internal.policy.DecorView.draw(DecorView.java:964)
       at android.view.View.updateDisplayListIfDirty(View.java:20483)
       at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:584)
       at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:590)
       at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:668)
       at android.view.ViewRootImpl.draw(ViewRootImpl.java:3840)
       at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:3648)
       at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2954)
       at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1857)
       at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8089)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1057)
       at android.view.Choreographer.doCallbacks(Choreographer.java:875)
       at android.view.Choreographer.doFrame(Choreographer.java:776)
       at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1042)
       at android.os.Handler.handleCallback(Handler.java:888)
       at android.os.Handler.dispatchMessage(Handler.java:100)
       at android.os.Looper.loop(Looper.java:213)
       at android.app.ActivityThread.main(ActivityThread.java:8178)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1101)

GridLayoutManager, spanSizeLookup, position is -1

// position == -1
// MoreViewItem is last item
spanSizeLookup = object : GridLayoutManager.SpanSizeLookup() {
    override fun getSpanSize(position: Int): Int {
        val item = adapter.items[position] // ArrayIndexOutOfBoundsException
        if (item is MoreViewItem) {
            return 2
        }
        return 1
}

// notify insert
items.add(moreViewItem)
adapter.items = items
adapter.notifyItemInserted(items.lastIndex)
java.lang.ArrayIndexOutOfBoundsException: length=108; index=-1
        at java.util.ArrayList.get(ArrayList.java:439)
        at cn.soloho.xvideos.view.HomeFragment$onActivityCreated$$inlined$also$lambda$1.getSpanSize(HomeFragment.kt:57)
        at android.support.v7.widget.GridLayoutManager$SpanSizeLookup.getSpanGroupIndex(GridLayoutManager.java:971)
        at com.fondesa.recyclerviewdivider.extension.LayoutManagerExtensionsKt.getGroupIndex(LayoutManagerExtensions.kt:70)
        at com.fondesa.recyclerviewdivider.RecyclerViewDivider.getItemOffsets(RecyclerViewDivider.kt:104)
        at android.support.v7.widget.RecyclerView.getItemDecorInsetsForChild(RecyclerView.java:4792)
        at android.support.v7.widget.RecyclerView$LayoutManager.calculateItemDecorationsForChild(RecyclerView.java:9320)
        at android.support.v7.widget.GridLayoutManager.layoutChunk(GridLayoutManager.java:590)
        at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1519)
        at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:614)
        at android.support.v7.widget.GridLayoutManager.onLayoutChildren(GridLayoutManager.java:170)
        at android.support.v7.widget.RecyclerView.dispatchLayoutStep1(RecyclerView.java:3763)
        at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3527)
        at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:4082)

How to use the SizeProvider

i want to give the gridView an different spacing like Flutter that use mainAxisSpacing and crossAxisSpacing
i know i must use the SizeProvider, but i want to use the position to accumulate it, but it donnt provided

Add possibility to specify defaults programmatically

It would be useful to specify the defaults of RecyclerViewDivider programmatically.
Example:

RecyclerViewDivider.Defaults.color(Color.RED)
                 .size(context.getResources().getDimensionPixelSize(R.dimen.example))
                 .insetBefore(0)
                 .insetAfter(0);

Bug: using default divider style in class that extends Application doesn't work well for dark theme

Attached sample project and video to show the issue.

The video shows before and after using the Application class.

For now, the only workaround is to do it manually, or maybe use something like this nice extension function:

fun RecyclerView.setDefaultDividers() {
    val context = this.context
    context.obtainStyledAttributes(intArrayOf(android.R.attr.listDivider)).use { typedArray ->
        typedArray.getDrawable(0)
            ?.let { RecyclerViewDivider.with(context).hideLastDivider().drawable(it).build().addTo(this) }
    }
}

My Application.zip
2019-11-09_22-25-44.zip

GridLayoutManager/StaggeredGridLayoutManager item width not equal

Description

if i use GridLayoutManager,the item width was not equal

RecyclerViewDivider version:

v3.1.0
API level:

How to reproduce it:

Sample code:

RecyclerViewDivider.with(rv.getContext())
.insetManager(new DefaultInsetManager())
.hideLastDivider()
.size(size)
.color(ResUtils.getColor(color))
.build().addTo(rv);

QQ截图20200417133758
QQ截图20200417133818

Can support divider on both sides of the group?

// firstMarginInGroup and lastMarginInGroup maybe added to SizeManager
if (orientation == RecyclerView.VERTICAL) {
    when {
        // LinearLayoutManager or GridLayoutManager with 1 column
        spanCount == 1 || spanSize == spanCount -> setRect(0, 0, 0, size)
        // first element in the group
        lineAccumulatedSpan == spanSize -> setRect(firstMarginInGroup, 0, halfSize, size)
        // last element in the group
        lineAccumulatedSpan == spanCount -> setRect(halfSize, 0, lastMarginInGroup, size)
        // element in the middle
        else -> setRect(halfSize, 0, halfSize, size)
    }
} else {
    when {
        // LinearLayoutManager or GridLayoutManager with 1 row
        spanCount == 1 || spanSize == spanCount -> setRect(0, 0, size, 0)
        // first element in the group
        lineAccumulatedSpan == spanSize -> setRect(0, firstMarginInGroup, size, halfSize)
        // last element in the group
        lineAccumulatedSpan == spanCount -> setRect(0, halfSize, size, lastMarginInGroup)
        // element in the middle
        else -> setRect(0, halfSize, size, halfSize)
    }
}

Inset doesn't seem to make sense.

var insetBefore: Int = insetManager.itemInsetBefore(groupCount, groupIndex)
var insetAfter: Int = insetManager.itemInsetAfter(groupCount, groupIndex)
if (spanCount > 1 && (insetBefore > 0 || insetAfter > 0)) {
    insetBefore = 0
    insetAfter = 0
    Log.e(TAG, "the inset won't be applied with a span major than 1.")
}

...
// 1. insetBefore and insetAfter always 0 when spanCount > 2
// 2. insetBefore and insetAfter never used when spanCount == 1

if (orientation == RecyclerView.VERTICAL) {
    when {
        // LinearLayoutManager or GridLayoutManager with 1 column
        spanCount == 1 || spanSize == spanCount -> setRect(0, 0, 0, size)
        // first element in the group
        lineAccumulatedSpan == spanSize -> setRect(0, 0, halfSize + insetAfter, size)
        // last element in the group
        lineAccumulatedSpan == spanCount -> setRect(halfSize + insetBefore, 0, 0, size)
        // element in the middle
        else -> setRect(halfSize + insetBefore, 0, halfSize + insetAfter, size)
    }
}

Hide the vertical divider

Is it possible to hide the vertical divider in a GrideLayoutMananger? I cannot find a way with VisibilityManager.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.