Skip to content

Instantly share code, notes, and snippets.

😎
Developing something cool

Yugansh Tyagi YuganshT79

😎
Developing something cool
Block or report user

Report or block YuganshT79

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@YuganshT79
YuganshT79 / EqualSpaceItemDecoration.java
Created Oct 7, 2018
An Item Decorator for maintaining equal spacing between all items of ListView or RecyclerView supporting changing spanSize() for GridLayout and StaggeredLayout
View EqualSpaceItemDecoration.java
import android.content.Context;
import android.graphics.Rect;
import android.support.annotation.DimenRes;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.OrientationHelper;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.StaggeredGridLayoutManager;
import android.view.View;
@YuganshT79
YuganshT79 / GridLayout.java
Created Mar 16, 2018
Dynamically change the Span of Grid Layout in Recycler View according to Screen size
View GridLayout.java
private RecyclerView mRecyclerView;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_view, container, false);
You can’t perform that action at this time.