安卓官方Twitter客户端在点击一条消息时,会出现一个漂亮的工具栏,让您可以进行转发、回复等操作。我该如何重新创建这样的工具栏?
<EditText android:text="Example Layout"
android:layout_width="match_parent"
android:id="@+id/editText"
android:layout_height="wrap_content"
android:layout_weight="0.95"></EditText>
<LinearLayout
android:layout_width="fill_parent"
android:orientation="horizontal"
android:weightSum="1.0"
android:padding="1px"
android:layout_height="wrap_content"
android:layout_weight="0.05">
<ImageButton android:id="@+id/testButton1"
android:layout_weight="0.2"
android:background="@drawable/btn"
android:layout_height="wrap_content"
android:layout_width="wrap_content"/>
<ImageButton android:id="@+id/testButton2"
android:layout_weight="0.2"
android:background="@drawable/btn"
android:layout_height="wrap_content"
android:layout_width="wrap_content" />
<ImageButton android:id="@+id/testButton3"
android:layout_weight="0.2"
android:background="@drawable/btn"
android:layout_height="wrap_content"
android:layout_width="wrap_content" />
<ImageButton android:id="@+id/testButton4"
android:layout_weight="0.2"
android:background="@drawable/btn"
android:layout_height="wrap_content"
android:layout_width="wrap_content" />
<ImageButton android:id="@+id/testButton5"
android:layout_weight="0.2"
android:background="@drawable/btn"
android:layout_height="wrap_content"
android:layout_width="wrap_content" />
</LinearLayout>
而且结果像这样:http://i.stack.imgur.com/bShgb.png
您也可以使用ActionBar,只需注意API要求:http://developer.android.com/guide/topics/ui/actionbar.html