码迷,mamicode.com
首页 >  
搜索关键字:surfaceview layout mainactivity    ( 9645个结果
用SurfaceView播放视频
1、定义private int mVideoWidth; private int mVideoHeight;private MediaPlayer mMediaPlayer; private SurfaceView mPreview; private SurfaceHolder hol...
分类:其他好文   时间:2014-05-22 14:54:22    阅读次数:269
Handler
一、work线程向main线程发送数据(work线程发数据,main线程处理数据)public class MainActivity extends Activity { private Button button; private TextView textView; pr...
分类:其他好文   时间:2014-05-21 19:29:29    阅读次数:234
你好,inline-block
今天在做布局的时候,遇到个纳闷的问题。我想将一个div块水平分为宽50%的两部分,分别为两个链接按钮,HTML代码如下: link1 link2自然而然想到了用display:inline-block来触发layout又不换行;a{ display:inline-block; ...
分类:其他好文   时间:2014-05-21 18:56:32    阅读次数:207
RelativeLayout
RelativeLayout1、控件之间对齐底部对齐:android:layout_alignBottom="@+id/img_head"顶部对齐android:layout_alignTop="@+id/img_head"左边对齐android:layout_alignLeft="@id/tv_n...
分类:其他好文   时间:2014-05-21 17:50:33    阅读次数:250
RadioButton一定要设置id,会导致radiobutton不互斥,后果很严重。。
今天编写代码如下:发现2个radiobutton居然都可以选中。这我真的晕了。。后来偶然发现原来是没有设置Id的原因。。。         android:layout_width="fill_parent"         android:layout_height="wrap_content"         android:orientation="horizont...
分类:其他好文   时间:2014-05-21 17:12:25    阅读次数:246
2C01-View-Layout-Animation-Grid-Fade
介绍一个grid layout 顺序显示的代码 LayoutAnimation1.java /* * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use th...
分类:其他好文   时间:2014-05-21 16:58:47    阅读次数:214
Android学习笔记(十七)——使用意图调用内置应用程序
使用意图调用内置应用程序 1、创建一个新的Android项目并命名为Intents,在main.xml文件中添加两个Button: <Button android:id="@+id/btn_webbrowser" android:layout_width="fill_parent" android:layout_heigh...
分类:移动开发   时间:2014-05-21 16:24:12    阅读次数:298
Android学习笔记(十八)——使用意图筛选器和实现浏览网页(附源码)
使用意图筛选器 点击下载源码 1、创建一个Intents项目,给该项目添加一个新类,命名为MyBrowserActivity,在res/layout文件夹下新增一个browser.xml; 2、在AndroidManifest.xml文件中添加如下代码: 添加权限: <activity android:...
分类:移动开发   时间:2014-05-21 14:48:41    阅读次数:385
2C02-View-Layout-Animation-list-Cascade
描述list layout item有上倒下依次显示的代码实现形式 LayoutAnimation2.java /* * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may no...
分类:其他好文   时间:2014-05-21 09:02:15    阅读次数:250
2C03-View-Layout-Animation-list-Reverse-Order
介绍list  item倒序显示 LayoutAnimation3.java /* * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file e...
分类:其他好文   时间:2014-05-21 08:25:44    阅读次数:278
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!