a.问题描述:eclipse加载新的项目后报一个错误,具体描述如下: b.问题分析: java版本不匹配:Facted Project 中的Java 版本设定与项目的Java 版本设定不一致。 c.问题解决: 在当前项目上点右键,属性--Project Facets中,配置编译版本与javacomp ...
分类:
编程语言 时间:
2016-05-13 07:33:07
阅读次数:
157
View的测量会回调onMeasure方法,因此首先要复写onMeasure方法,这个方法的作用进行宽高的测量,然后必须调用setMeasuredDimension进行设置,不然会触发IllegalStateException异常不复写此方法,默认采用EXACTLY模式测量,而EXACTLY只支持match_parent和指定的尺寸,指定为wrap_content的话无效,因为wrap_conten...
分类:
移动开发 时间:
2016-05-13 03:40:39
阅读次数:
195
#include "opencvlib.h"
using namespace cv;int main()
{
Mat img_1 = cv::imread("1.png");
Mat img_2 = cv::imread("2.png"); imshow("img1", img_1);
imshow("img2", img_2); if (!img_1.data...
分类:
其他好文 时间:
2016-05-13 03:09:32
阅读次数:
175
1、两种方式创建正则表达式
JS风格:
var re = /ab+c/;
Perl风格:/ab+c/;
2、字符串与正则配合
-->search:返回出现的位置,对大小写敏感(使用/i(忽略大小写));
-->match:返回获取的项目,匹配不到则返回null;
-->replace:替换所有的匹配(敏感词过滤)(str.replace(/mic),"t...
分类:
编程语言 时间:
2016-05-13 01:54:57
阅读次数:
286
我们看一下下面的代码<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="...
分类:
其他好文 时间:
2016-05-12 23:53:03
阅读次数:
325
实现思路:将手势写入GestureLibrary中,对其他手势进行匹配对比,进行识别
现在布局中加入GestureOverlayView组件
<android.gesture.GestureOverlayView
android:id="@+id/add_gesture"
android:layout_width="match_parent"
andr...
分类:
移动开发 时间:
2016-05-12 23:27:02
阅读次数:
170
下面是一个LinearLayout,里面的内容超级简单,就是一个ListView
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_pa...
分类:
移动开发 时间:
2016-05-12 23:15:54
阅读次数:
293
RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"android:layout_height="match_parent"android:ba...
分类:
微信 时间:
2016-05-12 20:19:21
阅读次数:
441
自定义view
布局
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_verti...
分类:
其他好文 时间:
2016-05-12 20:02:07
阅读次数:
311
先上效果图
加载完数据
首先定义一个底部正在加载的布局footer_layout.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_p...
分类:
移动开发 时间:
2016-05-12 19:39:03
阅读次数:
397