Questions tagged [android-gridview]
GridView is a subclass of AdapterView that displays items in a two-dimensional, scrollable grid.
1,624
questions
0
votes
2
answers
21
views
Render specific item count on a GridView
I was working with the GridView for a while. Everything's working fine on runtime.
However, I have always exactly 5 items on my GridView, and I am looking to make it "more realistic" when ...
1
vote
2
answers
65
views
How to make Flutter GridView change colors when tapped
I have asked this question previously but I am not receiving much help. I've created a GridView using GridView.count; however, I cannot get an indiviual container to change colors. The entire row ...
0
votes
2
answers
81
views
How do I sized of grid in Gridview flutter?
I want to change the dynamic size of children according to its array count.
It is a way same like GridLayoutManger in android java.
What I did in android(java)
GridLayoutManager mng_layout = new ...
0
votes
1
answer
34
views
How to make Scrollable StaggeredGrid list like Pinteret in flutter
I tried using flutter_staggered_grid_view 0.6.1
I was able to create the list but not able to make the list Scrollable.
If there is any other library I can use or is it any other way to make it ...
0
votes
0
answers
29
views
GridView with Spinners
I have a gridview with spinners and Textbox, when i select a value in spinner that textbox text gets updated however, items don't retain values or positions. I want help on code that the values of ...
-1
votes
1
answer
48
views
Can I use a GridView instead of RecyclerView for smaller dataset?
I have a simple use case to show six images on screen and allow multiselection. The number of images is fixed here. Can I use GridView instead of a RecyclerView for this simple use case?
I read an ...
0
votes
1
answer
24
views
GridView is not taking full space inside ExpandableListView in android
I have to create an ExpandableListView as shown in picture below
I have added GridView inside ExpandableListView but it shows only first line of GridView as you can see in the pic below
GridView is ...
0
votes
0
answers
41
views
How to make a GridView with headers synchronized to TabLayout?
I'm having trouble creating a grid view with headers. And these headers still need to be synchronized with TabLayout as the screen scrolls.
So far I've managed to create the view of items with ...
-2
votes
2
answers
113
views
what's the simplest way to implement an item grid of two columns in android studio [closed]
some guides say recyclerview. some say gridview. some say recyclerview with grid adapter...
i have no idea what these methods have in differences as i'm still new to android development. i've tried ...
0
votes
0
answers
37
views
Android GridView first item not changing image as expected
I'm trying to build a card matching app on android that has the following classes
public class PictureAdapter extends ArrayAdapter {
private int resource;
private List<Card> cards;
...
0
votes
0
answers
12
views
EditTexts inside GridView Items gets focused randomly
I have implemented RecyclerView with GridView items. Each GridView Item has EditText for entering quantity which has doOnTextChange listener. When I enter some number it triggers random multiple edit ...
0
votes
1
answer
28
views
Incompatible Types - Android Gridview
Incompatible types. Found: 'android.view.View', required: 'com.example.listviewgridview.GridView'. I am not able to access my gridview in java file. How can I resolve this issue?
GridView.java.
...
0
votes
0
answers
70
views
Auto adjust row height to fit screen in gridview
I've got a simple grid layout:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools=&...
1
vote
1
answer
38
views
Gridview highlight specific Item based on SQLITE status in Android
I have a problem in which I want to set highlight Gridview item
when the value status from SQLITE is equal to 0. I have the query below
but yet I don't have the idea where to start and how can I ...
0
votes
0
answers
21
views
GridView position 0 weird behaviour
I have a gridView with an adapter inheriting from BaseAdapter, I've experienced a lot of weird getView at position 0 behaviour. Right now when the gridView should be updated it is being called twice. ...
0
votes
0
answers
13
views
getLocationOnScreen of first child of gridView
I'm trying to get location array of my items which are inside a gridView like so:
val location = IntArray(2)
gridView.children.forEachIndexed { index, item ->
...
0
votes
1
answer
259
views
how to remove selected images in grid view when long press happens in android
I am new to android developer, after completing some example apps, I started to work grid view concepts. Here I'm trying to implement the following logics.
1.When long press happened upon images, ...
1
vote
0
answers
18
views
Can't change GridView dynamically
I'm developing an app. In this app there's an alertdialog that opens when you click a point.
In this alert dialog there are two edittext, a gridview and a button. The gridview has associated a ...
0
votes
1
answer
53
views
How can I add images from the gallery to my gridview dynamically ? I can go to the gallery but images aren't getting added to my gridview
MainActivity.java
So the button choose_img_btn will redirect you to the gallery from where you can pick images and in my arraylist I temporarily added some images using R.drawable.ids. So far I can ...
1
vote
2
answers
126
views
How to get the item position in a ListView and GridView outside the adapter?
I'm trying to get a View position through his view hierarchy.
When I have a RecyclerView, for get the current view position I do:
if(view.getParent() instanceof RecyclerView){
RecyclerView rv = (...
1
vote
2
answers
93
views
Not able to display more than 2 recycler grid views
I am making an app on android studio. I want to display items in a recycler view using grid layout manager. I am adding three element into the array through which I want to display the recycler view. ...
0
votes
1
answer
218
views
Flutter - white spaces displaying for grid view cell in landscape mode
i have a problem to get ride of a white space in grid view cell in fluter, especially when the device is in landscape orientation, the code is :
return Container(
padding: EdgeInsets.only(top: 15),
...
0
votes
4
answers
602
views
What's the view I should use in Glide.with() function
I'm developing an app and I want to display ArrayList in GridView for that I use an adapter the object includes 3 Strings.
number, hint, imageURL
I want to put each object in the GridView I ...
0
votes
0
answers
27
views
Trouble with GridView Adapter
My GridView Adapter, need add in gridView item only one picture
class GridPhotoAdapter(context: Context) : BaseAdapter() {
private var imageArrayList = arrayOf(
com.example.b_my_friend.R....
0
votes
1
answer
138
views
How to work with GridView items after activity loads on Android using Kotlin
I have an example android app in Kotlin. On my activity I have images displayed in gridview, and I want them randomly to disapear (or change with some other image), but I can't figure out where to ...
0
votes
0
answers
68
views
How do I create a new canvas for each drawn object referenced by the Adapter?
I am trying to get my getView method to work in my canvasAdapter.java class with my custom view class. I was trying to reimplement the imageView example I have gotten from https://stuff.mit.edu/afs/...
0
votes
2
answers
111
views
Recyclerview gridlayout manager showing unnecessary space
I am trying to show custom layout in recyclerview in a gridview layout manager, but after 2nd row onwards extra space is coming into the border.
Hence my question is how to remove that extra space and ...
0
votes
0
answers
29
views
GridView not honoring columnCount
I have some code below for rendering a list in a GridView:
LevelActivity.xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas....
0
votes
2
answers
344
views
GridView is not showing last row
I have the following GridView:
<GridView
android:id="@+id/gridview"
android:layout_width="match_parent"
android:layout_height="match_parent"
...
0
votes
1
answer
113
views
ScrollView with GridLayout doesn't start at top
Even in design view it starts somewhere in the middle and I can't scroll up, I can only scroll down. Similiarly when I run the app it shows the content somewhere in the middle and I can only scroll ...
0
votes
1
answer
65
views
Android - Intentionally make Grid-view items overlap vertically
I am populating a RecyclerView with this seekbar slider library.
Since this seekbar slider have a progress bubble which only appears upon interacting with seekbar there's an added height to the ...
1
vote
1
answer
55
views
Android : How To Insert GridView Selected Image into SqlLite
BottomSheetDialogFragment was Called When i press the Add Button in My Main Activity , The BottomSheet Contain EditText and the ImageView ( The Image View from gridview )
The User enter the Edittext ...
2
votes
1
answer
112
views
Android : how to pass the default selected thing in to a new Activity
In my Activity i have a EditText, ImageView and Button.I place a ImageView inside the GridView, When My Activity was loaded.
The Gridview First Image was Selected Default and i want to Enter the ...
2
votes
1
answer
35
views
Android : GridView was Not Marked insit of that it load to empty Activity
I am new to android and i know How to Create a GridView and i dont know how to mark the first one as the default one as Selected When the Fragmant was opened ...
i dont pass the image when the user ...
0
votes
1
answer
91
views
GridView android studio - onHover?
I would like to implements kind of onHover to my gridView.
This is my current code:
GridView gridView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super....
0
votes
1
answer
29
views
xml layout visibly different to code generated layout
Items will be displayed in a GridView:
<GridView
android:id="@+id/month_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
...
0
votes
1
answer
74
views
Linearlayout programtically clicked, focused and active state is not working
I have an app which has a gridview with 4x4 grid. I am trying to highlight and click grid item when a cursor is on top of those grid items and cursor is controlled with a Bluetooth joystick connected ...
0
votes
1
answer
2k
views
StaggeredGridLayoutManager with auto-fit span count
I need a StaggeredGridLayoutManager that follows these two requirements:
Automatically calculate the number of columns based on a set minimum dp size for each column, with columns expanding to ...
0
votes
1
answer
855
views
How to create Asymmetric Grid layout like this?
How to create Asymmetric Grid layout like this using RecyclerView or GridView in Android Java only?
Note: The data comes in from an online database, so I want the column width to be adjusted ...
-1
votes
1
answer
64
views
Can't resolve layout in BottomNavigation Activity
So I have my main Bottom Navigation Activity, and there is three section one of which is dashboard. And I want to make a grid of categories in there. I've been trying to follow some guides on youtube ...
2
votes
0
answers
154
views
What is the best option to create a dynamic board game on Android?
I want to develop a dynamic matching game for Android. I want the change the board size from 4x4 up to 8x8 (eg. 7x4 and 5x4 would be valid sizes), depending on the level of difficulty chosen. This ...
0
votes
1
answer
305
views
Android GridView Scrolling issue
I'm facing a Problem, that my GridView "clips"/"glitches" after I scroll to the 4th row or longer than 2 seconds.
I got 58 Items, which get loaded via a Adapter into the GridView. An Item consists of ...
-3
votes
1
answer
66
views
Grid view missplaced remove space between the grid view to other elements
enter image description here
can someone help i need that the grid view will take a place in the center between the add button to the top spinners i need him to capture all the white space in the ...
0
votes
1
answer
29
views
Custom gridview after few positions shows incorrect data
I found some problem with my custom gridview adapter, i was adding positions from 1 to 10.
Everything is correct till number 6, after that instead of showing number 7 / 8 it shows number 2 and 1.
I ...
1
vote
2
answers
632
views
Android: How to add buttons to GridView dynamically?
I am trying to add buttons to a GridView for each string from textArray.
void addButtons() {
GridView gridView = (GridView) findViewById(R.id.gridView);
List<Button> buttons = new ...
0
votes
0
answers
182
views
How to load and add images to an android arrayadapter using Glide
I am trying to load an image using the Glide repository, then ultimately add that image into a gridview. I am currently trying to do this by creating a blank imageview, loading the image, adding the ...
0
votes
1
answer
825
views
How To Populate A Gridview With Images Retreieved From Firebase Storage
I have reviewed other similar posts before posting this, mine is different
I am current retrieving a list of download urls from my Firestore data base, then trying to download those images from my ...
0
votes
0
answers
74
views
use executePendingBindings() with gridView
I am trying to use executePendingBinding with gridView adapter. On some data change the binding is not executing at first but other UI operations are being executed before that. How do I prevent that. ...
1
vote
1
answer
540
views
Android Horizontal RecyclerView with dynamic amount of rows and columns
I need to create a Horizontal RecyclerView with dynamic rows and columns, and every cell has the same width, but different height. Which means column width should be consistent and row height is ...
-1
votes
1
answer
59
views
Android Gridview not holding selection after scroll
Hi I need help to find why the selection in my android gridview is not working. I am trying to add ability in my app to allow users to highlight selected items. It is working (i.e. the selected item ...