Skip to content

Instantly share code, notes, and snippets.

@Singhak
Created June 21, 2016 05:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Singhak/ffc0a03797a90a6c6a92b84e8d60d2a3 to your computer and use it in GitHub Desktop.
Save Singhak/ffc0a03797a90a6c6a92b84e8d60d2a3 to your computer and use it in GitHub Desktop.
This is launcher activity where we are showing fragment which holds tabs
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
getSupportFragmentManager().beginTransaction().add(R.id.relative_layout, new TabHostFragment()).commit();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment