![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
android 学习
joker_zhou
这个作者很懒,什么都没留下…
展开
-
Android获取GPS 计算速度
package com.example.myapplication;import android.content.Intent;import android.location.Location;import android.location.LocationListener;import android.location.LocationManager;import android.location.LocationProvider;import android.os.Handler;im.原创 2021-06-15 13:43:56 · 2757 阅读 · 4 评论 -
Android ContextMenu和Listview配合使用
@Override protected void onResume() { // TODO Auto-generated method stub ListView listView = (ListView) findViewById(R.id.listView1); adapter= new ArrayAdapter( getApplicationContext(), and原创 2012-08-17 18:11:54 · 5354 阅读 · 1 评论 -
android 开发 小问题 随记
1 如何Activity启动时自动获得焦点,取消EditText自动获取焦点的方法getWindow().setSoftInputMode( WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); 2 自定义的ViewGroup必须加上以下构造,否则异常public MyGroup原创 2012-07-25 13:12:14 · 1072 阅读 · 0 评论 -
linux android 使用JNI
1. 首先去android sdk官网去下载DNK 2.配置环境变量,在/etc/profile 中定义如下变量 NDKROOT是你的ndk解压缩后的位置NDKROOT=/home/joker/anroid_tools/android-ndk-r8bexport PATH=$NDKROOT:$PATH3.在终端输入 ndk-build输出 :Android NDK原创 2012-11-05 14:43:37 · 868 阅读 · 0 评论 -
NDK makefile格式内容
LOCAL_PATH := $(call my-dir) //本地目录地址include $(CLEAR_VARS) //清理掉除去LOCAL_PATH外的所有变量LOCAL_MODULE:= helloworld //区分Android.mk中的每个模块(即最后生成的os库名)这个例子生成的模块为 libhelloworld.osLOCAL_SRC_FILES := hell原创 2012-11-09 10:46:24 · 723 阅读 · 0 评论 -
android 常用控件
事件处理: 在Activity上加事件使用的是onXXX方法; 在View上加入事件使用的是setonXXXListener(new View.XXX(){});方法 常用控件: label TextView 标签label列表 ListView 列表框,联系人ItemSelectedListener 换选项触发提示 Toast提示信息;就是下面出现一会原创 2015-10-16 10:36:17 · 261 阅读 · 0 评论 -
android http请求
1.使用的类 HttpGet 代表http的Get请求对象 HttpPost 代表http的Post请求对象 HttpClient http服务客户端,相当于浏览器 2封装类 public class AndroidNetRequestUtil { public InputStream sendGet原创 2015-10-16 10:42:41 · 277 阅读 · 0 评论 -
android布局文件 merge 标签的使用
<ToggleButton android:id="@+id/toggleButton1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="ToggleButton" /> <TextView原创 2015-10-16 10:22:08 · 356 阅读 · 0 评论 -
android开发笔记蓝牙
相关类: 1.BluetoothAdapter 顾名思义,蓝牙适配器,直到我们建立bluetoothSocket连接之前,都要不断操作它原创 2015-10-16 10:27:06 · 432 阅读 · 0 评论 -
sdk离线下载地址
http://www.androiddevtools.cn/#sdk-list原创 2015-12-15 09:31:32 · 503 阅读 · 0 评论 -
eclipse 安装android maven插件提示 bundle org.eclipse.zest.core 0.0.0
今天在Eclipse上安装maven插件时遇到了如下的错误:Cannot complete the install because one or more required items could not be found. Software being installed: Maven Integration for Eclipse (Required) 0.12.1.201101转载 2015-12-15 10:06:20 · 1750 阅读 · 0 评论 -
Android 使用ORMLite 操作数据库
用过ssh,s2sh的肯定不会陌生 ,应该一学就会第一步: 下载ormlite-android-4.41.jar和ormlite-core-4.41.jar两个jar包,放入工程的libs文件夹内,然后右键 builder path-->add path第二步:对你要持久化的类进行注解(记住.提供一个默认无参构造)@DatabaseTable(tableNam原创 2012-08-15 16:29:47 · 47517 阅读 · 3 评论 -
android 使用ContentProvider共享数据
注册ContentProvider主要类 ContentProvider 程序需要一个类继承ContentProvider URI content:// 域名//路径 路径规定了访问的业务. 比如可原创 2012-08-13 16:37:47 · 1167 阅读 · 1 评论 -
android appwidget 笔记
AppWidget 就是我们使用的窗口小部件实现appwidget非常简单,只需要一下几个步骤就OK1.在 /res/layout 中建立一个 布局文件.此布局文件就是 窗体小部件 的"样子"2.在/res/xml 中建立一个xml文件此文件对appwidget进行配置.如下<appwidget-provider xmlns:android="http://schemas.a原创 2012-07-17 22:10:18 · 678 阅读 · 0 评论 -
Android Animation动画
1.java代码实现Animation动画 首先介绍4个动画类: PS:一下出现的百分比数值 均化为数值 比如 100%=1 50%=0.5// TODO Auto-generated method stub // Alpha原创 2012-07-18 14:34:30 · 6494 阅读 · 0 评论 -
android 解析xml 笔记
1.首先建立一个xml文件 aa bb 2.创建一个Students对象类public class Student{ String name; String age; String id; public String getId() { return id; } public void setId原创 2012-07-19 17:44:50 · 948 阅读 · 0 评论 -
android json解析
1.将google-json.jar包导入到项目中,json.jar 下载:http://code.google.com/p/google-gson/ 下列代码用于JSON字符串转化为对象public class JSONUtil{ private Class clazz; private String jsonstring; public JSONUtil(C原创 2012-07-19 13:40:48 · 2060 阅读 · 0 评论 -
android开发笔记蓝牙
相关类: 1.BluetoothAdapter 顾名思义,蓝牙适配器,直到我们建立bluetoothSocket连接之前,都要不断操作它 BluetoothAdapter里的方法很多,常用的有以下几个: cancelDiscovery() 取消搜索原创 2012-07-20 20:28:22 · 2704 阅读 · 3 评论 -
android Tabhost的使用
1 xml 配置/res/layoutTabHost的id必须为tabhost Framelayout的id必须为tabcontentTabWidget的id必须为tabsTabHost,Framelayout,TRabWidge都是缺一不可的,<TabHost xmlns:android="http://schemas.android.com/apk/res/android原创 2012-07-23 18:22:01 · 674 阅读 · 0 评论 -
android http请求
1.使用的类 HttpGet 代表http的Get请求对象 HttpPost 代表http的Post请求对象 HttpClient http服务客户端,相当于浏览器2封装类public class AndroidNetRequestUtil { public InputStream sendGetRequest(S原创 2012-07-23 13:36:28 · 532 阅读 · 0 评论 -
android布局文件 merge 标签的使用
<ToggleButton android:id="@+id/toggleButton1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="ToggleButton" /> <TextView原创 2012-08-12 23:16:09 · 10321 阅读 · 0 评论 -
SQLite语法
SQLite库可以解析大部分标准SQL语言。但它也省去了一些特性并且加入了一些自己的新特性。这篇文档就是试图描述那些SQLite支持/不支持的SQL语法的。查看关键字列表。如下语法表格中,纯文本用蓝色粗体显示。非终极符号为斜体红色。作为语法一部分的运算符用黑色Roman字体表示。这篇文档只是对SQLite实现的SQL语法的综述,有所忽略。想要得到更详细的信息,参考源代码和语法文件“转载 2012-04-17 20:08:22 · 1530 阅读 · 0 评论