Den skapas alltid via XML:en för varje activity. XMLen läses sedan in via setContentViewpå OnCreate:en i activityn. Typlist en vertikal LinearLayout med actionbaren först, exempel:
HTML:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:custom="http://schemas.android.com/apk/res/XXX.XXX.XXX"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="0dp"
>
<!-- Create Action Bar -->
<XXX.XXX.XXActionBarControl
android:id="@+id/item_actionbar"
custom:showBackButton="true"
custom:showAjaxLoader="false"
android:layout_width="fill_parent"
android:layout_height="48dp"
/>
...
Har inte lyckats återupprepa i emulatorn (och på grund av min virituella utvecklingsmiljö så kan jag idag inte debugga direkt på telefonen) så vet inte riktigt ang. LogCat :-/
Tacksam för er hjälp!