Questions tagged [android-gridview]

GridView is a subclass of AdapterView that displays items in a two-dimensional, scrollable grid.

GridView is a subclass of AdapterView that displays items in a two-dimensional, scrollable grid. The grid items are automatically inserted to the layout using a ListAdapter. The cell-data binding is made through an Adapter.

Reference

1627 questions
9
votes
1 answer

How to find element inside a gridview in Android?

I have a grid view which I populate using a custom adapter. While populating the gridview I give each element inside a unique tag. Once this gridview is populated, I wish to find a specific element inside the gridview with its tag. How do I find…
user590849
  • 11,655
  • 27
  • 84
  • 125
9
votes
2 answers

Android - Images from Assets folder in a GridView

I have been working on creating a Grid View of images, with images being present in the Assets folder. Opening a File from assets folder in android link helped me with using the bitmap to read it. The code am currently having is: public View…
Saran
  • 91
  • 1
  • 1
  • 2
9
votes
4 answers

Customise context menu like pinterest menu

I've been looking for something like Pinterest menu whenever item in GridView is pressed. I know it's too broad question. But little strike on question will provide a correct way to achieve these. Que: How one can implement customise context menu…
Vikalp Patel
  • 10,669
  • 6
  • 61
  • 96
9
votes
4 answers

How to cenralize last uneven row in GridView in android?

I have a GridView , which displays pictures of alphabets what happens is , every time in the last row there are less no of alphabets. and the last row is left aligned , which doesn't look good so I want make the last row to be in centre, any …
9
votes
2 answers

Loading images in GridView using Universal Image Loader

I'm using the Universal Image Loader 1.8.6 library for loading dinamically images taken from web. The ImageLoaderConfiguration configuration is the following: ImageLoaderConfiguration config = new…
9
votes
4 answers

How to make a custom grid with images in android ?

I want to make a custom grid with images that we usually see for gallery in android phones I have been searching it for couple of hours. But no luck favours and finally I am making an attempt to ask question here. Can someone please suggest me how…
user1497684
9
votes
1 answer

Android How do I emulate the behavior of @android:id/empty in a GridView?

I have a gridview that is populated by a cursor that fetches data from SQLITE database. At times, there is no data to be shown. This shows a blank activity. I had earlier used listview where I could use @android:id/empty to set an emptyView like "no…
ambit
  • 1,099
  • 2
  • 28
  • 43
9
votes
1 answer

Creating grid view with clickable images in Android

I want to create a grid view with clickable images. Whenever an image is clicked, a corresponding value will be shown below that grid view. The problem I am facing is in the design part, I don't know how to design a grid view like this. Every time…
Harshit Syal
  • 649
  • 2
  • 11
  • 22
8
votes
1 answer

Run Android app in debugging mode

My Android Studio version is 2.3.3 In my Android app gradle build, I have explictly defined different server_url string values for debug type and release type: buildTypes { debug { resValue "string", "server_url",…
8
votes
2 answers

Android GridView Multiple Selection

I have a GridView implemented and activated the mGridView.setChoiceMode(GridView.CHOICE_MODE_MULTIPLE_MODAL); mode. Now I have the possibility to select multiple items from my grid when I perform a long click on one item. I want to achieve this…
davidOhara
  • 1,008
  • 5
  • 17
  • 39
8
votes
2 answers

How do I retain selected item highlighting on gridview when numColumns changes?

I have an ActionBarActivity with a GridView. The GridView has 2 columns in portrait and 3 columns in landscape. When I select items in portrait (starting my ActionMode) and then rotate the device, the selected item highlighting shifts one item to…
joepetrakovich
  • 1,344
  • 3
  • 24
  • 42
8
votes
3 answers

Android GridView add header and footer like listview

Maybe you want to call addHeaderView() or addFooterView() in GridView, which it does not have. It's nature that we want to add header view or a footer view to a GridView. Maybe your have been searching a long time like me, but finally find no…
srain
  • 8,944
  • 6
  • 30
  • 42
8
votes
2 answers

Android drawSelectorOnTop with GridView

I am developing a tabbed application in which one of the fragments, CollectionsFragment, contains a GridView with an ImageView in each slot. I would like the to use a selector to give feedback to users when the user clicks on one of the images. I…
lbrendanl
  • 2,626
  • 4
  • 33
  • 54
8
votes
1 answer

How to inflate another layout inside getView() of gridview adapter in android?

I want to create weekly calendar view and inside each grid item (each day) there are may be several activities.Out of this I have created weekly calendar view using grid view but I want to add activities if there are any for particular date by…
Narendra
  • 609
  • 1
  • 12
  • 28
8
votes
1 answer

How to add a scrollable header to a gridview in android?

Im attempting to add a scrollable header to a gridview layout in android, Ive tried about everything I could find on the web but I cant get it to work, this type of layout appears in a number of popular apps such as facebook and instagram but Im not…
Edmund Rojas
  • 6,376
  • 16
  • 61
  • 92