You can use like as:activity_header.xml Or You can use RelativeLayout for this
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/header"
android:orientation="horizontal" >
<LinearLayout
android:id="@+id/ll_header"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|bottom"
android:layout_marginBottom="2dip"
android:layout_weight="1"
android:clickable="true"
android:gravity="center_vertical|center_horizontal"
android:orientation="vertical" >
<ImageView
android:id="@+id/img_header_icon"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:src="@drawable/header_logo" />
</LinearLayout>
</LinearLayout>
point 1) en double possible de point 2) Il y a plusieurs façons de le faire: - PopupMenu classe (voir Docs Android) - Créer dialogue personnalisée (voir Docs Android) –