Android Open Source - Planets-App Fragment H

From Project

Back to project page Planets-App.


The source code is released under:

Apache License

If you think the Android project Planets-App listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.andrewq.planets;
/*  w  w  w.  j av  a  2 s . c  o m*/
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;


public class FragmentH extends Fragment {

    Button button;

    public FragmentH() {
        // Required empty public constructor

    public void onViewCreated(View view, Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);

        button = (Button) getView().findViewById(;

        button.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {

                String url = "";
                Intent i = new Intent(Intent.ACTION_VIEW);

                getActivity().overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_left);

    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        return inflater.inflate(R.layout.fragment_h, container, false);

    public void onStart() {
        EasyTracker.getInstance(getActivity()).activityStart(getActivity());  // Add this method.

    public void onStop() {
        EasyTracker.getInstance(getActivity()).activityStop(getActivity());  // Add this method.

Java Source Code List