How to add a floating action bar in Appcelerator . I have designed the widget and would like to place it over a ScrollView . The widget should be always on the bottom right and should not move with the scroll view .
You can just add it to the parent view/window of your ScrollView. E.g.
<Window>
<ScrollView />
<Widget />
</Window>
and it will be on top of your ScrollView and stay at the desired place (use tss to set right and bottom to a value)
Related
I have a NativeScript application with the ActionBar like the following image.
How can I force the ActionItem (3 bars icon) to be on the right side instead of the left side?
The problem is that on Android 10 and above, when device language is Hebrew (RTL language) the ActionItem is on the left and I would like to keep it right.
To align items inside the actionbar to the right, use:
<ActionBar title="HBreader">
<ActionItem
ios.position="right"
android.position="actionBar"
(tap)="doThisAndThat()"
>
// your view element here (image/icon/label/etc...)
</ActionItem>
</ActionBar>
When creating a long string of text using a TextView on iOS and exceeding the height of the TextView it will allow you to scroll.
After scrolling back up to the top of the textview and selecting a piece of text my caret position is not correctly set and my textview will not scroll to the "tapped" position. This is probably caused by the overlapping keyboard.
I set up an easy to test template which is:
<template>
<Page backgroundColor="#6B00D4" backgroundSpanUnderStatusBar="true" actionBarHidden="true" class="page">
<GridLayout rows="auto">
<TextView row="0" height="auto"/>
</GridLayout>
</Page>
</template>
How will I be able to get the correct position when tapping on a piece of text?
EDIT: Just found out it only seems to happen on iOS 14
EDIT 2: The scroll position isn't used when positioning the caret, that's why the caret position seems off from the user tap position
EDIT 3: Seems to be a native iOS 14 issue: https://developer.apple.com/forums/thread/662056
Is it possible in xamarin ScrollView to start no from standard top or left, but from bottom or right?
<ScrollView x:Name="scroll" Orientation="Horizontal">
</ScrollView>
I think that ScrollToAsync(double x, double y, bool animated) should do the trick for you. Whenever your view first appears, use that to set the scroll view to whatever position you want. Then the user will start scrolling from there.
I am unable to change the height of the titanium progress bar. The height property affects the size of the container it is, but not the bar itself. Is there anyway I can change it as it is too small.
Cheers.
xml
<Alloy>
<Window id="win" backgroundColor="white">
<ProgressBar id="pb" top="10" width="250" height="50" min="0" max="10" value="0" color="#fff" message="Downloading 0 of 10" />
</Window>
</Alloy>
If I change the height property from say 'auto', as above, the bar itself stays the same. Only the height of the container which holds the progress bar changes
Ok I think you're trying to change the height of the actual bar itself? When you set the height using the height property, you're changing the height of the whole ProgressBar View which includes the label.
From a quick search, it seems that what you want can only be done using a custom Android Theme:
Increase height of progress bar in Android
Link to how to make custom Android themes in Titanium
Also, height=auto has been deprecated and you should use either Ti.UI.SIZE or Ti.UI.FILL
EDIT: For iOS, looks like a custom module is the only solution https://github.com/viezel/NappAppearance
How to always show scroll bar in a listbox. If I delete Notscrolling visualstate of Scrollviewer. It always shows scrollbar only after scroll down happend. I want to show scrollbar when page loaded it should be visible always.
Pls Help me
<ListBox
ItemsSource="{Binding}"
ScrollViewer.VerticalScrollBarVisibility="Visible">
</ListBox>
Hope it help
<ScrollViewer HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Visible">
<List Box ..>
</List Box>
</ScrollViewer>
The Thing is the scroll bar moves up/down (or left/right) to the maximum of the child's(here listbox) width/height value. So ensure that the parent of the scrollviewer has greater height/width than the child's of the scroll viewer.
For your question : This is by design WP will not display scroll bar until you scroll it. It comes visible once you scroll the content of the scroll viewer and then disapperars automatically. If it is displaying ever (as you want to be) it must be an overhead.