注意两点
1.通过android:checkedButton="@+id/lunch"而不是item中的 android:checked="true"设置的某人被选中状态
<RadioGroup
android:layout_width="match_parent"
android:layout_height="wrap_content"
a...
分类:
其他好文 时间:
2014-05-23 00:04:35
阅读次数:
344
android:layout_column="1" 控制Table View在第几列:
android...
分类:
其他好文 时间:
2014-05-22 22:43:49
阅读次数:
361
注意要点:
1)必须要在AndroidManifest.xml中添加发送短信权限
设置视图:setContentView(R.layout.布局xml文件);
2)查找控件:findViewById(R.id.控件id);
3)监听按钮事件:控件.setOnClickListener(this),实现OnClickListener接口
4)获取editText里的值:getTex();
...
分类:
移动开发 时间:
2014-05-22 22:39:56
阅读次数:
460
最近在做web页面设计的时候,莫名的发现最上面会出现一个横条,颜色为html的背景颜色。本意是那一片空横条应该为header的背景色。查了一些资料,发现是margin collapsing的问题,记录下来,希望初学者少走弯路。
从问题说起
先给出demo的源码和截屏,给出一个直观的印象。代码如下:
html {
width: 100%;
...
分类:
Web程序 时间:
2014-05-22 18:54:31
阅读次数:
609
今天在做布局的时候,遇到个纳闷的问题。我想将一个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
介绍一个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