I want to add footer view to GridView in android as we can add to ListView. Since it is not available in Grid View, I added a loading layout at bottom of screen, and a grid view above it. Loading layout becomes visible when we scroll grid view till end. But when loading layout becomes visible, on scrolling upwards, it remains visible. How this can be customized in a way similar to footer of list view. Any help will be highy appreciated.
Grid View doesnot have footer similar to listview. Its workaround used was: Add a view having progress dialog at bottom of screen below gridview and manage its visibility.
Related
I am using recycler view with linear layout manager, based on some logic I am hiding/showing a view inside recycler view item.
Issue Problem occurs when I scroll, I can see some gaps in between recycler view item, which are random when scroll. If I hide the view always , then there is no issue, but I need to show and hide based on some logic and when implemented the gaps are coming as well.
Assumption One thing I am sure of is that the issue is there because of hiding/showing a view.
I have to make a layout in following manner:
grid with all content showing and a footer but when I enclosed grid view in scroll view so that after grid view end the footer scrolls up, grid view height cuts into one row only. how to overcome that….
I searched online there is something called expandableheightgridview but it is totally out of my reach……
so, can you explain that or any other solution in detail.
i have a fragment which has a stationary Image View at the top , some linear layouts to display the texts and List View at the Bottom. i want the entire screen to go up(that stationary Image View and middle part) when i scroll down in the List View.
I tried to place all layouts in a single Linear Layout and put it inside Scroll View since it has only one direct child..but that makes only the List view scroll able.
Try using CoordinatorLayout and scrolling behaviour from the design library.You can find a great tutorial here
I try to implement following behavior of my app:
I've got list of views and show them in scrollview partly.
If user scroll and reaches bottom of scrollview, I add one more view below last view;
If user scroll up and reaches top of scrollview, I add view above the first view.
My problem is that when I add view above the first view it shift all views in layout down.
My question is: how to add view above view in hidden area, so user could have a look by scrolling up?
In my activity I have a scroll view which contains a linear layout that has many views. Is there a way I can display a specific view (from the linear layout) when starting this activity? By default this view is hidden, so I must scroll the scroll view to make it visible.
Scroll the view to the view you want to show:
scrollView.smoothScrollTo(0, specificView.getTop())
See Is there a way to programmatically scroll a scroll view to a specific edit text?
You can use:
setVisibility(View.GONE);
see setVisibility for details