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

Bidirectional scrollable table/grid

I have to create a table of items in an Android Fragment which can exceed both the width and the height, so it would need to be scrolled on both ways. Think of a TV Guide with the hours on the horizontal axis and channels on the vertical axis. Each…
0
votes
1 answer

Android not showing any JPEG images

Android Emulator shows blank screen, images still opens up (assuming that 150,150 pics are there). In another word, my 150,150 thumbs are behind the blank screen My images are larger than 150*150, I followed the link below to load large bitmap…
0
votes
1 answer

Gridview selected item keep highlighted and confirm image

I am developing an android app with GridView. The gridView contains buttons. I have customized my gridView with button adapter. The question is: I need to keep the selected item highlighted with borders. Now the selection is disappearing after…
devian
  • 123
  • 5
  • 17
0
votes
2 answers

Empty gridlines in android gridview?

I want a gridview with empty grid lines as follows Here is what i got till now, gridview with gridlines in the occupied cells only. I want gridlines in empty cells also. Is this possible?
sooraj.e
  • 766
  • 2
  • 11
  • 26
0
votes
1 answer

How to refresh a GridView after a onItemClickListener modifies data in an int [] from the ImageAdapter class

My GridView is created in my onCreate here: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); GridView gridview = (GridView)…
ChrisWilson4
  • 195
  • 4
  • 23
0
votes
1 answer

How do I properly use an setOnItemClickListener?

Lets start with new to android I am. I have a GridView setup as a grid and I'm using it to represent a board for a little board game app that I'm making. I have setup a "setOnItemClickListener" for my GridView that functions, at least for the Toast…
ChrisWilson4
  • 195
  • 4
  • 23
0
votes
1 answer

Custom GridAdapter with 2 columns doesn't works

I want to implement a grid Adapter that receives an ArrayList of Element2S, where Element2S is a custom object with two String (Element2S(String a, String b) The GridAdapter should use the Element2S ArrayList to populate the Grid. the first String…
AndreaF
  • 11,975
  • 27
  • 102
  • 168
0
votes
1 answer

How to stop a GridView from cropping my images?

I have a GridView that I have filled with 64 60x60px png's. I want the GridView to display them all as close to a perfect square as I can so I have set the numColumns in the XML to 8 so now I have an 8x8 gird. Here is what it looks like: My images…
ChrisWilson4
  • 195
  • 4
  • 23
0
votes
2 answers

How to modify a View from the MainActivity in another class?

I would like update a GridView that I have created in my MainActivity from another class, in my case, called GameplayController. Specifically, I am trying to simply insert the gridView.setOnItemClickListener(....)... that I currently I have in the…
ChrisWilson4
  • 195
  • 4
  • 23
0
votes
2 answers

Identifying Selection in Gridview, populated with images Android

I have GridView populated with images of 6 fruits (from drawable-hdpi). like this: Now on selection, how can I come to know, what fruit the user has selected? Since I'm populating my images from drawables-hdpi, what would be the identifier and how…
Zeeshan
  • 2,884
  • 3
  • 28
  • 47
0
votes
2 answers

onItemClick - Get item at position from GridView with CustomAdapter

I have a gridview that populates a contact's information (an image, name and phonenumber) by using custom adapter. On the click of a particular item, i want to retrieve the contact's information(info of image, name and phonenumber). I know i have to…
Vamsi Challa
  • 11,038
  • 31
  • 99
  • 149
0
votes
1 answer

Fill a GrindView with images taken from Database

i really need your help to solve a problem that might appear stupid for a lot of you. I need to create a simple Grindview and fill it with images. I tried the sample code provided by the android developers site and it works nicely. The problem is…
Razinar
  • 727
  • 3
  • 13
  • 21
0
votes
2 answers

Gridview showing white screen while loading images from sd card

I have a gridview when this activity is loading it showing a white screen I checked a lot I don't know why it happening I am showing a gridview of image and those images are from sd card . My oncreate code follows @Override public void…
A J
  • 4,542
  • 5
  • 50
  • 80
0
votes
2 answers

Gridview scrolling not working (It's too slow)

I have a grid view its showing some images from SD card it showing properly but only when I am scrolling it loading images again and again that is why scrolling is too slow I don't know why it loading images every time when I am scrolling (images…
A J
  • 4,542
  • 5
  • 50
  • 80
0
votes
3 answers

NullPointerException when setting textView on viewholder (not null)

I have a custom adapter class, inside the getView I am experiencing problems with the viewholder and setting/accessing elements to it. I consistently receive a NullPointerException when I try to set the textView to the viewholder. I have tested the…