Best code examples for Android FragmentActivity class (android.support.v4.app.FragmentActivity)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android FragmentActivity class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Android FragmentActivity examples from Open Source projects
This code example shows how to use the following methods:
/** 
 * This demonstrates how you can implement switching between the tabs of a 
 * TabHost through fragments.  It uses a trick (see the code below) to allow 
 * the tabs to switch between fragments instead of simple views. 
 */ 
public class FragmentTabs extends FragmentActivity implements LocationListener{
    TabHost mTabHost;
    TabManager mTabManager;
 
    @Override 
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
 
        setContentView(R.layout.fragment_tabs); 
        mTabHost = (TabHost)findViewById(android.R.id.tabhost);
        mTabHost.setup();
        mTabHost.getTabWidget().setDividerDrawable(R.drawable.tab_divider);
        mTabManager = new TabManager(this, mTabHost, R.id.realtabcontent);
         
        setupTab("Dashboard", DashFrag.class); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
package net.avh4.tasks.android; 
 
import android.os.Bundle; 
import android.support.v4.app.FragmentActivity; 
import net.avh4.ide.example.net.avh4.tasks.android.R; 
 
/** 
 * An activity representing a list of Tasks. 
 */ 
public class TaskListActivity extends FragmentActivity { 
 
    @Override 
    protected void onCreate(Bundle savedInstanceState) { 
        super.onCreate(savedInstanceState); 
        setContentView(R.layout.activity_task_list); 
    } 
} 

10
CodeRank
This code example shows how to use the following methods:
package mobi.tongari.mokutan.ui; 
 
import mobi.tongari.mokutan.R; 
import android.support.v4.app.FragmentActivity; 
 
import com.google.android.gms.maps.SupportMapFragment; 
import com.googlecode.androidannotations.annotations.EActivity; 
import com.googlecode.androidannotations.annotations.FragmentById; 
 
@EActivity(R.layout.activity_test_fragment) 
public class TestFragmentActivity extends FragmentActivity { 
 
@FragmentById 
ExMapFragment fragment1; 
	 
@FragmentById 
SupportMapFragment mapFragment; 
	 
} 

10
CodeRank
This code example shows how to use the following methods:
package csci498.bybeet.lunchlist; 
 
import android.os.Bundle; 
import android.support.v4.app.FragmentActivity; 
 
public class DetailForm extends FragmentActivity { 
 
	@Override 
	public void onCreate (Bundle savedInstanceState) { 
		super.onCreate(savedInstanceState); 
		setContentView(R.layout.detail_activity); 
	} 
	 
	@Override 
	public void onResume(){ 
		super.onResume(); 
		 
		String restaurantId = getIntent().getStringExtra(LunchList.ID_EXTRA); 
		 
		if(restaurantId != null){ 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
package com.example.greenways;  
 
import android.os.Bundle; 
import android.support.v4.app.FragmentActivity; 
import android.view.Gravity; 
import android.view.Menu; 
import android.widget.TextView; 
 
public class Weather extends FragmentActivity  
{ 
	@Override 
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.weather); 
        TextView v = (TextView) findViewById(android.R.id.title);
        v.setGravity(Gravity.CENTER);
        v.setTextSize(17);
    } 
 
    @Override 

10
CodeRank
See Code Examples for Android FragmentActivity Methods: