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

Is it safe to use GridView in Android?

So I know GridView is deprecated, but is it okay to use GridView for production code? I would like to use it for my game app. The Android Studio client says it has been deprecated in favor of ConstraintLayout, but trying to set up a grid (which…
user10387978
5
votes
4 answers

GridView inside PageViewer has laggy scrolling

I implemented a GridView inside PageViewer, but scrolling is not as smooth as it should be. Views inside GridView are intercepting touches. This is driving me crazy I have tried everything and while one thing worked it is not good solution in the…
CBeTJlu4ok
  • 1,072
  • 4
  • 18
  • 51
5
votes
1 answer

Kotlin Android Firebase Database Hashmap Cast to Class

I am trying to get data from a firebase database. The breakpoints show it is getting the data, but it looks like I am not properly assigning it to my class. which causes this exception : java.lang.ClassCastException: java.util.HashMap cannot be…
5
votes
5 answers

GridView for calendar view

Parts of my old app are deprecated, I am trying to rebuild it. Basically it is a Calendar with month view. This is a part of my gridview adapter: public View getView(int position, View view, ViewGroup parent) { Date date = getItem(position); …
Dan NoNeed
  • 51
  • 3
5
votes
3 answers

gridview image border

I am using gridview for displaying group of images from xml using xml parsing, now I want to display the border around each image in gridview. All images should display outline border on image in gridview .how to set border for each image in…
sivaraj
  • 1,849
  • 9
  • 35
  • 52
5
votes
4 answers

Gridview not showing properly as a header of Listview

I want to achieve Fig-1 but I am stuck with Fig-2 and not able to see full gridview as a header of Listview. As you can see the gridview is not showing fully and hiding behind Listview in Fig-2 Gridview xml…
Ashish Shukla
  • 1,027
  • 16
  • 36
5
votes
1 answer

How to make gridview asymmetric?

In my application i am trying to make my gridview asymmetric,but i am able to set only with colums 2 or 3 so on..any other option to make gridview asymmetric? following is my code for gridview,can anyone help me with this?
Aditya
  • 1,508
  • 1
  • 19
  • 37
5
votes
1 answer

How do I get the dynamic grid view android?

My activity: package com.app.redbuslayout; import java.util.ArrayList; import java.util.List; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.NameValuePair; import…
5
votes
2 answers

Using GoogleApiClient from Push Notification IntentService to Send Data to Android Wear

This is a follow up question to... Android Wear Bundled Notifications and Background Images I'd like to create a Android Wear GridViewPager layout that get's created when a new push notification comes in. Below is my code that initializes a…
TWilly
  • 4,863
  • 3
  • 43
  • 73
5
votes
1 answer

Android Grid view with 3 rows and 3 columns

I unable to set no. of rows for grid view. Only able to set no. of columns. I need to create a grid view which has 3 rows and 3 columns. Can any one help me please. This is my XML layout code:
Dev
  • 119
  • 1
  • 4
  • 13
5
votes
2 answers

Popup windows in StickyGridHeader display wrong position

I use StickyGridHeaders library to create an Gridview like snapfish. Here is my expected layout: I show a popup windows when touching a button on header view (red arrow) instead of check box. The problem is my popup window always display wrong…
ductran
  • 10,043
  • 19
  • 82
  • 165
5
votes
2 answers

Images overlapping in gridview in android

I am creating gridview to show images. Even I am setting vertical and horizontal spacing, still images overlap each other. Why this happen? And how to solve this issue? You can see this in image. My code: public class Images extends Activity { …
John R
  • 2,078
  • 8
  • 35
  • 58
5
votes
3 answers

GridView By using Custom ArrayAdapter

Maybe I am asking the wrong question just for curiosity. I am creating the custom adapter by extending array adapter. Now I want to display this in GridView. I have gone through many articles and everywhere I found they are using only base adapter…
rupesh
  • 2,865
  • 4
  • 24
  • 50
5
votes
1 answer

Google Play Music style GridView

I'm looking to create a music app and I'd like to make a GridView similar to what Google Play uses where they inject elements that will span rows and columns like the Soilwork album does in this screenshot: I've thought about using a ListView and…
berwyn
  • 986
  • 7
  • 23
5
votes
1 answer

Auto-scrolling of AdapterView (Listview, GridView,...)

Background I'm trying to make an AdapterView (listview, gridview,...) to slowly auto scroll . the user can toggle it whenever he wishes, and it doesn't necessary move all the way to the end of the adapterView. again, i DO NOT wish to make the…