How to remove the back button on android

Asked

Viewed 427 times

1

How do I remove this back button from my application?

inserir a descrição da imagem aqui

1 answer

1


If you are in the oncreate the code below.

getSupportActionBar().setDisplayHomeAsUpEnabled(true);

You should also take Parentacivity on androidmanifest.xml. ex:

<activity
        android:name=".activity.Telefones"
        android:label="@string/title_activity_mostrar_telefones"
        android:parentActivityName=".activity.ListaTelefones">
        <meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value="br.com.dtec.listatelefonica2.activity.ListaTelefones" />
    </activity>

Let alone:

<activity
        android:name=".activity.MostrarTelefones"
        android:label="@string/title_activity_mostrar_telefones"
        >
</activity>

Apart from these codes Up Navigation will come out

  • Very good, that’s exactly what I needed.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.