// Path: Resources/src/org/owasp/seraphimdroid/adapter/TabsPagerAdapter.java
// public class TabsPagerAdapter extends FragmentStatePagerAdapter{
// 
// 	public TabsPagerAdapter(FragmentManager fm) {
// 		super(fm);
// 	}
// 
// 	@Override
// 	public Fragment getItem(int index) {
// 
// 		switch (index) {
// 		case 0:
// 			// Top Rated fragment activity
// 			return new CallLogFragment();
// 		case 1:
// 			// Games fragment activity
// 			return new SMSLogFragment();
// 
// 		case 2:
// 			// Movies fragment activity
// 			return new USSDLogFragment();
// 		}
// 
// 		return null;
// 	}
// 
// 	@Override
// 	public int getCount() {
// 		// get item count - equal to number of tabs
// 		return 3;
// 	}
// 
// }


import android.app.Activity;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.support.v4.view.ViewPager.OnPageChangeListener;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TabHost;
import android.widget.TabHost.OnTabChangeListener;
import org.owasp.seraphimdroid.adapter.TabsPagerAdapter;
package org.owasp.seraphimdroid;



public class BlockerFragment extends Fragment implements OnPageChangeListener,
		OnTabChangeListener {

	private TabHost tabHost;
	private ViewPager viewPager;
	private int tabNo = 5;

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {

		try {
			tabNo = getActivity().getIntent().getIntExtra("TAB_NO", 5);
		} catch (Exception e) {
			e.printStackTrace();
		}

		View view = inflater.inflate(R.layout.fragment_blocker, container,
				false);

		tabHost = (TabHost) view.findViewById(R.id.tabhost);
		tabHost.setup();
		initTabs();

		viewPager = (ViewPager) view.findViewById(R.id.viewpager);
		viewPager.setAdapter(new TabsPagerAdapter(getActivity()
				.getSupportFragmentManager()));
		viewPager.setOnPageChangeListener(this);

// Path: Resources/src/org/owasp/seraphimdroid/adapter/TabsPagerAdapter.java
// public class TabsPagerAdapter extends FragmentStatePagerAdapter{
// 
// 	public TabsPagerAdapter(FragmentManager fm) {
// 		super(fm);
// 	}
// 
// 	@Override
// 	public Fragment getItem(int index) {
// 
// 		switch (index) {
// 		case 0:
// 			// Top Rated fragment activity
// 			return new CallLogFragment();
// 		case 1:
// 			// Games fragment activity
// 			return new SMSLogFragment();
// 
// 		case 2:
// 			// Movies fragment activity
// 			return new USSDLogFragment();
// 		}
// 
// 		return null;
// 	}
// 
// 	@Override
// 	public int getCount() {
// 		// get item count - equal to number of tabs
// 		return 3;
// 	}
// 
// }


// Path: Seraphimdroid/app/src/main/java/org/owasp/seraphimdroid/BlockerFragment.java
import android.app.Activity;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.support.v4.view.ViewPager.OnPageChangeListener;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TabHost;
import android.widget.TabHost.OnTabChangeListener;
import org.owasp.seraphimdroid.adapter.TabsPagerAdapter;

package org.owasp.seraphimdroid;



public class BlockerFragment extends Fragment implements OnPageChangeListener,
		OnTabChangeListener {

	private TabHost tabHost;
	private ViewPager viewPager;
	private int tabNo = 5;

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {

		try {
			tabNo = getActivity().getIntent().getIntExtra("TAB_NO", 5);
		} catch (Exception e) {
			e.printStackTrace();
		}

		View view = inflater.inflate(R.layout.fragment_blocker, container,
				false);

		tabHost = (TabHost) view.findViewById(R.id.tabhost);
		tabHost.setup();
		initTabs();

		viewPager = (ViewPager) view.findViewById(R.id.viewpager);
		viewPager.setAdapter(new TabsPagerAdapter(getActivity()
				.getSupportFragmentManager()));
		viewPager.setOnPageChangeListener(this);

		tabHost.getTabWidget().setGravity(Gravity.BOTTOM);