Scrolled to the bottom when ads (admob) loaded in recyclerview in android - android-recyclerview

I have a recyclerview with 7 items in it. In the bottom of the list, I insert a banner of admob. I have inserted successfully.However, when the ads (in the bottom of the list) loaded, it automatically scrolled my view to the bottom.
I have used "ScrollToPosition(0)" but it doesn't have any effects.
I want my list always in the top when the ads loaded. What should I do?
Many Thanks.

Related

Hiding Scrollview items when there isn't enough room to show them

I'm currently developing an app where a list of items are being rendered in a ScrollView that's positioned before and after a View just like shown in the image.
Now as I scroll the first and last items tend to get occluded by the padding/Views. Is there any way to handle this behavior by making any partially occluded item not make it to the view?

How to disable recycler view auto scrolling?

I'm currently working on a kotlin mobile application. The problem I have met is if there are having 3 reviews or above, the recycler view will auto generate a scroll bar on the right side and the display will become not so good. May I know that is there anyway to disable scroll bar of the recycler view so that my layout can view all the reviews by just add a scrollview on the layout?

How to set the scrolling threshold for a react native ScrollView to switch to next/previous page

I currently have a ScrollView/Flatlist containing 4 items with paging enabled. When rendered, each item covers the entire screen in portrait mode. On Android, when the user tries to swipe vertically from one item to another, this requires "large" swipe gestures.
I am trying to increase the "sensitivity" of the react native ScrollView so that the user requires smaller swipe gestures to switch from one item to another.
At the moment the switch to the next/previous page requires that roughly 50% of the target page is visible. I want to reduce this value so that the user does not need to do big swipe gestures.
Any suggestions on how I could fine-tune the props of the ScrollView/FlatList would be great!

How to Auto adjust Scroll height of tab render items in native base react-native

I am using native base tabs to display scrollable tab bars in react-native
I had 4 tabs and the content in each render item tab changes, so the length of the tab bar content changes. how can I adjust the height of the scroll view based on content in tabview. it should not scroll when content is less. it leaves blank space below when content is less.
when content in tab bar render item is more than the screen height it scrolls.
when content in tab bar render item is less than the screen height it should not scroll.
even if the content in the 2nd tab is less it scrolls based on height of 1st tab content height.
It should not scroll if the content on in tab render item is less.It should scroll based on the content in tab view
it's the sole reason why i left native-base because of the issue. It's and open issue with native base and they havent resolved it yet. The problem is that i had 3 tabs and three scrollViews had different height. so it takes the longest height and when we go to any other tab , it leaves blank space.
this is the link to the open issue in github native base tabs . Do check it out if you can find any resolution for it. I couldnt find it so ive switched to
react native tab view . .This is a better library for tabs and coz of the issue in native abse. i switched to it.
Hope it helps. Feel free for doubts

Scrolling Tab Bar with Navigation Tab in each view

Project need to show 7 tab bars in the application. So as per TabBar controller I am able to show the 4 tabs at a time along with "More" button which after clicking shows remaining tabs.
Also I need to show Navigation Tab for each View.
I am able to achieve this till now. But we need to make the Tab Bar in scrolling manner so that user can scroll the remaining tabs and after clicking particular tab that view is loaded along with Navigation Controller.
So can any body tell me how to achieve Scrolling TabBar along with Navigation bar in each view.
Any sample code will be more great full......
Thanks in advance.
You already mentioned the "more"-button... This should be the way to manage too many tabs, in order not to break the common iPhone l&f and keep users on track.