自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 收藏
  • 关注

原创 在ES6类中使用setInterval调用类方法出现的不能定时调用问题

class Clock extends React.Component{ constructor(props){ super(props); this.state = {date:new Date()}; } trick(){ this.setState({date:new Date()}); } compo...

2019-05-07 15:06:27 1842

原创 搭建第一个React项目时script标签使用了自闭合解析出现问题

引用react.js时写成了<script src="https://cdn.staticfile.org/react/16.4.0/umd/react.development.js"/>不能正常解析后改为<script src="https://cdn.staticfile.org/react/16.4.0/umd/react.development.js">&lt...

2019-04-30 17:13:46 552

原创 EditText获取焦点的一系列方法

/** * Set whether this view can receive the focus. * * Setting this to false will also ensure that this view is not focusable * in touch mode. * * @param focusable If true, this view can re

2016-09-08 20:59:15 1364

原创 AlertDialog.Builder和AlertDialog之间的关系

在没有正确认识这两个关系之前,做了一个自定义布局添加到对话框中,自定义布局中的按钮的监听里面写的让对话框消失的功能无法实现,因为使用了AlerDialog.Builder而没有使用builder.create()来创建对话框,查看了API发现:/** * Set a custom view to be the contents of the Dialog. If the supplied vie

2016-09-08 19:32:17 914

原创 在Fragment中获取AndroidManifest.xml根元素(<manifest>)下的版本信息

String appVersionName=null;try{PackageManage manage=this.getActivity().getPackageManage(); PackageInfo info=manage.getPackageInfo( this.getActicity().getPackageName(),0); appVersio

2016-09-08 15:56:41 1369

原创 CSS样式中P标签的内容换行属性white-space

需求描述:在一个div块中包含四个div块,这四个div块每个块都有自己的子元素p标签,这个四个div的宽度是由百分比控制的问题描述:使用ng-repeat加载一个list集合数据的时候由于某个字段的字符串过长就造成了页面的局部错位,不能上下对齐,所以想让过长的字符串换行显示,这样就不至于页面上造成的错位。解决办法:在浏览器调试样式发现有个white-space的属性,其值是nowrap(即whit

2016-07-22 13:56:45 15631

原创 AngularJs强制操作DOM

需求描述:在弹出的模态页面上显示计时器问题描述:模态页面的text框使用了ng-model绑定数据,controller中也使用了间隔调用来实现了计时器的具体逻辑,但是最后出现的问题是使用了间隔调用并且通过检测值发生改变但新值无法渲染到界面上,也就是说模态界面上的数据不能实时更新,而保留在初始化界面时的状态解决办法:强制获取模态界面中的text框,给text控件定义一个id,通过angular.el

2016-07-20 16:54:35 2047

原创 使用照相机拍照后读取当前拍到的图片方法

文件布局代码如下:<Button android:layout_width="match_parent" android:layout_height="wrap_content" android:text="startCamera1" android:onClick="StartCamera1"/><Button android:layo

2016-02-29 13:41:03 829

原创 启动系统照相机Camera的方法

1、直接调用系统的照相机功能       <Button android:layout_width="match_parent" android:layout_height="wrap_content" android:text="StartCamera" android:onClick="startCamera"/>

2016-02-29 10:14:52 1166

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除