Skip to content

Instantly share code, notes, and snippets.

@nseidm1
nseidm1 / gist:9252142
Last active August 29, 2015 13:56
The ChildConsiderateFragment allows fragments to be defined in it's xml layout. The child fragments will be determined in the onCreateView callback by parsing the xml layout returned by the abstract getLayoutId method. The child fragments will automatically be cleaned up in the onDestroyView callback.
package com.paltalk.chat.utils;
import java.util.ArrayList;
import org.xmlpull.v1.XmlPullParser;
import android.content.res.XmlResourceParser;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;