本文能解决的问题: 1.android sdk, ADT (Android SDK tools) 升级至16, SDK升级4.0 2.Failed to fetch URL http://dl-ssl.google.com/android/repository/addons_list-1.xml, reason: Connection to http://10.159.192.62:8080 refused 3.Failed to rename directory *\android-sdk-windows\tools to *\android-sdk-windows\temp\Tool... Read More
posted @ 2011-12-22 15:36 我爱巧克力·派 Views(4570) Comments(1) Diggs(0) Edit
在实际开发中LayoutInflater这个类还是非常有用的,它的作用类似于findViewById()。不同点是LayoutInflater是用来找res/layout/下的xml布局文件,并且实例化;而findViewById()是找xml布局文件下的具体widget控件(如Button、TextView等)。具体作用:1、对于一个没有被载入或者想要动态载入的界面,都需要使用LayoutInflater.inflate()来载入;2、对于一个已经载入的界面,就可以使用Activiyt.findViewById()方法来获得其中的界面元素。LayoutInflater 是一个抽象类,在文档中 Read More
posted @ 2011-11-09 16:03 我爱巧克力·派 Views(871) Comments(1) Diggs(0) Edit
书本上, 网路上android游戏框架比比皆是, 但是都未深入其生命周期,以下是我选取的基于servaceView的android游戏框架,ActivityGameActivity.java 1 package air.frame; 2 3 import android.app.Activity; 4 import android.os.Bundle; 5 import android.util.Log; 6 import android.view.Menu; 7 import android.view.MenuItem; 8 import android.widget.Te... Read More
posted @ 2011-09-19 23:10 我爱巧克力·派 Views(599) Comments(0) Diggs(0) Edit