We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我是新手,刚接触android,还不明白为什么,但是,教程中要删除setContentView(R.layout.activity_display_message);是会出错的。实验了下,不缺掉没问题。马上去查下这个方法的作用……
The text was updated successfully, but these errors were encountered:
这个方法(setContentView())是为Activity设置View的.每一个活动页面都会有一个视图,就是你在手机上看到的页面。而视图,可以通过两种方式进行添加,分别是Layout文件和Java代码。你看它的下面不是实例化了一个TextView作为这个Activity的视图设置上去了么。不删除自然没问题,等于设置了两次视图,系统显示最后设置的,即TextView。
Sorry, something went wrong.
No branches or pull requests
我是新手,刚接触android,还不明白为什么,但是,教程中要删除setContentView(R.layout.activity_display_message);是会出错的。实验了下,不缺掉没问题。马上去查下这个方法的作用……
The text was updated successfully, but these errors were encountered: