Created
December 30, 2016 09:25
-
-
Save manishkpr/6d6c3c9ebca5ccafaa72cc898014d5b6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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