摘要:android sdk版本很多。。目前比较普遍的应该就是2.2。跟2.3了。。平板可能就是3.1或者3.2了。 3.0中的menu的创建代码跟2.x中的没什么不同的。可是出来的效果就有蛮大区别。下面就是3.0的menu的效果这是2.x的效果图。。都是在3.0的模拟器上运行的相同创建menu的代码java代码:import android.app.Activity;import android.os.Bundle;import android.view.Menu;import android.view.MenuInflater;public class MenuTest2Activity ext
阅读全文
摘要:ActivitiesAnActivityis an application component that provides a screen with which users can interact in order to do something, such as dial the phone, take a photo, send an email, or view a map. Each activity is given a window in which to draw its user interface. The window typically fills the scree
阅读全文
摘要:android应用中常用的监听OnTouchListener、OnClickListener、OnLongClickListener,大家肯定经常使用。但是你真的知道它会产生的神奇效果么?不要忽视这些神奇效果哦!说不定这些神奇效果正是你想要的呢?好,下面请看我的示例。示例、首先在Activity中创建一个button,然后对这个button同时设置OnTouchListener、OnClickListener、onLongClickListener这三种监听方式。接着就是重写这三个接口的实现代码了。java代码:public class ListenerTestActivity extends
阅读全文