Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the icons do not appear #166

Open
XamarinTounsi opened this issue Oct 15, 2019 · 14 comments
Open

the icons do not appear #166

XamarinTounsi opened this issue Oct 15, 2019 · 14 comments

Comments

@XamarinTounsi
Copy link

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());
@Falgantil
Copy link

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

@XamarinTounsi
Copy link
Author

XamarinTounsi commented Oct 15, 2019

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
Copy link
Author

Ì 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);`

@Falgantil
Copy link

What version are you using? According to this issue #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.

@XamarinTounsi
Copy link
Author

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

@Falgantil
Copy link

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

@XamarinTounsi
Copy link
Author

Yes exactly
issue

@saimel
Copy link

saimel commented Oct 22, 2019

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

@XamarinTounsi
Copy link
Author

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

@saimel
Copy link

saimel commented Oct 22, 2019

Try to add it into Assets/Fonts

@XamarinTounsi
Copy link
Author

Nothing appears

@saimel
Copy link

saimel commented Oct 22, 2019

Try to mark it as Content

@XamarinTounsi
Copy link
Author

Still not work

@XamarinTounsi
Copy link
Author

XamarinTounsi commented Oct 24, 2019

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>
``````

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants