Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我创建了一个Activity允许用户创建页面的。这个 PageActivity 扩展了一个Activity. 我可以创建一个扩展 PageActivity 的名为 Update PageActivity 的类吗?
Activity
是的,你可以,只要你没有声明PageActivity你final可以扩展它。
PageActivity
final
当然可以。Activity 就像任何其他 Java 类一样。确保覆盖相关的 Activity 生命周期函数 - onCreate、onResume 等...