Menu Home

备忘

boost serialization(备忘)

/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // demo.cpp // // (C) Copyright 2002-4 Robert Ramey – http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include <cstddef> // NULL #include <iomanip> #include <iostream> #include <fstream> #include <string> #include […]

Android使用多点触摸(一)

Android触摸事件分类 事件名 动作 ACTION_DOWN 按下第一个点 ACTION_POINTER_DOWN 按下第二个点 ACTION_MOVE 手势发生移动 ACTION_POINTER_UP 释放第二个点 ACTION_UP 释放第一个点 简单示例 activity_multitouch.xml <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:paddingBottom=”@dimen/activity_vertical_margin” android:paddingLeft=”@dimen/activity_horizontal_margin” android:paddingRight=”@dimen/activity_horizontal_margin” android:paddingTop=”@dimen/activity_vertical_margin” tools:context=”.Multitouch” > <ImageView android:id=”@+id/imageView” android:contentDescription=”@string/DESC” android:layout_width=”fill_parent” android:layout_height=”fill_parent” android:src=”@drawable/aywdhz8u” android:scaleType=”matrix” > </ImageView> </RelativeLayout> Multitouch.java public class Multitouch extends Activity implements OnTouchListener{ Matrix matrix = new Matrix(); Matrix […]

使用命令行工具构建android apk

新建工程 查看构建目标 输入下面的命令查看所以可构建目标: $android list targets 可能的输出: Available Android targets: ———- id: 1 or “android-3” Name: Android 1.5 Type: Platform API level: 3 Revision: 4 Skins: HVGA (default), HVGA-L, HVGA-P, QVGA-L, QVGA-P ABIs : armeabi ———- id: 2 or “Google Inc.:Google APIs:3” Name: Google APIs Type: Add-On Vendor: Google Inc. […]