Skip to content

Commit

Permalink
Updated nuget based sample.
Browse files Browse the repository at this point in the history
  • Loading branch information
amatkivskiy committed Jul 1, 2015
1 parent 4d72136 commit b197774
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 32 deletions.
4 changes: 2 additions & 2 deletions samples/Android-Iconics-Xamarin-Nuget/Adapter/IconAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace AndroidIconicsSample.Adapter
using Android.Support.V7.Widget;
using Android.Views;
using Android.Widget;
using Com.Mikepenz.Iconics.View;
using Mikepenz.Iconics.View;

public class IconAdapter : RecyclerView.Adapter
{
Expand All @@ -17,7 +17,7 @@ public IconAdapter(List<string> icons, int rowLayout)
this.rowLayout = rowLayout;
}

public void setIcons(List<string> icons)
public void SetIcons(List<string> icons)
{
this.icons.AddRange(icons);
this.NotifyItemRangeChanged(0, icons.Count - 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,23 @@
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Mono.Android" />
<Reference Include="material-drawer-3.0.3">
<HintPath>Libs\material-drawer-3.0.3.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Android.Support.v4">
<HintPath>..\..\packages\Xamarin.Android.Support.v4.22.1.1.1\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll</HintPath>
<HintPath>packages\Xamarin.Android.Support.v4.22.2.0.0\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Android.Support.v7.AppCompat">
<HintPath>..\..\packages\Xamarin.Android.Support.v7.AppCompat.22.1.1.1\lib\MonoAndroid403\Xamarin.Android.Support.v7.AppCompat.dll</HintPath>
<HintPath>packages\Xamarin.Android.Support.v7.AppCompat.22.2.0.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.AppCompat.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Android.Support.v7.CardView">
<HintPath>..\..\packages\Xamarin.Android.Support.v7.CardView.22.1.1.1\lib\MonoAndroid403\Xamarin.Android.Support.v7.CardView.dll</HintPath>
<HintPath>packages\Xamarin.Android.Support.v7.CardView.22.2.0.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.CardView.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Android.Support.v7.RecyclerView">
<HintPath>..\..\packages\Xamarin.Android.Support.v7.RecyclerView.22.1.1.1\lib\MonoAndroid403\Xamarin.Android.Support.v7.RecyclerView.dll</HintPath>
<HintPath>packages\Xamarin.Android.Support.v7.RecyclerView.22.2.0.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.RecyclerView.dll</HintPath>
</Reference>
<Reference Include="material-drawer-3.0.7">
<HintPath>Libs\material-drawer-3.0.7.dll</HintPath>
</Reference>
<Reference Include="android-iconics-1.0.2">
<HintPath>packages\Mikepenz.Android.Iconics.Xamarin.Binding.1.0.2\lib\MonoAndroid\android-iconics-1.0.2.dll</HintPath>
<Reference Include="android-iconics-1.2.0">
<HintPath>packages\Mikepenz.Android.Iconics.Xamarin.Binding.1.2.0\lib\MonoAndroid\android-iconics-1.2.0.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -104,13 +104,14 @@
<AndroidResource Include="Resources\values\strings.xml">
<SubType>Designer</SubType>
</AndroidResource>
<None Include="Libs\material-drawer-3.0.3.dll" />
<None Include="packages.config" />
<None Include="Libs\material-drawer-3.0.7.dll" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Novell\Novell.MonoDroid.CSharp.targets" />
<ItemGroup>
<Folder Include="Resources\drawable-mdpi\" />
<Folder Include="Assets\fonts\" />
<Folder Include="Libs\" />
</ItemGroup>
<ItemGroup>
<Compile Include="IconsFragment.cs" />
Expand Down
8 changes: 4 additions & 4 deletions samples/Android-Iconics-Xamarin-Nuget/CustomApplication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ namespace AndroidIconicsSample
using Android.App;
using Android.Runtime;
using AndroidIconicsSample.Typeface;
using Com.Mikepenz.Iconics;
using Com.Mikepenz.Community_material_typeface_library;
using Com.Mikepenz.Meteocons_typeface_library;
using Com.Mikepenz.Octicons_typeface_library;
using Mikepenz.Iconics;
using Mikepenz.Community_material_typeface_library;
using Mikepenz.Meteocons_typeface_library;
using Mikepenz.Octicons_typeface_library;

[Application(Theme = "@style/AppTheme")]
public class CustomApplication : Application
Expand Down
4 changes: 2 additions & 2 deletions samples/Android-Iconics-Xamarin-Nuget/IconsFragment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace AndroidIconicsSample
using Android.Support.V7.Widget;
using Android.Views;
using AndroidIconicsSample.Adapter;
using Com.Mikepenz.Iconics;
using Mikepenz.Iconics;

public class IconsFragment : Fragment
{
Expand Down Expand Up @@ -55,7 +55,7 @@ public override void OnViewCreated(View view, Bundle savedInstanceState)
{
this.icons.Add(icon);
}
adapter.setIcons(this.icons);
adapter.SetIcons(this.icons);
break;
}
}
Expand Down
Binary file not shown.
Binary file not shown.
12 changes: 6 additions & 6 deletions samples/Android-Iconics-Xamarin-Nuget/MainActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ namespace AndroidIconicsSample
using Android.OS;
using Android.Views;
using Android.Widget;
using Com.Mikepenz.Iconics;
using Com.Mikepenz.Iconics.Typeface;
using Com.Mikepenz.Materialdrawer;
using Com.Mikepenz.Materialdrawer.Model;
using Com.Mikepenz.Materialdrawer.Model.Interfaces;
using Mikepenz.Iconics;
using Mikepenz.Iconics.Typeface;
using Mikepenz.MaterialDrawer;
using Mikepenz.MaterialDrawer.Models;
using Mikepenz.MaterialDrawer.Models.Interfaces;
using Toolbar = Android.Support.V7.Widget.Toolbar;

[Activity(MainLauncher = true, Label = "@string/app_name")]
Expand Down Expand Up @@ -52,7 +52,7 @@ public override bool OnCreateOptionsMenu(IMenu menu)

var menuItem = menu.FindItem(Resource.Id.action_opensource);

menuItem.SetIcon(new IconicsDrawable(this, FontAwesome.Icon.FawGithub).ActionBarSize().Color(Color.White));
menuItem.SetIcon(new IconicsDrawable(this, FontAwesome.Icon.FawGithub).SizeDp(48).Color(Color.White));

return base.OnCreateOptionsMenu(menu);
}
Expand Down
4 changes: 2 additions & 2 deletions samples/Android-Iconics-Xamarin-Nuget/PlaygroundActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ namespace AndroidIconicsSample
using Android.Text;
using Android.Text.Style;
using Android.Widget;
using Com.Mikepenz.Iconics;
using Com.Mikepenz.Iconics.Typeface;
using Mikepenz.Iconics;
using Mikepenz.Iconics.Typeface;

