安卓SlidingDrawer

本文由PurpleSword(jzj1993)原创,转载请注明
原文网址 http://blog.csdn.net/jzj1993

Layout

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content" >

    <SlidingDrawer
        android:id="@+id/slidingdrawer"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_above="@+id/buttons_container"
        android:layout_below="@+id/bn_repeat"
        android:layout_centerHorizontal="true"
        android:content="@+id/content"
        android:handle="@+id/handle"
        android:orientation="horizontal" >
        <ImageView
            android:id="@+id/handle"
            android:layout_width="45dip"
            android:layout_height="80dip"
            android:scaleType="fitXY"
            android:src="@drawable/ic_handle" />
        <LinearLayout
            android:id="@+id/content"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:background="#F0F0F0" >
            <ListView
                android:id="@+id/drawer_list"
                android:layout_width="match_parent"
                android:layout_height="match_parent" />
        </LinearLayout>
    </SlidingDrawer>

</RelativeLayout>




Java程序

    SlidingDrawer drawer;

        drawer = (SlidingDrawer) this.findViewById(R.id.slidingdrawer);
        drawer.setOnDrawerOpenListener(onDrawerOpenListener);
        drawer.setOnDrawerCloseListener(onDrawerCloseListener);

    private OnDrawerOpenListener onDrawerOpenListener = new OnDrawerOpenListener() {
        @Override
        public void onDrawerOpened() {
            drawerOpened = true;
            refreshVoiceButton();
        }
    };

    private OnDrawerCloseListener onDrawerCloseListener = new OnDrawerCloseListener() {
        @Override
        public void onDrawerClosed() {
            drawerOpened = false;
            refreshVoiceButton();
        }
    };

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/242156.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

鸭子目标检测数据集VOC格式300张

鸭子是一种较为常见的水禽&#xff0c;属于鸟纲鸭科动物&#xff0c;是人们生活中的常见动物之一。鸭子的外形特征独特&#xff0c;身体小巧灵活&#xff0c;身长约30-40厘米左右&#xff0c;体重在1-2千克左右。鸭子的嘴宽大而扁平&#xff0c;呈圆形&#xff0c;嘴边有着细小…

为什么支付宝不提供房贷业务?原因在这里

大家都知道房贷是银行的一块肥肉&#xff0c;也是银行利润最丰厚最稳定的一部分&#xff0c;目前房贷业务占到银行整体业务基本上都是在30%以上&#xff0c;有部分银行甚至达到50%以上。尽管房贷业务和很肥&#xff0c;但是并不是所有银行都会开展房贷业务&#xff0c;比如蚂蚁…

文本摘要提取_了解自动文本摘要-1:提取方法

文本摘要提取Text summarization is commonly used by several websites and applications to create news feed and article summaries. It has become very essential for us due to our busy schedules. We prefer short summaries with all the important points over read…

安卓json的解析

本文由PurpleSword(jzj1993)原创&#xff0c;转载请注明原文网址 http://blog.csdn.net/jzj1993方法一&#xff08;使用安卓包含的JSON解析类&#xff09;import org.json.JSONArray;import org.json.JSONObject;import org.json.JSONTokener;try {JSONTokener tokener new JS…

安卓线程相关 HandlerThread Handler Thread Looper Message Runnable

本文由PurpleSword(jzj1993)原创&#xff0c;转载请注明原文网址 http://blog.csdn.net/jzj1993安卓主线程&#xff08;UI线程&#xff09;是线程不安全的&#xff1a;对UI控件的操作都应在主线程中完成&#xff1b;UI线程不应执行耗时操作&#xff0c;以免程序不响应&#xff…

用户细分_基于购买历史的用户细分

用户细分介绍 (Introduction) The goal of this analysis was to identify different user groups based on the deals they have availed, using a discount app, in order to re-target them with offers similar to ones they have availed in the past.该分析的目的是使用折…

一个字节的网络漫游故事独白

大家好&#xff0c;给大家介绍一下&#xff0c;我是一个字节。相比于你们人类据说即将达到的百岁人生的寿命&#xff0c;我的一生简直不直一提&#xff08;我只能存活零点几个毫秒&#xff09;。也许只有那些码农才会了解我&#xff0c;而且也只有一部分码农。那些整天做业务的…

swap最大值和平均值_SWAP:Softmax加权平均池

