Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Android Implementing Designs for Android Customizing a ListView for the Inbox Fun with Refactoring

Refactoring Ribbit Package

Hi Ben,

So when we refactored our code into specific packages, we had to modify the AndroidManifest.xml but there was this line of code that you did not edit so I was just curious to know if this must be modified as it still contains the old package structure value in the android:value attribute.

<meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.teamtreehouse.ribbit.MainActivity" />

Thanks, Ankit

1 Answer

Ankit, I believe that you will find that is for device(legacy really) support. The android Version Honeycomb v3.0 was the first version to use in app navigation with up/back as ben mentioned in the video. So to make it work on older versions of android you must have the meta-data tag with those attributes for navigation. The link is here Android Navigation Documentation. Included in that you will need to add the appcompat package into your build path. I am pretty sure that is why that code did not get edited. Here is my code: <p>

            android:name="com.example.ribbit.SignUpActivity"
            android:label="@string/title_activity_sign_up"
            android:parentActivityName="com.example.ribbit.LoginActivity"
            android:screenOrientation="portrait" >
            <meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value="com.example.ribbit.LoginActivity" />
        </activity>
    </application>```
</p>

Ok, thanks! :)