1、定义private int mVideoWidth; private int
mVideoHeight;private MediaPlayer mMediaPlayer; private SurfaceView
mPreview; private SurfaceHolder hol...
分类:
其他好文 时间:
2014-05-22 14:54:22
阅读次数:
269
一、work线程向main线程发送数据(work线程发数据,main线程处理数据)public
class MainActivity extends Activity { private Button button; private TextView
textView; pr...
分类:
其他好文 时间:
2014-05-21 19:29:29
阅读次数:
234
今天在做布局的时候,遇到个纳闷的问题。我想将一个div块水平分为宽50%的两部分,分别为两个链接按钮,HTML代码如下:
link1 link2自然而然想到了用display:inline-block来触发layout又不换行;a{ display:inline-block;
...
分类:
其他好文 时间:
2014-05-21 18:56:32
阅读次数:
207
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
今天编写代码如下:发现2个radiobutton居然都可以选中。这我真的晕了。。后来偶然发现原来是没有设置Id的原因。。。
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizont...
分类:
其他好文 时间:
2014-05-21 17:12:25
阅读次数:
246
介绍一个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
使用意图调用内置应用程序
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
使用意图筛选器
点击下载源码
1、创建一个Intents项目,给该项目添加一个新类,命名为MyBrowserActivity,在res/layout文件夹下新增一个browser.xml;
2、在AndroidManifest.xml文件中添加如下代码:
添加权限:
<activity
android:...
分类:
移动开发 时间:
2014-05-21 14:48:41
阅读次数:
385
描述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
介绍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