Q. What class might you inherit from to provide an application with consistent shared components?

A. By creating your own shared Activity base class, you can implement behavior that will exist within each screen.

Q. Can an activity have its own preferences?

A. Yes, preferences can be shared among activities, and an activity can have its own preferences. To access shared preferences, use the getSharedPreferences() method. To access activity-level preferences, use the getPreferences() method.

Q. What two things need to be configured before you can run and debug an Android application in Eclipse?

A. You need to have configured both an AVD and the debug configuration. Then you can easily launch your application straight from Eclipse for debugging and testing.

Was this article helpful?

0 0

Post a comment