Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2014
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.62 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. import android.support.v7.app.ActionBarActivity;
  18.  
  19. import com.andrew.apollo.R;
  20. import com.andrew.apollo.ui.fragments.phone.MusicBrowserPhoneFragment;
  21.  
  22. /**
  23.  * This class is used to display the {@link ViewPager} used to swipe between the
  24.  * main {@link Fragment}s used to browse the user's music.
  25.  *
  26.  * @author Andrew Neal (andrewdneal@gmail.com)
  27.  */
  28. public class HomeActivity extends ActionBarActivity {
  29.  
  30.     /**
  31.      * {@inheritDoc}
  32.      */
  33.     @Override
  34.     protected void onCreate(final Bundle savedInstanceState) {
  35.         super.onCreate(savedInstanceState);
  36.         setContentView(R.layout.activity_base);
  37.      
  38.         // Load the music browser fragment
  39.         if (savedInstanceState == null) {
  40.             getSupportFragmentManager().beginTransaction()
  41.                     .replace(R.id.activity_base_content, new MusicBrowserPhoneFragment()).commit();
  42.         }
  43.     }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement