Implementing the friends list
Before we start implementing the friends list screen, we must first add a menu item to ActionBar
in our application. Let's begin by creating a new menu
folder within the Resources
folder of our project. Next, create a new Android layout file named ConversationsMenu.axml
. Remove the default layout created by XML, and replace it with the following:
<?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/addFriendMenu"android:icon="@android:drawable/ic_menu_add"android:showAsAction="ifRoom"/> </menu>
We set up a root menu with one menu item inside it.
The following is a breakdown of what we set for the item in XML:
android:id
: We will use this later ...
Get Xamarin: Cross-Platform Mobile Application Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.