I
I
Ilya Megalinskiy2015-05-26 21:45:25
Java
Ilya Megalinskiy, 2015-05-26 21:45:25

What are the errors here and how to fix them?

This is HomeFragment. I transferred this code from another project (where it worked), but from MainActivity. All other classes work fine, but this one has errors. Who can help?
bdb661821cd34639807de636d3b906c0.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Emin, 2015-05-26
@Ewintory

Read about Activity and Fragment. There is a big difference between them.
In this case, setContentView and getActionBar are Activity methods, Fragment does not have them. It needs to be done differently. These are generally the basics, without their understanding, there can be no talk of any development.

U
urmi tilek uulu, 2015-05-28
@urma

Emin is right, you are trying to call non-existing methods from the super class. read well about Fragment.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question