自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Android中图片实现按钮点击效果

我们在开发的过程中,往往为了美化界面的需要,会修改按钮的默认外观,而因为Android中的按钮有三种状态—默认,被点击,被选中。所以,如果要改变按钮的外观,需要对这三种情况都做出修改,也许在以往,我们最容易想到的就是,手动监听按钮的选中和点击事件,然后写代码来替换按钮的背景,但是在android中,我们不需要这么麻烦,android早就替我们想好了解决方案,那就是selector资源。如果我们要实...

2011-03-31 20:31:43 306

原创 andorid AsyncTask 异步更新UI

AsyncTask extends Objectjava.lang.Object   ↳android.os.AsyncTask<Params, Progress, Result>Class OverviewAsyncTask enables proper and easy use of the UI thread....

2011-03-30 16:32:46 84

原创 Android动态设置控件高度

GridView mGrid= (GridView) findViewById(R.id.gridview); LinearLayout.LayoutParams linearParams = (LinearLayout.LayoutParams) mGrid.getLayoutParams(); // 取控件mGrid当前的布局参数linearParams.height = 75;// ...

2011-03-30 11:20:19 147

原创 Android中自定义ListView无法响应OnItemClickListener中的onItemClick方法问题解决方案

在Android软件设计与实现中我们通常都会使用到ListView这个控件,系统有一些预置的Adapter可以使用,例如SimpleAdapter和ArrayAdapter,但是总是会有一些情况我们需要通过自定义ListView来实现一些效果,那么在这个时候,我们通常会碰到自定义ListView无法选中整个ListViewItem的情况,也就是无法响应ListView的onItemCl...

2011-03-29 14:25:38 81

原创 android EditText 去除边框

 EditText的background属性设置为@null就搞定了:android:background="@null"style属性倒是可加可不加附原文:@SlumberMachine, that's a great observation! But, it seems that there is more to making a TextView editable...

2011-03-29 11:57:28 566

原创 Cursor与Adapter结合使用

查询数据库均会把查询的结果包装在一个Cursor的子类对象中返回。Cursor就像是位于结果集之上的一个游标,可以对结果集进行向前、向后或随机的访问。而Cursor本身是一个接口类,提供了对结果集访问的一些抽象方法,根据功能的不同在其子类有着不同的实现。要控制查询时返回的Cursor类型,可以自定义一个继承自CursorFactory类通过实现其newCursor()方法来返回需要的Cur...

2011-03-24 13:46:56 104

原创 android中去掉标题栏和状态栏

(一)去掉标题栏和状态栏(实现全屏) this.requestWindowFeature(Window.FEATURE_NO_TITLE);//去掉标题栏 this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);//...

2011-03-15 16:52:40 100

原创 AndEngine - Core-Terminology

AndEngine - Core-TerminologyBaseGameActivity:The BaseGameActivity is the root of a game, that contains an Engine and manages to create a SurfaceView the contents of the Engine will b...

2011-03-03 13:56:02 99

原创 AndEngine 分析之九 -----ITextureSource,TextureRegion

ITextureSource:An implmentation of the ITextureSource-interface like AssetTextureSource manages to load an image onto a specific position in the Texture. 一个实现了itexturesource-interface像...

2011-03-03 13:54:38 112

原创 AndEngine 分析之八------Texture

Texture:A Texture is a 'image' in the memory of the graphics chip. On Android the width and height of a Texture has to be a power of 2. Therefore AndEngine assembles a Texture from a cou...

2011-03-03 13:43:59 88

原创 AndEngine 分析之七-----Camera

Camera:A Camera defines the rectangle of the scene that is drawn on the screen, as not the whole scene is visible all the time. Usually there is one Camera per Scene, except for the SplitScree...

2011-03-03 12:46:23 90

原创 AndEngine 分析之六-----Entity

Entity:An Entitiy is an object that can be drawn, like Sprites, Rectangles, Text or Lines. An Entity has a position/rotation/scale/color/etc... 一个entitiy是一个可以被画的物体,像Sprites,矩形,文本或线。一个实...

2011-03-03 12:34:55 105

原创 AndEngine 分析之五-----Scene

Scene:The Scene class is the root container for all objects to be drawn on the screen. A Scene has a specific amount of Layers, which themselves can contain a (fixed or dynamic) amount o...

2011-03-03 12:12:16 164

原创 javascript 创建流程节点

