1 /* ownCloud Android client application
2 * Copyright (C) 2011 Bartek Przybylski
3 * Copyright (C) 2012-2013 ownCloud Inc.
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2,
7 * as published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 package com
.owncloud
.android
.ui
.fragment
;
20 import com
.actionbarsherlock
.app
.SherlockFragment
;
21 import com
.owncloud
.android
.ui
.activity
.LandingActivity
;
22 import com
.owncloud
.android
.ui
.adapter
.LandingScreenAdapter
;
24 import android
.os
.Bundle
;
25 import android
.view
.LayoutInflater
;
26 import android
.view
.View
;
27 import android
.view
.ViewGroup
;
28 import android
.widget
.ListView
;
29 import com
.owncloud
.android
.R
;
32 * Used on the Landing page to display what Components of the ownCloud there
33 * are. Like Files, Music, Contacts, etc.
35 * @author Lennart Rosam
38 public class LandingPageFragment
extends SherlockFragment
{
41 public View
onCreateView(LayoutInflater inflater
, ViewGroup container
,
42 Bundle savedInstanceState
) {
43 View root
= inflater
.inflate(R
.layout
.landing_page_fragment
, container
);
48 public void onActivityCreated(Bundle savedInstanceState
) {
49 super.onActivityCreated(savedInstanceState
);
51 ListView landingScreenItems
= (ListView
) getView().findViewById(
53 landingScreenItems
.setAdapter(new LandingScreenAdapter(getActivity()));
55 .setOnItemClickListener((LandingActivity
) getActivity());