Fab button not working on a scroll view in react native - floating-action-button

Fab button is not working on a scroll view. I am using FAB from react-native-paper and the icon is displayed but when i press fab button, its not working. As an alternative, i tried to make a sticky button which sticks to the bottom when i use scroll view, but the button is displayed after the scrollview content and is not fixed at the bottom of our screen. It also fails.
My code is like :
<View>
<FAB style={{position:'absolute',right:0,bottom:0}}/>
<ScrollView></ScrollView>
</View>

Rendering Fab below the ScrollView should work.
<ScrollView />
<Fab />

Fab needs to be above all the components.
Put it inside <Portal> tag
https://callstack.github.io/react-native-paper/portal.html

Related

avoid screen getting pushed up into status bar when keyboard is open

On opening the keyboard, and on pressing the next button from the keyboard, the screen gets pushed up into the status bar, making the contents of the statusbar and the screen to overlap in react native android. I am using react-native version 0.59.2 and react-native-router-flux version 0.4.6
I have tried using keyboard avoiding view but no success.
I have also tried setting android:windowSoftInputMode="adjustResize", but using it pushes my tab bar over the keyboard.
Making the combination of android:windowSoftInputMode="adjustResize|adjustPan", however does not pushes the screen above the status bar, but does make my screen scroll automatically, thus user has to scroll manually.
StatusBar Component
<StatusBar translucent={true} hidden={false} backgroundColor={'rgba(0,0,0,0.0)'} barStyle={"light-content"}/>
This is how I am using it in the class.
<View style={{flex:1}>
<StatusBar/>
<Header/>
<ScrollView contentContainerStyle={{ flexGrow: 1 }}>
<TextInput/> //here i have multiple textinput fields
</ScrollView>
</View>
Expected result should be "the screen should go beneath the statusbar and not over it."

Bottom sheet dialog fragment is not scrolling up when keyboard appears

I have a BottomSheetDialogFragment which is opened from another fragment.
bottom_sheet_fragment.xml:
<LinearLayout>
<TabLayout/>
<ViewPager>
</LinearLayout>
I have two fragments for the view pager each of which contains an EditText and a RecyclerView in vertical fashion.
view_pager_fragment1.xml:
<LinearLayout>
<EditText/>
<RecyclerView>
</LinearLayout>
Now when ever I click on the edit text a part of recycler view is getting hidden behind the key board.
Expected:
When ever keyboard appears the bottomsheet should scroll up so that the recycler view contents remain visible.
I've managed to achieve the behavior you want by making the root view of the BottomSheetFragment layout a android.support.v4.widget.NestedScrollView. Don't know if its going to work for you, as you seem to be using other scroll views inside.

How can i show spinner in titlebar when link is clicked on webview

Am new to android programming. I want to create a little spinner on my title bar in webview when a link is clicked. An example is the one in opera mini (on the top left) shown in this photo. Pls I'll really appreciate your help.
Implement toolbar with progress bar or spinner. Then setup javascriptInterface for your webview and update toolbar's spinner when it's called from webview.

How to re-position tooltip to top left or on mouse over in PrimeFaces?

I want to change the place where the tooltip is displayed in the JSF. Like to top left or Top right or Mouse over.
<p:tooltip for="rowEditButton" value="Click to Edit" ></p:tooltip>
Mouse over is what i am looking for!
Try to use primefaces-extension tooltip. It has everything what you need.
Primefaces extension - tooltip demo

Enable mouse scroll in flipview children

In my WinJS application, I use a flipview, with a Listview inside it.
The listview as a long content, so it is scrollable : the scrollbar is visible, I can scroll with the finger on a touch screen, but the mouse wheel doesn't work.
After looking at the flipview source code, I added the win-interactive class on my listview, and now I can use the mouse wheel to scroll, but the problem is that the scroll also applies to the flipview container : the mouse scroll directly between the different flipview items.
Is there a way to enable the scroll on the listview, without modifying the flipview behavior ?
Yes there is, you can subscribe to the mousewheel event being fired in your ListView and stopPropagation() from there to the FlipView.

Resources