summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.ControlGallery.Android
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.ControlGallery.Android')
-rw-r--r--Xamarin.Forms.ControlGallery.Android/Resources/layout/Layout38989.axml13
-rw-r--r--Xamarin.Forms.ControlGallery.Android/Xamarin.Forms.ControlGallery.Android.csproj8
-rw-r--r--Xamarin.Forms.ControlGallery.Android/_38989CustomRenderer.cs35
3 files changed, 53 insertions, 3 deletions
diff --git a/Xamarin.Forms.ControlGallery.Android/Resources/layout/Layout38989.axml b/Xamarin.Forms.ControlGallery.Android/Resources/layout/Layout38989.axml
new file mode 100644
index 00000000..82d895ab
--- /dev/null
+++ b/Xamarin.Forms.ControlGallery.Android/Resources/layout/Layout38989.axml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:padding="8dp">
+ <ImageView
+ android:id="@+id/coffee"
+ android:layout_width="48dp"
+ android:layout_height="48dp"
+ android:padding="5dp"
+ android:src="@drawable/icon"
+ android:layout_alignParentLeft="true" />
+</RelativeLayout> \ No newline at end of file
diff --git a/Xamarin.Forms.ControlGallery.Android/Xamarin.Forms.ControlGallery.Android.csproj b/Xamarin.Forms.ControlGallery.Android/Xamarin.Forms.ControlGallery.Android.csproj
index 32f92ecc..9a907004 100644
--- a/Xamarin.Forms.ControlGallery.Android/Xamarin.Forms.ControlGallery.Android.csproj
+++ b/Xamarin.Forms.ControlGallery.Android/Xamarin.Forms.ControlGallery.Android.csproj
@@ -53,9 +53,7 @@
</CustomCommands>
</CustomCommands>
<AndroidCreatePackagePerAbi>False</AndroidCreatePackagePerAbi>
- <AndroidSupportedAbis>armeabi,armeabi-v7a,x86</AndroidSupportedAbis>
- <AndroidStoreUncompressedFileExtensions />
- <MandroidI18n />
+ <AndroidSupportedAbis>armeabi;armeabi-v7a;x86</AndroidSupportedAbis>
<Debugger>Xamarin</Debugger>
<AndroidEnableMultiDex>False</AndroidEnableMultiDex>
<DevInstrumentationEnabled>True</DevInstrumentationEnabled>
@@ -176,6 +174,7 @@
<Compile Include="Resources\Resource.Designer.cs" />
<Compile Include="CustomRenderers.cs" />
<Compile Include="ColorPicker.cs" />
+ <Compile Include="_38989CustomRenderer.cs" />
</ItemGroup>
<ItemGroup>
<AndroidAsset Include="Assets\default.css" />
@@ -256,6 +255,9 @@
<AndroidResource Include="Resources\layout\Tabbar.axml">
<SubType>Designer</SubType>
</AndroidResource>
+ <AndroidResource Include="Resources\layout\Layout38989.axml">
+ <SubType>Designer</SubType>
+ </AndroidResource>
</ItemGroup>
<ItemGroup>
<TransformFile Include="Properties\AndroidManifest.xml" />
diff --git a/Xamarin.Forms.ControlGallery.Android/_38989CustomRenderer.cs b/Xamarin.Forms.ControlGallery.Android/_38989CustomRenderer.cs
new file mode 100644
index 00000000..1cde98a8
--- /dev/null
+++ b/Xamarin.Forms.ControlGallery.Android/_38989CustomRenderer.cs
@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+using Android.App;
+using Android.Content;
+using Android.OS;
+using Android.Runtime;
+using Android.Views;
+using Android.Widget;
+using Xamarin.Forms;
+using Xamarin.Forms.ControlGallery.Android;
+using Xamarin.Forms.Controls.Issues;
+using AView = Android.Views.View;
+
+[assembly: ExportRenderer(typeof(Bugzilla38989._38989CustomViewCell), typeof(_38989CustomViewCellRenderer))]
+
+namespace Xamarin.Forms.ControlGallery.Android
+{
+ public class _38989CustomViewCellRenderer : Xamarin.Forms.Platform.Android.ViewCellRenderer
+ {
+ protected override AView GetCellCore(Cell item, AView convertView, ViewGroup parent, Context context)
+ {
+ var nativeView = convertView;
+
+ if (nativeView == null)
+ nativeView = (context as Activity).LayoutInflater.Inflate(Resource.Layout.Layout38989, null);
+
+ return nativeView;
+ }
+ }
+
+
+} \ No newline at end of file