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
7
votes
2 answers

GridView with different column sizes

Trying to make a highscore list, which is scrollable, and looks like this: foo 1000 bar 876 foobar 500 foobarfoo 1 I am currently doing it with a GridView. I would like to set the name column width to 60% of the screen and…
Szellszi
  • 123
  • 1
  • 1
  • 6
7
votes
3 answers

Shift column of Gridview up and down on touch on that column

I have a 3x3 grid view. Imagine like below. 1 2 3 4 5 6 7 8 9 NOW WHAT I WANT TO ACHIEVE I want the column of grid view to shift upwards and downwards on touch. Consider, the first column of a grid view. That is 1 4 7 Now, If I touch anywhere on…
Bhargav Thanki
  • 4,924
  • 2
  • 37
  • 43
7
votes
3 answers

Update GridView/ListView without re-populating

whenever you update a GridView/ListView you call notifyDatasetChanged on the adapter which re-populates the the list with the new data removing everything that was currently in the list. now take this little video for example from the L Preview…
tyczj
  • 71,600
  • 54
  • 194
  • 296
7
votes
1 answer

GridView in android widgets

I have been trying to implement widget for my application with GridView . I am new to Android Development. I have searched a lot on internet but could not find anything helpful. I am kind of stuck here , as this is not showing anything on my…
Muhammad Adil
  • 4,358
  • 3
  • 32
  • 36
7
votes
1 answer

Animate android Gridview Items

I want to animate the items of a gridview, in such a way that each item gets concentrated to the centre of view and one item is visible, and then again the grid items move back to their original position. I've added images for clarity. The flow…
Rahul
  • 381
  • 1
  • 5
  • 19
7
votes
3 answers

How to handle GridView with cell of different heights?

NOTE: OK, I admit the title is a bit vague, but English is not my main language, and I'm not sure how to describe the problem in one sentance. Background I'm trying to create an app that shows all apps information on a gridView. The gridView has…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
7
votes
2 answers

How to set equal spacing with Android GridView?

How to set the space left over to be divided equally? For example, I have a GridView with 2 columns. The full width is 700px, and the column is 200px: how do I specify the xml, so the space left (300px) are divided evenly into 3 pieces? i.e. 100px |…
Johnny
  • 2,800
  • 6
  • 25
  • 33
7
votes
4 answers

How to avoid refreshing of cells on when calling notifyDataSetChanged() for PinterestLikeAdapterView?

Background I'm using the PinterestLikeAdapterView library to show some images from the internet, which is like a gridView but with different height for each cell. The problem Since I use this library to show images from the internet, it's crucial…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
7
votes
0 answers

How to make GridView animation like in Google Keep app?

My problem I am using GridView in my application. GridView has pretty simple cells: just two TextViews. When the user clicks button on the ActionBar, a Dialog opens. He can make a new cell here. I use this code to update my…
AlexMomotov
  • 7,418
  • 8
  • 24
  • 34
7
votes
0 answers

Drag and Drop of item in same Gridview with repositioning

I have a requirement of creating drag and drop feature in same Gridview. Where items can be rearranged automatically after dropping it to particular position. I have tried blahti's drag and drop thQuinn's drag drop mrKlar's drag drop with…
kaushal trivedi
  • 3,405
  • 3
  • 29
  • 47
7
votes
1 answer

How to show Text on Image

I have written a code, in which i am showing images in GridView, but now i want to show text in bottom of every image. And i want to show my Grid like this: but getting like this [also want to show Text for Image]: main.xml:
Sneha
  • 1,051
  • 4
  • 14
  • 23
7
votes
1 answer

Android - Get Color From ImageView with ColorFIlter Applied to Drawable

I'm trying to get the color of an ImageView within a GridView that I've applied a color filter too previously. I'm running on a Nexus 4 with 4.2.2 I'm altering the color of the ImageView like this. The actual color of the image is white before I…
Ben987654
  • 3,280
  • 4
  • 27
  • 50
7
votes
3 answers

Changing background of a single row of gridview in android

I'm currently developing an android application which needs to show a book shelf where it contains maximum of 3 images in each row. I'm using gridview for that. But i'm stuck in one point where i'm not able to change the background of a whole row in…
akh
  • 2,478
  • 3
  • 23
  • 23
7
votes
1 answer

Android expandable GridView like Google images

I would like to create expandable GridView which will behave similar to Google images page. I would like to know how can I achieve such functionality: when I click one of the images, page expands and shows details of the picture. Is it possible to…
Ziem
  • 6,579
  • 8
  • 53
  • 86
7
votes
2 answers

GridView shows only two columns

I programmatically created a GridView of images to be used inside a Dialog. If I set the columns to autofit, I always get exactly two columns, whatever the size of the images is and whatever the screen size is. If I force the columns to a fixed…
Beppi's
  • 2,089
  • 1
  • 21
  • 38