将android活动(公共类扩展活动)更改为一个简单的类 [英] Changing android activity (public class extends activity) into a simple class

查看:88
本文介绍了将android活动(公共类扩展活动)更改为一个简单的类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个扩展活动的课程,我的意思是它有on create方法...

我想把它改成一个简单的类,我可以在其他项目中使用它。

我的意思是我想从这个类实例化并使用这些方法。

我遇到了很多问题我删除了extends activity和on create方法。

这样做的最佳解决方案是什么?

Hi every one,
I have a class which extends activity, I mean it has "on create" method...
I want to change it to a simple class in a way I could use it in other projects.
I mean I want to instantiate from this class and use the methods.
I have faced lots of problems when I delete the words "extends activity" and "on create" method.
what is the best solution to do that?

推荐答案

< a href =http://developer.android.com/reference/android/app/Activity.html> http://developer.android.com/reference/android/app/Activity.html [< a href =http://developer.android.com/reference/android/app/Activity.htmltarget =_ blanktitle =New Window> ^ ]



活动是其中的一部分 - 我想说一下Android应用程序的生命周期。
http://developer.android.com/reference/android/app/Activity.html[^]

An Activity is a part - I'd like to say the lifecycle of an Android application.


这篇关于将android活动(公共类扩展活动)更改为一个简单的类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