[Activity]
public class PlaygroundActivity : Activity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Linq;
using Android.Graphics;
using Android.Util;
using Com.Mikepenz.Iconics.Typeface;
using Mikepenz.Iconics.Typeface;

public class CustomFont : Java.Lang.Object, ITypeface
{
Expand Down
10 changes: 5 additions & 5 deletions samples/Android-Iconics-Xamarin-Nuget/packages.config
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Mikepenz.Android.Iconics.Xamarin.Binding" version="1.0.2" targetFramework="MonoAndroid50" />
<package id="Xamarin.Android.Support.v4" version="22.1.1.1" targetFramework="MonoAndroid50" />
<package id="Xamarin.Android.Support.v7.AppCompat" version="22.1.1.1" targetFramework="MonoAndroid50" />
<package id="Xamarin.Android.Support.v7.CardView" version="22.1.1.1" targetFramework="MonoAndroid50" />
<package id="Xamarin.Android.Support.v7.RecyclerView" version="22.1.1.1" targetFramework="MonoAndroid50" />
<package id="Mikepenz.Android.Iconics.Xamarin.Binding" version="1.2.0" targetFramework="MonoAndroid50" />
<package id="Xamarin.Android.Support.v4" version="22.2.0.0" targetFramework="MonoAndroid50" />
<package id="Xamarin.Android.Support.v7.AppCompat" version="22.2.0.0" targetFramework="MonoAndroid50" />
<package id="Xamarin.Android.Support.v7.CardView" version="22.2.0.0" targetFramework="MonoAndroid50" />
<package id="Xamarin.Android.Support.v7.RecyclerView" version="22.2.0.0" targetFramework="MonoAndroid50" />
</packages>

0 comments on commit b197774

Please sign in to comment.