Skip to content

Commit

Permalink
Merge pull request #6 from wcoder/new-version
Browse files Browse the repository at this point in the history
New version
  • Loading branch information
wcoder authored Jan 7, 2019
2 parents c60f406 + 6fd0fb3 commit d813d65
Show file tree
Hide file tree
Showing 15 changed files with 2,932 additions and 2,526 deletions.
43 changes: 39 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Material Chip View ![version](http://img.shields.io/badge/original-v1.0.1-brightgreen.svg?style=flat) [![NuGet Badge](https://buildstats.info/nuget/MaterialChipView)](https://www.nuget.org/packages/MaterialChipView/)
# Material Chip View
![version](http://img.shields.io/badge/original-v1.0.1-brightgreen.svg?style=flat)
[![NuGet Badge](https://buildstats.info/nuget/MaterialChipView)](https://www.nuget.org/packages/MaterialChipView/)
[![Build status](https://yauhenipakala.visualstudio.com/My%20OS%20projects/_apis/build/status/MaterialChipView%20-%20Build%20master)](https://yauhenipakala.visualstudio.com/My%20OS%20projects/_build/latest?definitionId=3)

Port of [MaterialChipView](https://github.com/robertlevonyan/materialChipView) for Xamarin.Android

Expand Down Expand Up @@ -53,8 +56,8 @@ app:mcv_textColor="@color/customTitleColor"

### Attributes

|Custom Atributes |Description |
|-----------------------------|--------------------------------------------|
|Custom Atributes |Description |
|---------------------------------|--------------------------------------------|
|`app:mcv_chipText` |Text label of Chip |
|`app:mcv_textColor` |Custom color for text label |
|`app:mcv_backgroundColor` |Custom background color |
Expand All @@ -65,7 +68,12 @@ app:mcv_textColor="@color/customTitleColor"
|`app:mcv_closeColor` |Custom color for close button |
|`app:mcv_selectable` |Chip with selection button |
|`app:mcv_selectedTextColor` |Custom color for label when selected |
|`app:mcv_selectedCloseColor` |Custom color for close button when selected |
|`app:mcv_cornerRadius` |Change the corner radius of your Chip |
|`app:mcv_strokeSize` |Add stroke to your Chip |
|`app:mcv_strokeColor` |Choose a custom stroke color for your Chip |
|`app:mcv_iconText` |Instead of an image create icon from String |
|`app:mcv_iconTextColor` |Select a color for your String icon |
|`app:mcv_iconTextBackgroundColor`|Select a background color for String icon |

### Setting Handlers

Expand Down Expand Up @@ -115,10 +123,37 @@ chip.Selectable //Chip has selection button
chip.Clicked // Chip as clicked
chip.SelectedTextColor // Custom color for label when selected
chip.SelectedCloseColor // Custom color for close button when selected
chip.CornerRadius // Set corner radius of your Chip
chip.StrokeSize // Set width of stroke
chip.StrokeColor // Set stroke color for your Chip
chip.IconText // Set Chip icon text, text color and background color
```

## Versions

### 1.2.5

Sync with latest original library v1.2.5.

### 1.2.1, 1.2.2

General bug fixed

#### 1.1.3

Selection option added

#### 1.1.2

Icon text issue fixed

#### 1.1.1

Updated version of Material Chip View:
- the attribute names are changed to escape conflicts with other libs
- added new features like customizable corner radius and stroke
- recreation issue fixed for post Lollipop versions

#### 1.0.1

Recreation issues are fixed
Expand Down
13 changes: 3 additions & 10 deletions nuget/MaterialChipView.nuspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/01/nuspec.xsd">
<metadata>
<id>MaterialChipView</id>
<version>1.0.1</version>
<version>1.2.5</version>
<title>Material Chip View for Xamarin.Android</title>
<authors>Yauheni Pakala</authors>
<owners>Yauheni Pakala</owners>
Expand All @@ -12,15 +12,8 @@
<tags>xamarin android monodroid xamarin.android material chip view</tags>
<dependencies>
<group targetFramework="MonoAndroid">
<dependency id="Xamarin.Android.Support.Animated.Vector.Drawable" version="25.3.1" />
<dependency id="Xamarin.Android.Support.Annotations" version="25.3.1" />
<dependency id="Xamarin.Android.Support.Compat" version="25.3.1" />
<dependency id="Xamarin.Android.Support.Core.UI" version="25.3.1" />
<dependency id="Xamarin.Android.Support.Core.Utils" version="25.3.1" />
<dependency id="Xamarin.Android.Support.Fragment" version="25.3.1" />
<dependency id="Xamarin.Android.Support.Media.Compat" version="25.3.1" />
<dependency id="Xamarin.Android.Support.v7.AppCompat" version="25.3.1" />
<dependency id="Xamarin.Android.Support.Vector.Drawable" version="25.3.1" />
<dependency id="Xamarin.Android.Support.v7.AppCompat" version="28.0.0" />
<dependency id="Xamarin.Android.Support.v4" version="28.0.0" />
</group>
</dependencies>
</metadata>
Expand Down
2 changes: 0 additions & 2 deletions samples/MaterialChipView.SampleApp/MainActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ protected override void OnCreate(Bundle bundle)

SetContentView (Resource.Layout.Main);



var footballChip = FindViewById<Chip>(Resource.Id.football_chip);
footballChip.Click += FootballChipOnClick;
footballChip.IconClick += FootballChipOnIconClick;
Expand Down
108 changes: 15 additions & 93 deletions samples/MaterialChipView.SampleApp/MaterialChipView.SampleApp.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Xamarin.Build.Download.0.4.3\build\Xamarin.Build.Download.props" Condition="Exists('..\packages\Xamarin.Build.Download.0.4.3\build\Xamarin.Build.Download.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand All @@ -16,8 +15,7 @@
<AndroidApplication>True</AndroidApplication>
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<AndroidUseLatestPlatformSdk>True</AndroidUseLatestPlatformSdk>
<TargetFrameworkVersion>v7.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
Expand All @@ -32,7 +30,7 @@
<WarningLevel>4</WarningLevel>
<AndroidUseSharedRuntime>True</AndroidUseSharedRuntime>
<AndroidLinkMode>None</AndroidLinkMode>
<EmbedAssembliesIntoApk>False</EmbedAssembliesIntoApk>
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>PdbOnly</DebugType>
Expand All @@ -47,52 +45,29 @@
<EmbedAssembliesIntoApk>True</EmbedAssembliesIntoApk>
</PropertyGroup>
<ItemGroup>
<Reference Include="FlexboxLayoutXamarinBindingAndroid, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\FlexboxLayoutXamarinBindingAndroid.1.0.2\lib\monoandroid71\FlexboxLayoutXamarinBindingAndroid.dll</HintPath>
</Reference>
<Reference Include="Java.Interop" />
<Reference Include="Microsoft.CSharp" />
<PackageReference Include="FlexboxLayoutXamarinBindingAndroid" Version="1.0.2" />
<PackageReference Include="Xamarin.Android.Support.v4" Version="28.0.0" />
<PackageReference Include="Xamarin.Android.Support.v7.AppCompat" Version="28.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\MaterialChipView\MaterialChipView.csproj">
<Project>{20CD7BF0-3EC0-4BA5-9DF4-67C68E3C193A}</Project>
<Name>MaterialChipView</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Reference Include="Mono.Android" />
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Xml" />
<Reference Include="Xamarin.Android.Support.Animated.Vector.Drawable, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Xamarin.Android.Support.Animated.Vector.Drawable.25.3.1\lib\MonoAndroid70\Xamarin.Android.Support.Animated.Vector.Drawable.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Android.Support.Annotations, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Xamarin.Android.Support.Annotations.25.3.1\lib\MonoAndroid70\Xamarin.Android.Support.Annotations.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Android.Support.Compat, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Xamarin.Android.Support.Compat.25.3.1\lib\MonoAndroid70\Xamarin.Android.Support.Compat.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Android.Support.Core.UI, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Xamarin.Android.Support.Core.UI.25.3.1\lib\MonoAndroid70\Xamarin.Android.Support.Core.UI.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Android.Support.Core.Utils, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Xamarin.Android.Support.Core.Utils.25.3.1\lib\MonoAndroid70\Xamarin.Android.Support.Core.Utils.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Android.Support.Fragment, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Xamarin.Android.Support.Fragment.25.3.1\lib\MonoAndroid70\Xamarin.Android.Support.Fragment.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Android.Support.Media.Compat, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Xamarin.Android.Support.Media.Compat.25.3.1\lib\MonoAndroid70\Xamarin.Android.Support.Media.Compat.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Android.Support.v7.AppCompat, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Xamarin.Android.Support.v7.AppCompat.25.3.1\lib\MonoAndroid70\Xamarin.Android.Support.v7.AppCompat.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Android.Support.Vector.Drawable, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Xamarin.Android.Support.Vector.Drawable.25.3.1\lib\MonoAndroid70\Xamarin.Android.Support.Vector.Drawable.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="MainActivity.cs" />
<Compile Include="Resources\Resource.Designer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="Resources\AboutResources.txt" />
<None Include="Assets\AboutAssets.txt" />
</ItemGroup>
Expand All @@ -101,71 +76,18 @@
<SubType>Designer</SubType>
</AndroidResource>
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\values\Strings.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\Icon.png" />
</ItemGroup>
<ItemGroup>
<None Include="Properties\AndroidManifest.xml" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\MaterialChipView\MaterialChipView.csproj">
<Project>{20cd7bf0-3ec0-4ba5-9df4-67c68e3c193a}</Project>
<Name>MaterialChipView</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\Icon.png" />
<AndroidResource Include="Resources\drawable-nodpi\android.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-nodpi\basketball.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-nodpi\football.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-nodpi\tennis.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\values\Strings.xml" />
<AndroidResource Include="Resources\values\colors.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\values\dimens.xml" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Xamarin.Build.Download.0.4.3\build\Xamarin.Build.Download.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Build.Download.0.4.3\build\Xamarin.Build.Download.props'))" />
<Error Condition="!Exists('..\packages\Xamarin.Build.Download.0.4.3\build\Xamarin.Build.Download.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Build.Download.0.4.3\build\Xamarin.Build.Download.targets'))" />
<Error Condition="!Exists('..\packages\Xamarin.Android.Support.Annotations.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.Annotations.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Android.Support.Annotations.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.Annotations.targets'))" />
<Error Condition="!Exists('..\packages\Xamarin.Android.Support.Compat.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.Compat.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Android.Support.Compat.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.Compat.targets'))" />
<Error Condition="!Exists('..\packages\Xamarin.Android.Support.Core.UI.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.Core.UI.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Android.Support.Core.UI.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.Core.UI.targets'))" />
<Error Condition="!Exists('..\packages\Xamarin.Android.Support.Core.Utils.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.Core.Utils.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Android.Support.Core.Utils.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.Core.Utils.targets'))" />
<Error Condition="!Exists('..\packages\Xamarin.Android.Support.Media.Compat.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.Media.Compat.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Android.Support.Media.Compat.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.Media.Compat.targets'))" />
<Error Condition="!Exists('..\packages\Xamarin.Android.Support.Fragment.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.Fragment.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Android.Support.Fragment.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.Fragment.targets'))" />
<Error Condition="!Exists('..\packages\Xamarin.Android.Support.Vector.Drawable.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.Vector.Drawable.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Android.Support.Vector.Drawable.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.Vector.Drawable.targets'))" />
<Error Condition="!Exists('..\packages\Xamarin.Android.Support.Animated.Vector.Drawable.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.Animated.Vector.Drawable.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Android.Support.Animated.Vector.Drawable.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.Animated.Vector.Drawable.targets'))" />
<Error Condition="!Exists('..\packages\Xamarin.Android.Support.v7.AppCompat.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.v7.AppCompat.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Android.Support.v7.AppCompat.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.v7.AppCompat.targets'))" />
</Target>
<Import Project="..\packages\Xamarin.Build.Download.0.4.3\build\Xamarin.Build.Download.targets" Condition="Exists('..\packages\Xamarin.Build.Download.0.4.3\build\Xamarin.Build.Download.targets')" />
<Import Project="..\packages\Xamarin.Android.Support.Annotations.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.Annotations.targets" Condition="Exists('..\packages\Xamarin.Android.Support.Annotations.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.Annotations.targets')" />
<Import Project="..\packages\Xamarin.Android.Support.Compat.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.Compat.targets" Condition="Exists('..\packages\Xamarin.Android.Support.Compat.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.Compat.targets')" />
<Import Project="..\packages\Xamarin.Android.Support.Core.UI.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.Core.UI.targets" Condition="Exists('..\packages\Xamarin.Android.Support.Core.UI.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.Core.UI.targets')" />
<Import Project="..\packages\Xamarin.Android.Support.Core.Utils.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.Core.Utils.targets" Condition="Exists('..\packages\Xamarin.Android.Support.Core.Utils.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.Core.Utils.targets')" />
<Import Project="..\packages\Xamarin.Android.Support.Media.Compat.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.Media.Compat.targets" Condition="Exists('..\packages\Xamarin.Android.Support.Media.Compat.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.Media.Compat.targets')" />
<Import Project="..\packages\Xamarin.Android.Support.Fragment.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.Fragment.targets" Condition="Exists('..\packages\Xamarin.Android.Support.Fragment.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.Fragment.targets')" />
<Import Project="..\packages\Xamarin.Android.Support.Vector.Drawable.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.Vector.Drawable.targets" Condition="Exists('..\packages\Xamarin.Android.Support.Vector.Drawable.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.Vector.Drawable.targets')" />
<Import Project="..\packages\Xamarin.Android.Support.Animated.Vector.Drawable.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.Animated.Vector.Drawable.targets" Condition="Exists('..\packages\Xamarin.Android.Support.Animated.Vector.Drawable.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.Animated.Vector.Drawable.targets')" />
<Import Project="..\packages\Xamarin.Android.Support.v7.AppCompat.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.v7.AppCompat.targets" Condition="Exists('..\packages\Xamarin.Android.Support.v7.AppCompat.25.3.1\build\MonoAndroid70\Xamarin.Android.Support.v7.AppCompat.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="MaterialChipView.SampleApp.MaterialChipView.SampleApp" android:versionCode="1" android:versionName="1.0">
<uses-sdk android:minSdkVersion="16" />
<application android:label="MaterialChipView.SampleApp"></application>
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="26" />
<application android:label="MaterialChipView.SampleApp"></application>
</manifest>
Loading

0 comments on commit d813d65

Please sign in to comment.