@@ -0,0 +1,1662 @@
+/*%0A * Copyright (c) 2014 Ben Murphy%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A * %0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage com.smurph.openlicenseparserlib.frags;%0A%0Aimport android.app.Activity;%0Aimport android.app.Fragment;%0Aimport android.app.FragmentManager;%0Aimport android.app.FragmentTransaction;%0Aimport android.os.Bundle;%0A%0Aimport com.smurph.openlicenseparserlib.R;%0A%0Apublic class LicenseActivity extends Activity %7B%0A%0A%09@Override%0A%09protected void onCreate(Bundle savedInstanceState) %7B%0A%09%09super.onCreate(savedInstanceState);%0A%0A%09%09setContentView(R.layout.activity_license);%0A%0A%09%09Bundle args = getIntent().getExtras();%0A%0A%09%09FragmentManager fm = getFragmentManager();%0A%0A%09%09Fragment frag = fm.findFragmentByTag(LicenseFragment.FRAG_TAG);%0A%0A%09%09if (frag == null) %7B%0A%09%09%09frag = new LicenseFragment();%0A%09%09%09frag.setArguments(args);%0A%09%09%7D else %7B%0A%09%09%09if (frag.getArguments() == null)%0A%09%09%09%09frag.setArguments(args);%0A%09%09%09else %7B%0A%09%09%09%09if (args != null) %7B%0A%09%09%09%09%09Bundle arg = frag.getArguments();%0A%09%09%09%09%09arg.clear();%0A%09%09%09%09%09arg.putAll(args);%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D%0A%0A%09%09fm.beginTransaction()%0A%09%09%09%09.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE)%0A%09%09%09%09.replace(R.id.container, frag, LicenseFragment.FRAG_TAG)%0A%09%09%09%09.commit();%0A%09%7D%0A%7D%0A

Create a ListActivity so that the Fragment functionality can also be used as an Activity