Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2014
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. /*
  2. * Copyright (C) 2012 Andrew Neal Licensed under the Apache License, Version 2.0
  3. * (the "License"); you may not use this file except in compliance with the
  4. * License. You may obtain a copy of the License at
  5. * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
  6. * or agreed to in writing, software distributed under the License is
  7. * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  8. * KIND, either express or implied. See the License for the specific language
  9. * governing permissions and limitations under the License.
  10. */
  11.  
  12. package com.andrew.apollo.ui.activities;
  13.  
  14. import android.os.Bundle;
  15. import android.support.v4.app.Fragment;
  16. import android.support.v4.view.ViewPager;
  17.  
  18. import com.andrew.apollo.R;
  19. import com.andrew.apollo.ui.fragments.phone.MusicBrowserPhoneFragment;
  20.  
  21. /**
  22. * This class is used to display the {@link ViewPager} used to swipe between the
  23. * main {@link Fragment}s used to browse the user's music.
  24. *
  25. * @author Andrew Neal (andrewdneal@gmail.com)
  26. */
  27. public class HomeActivity extends BaseActivity {
  28.  
  29. /**
  30. * {@inheritDoc}
  31. */
  32. @Override
  33. protected void onCreate(final Bundle savedInstanceState) {
  34. super.onCreate(savedInstanceState);
  35.  
  36. // Load the music browser fragment
  37. if (savedInstanceState == null) {
  38. getSupportFragmentManager().beginTransaction()
  39. .replace(R.id.activity_base_content, new MusicBrowserPhoneFragment()).commit();
  40. }
  41.  
  42. setContentView(R.layout.activity_base);
  43. }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement