I created an external Class tag to leave some methods that I always use, but it is giving error when using them, / em>:
package com.hs.gui.testelayout.util;
import android.support.v7.app.AppCompatActivity;
/**
* Created by Gui_j on 25/04/2016.
*/
public class Util extends AppCompatActivity {
public void backAppBar(String telaTitulo){
//getSupportActionBar() são métodos nativos do _Android_ que chamam um botão na tela
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setHomeButtonEnabled(true);
getSupportActionBar().setTitle(telaTitulo);
}
}
If I keep the way it is there, I have a return error:
TogettheerrorIshouldmake
publicvoidbackAppBar(StringtelaTitulo){...}
in
publicstaticvoidbackAppBar(StringtelaTitulo){...}
ButdoingthisIgainanothererror:
ThattocorrectImustremovethestatic
added,butwiththatwereturntotheinitialproblem.About getSupportActionBar()