English 中文(简体)
安德森·月球拉德和杰贝·埃皮奥特(签名)
原标题:Android LunarLander and JetBoy Example Differences
  • 时间:2010-09-09 11:58:48
  •  标签:
  • android

Hallo,

I noticed that the keypress handling ( onKeyUp etc) in the SDK LunarLander example is in the View class, whereas in the JetBoy example it is in the Activity class. Are there any advantages/disadvantages to either solution?

我自己的想法是,把所有投入处理(Key、Click & Touch)纳入这项活动是不明智的,因为这样做太少了。

  • Frink
最佳回答

取决于随着事态的发展,无论哪一类人都有处理方法。

在观点层面处理关键/重要事件的一个实例是,在一次屏幕上,你有多种看法。

在活动中处理的活动的一个例子是,如果你定制一个标题栏,你将抓住活动层面的关键/工具。 仅仅因为你可能会在标题栏上设置一些子,引发另一项活动。

问题回答

暂无回答




相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签