自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

EasonVincent的博客

Android开发

  • 博客(30)
  • 收藏
  • 关注

原创 Bundle的使用

注册界面布局:content_main.xml<TableLayout xmlns: android ="http://schemas.android.com/apk/res/android" android :layout_width= "match_parent" android :layout_height= "match_parent" android

2016-05-21 17:55:53 542

原创 计算质数

布局文件代码<LinearLayout xmlns: android ="http://schemas.android.com/apk/res/android" android :layout_width= "match_parent" android :layout_height= "match_parent" android :orientation= "verti

2016-05-19 13:13:33 563

原创 Handler--消息处理机制

页面布局 content_main.xml   android :layout_width= "match_parent"    android :layout_height= "match_parent"    android :orientation= "vertical"    >            android :layout_marginTop=

2016-05-19 12:16:02 312

原创 Configration--获取屏幕属性

android :layout_width= "match_parent"    android :layout_height= "match_parent"    android :orientation= "vertical"    >            android :id= "@+id/ori"        android :hint= "显示屏幕方向"

2016-05-19 11:24:39 471

原创 StackView

content_main.xml布局<LinearLayout xmlns: android ="http://schemas.android.com/apk/res/android" android :layout_width= "match_parent" android :layout_height= "match_parent" android :orientat

2016-05-18 20:08:53 387

原创 ProgressBar-进度条案例

content_main.xml布局<LinearLayout xmlns: android ="http://schemas.android.com/apk/res/android" android :orientation= "vertical" android :layout_width= "match_parent" android :layout_height=

2016-05-18 20:06:17 474

原创 Calendar(日历)--选择日期

content_main.xml布局<LinearLayout xmlns: android ="http://schemas.android.com/apk/res/android" android :layout_width= "match_parent" android :layout_height= "match_parent" android :ori

2016-05-18 20:03:59 1175

原创 TabHost--选项卡案例

页面布局content_main.xml<TabHost xmlns: android ="http://schemas.android.com/apk/res/android" android :layout_width= "match_parent" android :layout_height= "match_parent" android :layout_wei

2016-05-18 19:56:28 320

原创 SearchView--搜索框案例

页面布局content_main.xml    android :layout_width= "match_parent"    android :layout_height= "match_parent"    android :orientation= "vertical">                android :id= "@+id/sea

2016-05-18 19:51:08 501

原创 onTouchEvent--触摸事件案例

自定义控件DrawView继承Viewpackage com.eson.ontouchevent ;import android.content.Context ;import android.graphics.Canvas ;import android.graphics.Color ;import android.graphics.Paint ;import

2016-05-18 19:48:10 898

原创 PlaneGame--飞机小游戏案例

PlaneView负责绘制游戏的的飞机package com.eson.planegame ;import android.content.Context ;import android.graphics.Bitmap ;import android.graphics.BitmapFactory ;import android.graphics.Canvas ;

2016-05-18 19:41:54 1601

原创 AdapterViewFlipper使用案例

用AdapterViewFlipper设置页面布局    android :layout_width= "match_parent"    android :layout_height= "match_parent" >            android :id= "@+id/flipper"        android :layout_width=

2016-05-15 14:33:48 422

原创 Gallery事例

页面布局content_main.xml    android :orientation= "vertical"    android :layout_width= "match_parent"    android :layout_height= "match_parent"    >                android :id= "@+id/i

2016-05-15 13:32:42 289

原创 Spinner的使用案例

事例图片    页面布局content_main.xml    android :orientation= "vertical"    android :layout_width= "match_parent"    android :layout_height= "match_parent"    >

2016-05-15 11:00:12 584

原创 GridView-网格布局案例

(1)图片1效果                                                                               (2)随机点击图片出现的效果                                                    (3)随机点击图片出现的效果       页面布局content_main

2016-05-13 00:23:22 433

原创 BaseAdapter使用案例

在页面布局上用ListView显示adapter传过来的数据。   android :orientation= "vertical"    android :layout_width= "match_parent"    android :layout_height= "match_parent"    >            android :id=

2016-05-12 09:23:06 469

原创 SimpleAdapter使用案例

