Posts

Showing posts with the label Monodroid

GridView in Mono for Android

Image
Main.axml <?xml version="1.0" encoding="utf-8"?> <GridView xmlns:android="http://schemas.android.com/apk/res/android"     android:id="@+id/gridview"     android:layout_width="fill_parent"     android:layout_height="fill_parent"     android:columnWidth="90dp"     android:numColumns="auto_fit"     android:verticalSpacing="10dp"

Gallery in Mono for Android

Main.axml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"     android:orientation="vertical"     android:layout_width="fill_parent"     android:layout_height="fill_parent">     <Gallery         android:id="@+id/gallery"         android:layout_width="fill_parent"         android:layout_height="wrap_content" />

How to Create Menus in Mono Android

Image
In android application menu is one of the important user interface entity which provides some action options for a particular view. In this tutorial i am discussing about creating android menus. In this tutorial we are creating a simple menu with 6 menu items. On clicking on single menu item a simple Toast message will be shown. 1 . Create a new project  File ⇒ New ⇒ Android Project  and give activity name as AndroidMenusActivity . 2 . Now create an XML file under  res/layout  folder and name it as  menu.axml . 3 . Open  menu.axml  file and type following code. In the following code we are creating a single menu with 6 menu items. Each menu item has an  icon  and  title  for display the label under menu icon. Also we have  id  for each menu item to identify uniquely.  menu.axml <? xml   version = "1.0"   encoding = "utf-8" ?> < menu   xmlns:android = " http://schemas.android.com/apk/res/android " >      <!-- Single menu it