+ 2
Can somebody explain this? I'm not understanding this from android studio.
package com.example.colrhodes.myapplication; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } } (This doesn't seem to be normal java code for me. I've studied basics of java.)
5 Respuestas
+ 3
package
import
class Mainactivity - your first run activity
oncreate method- first run method as main method.
+ 3
If a class inherits a method from its superclass, then there is a chance to override the method
+ 2
@Hasan. Could you explain it more deeply? I cant get what is meant be "override" and more
+ 2
MainActivity is your first class and the first action that is run by default when the program is started. And this in your case expands from the AppCompat support library. In onCreate, the activity and layout are created. setContentView is responsible for the layout, that is, for the appearance. A Bundle is designed for data storage
+ 1
I advise reading books on Android. I personally advise: The Busy Coder's Guide to Android Development 8.10