开发者

Android menu controls

I am developing an application and I would like to use the control that I can see in the Photos application and the Desk Clock (on an HTC Desire).

The one I am referring to is the bar along the bottom of the screen that has various icons in it. When you press on an icon, the bubble moves along the bar to the icon 开发者_开发问答you have pressed and the icon is then shown in colour.

What is the name of this control?


The first control you are talking about is the SlidingDrawer, (here is an example of how to use it), then you can just use a GridView if you also want to show icons on there.

If you want to give it a try, you just have to create an XML layout as this:

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="#FF4444CC"
    >
  <SlidingDrawer
    android:id="@+id/drawer"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:handle="@+id/handle"
    android:content="@+id/content">
    <ImageView
      android:id="@id/handle"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:src="@drawable/tray_handle_normal"
    />
    <Button
      android:id="@id/content"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:text="I am big :D"
    />
  </SlidingDrawer>
</FrameLayout>


I think you are looking for the Sliding Drawer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