本实例的功能室将用户选择的图片裁剪后放入ImagView,布局文件是个Button和ImageView。为了图片的正常显示,我们在裁剪后先将裁剪好的图片先存放到SD卡中,这样就能在以后开启应用的时候直接调用了。main_activity.xml MainActivity.javapa...
分类:
移动开发 时间:
2014-07-22 22:48:32
阅读次数:
371
为了防止用户或者测试MM疯狂的点击某个button,写个方法防止按钮连续点击。public class Utils { private static long lastClickTime; publicsynchronized static boolean isFastClick() {...
分类:
移动开发 时间:
2014-07-22 22:41:33
阅读次数:
247
让类实现接口OnClickListener然后button.setOnClickListener(this);之后重写onClick(View v)函数。通过v.getId()得到是哪个view触发了click事件。然后分情况处理。如 1 package com.example.linearlayo...
分类:
其他好文 时间:
2014-07-22 08:04:34
阅读次数:
186
http://stackoverflow.com/questions/3723831/set-a-button-background-image-iphone-programmaticallyhttp://stackoverflow.com/questions/11469908/how-to-cha...
分类:
移动开发 时间:
2014-07-22 00:37:33
阅读次数:
239
代码如下:
Tabs
/* Remove margin padding */
body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td { margin:0; padding:0; }
/* Default Font...
分类:
其他好文 时间:
2014-07-22 00:16:33
阅读次数:
316
代码如下:
/*
这以下是重置样式
Remove margin padding */
body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td { margin:0; padding:0; }
/*...
分类:
移动开发 时间:
2014-07-22 00:15:36
阅读次数:
361
实现的效果为:我感觉来自定义RadioButton样式和定义button空间的样式差不多,只是类型不同而已。接下来分析一下样式代码: XAML中代码为:
分类:
其他好文 时间:
2014-07-22 00:11:35
阅读次数:
1575
定义
用一个中介对象来封装一系列的对象的交互。中介者使各对象不需要显示地相互使用,从而使其耦合松散,而且可以独立的改变他们之间的交互。
案例
比如有一个图像界面,在界面上有一个输入框LineEdit,有个一个列表框ListBox,有一个按钮Button。当输入框LineEdit没有内容的时候,按钮是灰显,不可用的,当在LineEdit输入了正确的选项后,ListBox...
分类:
其他好文 时间:
2014-07-21 23:29:41
阅读次数:
311
1、ios7 tableviewcell上面加入一个view,view上面有button,点击button不运行button的点击事件解决的方法:self.view.userInteractionEnabled = YES;[cell.contentView addSubview:self.view...
分类:
移动开发 时间:
2014-07-21 11:15:55
阅读次数:
205
1.首先要在activity_main.xml文件里新建两个button标签。 1 11 12 21 22 30 38 39 40 这里出现了几个问题。 1)布局问题:我现在用的Android环境是最新的,新建工程下activity_main.xml文件自带布局...
分类:
移动开发 时间:
2014-07-21 11:04:40
阅读次数:
1396