Xamarin.Forms disable Shell TabBar font scale when selected - xamarin.forms

Is there any way to disable behavior of tab bar scaling font size for selected items on Android?
It cuts off titles when selected which is very annoying.
I could not find TabBar renderer kind of thing to change behavior on Android side.
The last item 'Notificaitons' are being cut to 'Notificatio' when it is selected.

Create a dimens.xml in Android> Resource> values. And then add the following XML to override the size of the text when it is active and not active:
<?xml version="1.0" encoding="utf-8" ?>
<resources xmlns:tools="http://schemas.android.com/tools">
<dimen name="design_bottom_navigation_text_size" tools:override="true">12sp</dimen>
<dimen name="design_bottom_navigation_active_text_size" tools:override="true">12sp</dimen>
</resources>
Before:
After:

Related

Fit title text on a tabbedpage xamarin forms?

Hello friends how are you?
I tell you that I have a tabbedpage that aims to show a list of elements. These elements have different states and not to saturate a listview, I decided to create a tab for each state. This works well, the only problem is that the text of the tabs titles are cut. I understand that it is because of the screen size. But I have seen apps that have multiple tabs that are hidden and when they press other tabs they appear.
In summary, how can I make the text appear complete in the tab titles? Try WidthRequest, but this does not work. I thank you for the help you can give me.
<ContentPage Title="Tab 1" MinimumWidthRequest="222" WidthRequest="222" />
<ContentPage Title="Tab 2" MinimumWidthRequest="222" WidthRequest="222" />
<ContentPage Title="Tab 3" MinimumWidthRequest="222" WidthRequest="222" />
You could reset the app:tabMode from "fixed" to "scrollable".
In Xamarin.forms, Android> Resources> layout> Tabbar.xml:
Change:
app:tabMode="fixed"
To:
app:tabMode="scrollable"
Please make sure you have the code below in your MainActivity.
TabLayoutResource = Resource.Layout.Tabbar;

Center text of a Xamarin Forms TabbedPage Title

i have a TabbedPage with multiple Child-Pages, with a title each.
When the title is short enough to be single line the text gets centered perfectly, but as soon as the text needs more than 1 line it is no longer centered.
Can anyone tell me how to fix this?
I think it's impossible to do in common way for all platforms, and you have to do it in platform specific way.
For android project I did it in such way:
In file Styles.xml from folder Resources/values I added style
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="CustomTheme"
parent="#android:style/Theme.Holo">
<item name="android:actionBarTabTextStyle">#style/CustomTab</item>
</style>
<style name="CustomTab"
parent="#android:style/Widget.Holo.ActionBar.TabText">
<item name="android:gravity">center</item>
</style>
</resources>
And in MainActivity.cs I added
[Activity(Theme = "#style/CustomTheme")]
For Windows phone I found this article https://nocture.dk/2014/12/10/xamarin-forms-customizing-tabbed-page-header-title-windows-phone/, but didn't try it.
For iOS i didn't check too http://jfarrell.net/2015/02/25/customizing-the-tab-bar-on-ios-with-xamarin-forms/.

Set "Splash Screen" color for Android TV App

How can I set/change the color of this animated screen for my app?
OK, Finally I've figured it out.
This color is taken from Theme. You should overwrite the android:colorPrimary to change this color.
This is called "Changing Launcher color"
To customize the color of this animation, set the android:colorPrimary attribute of your TV app or activity to a specific color.
<resources>
<style ... >
<item name="android:colorPrimary">#color/primary</item>
</style>
</resources>
For More info, you can check this link
https://developer.android.com/training/tv/start/start.html

FLEX - Disable specific Tree nodes

Ey guys,
I want to disable specific nodes in a mx:Tree component.
The dataprovider is a XML file, and here is a sample of that menu:
<nav>
<menu label="Menu" action="" item="">
<menu label="Item 1" action="image" item="image.png" />
<menu label="Item 2" action="disabled" item=" " />
</menu>
</nav>
In the above example, you will get a simple menu item with two childs. I want to disable the second child (if action is set to disabled...)
How can I do this?
All I need is to simply change the font color of those items, or to make the alpha 0.5. If its possible to also disable the clicking, then thats good, but the main focus is giving them different color or opacity.
Any help is appreciated! :)
Thanks! :)
Basically that's how item renderer should looks like. However it's not going to work with xml dataprovider. I recommend you to to use collection of objects then it will work fine.
<?xml version="1.0"?>
<s:MXTreeItemRenderer xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:fx="http://ns.adobe.com/mxml/2009"
enabled="{data.action != 'disabled'}">
<s:Label text="{data.label}"
color="{data.action != 'disabled'? 0x000000:0xff0000}"/>
</s:MXTreeItemRenderer>

Widget in Adobe AIR position bottom-right

Thanks in advance.
I'm a graphic designer.
I have to make a widget that shows some icons.
I've made an icon that starts in systemtray, all I need is to make the window application that start at bottom over the icon.
I don't know anything about flex...
I've done this so far in application.xml:
<?xml version="1.0" encoding="UTF-8" ?>
<application xmlns="http://ns.adobe.com/air/application/1.0">
<id>com.widgetStatus.widgetStatus</id>
<filename>widgetStatus</filename>
<name>widgetStatus</name>
<description>Test</description>
<version>0.1a</version>
<initialWindow>
<content>html/index.html</content>
<title>widgetStatus</title>
<systemChrome>none</systemChrome>
<transparent>true</transparent>
<visible>true</visible>
<minimizable>false</minimizable>
<resizable>false</resizable>
<width>400</width>
<height>300</height>
<x>1268</x>
<y>646</y>
</initialWindow>
<icon>
<image128x128>/icons/widget128.png</image128x128>
<image48x48>/icons/widget48.png</image48x48>
<image32x32>/icons/widget32.png</image32x32>
<image16x16>/icons/widget16.png</image16x16>
</icon>
The application starts over the systray but only with my resolution obliuvsly.
Now I need to do something like that:
Positioning Flex/AIR Desktop App Window to the bottom right corner
How can I work with that script in flex? I understand that I can put the code into xml.
Thanks.

Resources