Fill max width inside FlowRow - jetpack compose - android

I to want a row where the items goes to the next line if it gets to small. Fair enough, i am using FlowRow for that.
I want the items to take up the space on the line they are on. Ok, tried to use weight, but thats not possible.
So how can i create a Row that both goes to the next line when reaching a size limit, but also make it fill the whole possible width?

Related

Android Force GridView items to fill full gridview height

First of all I'd like to say it isn't any duplicate. My problem is tha I have to much items and I want to make them smaller to fill in gridview height. That's why I cannot use setMinimumHeight. I need something like setMaximumHeight but nothing like this is predicted by Android SDK. Additionally I don't have any row spacing so I cannot make it smaller.
image to help understand:
I want make itemw smaller height, I don't want any to be "cut" by the display border.

Add new element to the right till the end of screen in Android

Basically I have a lot of square pictures. I want to add them from left to right till the end of the screen, go to the next line and so on.
I'm looking for the best way to add as many element as possible in one line of a layout before going to the next line.
I'm currently using TableLayout with a fixed number of element per row which is not really convenient.
Is there a way to do it dynamically to be sure to cover every screen size and screen flip ?

GridLayout frustrations

I have a series of controls that I need to layout in a 3x2 grid (limited to only 6 controls visible at a time). I need to be able to change a cell's visibility to gone and have the next visible control in the list align itself on the previous column or row depending on where it already sits. I also need to force each cell into a perfect square, but make the width of each cell half the screen size. Is there a way I can make this happen in XML without having to resort to using an adapter in java?

Android. Making my object appear anywhere on the screen

If I want a bunch of objects that appear let's say middle, middle right and occupy have the ability to occupy any part of the screen, would I use gridlayout or relative layout and dp to customize the location?
I think I explained it badly. If I used an analogy, it would be like whack a mole with the hole screen. I was thinking of making a large amount of rows and columns in gridlayout or just using dp. Any insight or suggestions?
The thing about gridview is that its entire purpose is scrolling. If you have lots of data and want to scroll through it in a grid, that's the right answer. If you have a fixed amount of data you want to display in a grid, you want something else- a TableLayout likely.

Android clip upper part of text in TextView

I need to have two TextViews displaying same number, first of which should display upper half and second lower half in order to animate those parts differently. (See images below, there's an example with '8' digit).
http://img403.imageshack.us/img403/2461/bottomtop.png
While clipping bottom is perfectly simple (setting TextView's height is just enough), the second task I find very hard. The only solution I came up with till now is to wrap TextView into some layout and set it's y position to negative - it would be OK, but I need to care about optimization because there will be many digits animated in that way simultaneously.
Do any of you know how to achieve this in more effective way?
What about overlaying the top textview OVER the bottom textview (maybe with the white spacer as well?

Categories

Resources