Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
public class MainActivity extends FragmentActivity{
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setUpView();
setUpFragment();
}
void setUpView(){
setContentView(R.layout.activity_main);
}
void setUpFragment(){
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
SlidingFragment fragment = new SlidingFragment();
transaction.replace(R.id.sample_content_fragment, fragment);
transaction.commit();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment