Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="utf-8" ?>
<android.support.design.chip.Chip
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/chipItem"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:gravity="center_horizontal"
app:closeIcon="@drawable/ic_mtrl_chip_close_circle"
app:chipBackgroundColor="@android:color/holo_blue_light"
<?xml version="1.0" encoding="utf-8" ?>
<android.support.design.chip.ChipGroup
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_marginTop="16dp"
android:id="@+id/chipGroup"
android:theme="@style/Base.Theme.MaterialComponents.Light"
android:layout_height="wrap_content">
</android.support.design.chip.ChipGroup>
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
xmlns:cntrl="clr-namespace:MaterialChipsDemo"
x:Class="MaterialChipsDemo.MainPage">
<StackLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" Spacing="10">
public static readonly BindableProperty ChipTextProperty = BindableProperty.Create("ChipText", typeof(string), typeof(ChipsControl), default(string),defaultBindingMode:BindingMode.TwoWay,propertyChanged:ChipTextPropertyChanged);
private static void ChipTextPropertyChanged(BindableObject bindable, object oldValue, object newValue)
{
var control = (ChipsControl)bindable;
control.ChipText = newValue.ToString();
}
public string ChipText
{
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using Foundation;
using MaterialComponents;
using MaterialTextField;
using MaterialTextField.iOS;
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.TextInputLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/textInputLayout"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:hint="Enter the value here"
app:counterEnabled="true"
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Xamarin.Forms;
namespace MaterialTextField
{
public class EntryView : View
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Xamarin.Forms;
namespace MaterialTextField
{
public class EntryView : View