swap最大值和平均值Blake Elias is a Researcher at the New England Complex Systems Institute.Shawn Jain is an AI Resident at Microsoft Research.布莱克埃里亚斯 ( Blake Elias) 是 新英格兰复杂系统研究所的研究员。 Shawn Jain 是 Microsoft Research 的 AI驻地 。 …

Activity和Service通信 使用BroadcastReceiver

本文由PurpleSword(jzj1993)原创&#xff0c;转载请注明原文网址 http://blog.csdn.net/jzj1993Activity中编写/*** 广播接收器*/public class MsgReceiver extends BroadcastReceiver {Overridepublic void onReceive(Context context, Intent intent) {Log.v("", &…

该酷的酷该飒的飒,穿出自己的潮流前线

精选匈牙利白鸭绒填充&#xff0c;柔软蓬松 舒适感很强&#xff0c;回弹性好 没有什么异味很干净安全 宝贝穿上去保暖又舒适 树脂拉链&#xff0b;金属按扣&#xff0c;松紧帽檐&#xff0b;袖口 下摆还做了可调节抽绳&#xff0c;细节满满防风保暖很nice 短款设计相较于…

pytorch卷积可视化_使用Pytorch可视化卷积神经网络

pytorch卷积可视化Filter and Feature map Image by the author筛选和特征图作者提供的图像 When dealing with image’s and image data, CNN are the go-to architectures. Convolutional neural networks have proved to provide many state-of-the-art solutions in deep l…

Golang之轻松化解defer的温柔陷阱

defer是Go语言提供的一种用于注册延迟调用的机制&#xff1a;让函数或语句可以在当前函数执行完毕后&#xff08;包括通过return正常结束或者panic导致的异常结束&#xff09;执行。深受Go开发者的欢迎&#xff0c;但一不小心就会掉进它的温柔陷阱&#xff0c;只有深入理解它的…

安卓Selector

本文由PurpleSword(jzj1993)原创&#xff0c;转载请注明原文网址 http://blog.csdn.net/jzj1993安卓的按钮复选框等&#xff0c;在点击、选中等不同状态时&#xff0c;显示的图片不同。通常可以使用Selector进行定义&#xff08;如res/drawable/button_selector.xml&#xff09…

u-net语义分割_使用U-Net的语义分割

u-net语义分割Picture By Martei Macru On Unsplash图片由Martei Macru On Unsplash拍摄 Semantic segmentation is a computer vision problem where we try to assign a class to each pixel . Unlike the classic image classification task where only one class value is …

我国身家超过亿元的有多少人?

目前我国身家达到亿元以上的人数&#xff0c;从公开数据来看大概有13万人&#xff0c;但如果把那些统计不到的隐形亿万富翁计算在内&#xff0c;我认为至少有20万以上。公开资料显示目前我国亿万富翁人数达到133000人根据胡润2018财富报告显示&#xff0c;目前我国&#xff08;…

地理空间数据

摘要 (Summary) In this article, using Data Science and Python, I will show how different Clustering algorithms can be applied to Geospatial data in order to solve a Retail Rationalization business case.在本文中&#xff0c;我将使用数据科学和Python演示如何将…

安卓PopupWindow

本文由PurpleSword(jzj1993)原创&#xff0c;转载请注明原文网址 http://blog.csdn.net/jzj1993定义弹窗动画res/anim/scale_in.xml<?xml version"1.0" encoding"utf-8"?><set xmlns:android"http://schemas.android.com/apk/res/android&…

嵌入式系统分类及其应用场景_词嵌入及其应用简介

嵌入式系统分类及其应用场景Before I give you an introduction on Word Embeddings, take a look at the following examples and ask yourself what is common between them:在向您介绍Word Embeddings之前&#xff0c;请看一下以下示例并问问自己它们之间的共同点是什么&…

山东男子5个月刷信用卡1800次,被银行处理后他选择29次取款100元

虽然我国实行的是存款自愿&#xff0c;取款自由的储蓄政策&#xff0c;客户想怎么取款&#xff0c;在什么时候取&#xff0c;取多少钱&#xff0c;完全是客户的权利&#xff0c;只要客户的账户上有钱&#xff0c;哪怕他每次取一毛钱取个100次都是客户的权利。但是明明可以一次性…