nmilcoff / tagsview Goto Github PK
View Code? Open in Web Editor NEWSimple and highly customizable Xamarin.iOS tag list view. Originally inspired by https://github.com/ElaWorkshop/TagListView
License: MIT License
Simple and highly customizable Xamarin.iOS tag list view. Originally inspired by https://github.com/ElaWorkshop/TagListView
License: MIT License
Hi, I have been looking into solving this but I just cannot figure out the solution. You might be able to help in this.
My code is the following
this.tagsView = new TagListView(false)
{
PaddingY = 15f,
PaddingX = 15f,
TextFont = UIFont.SystemFontOfSize(16f),
TagBackgroundColor = UIColor.FromRGB(71, 84, 205),
BorderColor = UIColor.Blue,
Alignment = TagsAlignment.Left,
BorderWidth = 1f,
CornerRadius = 20f,
Frame = new CGRect(20, 30, ScrollViewTags.Frame.Width, ScrollViewTags.Frame.Height)
};
and I am adding tags like this
foreach (Tag T in GlobalTags)
{
try
{
this.tagsView.AddTag(T.TagName, T);
}
catch (Exception X)
{
}
}
AND
MyScrollView.ContentSize = new CGSize(this.View.Bounds.Width, this.View.Bounds.Height);
MyScrollView.Add(this.tagsView);
Simple enough and it works but the results are something like this.
After two Rows, it creates a huge gap for next row of tags - I am not sure what the issue is, if I am not adding Constrains properly or something?
Cheers
Hey @nmilcoff,
I've been attempting to use the MvxTagsView in my MVVMCross 5.7 project, but if I when I add the package, implement the MvxTagListView and build, my compiled binary is missing my assets from my Asset Catalog, and is instead replaced with the 'ic_removetag' asset from the Asset Catalog of this project (You can check this by inspecting the compiled Assets.car). I've tried to add an Asset Catalog in one of your samples and saw similar results.
Strangely, if I make some changes to my Asset Catalog (rename it, open it in Xcode, etc), it appears to bring all my assets back, but remove the ic_removetag asset. This means that whenever you set show 'enableTagButton' to true, we get an Mvx error because the button is initialised with that asset first, even if we set our own custom ButtonIcon.
I'll keep investigating with the hope of submitting a PR but wanted to submit an issue as you may have some other ideas. Cheers!
EDIT: I've been playing around trying to fix the TagsView and have found that deleting the Asset Catalog and the SetImage line in the Initialize method of the TagButtonView allows me to set my own ButtonIcon and everything works. I'll work on a more elegant solution so we can keep the default icon (probably FFImageLoading or a bitmap) and submit a PR when I get the chance ๐
Hello,
You have done a great job with this tagView package !
I am trying to use it but I am encountering an issue that I can solve.
The list is randomly incorrectly displayed into my view.
Sometimes the list is correctly displayed when I add a tag and sometimes not...
The RowQuantity property is correct.
Here I joined my code and 3 photos to explain my case :
`this._tagsView = new TagListView(true)
{
MarginX = 8f,
MarginY = 8f,
PaddingY = 8f,
PaddingX = 8f,
TextFont = FontHelper.GetFont(FontsEnum.Medium, 14f),
TagTextColor = ColorHelper.GreyishBrown,
Alignment = TagsAlignment.Left,
Frame = new CGRect(24, 16, _tagView.Frame.Width, _tagView.Frame.Height),
TagButtonSize = 16f,
TagButtonColor = ColorHelper.Black,
TagBackgroundColor = ColorHelper.paleGrey
};
this._tagsView.TagButtonTapped += (sender, e) =>
{
this._tagsView.RemoveTag(e);
};
//_tagView is the view where I placed my TagListView
this._tagView.AddSubview(_tagsView);
this._tagView.AddConstraints(
this._tagsView.Below(this._limitForTagView, 16f)
);
_tagsView.AddTags(list);`
Tag not added :
Tag correctly added :
Tag incorrectly added :
Any idea on how I can fix this issue please?
PS : Sorry the first part of my code can not be added as I wished.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.