button return Toolbar to the previous activity "without Reloading the Activity again

1

I have this code in the AndroidManifest.xml but when I press the Go back button, I recharge the activity and since I have a query it is generated again, making the process a little delayed.

AndroidManifest.xml code:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity
        android:name=".MainActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.AppCompat.Light.NoActionBar" />
    <activity
        android:name=".SplashScreen"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.AppCompat.Light.NoActionBar">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <activity
        android:name=".Noticias"
        android:parentActivityName=".MainActivity">
        <meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value=".MainActivity" />
    </activity>

</application>

The Question is ... Is there another way to Return to an Activity if it is loaded?

    
asked by Sharly Infinitywars 27.11.2016 в 17:01
source

1 answer

1

You can remove the AndriodManifest.xml you left like this:

<activity
    android:name=".Noticias">
</activity>

To put a button back to the ActionBar Back button in the title of the activity

If you want to detect your click How to execute the action of the Back button with any other button in Android Studio?

Tutorial navigation between activities: How to get back from an activity on android

    
answered by 27.11.2016 / 20:16
source