OSDN Git Service

Repackaged com.andrew.apollo to com.cyngn.eleven
[android-x86/packages-apps-Eleven.git] / src / com / cyngn / eleven / ui / activities / HomeActivity.java
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.cyngn.eleven.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.cyngn.eleven.R;
19 import com.cyngn.eleven.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         // Load the music browser fragment
36         if (savedInstanceState == null) {
37             getSupportFragmentManager().beginTransaction()
38                     .replace(R.id.activity_base_content, new MusicBrowserPhoneFragment()).commit();
39         }
40     }
41
42     /**
43      * {@inheritDoc}
44      */
45     @Override
46     public int setContentView() {
47         return R.layout.activity_base;
48     }
49 }