daniel-stoneuk / material-about-library

Makes it easy to create beautiful about screens for your apps
Apache License 2.0
1.12k stars 140 forks source link

How to show the back-arrow in the toolbar? #20

Closed Rainer-Lang closed 7 years ago

daniel-stoneuk commented 7 years ago

Make sure your activity declaration looks something like this:

<activity
            android:name=".ExampleMaterialAboutActivity"
            android:parentActivityName=".MainActivity"
            android:theme="@style/AppTheme.MaterialAboutActivity"
            tools:ignore="UnusedAttribute">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value=".MainActivity" />
        </activity>
Rainer-Lang commented 7 years ago

I have different parent activites. I start the "about" out of the NavDrawer.

daniel-stoneuk commented 7 years ago

Do you use fragments with your NavDrawer?

Rainer-Lang commented 7 years ago

I'm using Activities and within Fragments (sometimes).

daniel-stoneuk commented 7 years ago

Oh right. Hmm, if you want to code your own logic for activity handling, you can check out MaterialAboutFragment and see how I've done it in the demo app here.

Rainer-Lang commented 7 years ago

Yes I think this is the only way.