Android GridView populate from the bottom - java

I'm using a GridView, and I want items in the grid to start from bottom left and grow to top. Any suggestions on how I can achieve that?
I tried using this attribute:
android:stackFromBottom="true"
but it doesn't work! What can be done?

I am not sure about GridView,
but in a GridLayout when you set its orientation to vertical. each new view is added vertically.
row count limits the number of views per column.

Related

How to create a grid which you can scroll both vertically and horizontally, which contains random sized elements, and works with recyclerview?

I am a beginner, and i tried to find an answer but everything i found was from 2013 and earlier. I want to create a grid which you can scroll in any direction, (as a zoomed in picture), which contains items of different sizes which are generated randomly, then i want to populate them with a recycler view. I will attach an illustration, maybe you would understand it better.As you can see, the thick outline is the phone screen and whenever you scroll the view, it generates new items which are populated by a recycler view.
I thought of using Google's FlexBox Layout for generating the items but i don't really know how to create that scrollable view. I would literally pay to get this done.
I don't think you can make RecyclerView scroll in Both way. U can Create Nested RecyclerView if that is what you are looking for.

Layout scrolling ripple effect

How could this scrolling behavior be accomplished?
Screenshot
To be specific, I need the wave effect to be shown whenever I try to scroll and reach the limit of a layout. Is there some property that I can tweak?
To get this wave effect, use any horizontally or vertically scrollable view as a container layout in your layout XML.
For example: ScrollView, HorizontalScrollView, NestedScrollView
List and Grid layouts like ListView, RecyclerView also has this scrolling effect.

List view with horizontal scroll

I am using custom list view with base adapter. The width of row is longer than screen. But I am not getting horizontal scroll bar like automatic vertical scrollbar. Do I need to specify any extra attribute? I tried with putting listview in horizontal scroll view but still no success. How should I achieve this?
Thanx in advance.
You might just need to use android:layout_width="wrap_content" in your horizontal scroll. You should also show your XML layout in case it is just some other minor change, like having the list view inside the horizontal scroll view.
As a side note, you won't get a horizontal scroll bar but the views inside the horizontal scroll view will slide left/right if their width is wider than the screen.

Android GridView 1 full width item then 2 columns, how?

I need the first item in my GridView to be twice the size of other items, then all next items to be same size which is half the first item size.
using GridView is not mandatory, it just seems to me it should be done using GridView.
You can put the first item out of the gridview in a RelativeLayout
it is not an elegant solution, but it's a solution
You should go with GridLayout :-
here is a short tutorial http://developer.samsung.com/android/technical-docs/GridLayout-in-Android
custom arrangement in GridLayout :- Heterogeneous GridLayout
You can use a linearlayout, set layout_width of all items to 0dp, set layout_weight of the first to 2 and layout_weight of the others to 1

How to set the contents of a vertical scrollview depending on what button is chosen from a horizontal scroll above?

I was just wondering if any of you guys could give me a heads up as to what this involves?
I have used ScrollViews, I know they need a LinearLayout to scroll through and that isn't the problem.
It is that there is a dynamic horizontal ScrollView containing several buttons with buttons can be added/removed.
I also have a vertical scrollview.
The GOAL is to set the contents of the vertical ScrollView depending on which button is pressed in the above horizontal ScrolLView.
Any direction/insight would be appreciated.
Cheers
In ur Horizontal scroll view U have to set tag for individual views. Then in on click event of a view u can populate the vertical scroll by required data. I thinks for ur vertical scroll u can use the listview. It will be easy to handle. Also if ur horizontal things are in more numbers then its better to use the ListView for that even..

Categories