Click here to Skip to main content
Click here to Skip to main content
 
Add your own
alternative version

Sectioned ListView for Android Using Mono C#

, 14 Mar 2013 CPOL
Develop a Preferences style sectioned list adapter using Android Mono C#.
foodtypesectionlist_4.0.3.zip
FoodTypeSectionList
FoodTypeSectionList
Assets
bin
Release
FoodTypeSectionList.dll
FoodTypeSectionList.pdb
obj
Debug
android
assets
bin
classes
foodtypesectionlist
Activity1.class
foodtypesectionlist
R$attr.class
R$drawable.class
R$id.class
R$layout.class
R$string.class
R.class
FruitTypeListAdapter.class
JavaObjectHandler.class
MeatTypeListAdapter.class
SectionedListAdapter.class
VegetableTypeListAdapter.class
mono
android
Seppuku.class
MonoPackageManager.class
MonoPackageManager_Resources.class
MonoRuntimeProvider.class
classes.dex
FoodTypeSectionList.FoodTypeSectionList.apk
mono.android.jar
packaged_resources
resources_and_assemblies
foodtypesectionlist
foodtypesectionlist
src
foodtypesectionlist
foodtypesectionlist
mono
android
DesignTimeResolveAssemblyReferencesInput.cache
FoodTypeSectionList.dll
FoodTypeSectionList.pdb
R.cs.flag
res
drawable
icon.png
layout
main.axml
values
TempPE
__library_projects__
Release
android
assets
FoodTypeSectionList.dll
Mono.Android.dll
Mono.Android.dll.mdb
Mono.Security.dll
Mono.Security.dll.mdb
mscorlib.dll
mscorlib.dll.mdb
System.Core.dll
System.Core.dll.mdb
System.dll
System.dll.mdb
bin
classes
foodtypesectionlist
Activity1.class
foodtypesectionlist
R$attr.class
R$drawable.class
R$id.class
R$layout.class
R$string.class
R.class
FruitTypeListAdapter.class
JavaObjectHandler.class
MeatTypeListAdapter.class
SectionedListAdapter.class
VegetableTypeListAdapter.class
mono
MonoPackageManager.class
MonoPackageManager_Resources.class
MonoRuntimeProvider.class
classes.dex
mono.android.jar
packaged_resources
foodtypesectionlist
foodtypesectionlist
src
foodtypesectionlist
foodtypesectionlist
mono
assemblies
FoodTypeSectionList.dll
Mono.Android.dll
Mono.Android.dll.mdb
Mono.Security.dll
Mono.Security.dll.mdb
mscorlib.dll
mscorlib.dll.mdb
System.Core.dll
System.Core.dll.mdb
System.dll
System.dll.mdb
System.Xml.dll
System.Xml.dll.mdb
DesignTimeResolveAssemblyReferencesInput.cache
FoodTypeSectionList.dll
FoodTypeSectionList.pdb
link.flag
R.cs.flag
res
drawable
icon.png
layout
main.axml
values
TempPE
__library_projects__
Properties
Resources
Drawable
Icon.png
Layout
Main.axml
Values
FoodTypeSectionList.suo
FoodTypeSectionList_4_0_3_clean-noexe.zip
Icon.png
Main.axml
FoodTypeSectionList_4_0_3_clean.zip
FoodTypeSectionList.dll
Icon.png
Main.axml
package mono;

public class MonoRuntimeProvider
	extends android.content.ContentProvider
{
	public MonoRuntimeProvider ()
	{
	}

	@Override
	public boolean onCreate ()
	{
		return true;
	}

	@Override
	public void attachInfo (android.content.Context context, android.content.pm.ProviderInfo info)
	{
		// Mono Runtime Initialization {{{
		try {
			android.content.pm.ApplicationInfo runtimeInfo = context.getPackageManager ().getApplicationInfo ("Mono.Android.DebugRuntime", 0);
			android.content.pm.ApplicationInfo apiInfo = mono.MonoPackageManager.getApiPackageName () != null
				? context.getPackageManager ().getApplicationInfo (mono.MonoPackageManager.getApiPackageName (), 0)
				: null;
			mono.MonoPackageManager.LoadApplication (context, runtimeInfo.dataDir,
					apiInfo != null
					? new String[]{runtimeInfo.sourceDir, apiInfo.sourceDir, context.getApplicationInfo ().sourceDir}
					: new String[]{runtimeInfo.sourceDir, context.getApplicationInfo ().sourceDir});
		} catch (android.content.pm.PackageManager.NameNotFoundException e) {
			throw new RuntimeException ("Unable to find application Mono.Android.DebugRuntime" + 
					(mono.MonoPackageManager.getApiPackageName () == null ? "" : " or " + mono.MonoPackageManager.getApiPackageName ()) +
					"!", e);
		}
		// }}}
		super.attachInfo (context, info);
	}

	@Override
	public android.database.Cursor query (android.net.Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder)
	{
		throw new RuntimeException ("This operation is not supported.");
	}

	@Override
	public String getType (android.net.Uri uri)
	{
		throw new RuntimeException ("This operation is not supported.");
	}

	@Override
	public android.net.Uri insert (android.net.Uri uri, android.content.ContentValues initialValues)
	{
		throw new RuntimeException ("This operation is not supported.");
	}

	@Override
	public int delete (android.net.Uri uri, String where, String[] whereArgs)
	{
		throw new RuntimeException ("This operation is not supported.");
	}

	@Override
	public int update (android.net.Uri uri, android.content.ContentValues values, String where, String[] whereArgs)
	{
		throw new RuntimeException ("This operation is not supported.");
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

stebo0728

United States United States
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.1411023.1 | Last Updated 14 Mar 2013
Article Copyright 2012 by stebo0728
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid