在Android的自定义通知栏 [英] Custom Notification Bar in Android

查看:93
本文介绍了在Android的自定义通知栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有关我的Andr​​oid应用我的要求是要实现我的布局自定义通知栏。当用户拖动该自定义通知栏图标,然后将可见。这个自定义通知栏是像在Facebook的Andr​​oid应用程序底部的通知栏。如果有人知道如何做到这一点,那么请与我分享。

For my android application my requirement is to implement the Custom Notification Bar in my layout. When user drag this Custom notification bar then icons will be visible. This custom notification bar is look like notification bar at the bottom in the Facebook Android Application. If anyone knows how to do this then please share with me.

推荐答案

您可以使用的 SlidingDrawer

例如:

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

    <TextView 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/hello"/>

    <SlidingDrawer
        android:id="@+id/slidingDrawer"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"

        android:handle="@+id/handle"
        android:content="@+id/content">

        <Button
            android:id="@id/handle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Drawer Handle"/>

        <TextView
            android:id="@id/content"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:background="@color/grey"
            android:text="This is the content of the drawer"/>

    </SlidingDrawer>

</FrameLayout>

更新:

尼斯教程,详细说明:的Andr​​oid:妈的滑动抽屉

这篇关于在Android的自定义通知栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