Created
February 17, 2017 15:57
-
-
Save cthulhuplush/7243f9221d8baf51caefe27f5df098e1 to your computer and use it in GitHub Desktop.
This file contains 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 AppCompatActivity | |
{ | |
private static final long MOVE_DEFAULT_TIME = 1000; | |
private static final long FADE_DEFAULT_TIME = 300; | |
private FragmentManager mFragmentManager; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) | |
{ | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
ButterKnife.bind(this); | |
mFragmentManager = getSupportFragmentManager(); | |
loadInitialFragment(); | |
Handler handler = new Handler(); | |
handler.postDelayed(this::performTransition, 1000); | |
} | |
private void loadInitialFragment() | |
{ | |
Fragment initialFragment = Fragment1.newInstance(); | |
FragmentTransaction fragmentTransaction = mFragmentManager.beginTransaction(); | |
fragmentTransaction.replace(R.id.fragment_container, initialFragment); | |
fragmentTransaction.commit(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment