Iconize icon indicating copy to clipboard operation
Iconize copied to clipboard

the icons do not appear

Open XamarinTounsi opened this issue 6 years ago • 14 comments

Hello, the icons do not appear in any platform (UWP, Android, IOS)


 <StackLayout Orientation="Horizontal" Margin="0,5,0,0"
                         HorizontalOptions="FillAndExpand">
                <iconize:IconImage Icon="fa-tag" IconSize="16" IconColor="#fff"
                                   HorizontalOptions="Start"/>
                <Label Text="Tags" TextColor="#fff" VerticalTextAlignment="Center"
                       HorizontalOptions="Start"/>
                <StackLayout Orientation="Horizontal"
                             HorizontalOptions="EndAndExpand"
                             effect:AddCommand.On="True"
                             effect:AddCommand.EnableRipple="True"
                             effect:AddCommand.EffectColor="#3742fa"
                             effect:AddCommand.Command="{Binding ShowCategoriesCommand}">
                    <iconize:IconImage Icon="fa-ellipsis-h" IconSize="16" IconColor="#fff"
                                       Margin="0,5,10,0"/>
                    <Label Text="More" TextColor="#fff" VerticalTextAlignment="Center"
                           Margin="0,5,10,0"/>
                </StackLayout>

            </StackLayout>`

in app.cs i added this code

  Plugin.Iconize.Iconize
                                .With(new Plugin.Iconize.Fonts.FontAwesomeSolidModule())
                                .With(new Plugin.Iconize.Fonts.FontAwesomeRegularModule())
                                .With(new Plugin.Iconize.Fonts.FontAwesomeProRegularModule())
                                .With(new Plugin.Iconize.Fonts.FontAwesomeBrandsModule())
                                .With(new Plugin.Iconize.Fonts.EntypoPlusModule())
                                .With(new Plugin.Iconize.Fonts.IoniconsModule())
                                .With(new Plugin.Iconize.Fonts.TypiconsModule())
                                .With(new Plugin.Iconize.Fonts.MeteoconsModule())
                                .With(new Plugin.Iconize.Fonts.FontAwesomeProSolidModule())
                                .With(new Plugin.Iconize.Fonts.FontAwesomeProBrandsModule())
                                .With(new Plugin.Iconize.Fonts.MaterialModule());

XamarinTounsi avatar Oct 15 '19 08:10 XamarinTounsi

The correct name for said icon is "fas-ellipsis-h"

Falgantil avatar Oct 15 '19 09:10 Falgantil

Thanks for your answer i tried with two differnets way

                         HorizontalOptions="FillAndExpand">
                <iconize:IconImage Icon="fas fa-tag" IconSize="16" IconColor="#fff"
                                   HorizontalOptions="Start"/>
                <Label Text="Tags" TextColor="#fff" VerticalTextAlignment="Center"
                       HorizontalOptions="Start"/>
                <StackLayout Orientation="Horizontal"
                             HorizontalOptions="EndAndExpand"
                             effect:AddCommand.On="True"
                             effect:AddCommand.EnableRipple="True"
                             effect:AddCommand.EffectColor="#3742fa"
                             effect:AddCommand.Command="{Binding ShowCategoriesCommand}">
                    <iconize:IconImage Icon="fas fa-ellipsis-h" IconSize="16" IconColor="#fff"
                                       Margin="0,5,10,0"/>
                    <Label Text="More" TextColor="#fff" VerticalTextAlignment="Center"
                           Margin="0,5,10,0"/>
                </StackLayout>

            </StackLayout>
<StackLayout Orientation="Horizontal" Margin="0,5,0,0"
                         HorizontalOptions="FillAndExpand">
                <iconize:IconImage Icon="fa-tag" IconSize="16" IconColor="#fff"
                                   HorizontalOptions="Start"/>
                <Label Text="Tags" TextColor="#fff" VerticalTextAlignment="Center"
                       HorizontalOptions="Start"/>
                <StackLayout Orientation="Horizontal"
                             HorizontalOptions="EndAndExpand"
                             effect:AddCommand.On="True"
                             effect:AddCommand.EnableRipple="True"
                             effect:AddCommand.EffectColor="#3742fa"
                             effect:AddCommand.Command="{Binding ShowCategoriesCommand}">
                    <iconize:IconImage Icon="fas-ellipsis-h" IconSize="16" IconColor="#fff"
                                       Margin="0,5,10,0"/>
                    <Label Text="More" TextColor="#fff" VerticalTextAlignment="Center"
                           Margin="0,5,10,0"/>
                </StackLayout>

            </StackLayout>

Still not work

XamarinTounsi avatar Oct 15 '19 09:10 XamarinTounsi

Ì have added this code in app.cs for UWP platform,

Plugin.Iconize.Iconize.With(new Plugin.Iconize.Fonts.FontAwesomeBrandsModule());
                Plugin.Iconize.Iconize.With(new Plugin.Iconize.Fonts.FontAwesomeRegularModule());
                Plugin.Iconize.Iconize.With(new Plugin.Iconize.Fonts.FontAwesomeSolidModule());
                List<Assembly> assembliesToInclude = new List<Assembly>();
                assembliesToInclude.Add(typeof(CarouselViewRenderer).GetTypeInfo().Assembly);
                assembliesToInclude.Add(typeof(CachedImageRenderer).GetTypeInfo().Assembly);
                assembliesToInclude.Add(typeof(Plugin.Iconize.Icon).GetTypeInfo().Assembly);
                assembliesToInclude.Add(typeof(Plugin.Iconize.Iconize).GetTypeInfo().Assembly);
                assembliesToInclude.Add(typeof(Plugin.Iconize.IconModule).GetTypeInfo().Assembly);
                assembliesToInclude.Add(typeof(Plugin.Iconize.IIcon).GetTypeInfo().Assembly);
                assembliesToInclude.Add(typeof(Plugin.Iconize.IIconModule).GetTypeInfo().Assembly);
                assembliesToInclude.Add(typeof(Plugin.Iconize.Fonts.FontAwesomeCollection).GetTypeInfo().Assembly);
                assembliesToInclude.Add(typeof(Plugin.Iconize.Fonts.FontAwesomeBrandsModule).GetTypeInfo().Assembly);
                assembliesToInclude.Add(typeof(Plugin.Iconize.Fonts.FontAwesomeRegularModule).GetTypeInfo().Assembly);
                assembliesToInclude.Add(typeof(Plugin.Iconize.Fonts.FontAwesomeSolidModule).GetTypeInfo().Assembly);`