var nodeIndex=0; function addChannelNode() { nodeIndex++; var table=$("#nodeTable")[0];         var tr = document.createElement('tr');           tr.id = ''+nodeIndex+'';           table....

2011-03-03 11:49:36 117

原创 Struts2防止表单重复提交

Struts2防止表单重复提交2009年04月14日 星期二 11:37在开发的时候,很多时候会需要防止用户重复提交表单。在Strut2中可以方便的实现这个功能。 防止表单重复提交主要用到的标签是<s: token />,拦截器 <interceptor-ref name="token" />,还有一个默认的返...

2011-03-03 11:49:25 76

原创 frameset框架中session失效后怎样回到登录页面

在页面使用了frameset。在session失效后需望转到登录页面,此时会在管理台页面的一个子页面中显示登录界面 解决方法是:可以在登录页面中加入以下js代码。Java代码if (top.location != self.location){     top.location=self.location;     }   ...

2011-03-03 11:49:15 143

原创 mysql 转 Oracle 时遇到的问题及解决方案

1。"ORA-00942: 表或视图不存在 "的原因和解决方法 Posted on 2008-07-21 13:35 张荣华 阅读(10899) 评论(1) 编辑 收藏 所属分类: DB <!-- <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc...

2011-03-03 11:49:00 308

原创 AndEngine 分析之四-----Engine

Engine:The Engine make the game proceed in small discrete steps of time. The Engine manages to synchronize a periodic drawing and updating of the Scene, which contains all the content th...

2011-03-03 11:47:44 133

原创 AndEngine 分析之三-----AsyncTask,BaseActivity备忘

 不用handler更细页面的另一种更新方式: AsyncTask enables proper and easy use of the UI thread. This class allows to perform background operations and publish results on the UI thread without having to mani...

2011-03-03 10:34:29 103

原创 AndEngine 分析之二-----BaseGameActivity

BaseGameActivity:The BaseGameActivity is the root of a game, that contains an Engine and manages to create a SurfaceView the contents of the Engine will be drawn into. There is always exactl...

2011-03-03 10:26:42 119

原创 AndEngine 分析之一-----Loading Resources In The Background With A Loading Screen

Loading Resources In The Background With A Loading Screen Well, after searching for this for the last two days it seems that either no one has figured it out, or...

2011-03-03 10:24:23 112

原创 androidUI 设计之四-----多按钮选择

此案例适用于多个按钮模拟菜单的场景:布局示意图: 实现代码: <?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_...

2011-03-02 17:29:22 255

原创 androidUI 设计之三-----登陆页面

此范例用来实现用户登录等场景布局:布局示意图:实现代码:<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/LinearLayout1" and...

2011-03-02 15:11:16 132

原创 androidUI 设计之二-----说明书

此例用于实现产品说明书等相关布局:布局示意图:实现代码: <?xml version="1.0" encoding="utf-8"?><LinearLayout  xmlns:android="http://schemas.android.com/apk/res/android"  android:layout_width="fill_parent...

2011-03-02 14:54:31 94

原创 androidUI 设计之一

ndroid有多种布局格式,这里只是详细介绍常用的五种格式。RelativeLayout、LinearLayout、FrameLayout、AbsoluteLayout、TableLayout.。其中LinearLayout和RelativeLayout是最常用的格式,他们可以通过xml配置文件进行布局。可以查看相关api: http://developer.android.c...

2011-03-02 10:10:48 72

原创 基于OpenGL动画设计研究与实现

摘 要:本文从Windows及C语言编程基础出发,重点介绍了如何使用OpenGL来实现动画的原理与方法,并通过相关实例进行了验证。  关 键 词:OpenGL,API, 双缓冲技术,渲染,计时器   1.引 言   OpenGL是一种相对新的工业标准,它的前身是由SGI公司为其图形工作站开发的IRIS GL,是一个工业标准的三维计算机图形软件接口。  OpenGL不是一种编...

2011-03-01 18:05:53 295

原创 OpenGL的原理

可以把OpenGL看成一条生产流水线,原料是场景、物体的顶点、表面细节等信息,产品是看起来有三维感觉的平面位图。  在OpenGL中是以面边界(B-REP)模型来描述物体的,或者说是使用多边形造型系统。在OpenGL中每个物体都只是一组平面,这组平面记录了该物体的表面。显然这些平面越小画出不断的物体越逼真。 生成本图的程序源码(http://chinaaspdownloa...

2011-03-01 18:04:40 245

空空如也

空空如也

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

TA关注的人

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