get GridLayoutManager - Android User Interface

Android examples for User Interface:Layout

Description

get GridLayoutManager

Demo Code


import android.app.Activity;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;

public class Main{
    public static GridLayoutManager getGridLayoutManager(Activity activity) {

        GridLayoutManager gridLayoutManager = new GridLayoutManager(
                activity, 2);/*from w  w  w  .  j  av  a 2  s  .  c o m*/
        return gridLayoutManager;
    }
}

Related Tutorials