727
questions
2
votes
4
answers
168
views
Prevent GridLayout column width from stretching as if there were other columns
I have a programmatically created GridLayout that renders time slots within a specific day (such as an appointment time). At a maximum, each row should have 4 evenly spaced even width items, and at a ...
1
vote
0
answers
46
views
Ludo Game in Android Studio - Pawn Movement Issues on Different Devices
I am currently developing a Ludo game in Android Studio and have run into a significant issue regarding the movement of pawns across different devices.
Project Setup:
I have created a grid using ...
0
votes
0
answers
26
views
GridLayout CardView goes out of screen on my phone only
Im trying to make a list of products using GridLayout + CardView, it went well on the studio when i was designing Expected Results
But when i went ahead and opened the app on my phone i get this ...
0
votes
0
answers
32
views
Views are not aligned properly in custom gridview layout
cstm_grd_layout.xml
it is the custom grid view that will be used to show photo and name of each photo it contains ian imageview and an textview
<androidx.constraintlayout.widget.ConstraintLayout ...
1
vote
1
answer
62
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 ...
0
votes
0
answers
29
views
Error while downloading GridLayout in Android Studio
enter image description here
I download the GridLayout and can't use it properly.
I upgraded Android Studio version and its dependencies. Still same issue. Can't see grid in my project. It is not ...
0
votes
1
answer
69
views
problem with displaying grid layout while app has different theme than system
i have a problem with my elements in Gridlayout which are not loading properly.
If my android app has a different theme than the system of my phone, elements are not visible.
I have normal grid layout ...
0
votes
1
answer
107
views
How to adjust empty cell in grid layout in android studio?
I am working on android project using kotlin and xml. I have design a screen in where there are six menu like below
When I set visibility gone to the menu named "Chuti". Then the screen ...
0
votes
1
answer
48
views
How to display both the cardviews of equal sizes?
I am trying to display two cards of equal size, one of the CardViews will display the image and another will display TextView. Currently both the CardViews are of different sizes as shown in the image
...
1
vote
0
answers
152
views
Vertical grid with different cells in Compose
There was a slightly interesting question: we need to make something like a vertical grid, without a fixed number of columns and clickable cells (available for selection) that adapt to the size of the ...
0
votes
0
answers
40
views
How can I make a RecyclerView with 2 columns with the contents attached to the sides of the RecyclerView?
I want to implement a RecyclerView using a GridLayoutManager with 2 columns which will contain Checkboxes. I want all the items of the first column to be 'attached' to the left side of the ...
0
votes
1
answer
62
views
grid layout and cardview not showing anything, android studio
while using grid layout and cardview it shows only white rectangle not even divided on my phone while working fine on the emulator, adding pics so you could see exactly what I'm talking about;
on the ...
1
vote
0
answers
18
views
Which element is better for build dynamic part of layout?
I'd like to make a layout like this:
sample layout image
This is gonna be a list of descriptions for items. Each big blue rectangle - single item which I get from database, or json, nevermind.
The ...
0
votes
1
answer
56
views
How to set a column width relative with the GridLayout width?
I want to set a column width to a quarter width of his parent (the GridLayout), even if there is a single column in the row.
<GridLayout
android:id="@+id/widget_place"
android:...
-2
votes
1
answer
105
views
How to create a Baccarat trend like graph in Android?
I need to create a graph that is similar to a Baccarat trend like this
What could be the best approach? I am thinking of using RecyclerView with GridLayout but I have no idea how to plot it this way. ...
0
votes
1
answer
48
views
GridLayoutManager. How show selected item at the first grid?
My app is called MyGram, a school project. I want this app to function like instagram, everytime you select an image, it should show at the top.
My code is
package com.example.mygram;
import androidx....
0
votes
2
answers
48
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
1
answer
179
views
Android GridLayout: layout_rowWeight not dividing item width equally
I'm using GridLayout for my items, I have 4 * 2 items in total.
I use layout_rowWeight="1" and layout_columnWeight="1" for each item.
However, the item are not divided equally. The ...
0
votes
1
answer
103
views
Android GridLayout: How to align child view to right with its column width proportional
I have a Grid with two columns, each with a label. I want the label on the 2nd column to align to the right:
<androidx.gridlayout.widget.GridLayout
android:layout_width="match_parent"
...
0
votes
1
answer
199
views
GridLayout with variable row height in Xamarin
I have a fairly simple Xamarin app with a primary interface that consists of two ImageViews, one overlayed on the other. The images are the same size, and I want them to expand to fill the screen. ...
1
vote
1
answer
500
views
Change RecyclerView Layout (from Linear to Grid and reverse) when rotate device automatically
I have 4 different "Card List", "Card Magazine" , "Title" and "Grid" and view holders for each one to relate check my other question here.
now I am trying to ...
2
votes
1
answer
1k
views
Creating responsive grid layout in android studio
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/...
1
vote
1
answer
3k
views
How to create GridLayout using JetpackCompose?
<androidx.gridlayout.widget.GridLayout>
...
</androidx.gridlayout.widget.GridLayout>
In the grid layout, each column will automatically adapt to the widest view.
In JetpackCompose, I ...
1
vote
2
answers
1k
views
Android ConcatAdapter scrolls to the top when prepend elements but keep the position when append
I am making a movie list with RecyclerView and ConcatAdapter.
The ConcatAdapter consists of three different adapters, HeaderAdapter, MovieAdapter and FooterAdapter.
HeaderAdapter - displays either of ...
0
votes
0
answers
134
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 ...
1
vote
1
answer
1k
views
Using spanSizeLookup in Kotlin to set span size based on ItemViewType in GridLayoutManager
I have a a RecyclerView that uses GridLayoutManager to display data, I'm trying to span an item fully if the ItemViewType matches being a title. I know how its done in java, but in Kotlin I cant get ...
0
votes
1
answer
75
views
Android CardView behaving differently in 2 Android device
I've made a Card View GUI containing 6 options and the vertical layout looks good in my 2 devices. However when doing a layout for landscape mode, I see it cropped in one device.
Working Device
...
0
votes
1
answer
444
views
AndroidX GridLayout: incorrect layout when cell content changes
I am using an AndroidX GridLayout to display a 2x2 grid of content using the following XML layout:
<androidx.gridlayout.widget.GridLayout
android:id="@+id/gridlayout_first"
...
1
vote
0
answers
796
views
Android - Recycler View with Grid Layout item span different rows and columns
I need to implement several views in the same recycler view, with different width and height size, take a look at this image
Sometimes I will need to paint a item that takes two colums, as the first ...
1
vote
2
answers
530
views
How to create angled ribbon with textview
I'm trying to create such a list of items in android, I am able to complete almost everything except the orange ribbon on the right top corner, I tried different methods to achieve this UI element but ...
1
vote
1
answer
383
views
RecyclerView with GridLayoutManager change disposition of sorted item after scroll
I have a problem with recyclerview with inside items with string time text (08.03 , 08.09, ..., 10.51...). Initially the list of times is sort but when the user scroll the gridLayout the item lost the ...
1
vote
1
answer
47
views
Android Gridlayout isn't showing framelayout that doesn't have any view in it
I wanted to implement a chessboard with gridlayout & framelayout. When I hardcoded the xml everything works fine. But when I tried to implement it programmatically all things fall apart. In xml I ...
0
votes
0
answers
809
views
How to create a custom table like structure using Grid Layout in Android Studio?
I want to create a custom report which should look something like this in Android:
The number of schools and number of years will be dynamic. I had created this using the Table Layout but since it is ...
0
votes
2
answers
1k
views
Wrap Content grid view items with span count
I have a recyclerview with gridlayoutmanager having column span 4,
I am able to achieve below output with following code
recyclerGridLayout.addItemDecoration(new GridSpacingItemDecoration(spanCount, ...
0
votes
1
answer
418
views
Android Staggered Gridview Layout
have anyone done the same layout as fig. 1? i am currently using StaggeredGridLayoutManager but the result is fig 2. could anyone help me regarding this?
Ps tried using grid layout but it just copy ...
0
votes
0
answers
79
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 ...
0
votes
0
answers
91
views
Tried building a sample app where the fragments inside the Grid layout while drag and dropping would swap their place
This is my Activity.xml file.
' <?xml version="1.0" encoding="utf-8"?>
<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
...
1
vote
0
answers
143
views
RecyclerView with GridLayoutManager and footer
I just coded a RecyclerView inside SwipeRefreshLayout and added a footer as a list item that prints the recyclerView to appear last.
The problem I have, is that the recyclerView can change its ...
1
vote
0
answers
119
views
GridLayoutManager resizes the first item on the row above the last one
I have a RecyclerView that's using GridLayoutManager. It has some strange behaviour when the itemCount is not divided by the spanCount. It appears to resize the first item on the row above the last ...
2
votes
3
answers
574
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
1
answer
1k
views
GridLayoutManager in recyclerview with space among elements and matching the full width
I want to use a gridlayout manager, the items to be in 2 columns.
I want each row to be evenly split among the items and have some small space around the items too.
I did:
val manager = ...
0
votes
0
answers
216
views
How to create responsive list item in recyclerView with fixed height and width
So basically I want to create list items like this using grid layout in recyclerView
So if I fixed my height and width of the list item it the content within it is not fitted and also it becomes ...
0
votes
0
answers
60
views
What layout do I use for creating a form in android?
I need to create a layout exactly like in the picture. What layout can I use? If I use LinearLayout, I can't add the icons in front of the text fields without using so many nested LinearLayouts. With ...
0
votes
1
answer
792
views
Programmatically add view to a GridLayout in Xamarin.Android C#
How can I programmatically create and add views to a GridLayout using C# in Xamarin.Android, while specifying column/row span?
1
vote
1
answer
100
views
3 and higher columnCount cause bug Android Studio
When objects do not fit in three lines, they go beyond, and I need that if there are too many of them they passed to the next row. Is it possible way to fix it? Thanks.
columnCount is 2
columnCount is ...
1
vote
2
answers
698
views
Recycerview dynamic height for grid layout
I want to achieve this type of dynamic height of grid layout in recycler view. If a cell is having two lines then other cells in the same row should be of same height despite of having one line in ...
1
vote
2
answers
1k
views
GridLayout cardview getting out of screen Android
I am trying to make an app using GridLayout, CardView and LinearLayout so everything works fine on the emulator but when I test my app on real devices the card view goes out of the screen I have ...
1
vote
1
answer
809
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
2
answers
292
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
2
answers
985
views
Attribute layout_columnWeight not found in MaterialCardView inside Gridlayout
I am using the latest Grid Layout implemented in Gradle as below:
implementation 'com.google.android.material:material:1.3.0'
Below is my MaterialCardView Inside a GridLayout
<GridLayout
...