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
0
votes
1 answer

Change checbox's state in GridView

I have an GridView with custom items: an ImageView and an Checkbox on it. I want to setOnClickListener on ImageView, to check/uncheck the checkbox's state when image is clicked. This is the adapter for gridView: public class ProductAdapter extends…
0
votes
0 answers

How can I make my GridView items rearrangeable(drag and drop)?

I have a GridView with a custom adapter and item layout. I want the user to be able to hold one of the items to move it into another item's place, just like moving icons on the homescreen. Is there a simple way to do this? Or is there a different…
Steven Schoen
  • 4,366
  • 5
  • 34
  • 65
0
votes
1 answer

How to set data by coloumns in a Table implemented with a GridView

I have to view the data of a SQLite database in a table, now the problem is that all the gridView sample that I have seen are implemented with a single array that defines all data of the table public class GridViewDemo extends Activity implements …
AndreaF
  • 11,975
  • 27
  • 102
  • 168
0
votes
1 answer

How to handle multiple listeners inside GridView in Android

In my app, a GridView has list of contents. Each item is inflated with a layout. Single item inside the gridview contains, an image and 2 textviews. I have a requirement that when I click on the image, the image should be replaced with another…
intrepidkarthi
  • 3,104
  • 8
  • 42
  • 75
0
votes
2 answers

Multi-choice GridView

I want to highlight selected items thats on an GridView, so a GridView must behave like an multi-choice ListView. Can somebody suggest how to do that?
Ion C
  • 213
  • 3
  • 13
  • 24
0
votes
1 answer

OnScrollListener inside GridView in Android

Here is fragment which has a gridview of images. Initially I am loading the grid with 20 items. When the user scroll down the grid, I want to notify the data set has been changed and should reload the view. I have added OnScrollListener. But it…
intrepidkarthi
  • 3,104
  • 8
  • 42
  • 75
0
votes
1 answer

Limit a number of image display in gridview

I wanted to know is there any way to limit the amount of images display in gridview. I created a gridview and I might need display a lot of images. Therefore, I wanted to implement the system that only display 30 images by default and there will be…
IssacZH.
  • 1,457
  • 3
  • 24
  • 54
0
votes
2 answers

Unable to display image (internal storage) in gridview

I have a few images that I have stored inside the internal storage. I managed to retrieve the image file location and decode it. But I could not manage to get it to display inside a gridview. And I'm not sure what's wrong with the codes due to there…
IssacZH.
  • 1,457
  • 3
  • 24
  • 54
0
votes
3 answers

Attr of Size From custom view

I wrote my own GridView and i using it with XML setting layout_width as match_parent. My question is how to get width in pixels from attrs. I know how to get my cyston attrs but dont know how to read width value before view is drawed.
Adrian Deja
  • 737
  • 1
  • 9
  • 17
0
votes
1 answer

Loading Images from sd card to grid view causes bitmap exceeds VM budget

In my Application im loading images from sd card almost 40 to 50 images in grid view for this i created adapter in which constructor loads images from sd card to global variable of array list of bitmaps with in get view im returning bitmap from…
Manju
  • 720
  • 9
  • 23
0
votes
1 answer

Android: GridView - OutOfMemoryError

I have to show about 40 bitmaps in a Gridview. each image is around 500k and total size is around 15MB. I am getting OutOfMemoryError in my getView() of Adapter. (I'm reusing the convertView). How can I get rid of this error?
Venkat Papana
  • 4,757
  • 13
  • 52
  • 74
0
votes
2 answers

My Grid View Items poition change in scrolling down and up

My GridView at the start of activity look like correct but after scrolling down and up items position changes my last item in first row has a big text, I think this is my issue this is my getView() code public View getView(int position, View…
0
votes
1 answer

Asynchronous loading of images in gridview

Currently am using Zonghai-li's android-http-image-manager but the problem I am facing is that when the image is getting downloaded and at that moment when I scroll the grid-view list, that image get displayed in some other grid-cell. Can someone…
0
votes
1 answer

Grid style menu inside grid cell on longpress

I am trying to achieve something similar to this : When a user long press on a grid cell in a grid-view the menu should be drawn inside the grid cell area as shown above. Please help me if anyone has ever tried something similar to this or if there…
0
votes
2 answers

For loop prints three times or maybe is something else

Am trying to change this answer in this Link below Gridview Tutorial problems To display Images from a specific folder unto gridview layout. Am sure i broke it..check out the code and the log cat... package nsixty.crew.app; import…
ImGeorge
  • 527
  • 6
  • 24
1 2 3
99
100