android 中 new button(this) ,new button(getApplicationContext

学习 时间:2026-06-04 18:08:11 阅读:1914
android 中 new button(this) ,new button(getApplicationContext)的主要区别和用法

最佳回答

微笑的铃铛

包容的羽毛

2026-06-04 18:08:11

若该类继承一父类,
比如 public class TextActivity extends Activity{}
new button(this) 指的是 Activity ,而后者则指的是 TextActivity。

最新回答共有2条回答

  • 勤恳的黄蜂
    回复
    2026-06-04 18:08:11

    若该类继承一父类,比如 public class TextActivity extends Activity{}new button(this) 指的是 Activity ,而后者则指的是 TextActivity。

上一篇 to swim in Kunming Lake is a great pleasure

下一篇 定制衣柜选择移门和平开门,哪一种好些呢