Last active
February 7, 2019 19:19
-
-
Save dynoChris/7203702ebfed9e56dbc45b775e73b6d7 to your computer and use it in GitHub Desktop.
Display the fragment as the main content of activity
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 SettingsActivity extends AppCompatActivity { | |
| @Override | |
| protected void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| // Display the fragment as the main content. | |
| getFragmentManager().beginTransaction() | |
| .replace(android.R.id.content, new SomeFragment()) | |
| .commit(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment