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
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
I'm making a custom gradient tool bar in Xamarin.Forms and I would like it to start showing under the status bar in the android version.
I tried using the first color in the gradient colors as the status bar color but it was too big to feel gradient.
I also tried making the window full screen but it removed all the status icon that I need to view as well
above is how I would like it to look like
In order to put a custom gradient toolbar under the status bar in Android, you will have to Hide the NavigationBar, that can be achieved in xaml by:
NavigationPage.HasNavigationBar="False"
Or in the code-behind:
NavigationPage.SetHasNavigationBar(this, false);
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)
I have tried adding a progressbar to my Windows Phone 7 application, but it doesn't show in the emulator. Am I doing something wrong? Can you give me an example of how to implement the progressbar?
I actually put the progress bar on a grid with a Panorama control. It seems that the Panorama control sits on top of the progress bar unless you set its visibility to collapsed. Once I set the Panorama control's visibility to collapsed, I could see the progress bar.
Thanks for all your help, though.
With IsIndeterminate = false, you simply write code to update ProgressBar.Value to reflect how far through your processing your are.
This assumes you can quantify your progress of whatever processing you are doing in terms of a percentage.
For cases where you can't quantify this, say for example downloading content of unknown size, you can set IsIndeterminate = true.
Early on it was recognised the storyboards used to implement the IsIndeterminate = true ProgressBar animation were very costly and had not been implemented on the render thread.
In response Jeff Wilcox posted this solution.
Jeff Wilcox – A high performance ProgressBar for Windows Phone
And this update, which Matt has referred you to.
Jeff Wilcox – Windows Phone performance progress bar update: part 2, remember to turn IsIndeterminate off when not needed!
Do not use the progres bar which ships with the SDK.
Use this instead.
You use it like this (from the above linked page):
<ProgressBar HorizontalAlignment="Left" VerticalAlignment="Center"
IsIndeterminate="{Binding IsProgressBarVisible}"
Style="{StaticResource PerformanceProgressBar}"
Visibility="{Binding IsProgressBarVisible, Converter={StaticResource VisibilityConverter}}" />
You either need to set a value on it, or set IsIndeterminate=true, or it doesn't show/do anything.
You can set the Canvas.ZIndex property to put in front of the panorama controls.
E.g.
<ProgressBar x:Name="ProgressBar"
Canvas.ZIndex="100"
Width="400" Height="30"
IsIndeterminate="True"/>