XamarinTounsi avatar Oct 15 '19 09:10 XamarinTounsi

What version are you using? According to this issue https://github.com/jsmarcus/Iconize/issues/161 3.5.0.129's FontAwesome Solid pack (which is the one you're using) is currently broken on Android, we're all waiting for a fix.

Falgantil avatar Oct 15 '19 09:10 Falgantil

I used Xamarin V4.2.0.84 Xam.Plugin.Iconize version 3.5.1

XamarinTounsi avatar Oct 15 '19 09:10 XamarinTounsi

3.5.1 isn't a version on Nuget, did you make your own build?

Falgantil avatar Oct 15 '19 09:10 Falgantil

Yes exactly issue

XamarinTounsi avatar Oct 15 '19 09:10 XamarinTounsi

I'm facing the same issue. My solution (again) is to download the ttf file I want to use and add it as a BundleResource in iOS or AndroidAsset

saimel avatar Oct 22 '19 14:10 saimel

Hello @saimel What can i do for UWP ? i add files to asset ?

XamarinTounsi avatar Oct 22 '19 14:10 XamarinTounsi

Try to add it into Assets/Fonts

saimel avatar Oct 22 '19 14:10 saimel

Nothing appears

XamarinTounsi avatar Oct 22 '19 14:10 XamarinTounsi

Try to mark it as Content

saimel avatar Oct 22 '19 15:10 saimel

Still not work

XamarinTounsi avatar Oct 24 '19 13:10 XamarinTounsi

after several tests,

MaterialModule partially working, but i can't understand the issue !

ican't call all icons ! and when i try like this, the icon doesn't appear

<StackLayout Orientation="Horizontal">
                                <StackLayout  Orientation="Horizontal" BackgroundColor="#f9ca24"
                                             Padding="3">
                                    <Label Text="{Binding rating}"
                                           TextColor="#fff"
                                           FontSize="12"
                                           HorizontalTextAlignment="Center"
                                           VerticalTextAlignment="Center"/>
                                    <iconize:IconImage Icon="md-grade" IconColor="#fff"
                                                       IconSize="14"/>
                                </StackLayout>
                                <Label Text="{Binding price,StringFormat='$ {0}'}"
                                       TextColor="#5352ed"
                                       FontSize="13"
                                       HorizontalOptions="EndAndExpand"/>
                            </StackLayout>

and work when i put grid into stacklayout

<StackLayout Orientation="Horizontal">
                                <StackLayout  Orientation="Horizontal" BackgroundColor="#f9ca24"
                                             Padding="3">
                                    <Grid ColumnSpacing="0" RowSpacing="0" HorizontalOptions="FillAndExpand">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="*" />
                                            <ColumnDefinition Width="*"/>
                                        </Grid.ColumnDefinitions>
                                        <Label Text="{Binding Weight}"
                                           TextColor="#fff"
                                           FontSize="12"
                                           HorizontalTextAlignment="Center"
                                           VerticalTextAlignment="Center" Grid.Column="0"/>
                                        <iconize:IconImage Icon="md-grade"
                                                           IconSize="16"
                                                           IconColor="#fff"
                                                           Grid.Column="1">
                                            
                                        </iconize:IconImage>
                                       
                                    </Grid>
                                </StackLayout>
                                <Label Text="{Binding PriceSupplierPurchase,StringFormat='$ {0}'}"
                                           TextColor="#5352ed"
                                           FontSize="13"
                                           HorizontalOptions="EndAndExpand"/>
                            </StackLayout>
``````

XamarinTounsi avatar Oct 24 '19 15:10 XamarinTounsi