页面布局    android :layout_width= "match_parent"    android :layout_height= "match_parent"    android :orientation= "horizontal">            android :id= "@+id/img"        android :

2016-05-10 18:06:45 601

原创 SimpleCursorAdapter-获取电话簿中联系人并显示在类表中

下面的程序是从手机中把联系人显示到类表中。先在通讯录中添加一个联系人作为数 据库的数据。然后获得一个指向数据库的 Cursor 并且定义一个布局文件(当然也可以使用 系统自带的)。package com.eson.simplecursoradapter ;import android.database.Cursor ;import android.os.Bund

2016-05-10 14:20:31 525

原创 Android Studio下jni应用

Android Studio下jni应用最近在将一个小应用从eclipse开发迁移到android studio,程序中有native代码实现,在eclipse是靠Android.mk这么个mk文件来组织编译的,但到android studio上就不行了,因其是靠gradle组织,所以makefile里的配置要转换为build.gradle里的语句(尽管实际上gradle也是组

2016-05-09 19:23:42 315

原创 表格布局—计算器

android :id= "@+id/root"  android :layout_width= "match_parent"  android :layout_height= "match_parent"  android :columnCount= "4"  android :rowCount= "6">        android :layout_width

2016-05-09 18:40:07 3112

原创 引用第三方项目出现fragment的错误

1.错误情况2.解决方法在BaseFragment类把import android.app.Fragment ;替换为import android.support.v4.app.Fragment ;改为如图所示改完后错误提示没有了

2016-04-26 23:28:23 759

原创 引用第三方开源xUtils时出现的错误

在使用ViewUtils. inject( this, view)时,系统自动导入的包是系统内部的包,导致inject无法调用,这时需要把包改为import com.lidroid.xutils.view.annotation.ViewInject ;才能使用xUtils里面的inject方法

2016-04-26 23:25:35 780

原创 Android Studio引用第三方开源项目

1.复制开源项目的libraries文件2.把复制的黏贴到开发项目的与app的同级目录下3.在build.gradle(Moudule:App)里添加compile project( ':libraries:SlidingMenu' ),SlidingMenu是开源项目的名称。      4.修改版本号为您使用的版本号

2016-04-26 23:19:14 509

原创 标签出错导致的错误提示

出现错误提示Error:(7) Error parsing XML: not well-formed (invalid token)解决方法: 注意检查你的xml中是否有写""或者其他不配对的情况。如:标记处出现空格

2016-04-26 23:17:49 1254

原创 xUtils里使用HttpUtils时出现的无法访问HttpRequestBase的错误

1.xUtils里使用HttpUtils2.出现的无法访问HttpRequestBase的错误3. 在相应的module下的build.gradle中加入 android { useLibrary 'org.apache.http.legacy' }

2016-04-26 23:13:51 1109

原创 ContentProvider内容提供者

1.为什么需要内容提供者(ContentProvider)    [1].如何创建一个数据库,定义一个类继承SqliteOpenHelper    [2].打开数据库 :(1)adb shell  (2)cd data/data  (3)ls  (4)cd con.eson.db (5)ls (6)cd databases    (7)ls       (8)sqlite3 数据库

2016-04-26 23:07:20 370

原创 加载大图片

1.添加布局    android :layout_width="wrap_content"    android :layout_height="wrap_content"    android :onClick="click"    android :text="加载图片"    />    android :layo

2016-04-26 23:05:29 268

原创 Android Studio对比代码的方法

第一步选中代码第二步,右键选中Compare with Clipboard第三步,将代码复制到左边与之对比

2016-04-26 23:01:07 3895

原创 模拟WeChat

第一步:画出UI(1)主要模块xmlns:android="http://schemas.android.com/apk/res/android"    xmlns: tools="http://schemas.android.com/tools"    android :layout_width="match_parent"    an

2016-04-26 22:59:55 385

原创 Android Studio快捷键

Android studio 快速代码模板生成常用的缩写汇总一.输出打印1.Groovy(常规部分)---->(1).serr --->System.err.println("example")(2).souf --->printf "example"(3).sout --->println "example"(4).soutm --

2016-04-26 22:58:02 321

空空如也

空空如也

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

TA关注的人

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