All Questions
Tagged with grid-layout android-gridlayout
63
questions
25
votes
5
answers
37k
views
android.support.v7.widget.GridLayout cannot get it to work
I have an android project which utilizes GridLayout in most of its menus and screens. The problem however is that GridLayout is supported from API 14 and onwards.
Since I want to make the ...
7
votes
2
answers
466
views
Alignment not right when adding view dynamically to GridLayout
When added buttons by XML - All good
<GridLayout
android:id="@+id/social_gl_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:...
6
votes
0
answers
2k
views
Dynamic Android Grid Layout with custom positioning and sizing of children
I'm currently trying to create an Android grid layout from custom elements(taken from a db) and am in need of suggestions on how to implement it. The grid should have 6 columns and it should be scroll ...
4
votes
1
answer
1k
views
GridLayout compatibility - ClassNotFoundException: Didn't find class "android.support.v7.widget.GridLayout"
I'm trying to use GridLayout in my Android 2.2 project, and after having installed the gridlayout_v7 project in my workspace, adding it to my projects Android Dependencies, adding a custom xmlns for ...
3
votes
1
answer
1k
views
GridLayout vs. RecyclerView with GridLayoutManager
I am just starting with Android development and there are at least two ways to build a grid: using GridLayout or using a RecyclerView with a GridLayoutManager.
Is there any case/reason still to use ...
3
votes
1
answer
1k
views
android gridlayout not showing weighted items in apis under 23
I am trying to populate a GridView with 6 imagebuttons, all of which have width and height set to 0dp, and are weighted on both row and column
While coding in Android Studio the designer was giving ...
3
votes
1
answer
1k
views
Android GridLayout cutting off
I'm following this tutorial: http://code.tutsplus.com/tutorials/android-user-interface-design-creating-a-numeric-keypad-with-gridlayout--mobile-8677
But in my application, I'm getting the result:
I ...
3
votes
0
answers
210
views
Space arround ripple effect in GridLayout
I am currently trying to create a layout which looks like the default Google Calculator in the latest Android. Now I am struggling with the GridLayout and a custom component (called FlatButton).
The ....
3
votes
0
answers
436
views
Control the size of patches in Gridlayout when using QuiltView lib
I started doing Android development about a year ago and ever since I started developing ive wanted to create a layout with all different size boxes that would fit together snuggly w. out any gaps. My ...
2
votes
5
answers
9k
views
GridLayout not working
I created a GridLayout and CardView, but card view not working I am using Android Studio 3.0.1
When I look in the Design View, everything looks right. But when I look up the run, I do not see the ...
2
votes
2
answers
1k
views
GridLayout matches parent by resizing the last column and row only (AndroidStudio)
I have a GridLayout of 4 columns and 5 rows. If set to wrap_content for layout_width and layout_height, all cells are of equal size, as they should be. When I set it to match_parent, however, all ...
2
votes
0
answers
561
views
GridView translate animation
I want to animate my gridview cells in the same way like in the 2048 game
I couldn't find any examples of anything similar and I have no experience in Android animation (or any animation to be ...
2
votes
1
answer
405
views
TextViews clipped in Dynamic GridLayout (Android)
I'm using a GridLayout (from the support library, if that matters) into which I dynamically add TextViews. I here get a problem with all TexViews getting added in only one row, which also leads to ...
1
vote
1
answer
2k
views
android gridlayout columnSpan not spanning
Purpose:
I am attemping to create a simple keypad, using a GridLayout and Buttons
Using the columnSpan feature of a GridLayout, my numeric keypad consists of buttons 0-9 and a clear button spanning ...
1
vote
2
answers
1k
views
Android Studio: Buttons in Grid Layout change size in emulator
enter image description here
I don't know how to make all button sizes the same... I tried making grid to wrap content, it worked, but button sizes were a bit different depending on the number of ...
1
vote
2
answers
2k
views
Remove one row from gridlayout
I'm using a GridLayout with 5 coloums and multiple (not a fix value) rows. It is possible to add more rows with values to the grid by a add button (the values are hardcoded in hashmap for now).
In ...
1
vote
1
answer
16
views
Cannot resolve symbol 'GridLayout'
When I try to program a program in Android Studio, I found this error but I did not know how to resolve it
Cannot resolve symbol 'GridLayout'
this error rises up in Android Studio
I search on internet ...
1
vote
1
answer
649
views
Fit ImageViews into Android GridLayout
I need to place 4 images into GridLayout. If I define their sizes hard-coded.
e.g.
android:layout_width="150dp"
android:layout_height="200dp"
It works fine.
But my question is, if ...
1
vote
1
answer
67
views
My gridlayout is not inflating as expected
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:...
1
vote
2
answers
479
views
GridLayout dynamically change to fill Gone view
I am using a GridLayout to design a dashboard which a 2 columns based one. So I am just adding widgets and it directly define the Grid.
The issue I have is that, I have 12 cells but some will be set ...
1
vote
2
answers
275
views
android gridlayout row and column not match the result
I want to create a GridLayout
Here is my setting from server:
items.add(listOf(4, 3, 0, 0)) -> start at x: 0 - y:0 expand horizontal : 4, vertical 3
items.add(listOf(1, 1, 0, 3)) -> start at x:...
1
vote
0
answers
30
views
Android grid layout items starting from the center and fill the view if many
How to create a layout containing items (displayed in a recyclerview) when their count is few (4 only for example), they would be positioned at the view center, and when their number increases, the ...
1
vote
0
answers
44
views
How do i span in gridlayout but in android java class?
Im doing a schedule for my school using Android, and i did the schedule via gridlayout,but now i cant rowSpan or columnSpan using the java part.
And the result is:
Image of the layout
Here is the ...
1
vote
1
answer
295
views
GridLayout SurfaceView children overlays each other when changing the visibility of them
I have an activity named ScreensActivity, this activity contains a GridLayout.
Each of the GridLayout children is a custom View named ScreenView.
ScreenView consist of a SurfaceView which intended ...
1
vote
0
answers
2k
views
Android Gridlayout :how to change the height of each row?
In GridLayout i want to stretch the button height in row (ie to take 3 rows or more ) i could to specify the height (1 or 2 rows) using the command android:layout_rowSpan="2" but its not ...
1
vote
2
answers
173
views
Dynamically created Views don't appear in the GridLayout properly
I have a GridLayout in which I want dynamically generated TextViews to be displayed. At least the GridLayout can have 2 columns and at most it can have 3 columns.
I have a function called decide(int)...
1
vote
1
answer
436
views
Gridlayout preivew is right but on real device gets compressed
I am new to Gridlayout in android, but i create a layout which looks fine on preview screens but when i run it on real device all items gets compressed and get aligned to top-left of screen
This ...
1
vote
1
answer
745
views
Support v7 GridLayout doesn't stretch columns
I'm trying to use GridLayout from support library in my project. All that I've done was adding it to my project as Android library. I've created a simple layout to show what is not workning.
<...
0
votes
2
answers
8k
views
Set ColumnSpan and ColumnWeight programmatically
I have been trying to add views to a gridLayout, wich I have done, but they're not adjusting to the columns as they should, I had tried inflate the views with the same atribute that is showing well in ...
0
votes
2
answers
1k
views
Custom GridLayout
I'm trying to make some auto fill grid, but without know the width from every item. So, the width from child can be deferent in every row and every column. It only depends from a TextView.
I want ...
0
votes
1
answer
77
views
Gridlayout - sizing of element over extending past elements
Intro/Issue
I'm using a mobile app called AIDE (and it's program App UI Designer) to create a layout for an mobile app I'm making before I start programming it. The layout is almost perfect. I'd want ...
0
votes
1
answer
232
views
Android grid layout align like GridLayoutManager style
I have the following GridLayout which stores a number of 6 maximum columns :
<androidx.gridlayout.widget.GridLayout
android:id="@+id/pokemonTeambuilderSpritesLayout"
...
0
votes
1
answer
1k
views
Android: TableLayout doesn't show
I'm new to Android app programming.
I'm trying to use a Table Layout to list some notes. Because their number shouldn't be limited, I have to integrate it programically.
I created a new project for ...
0
votes
3
answers
3k
views
How to add multiple views as a single View to a GridLayout in Android?
So I have a GridLayout that I want to display both, ImageView & TextView in each of its cells. Each TextView should be placed right under the ImageView in the Grid cell.
Problem here is, a ...
0
votes
3
answers
460
views
Aligning textviews with imageview in a gridlayout
I'm trying to align 5 textviews with an imageview. I've created a gridlayout with 2 columns and 5 rows. In column 0 are 5 textviews divided in 5 rows. In column 1 is an imageview that spans over the 5 ...
0
votes
1
answer
1k
views
Interchange positions of two Views within GridLayout (Android)
I have programmed a basic gaming App that consists of blocks which can be exchanged by a swipe (similar to CandyCrush). I succeeded in recognizing the swipe gesture but my code that changes the ...
0
votes
0
answers
22
views
How do I stop the background image from stretching the last row and column of cells in my nested scrollable GridLayout?
How to set background image on grid layout in android studio? This should be a simple problem, I might not search hard enough.
What I want to achieve
I have a nested scrollable grid layout, and I want ...
0
votes
2
answers
44
views
Android Studio Recycler View have gaps between the rows. Help me fix
I followed this tutorial on youtube for my school project. The app is able to display selected images from gallery but the recycler view have gaps in every row. What do I code to fix this app? help. ...
0
votes
0
answers
133
views
Kotlin || How to adjust Gridlayout width and height parameters programatically for all screen sizes?
I have a gridlayout with fixed height and weight paramaters. When screensize change automatically ıts getting bigger or smaller. Iv tried all methods but not succeed. How to fix?
My code ;
private ...
0
votes
3
answers
545
views
Android Studio 4.0.1 GridLayout crashes the app
I was learning how to take a grid and find some elements from the grid, but my app was crashing when I was looking to find the grid by id, so I decided to create a test app that would look for the ...
0
votes
0
answers
40
views
Gridlayout is displaying 4 records but after I changed the rowCount and increased to 6 it didn't display in android
Gridlayout is displaying 4 records but after I changed the rowCount and increased to 6 it didn't display in android.
I used this code to display a grid layout with 4 rows and it works but when I ...
0
votes
1
answer
51
views
GridLayout images go off screen
In the design and blueprint view it looks that it fits, but on app some images go off screen. I want to have all images shown, without scrolling. It doesn't need to support landscape orientation, only ...
0
votes
2
answers
53
views
Problem with filling 5th column in GridLayout
When I add the 5th column, the button with the number 5 half crawls out of the screen. When I add value to the buttons: android:layout_columnWeight="1", then the button with number 1 is stretched out ...
0
votes
1
answer
31
views
GridLayout of Buttons auto aligns left, ignoring Grid lines
I have a very straightforward grid of buttons to make a keyboard. In this, I want "A" to be halfway in the middle of "Q" and "Z", so instead of 10 columns, which is what I require, I have 20 columns ...
0
votes
0
answers
250
views
Xamarin Android GridLayout - rowspan works in designer but not in emulator
I am trying to design a form where I have 6 buttons. 1 button will take up half the screen and the other buttons will each take up the rest of the screen space. I decided to use a GridLayout where I ...
0
votes
1
answer
82
views
GridLayout Items not visible in Nougat
I have to dynamically build views and I have used GridLayout as the parent layout to populate 2 views in a row. The code works perfectly fine in the platforms below Nougat. But in nougat version, the ...
0
votes
2
answers
934
views
GridLayout overflows the screen
I have images in a Grid Layout. However the Grid Layout rows overflow the screen. I think the image widths are not the cause of problem. If I delete the images, the grid layout lines still overflow.
...
0
votes
1
answer
599
views
GridLayout will not show up on device, only in Android Studio
I am creating a very simple activity for my nephew to learn Android and, during design time, I can see the grid, but when I put it on my Samsung Note 4 (android 6.0.1) it's completely empty.
Here's a ...
0
votes
1
answer
63
views
Is there a way to hold a particular element of a recyclerview on the top?
I am using a recyclerView, with a GridLayoutManager layout.
The recycler view contains 2 types on ViewHolders, one having span size equal to 3 in order to separate different types of grid elements ...
0
votes
1
answer
3k
views
Android GridLayout fill_horizontal goes off-screen [duplicate]
I have a simple GridLayout:
<GridLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:...