SubscribeSubscribe with Androidlift to get new post on mail.

how to create simple gridveiw in android

android simple GridView example

GridView is a ViewGroup that displays items in a two-dimensional, scrollable grid. The grid items are automatically inserted to the layout using a ListAdapter.

For an introduction to how you can dynamically insert views using an adapter

In this tutorial, you’ll create a grid of text. When an item is selected, a toast message will display the position and text.

-Start a new project named Simple Grid View.

Output :

android simple GridView
android simple Grid View

activity_main.xml

MainActivity.java

(9)

  • raj

    really very helpfull