Doubt about the ActionBar Tab

1

When my application opens, Tab looks like this:

ButifIopenanewViewandreturntothehomescreen,italreadylookslikethis:

Does anyone know why? And how do I always appear with the shadow? I'm using the Live-O template.

===================================================== ===================== MainActivity:

public class MainActivity extends NavigationLiveo implements OnItemClickListener {

private HelpLiveo mHelpLiveo;
public Context contexto = this;
public static String idUser;

@Override
public void onInt(Bundle bundle) {
    Intent receive = getIntent();
    String[] dadosUser = receive.getStringArrayExtra("dadosusuario");
    idUser = dadosUser[0];
    String nome_sobrenome = dadosUser[1] + " " + dadosUser[2];
    String credito = "Saldo: " +dadosUser[3];

    // User Information
    this.userName.setText(nome_sobrenome);
    this.userEmail.setText(credito);
    this.userPhoto.setImageResource(R.drawable.padrao); //Foto do usuario no menu
    this.userBackground.setImageResource(R.drawable.ic_user_background_first);

    // Creating items navigation
    mHelpLiveo = new HelpLiveo();
    mHelpLiveo.add(getString(R.string.abrir_perfil), R.mipmap.ic_perfil);

    mHelpLiveo.addSeparator(); // Item separator

    mHelpLiveo.addSubHeader("Outras opções"); //Item subHeader
    mHelpLiveo.add(getString(R.string.config_da_conta), R.mipmap.ic_inbox_black_24dp);
    mHelpLiveo.add(getString(R.string.config_do_app), R.mipmap.ic_settings_black_24dp);
    mHelpLiveo.add(getString(R.string.ajuda_info), R.mipmap.ic_info);
    mHelpLiveo.add(getString(R.string.informar_erro), R.mipmap.ic_report_black_24dp);
    //mHelpLiveo.add("");

    with(this).startingPosition(2) //Starting position in the list
            .addAllHelpItem(mHelpLiveo.getHelp())
            .colorNameSubHeader(R.color.nliveo_blue_colorPrimary)
            .colorItemSelected(R.color.nliveo_blue_colorPrimary)
            .footerItem(R.string.desconectar, R.mipmap.ic_logout)
            .setOnClickUser(onClickPhoto)
            .setOnPrepareOptionsMenu(onPrepare)
            .setOnClickFooter(onClickFooter)
            .build();

    int position = this.getCurrentPosition();
    this.setElevationToolBar(position != 2 ? 15 : 0);
}
}

TabsPagerAdapter:

public class TabsPagerAdapter extends FragmentPagerAdapter {
public TabsPagerAdapter(FragmentManager fm) {
    super(fm);
}

@Override
public Fragment getItem(int index) {
    switch (index) {
        case 0:
            return new feed();
        case 1:
            return new eventos();
        case 2:
            return new amigos();
        default:
            return new feed();
    }
}

@Override
public int getCount() {
    // get item count - equal to number of tabs
    return 3;
}

@Override
public CharSequence getPageTitle(int position) {
    switch (position) {
        case 0:
            return "Mural";
        case 1:
            return "Eventos";
        case 2:
            return "Conexões";
    }
    return null;
}
}
    
asked by anonymous 16.12.2015 / 23:32

0 answers