moving from eu.alefzero.eu to com.owncloud.android
[pub/Android/ownCloud.git] / src / com / owncloud / android / ui / fragment / LandingPageFragment.java
diff --git a/src/com/owncloud/android/ui/fragment/LandingPageFragment.java b/src/com/owncloud/android/ui/fragment/LandingPageFragment.java
new file mode 100644 (file)
index 0000000..a021afb
--- /dev/null
@@ -0,0 +1,58 @@
+/* ownCloud Android client application\r
+ *   Copyright (C) 2011  Bartek Przybylski\r
+ *\r
+ *   This program is free software: you can redistribute it and/or modify\r
+ *   it under the terms of the GNU General Public License as published by\r
+ *   the Free Software Foundation, either version 3 of the License, or\r
+ *   (at your option) any later version.\r
+ *\r
+ *   This program is distributed in the hope that it will be useful,\r
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+ *   GNU General Public License for more details.\r
+ *\r
+ *   You should have received a copy of the GNU General Public License\r
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
+ *\r
+ */\r
+package com.owncloud.android.ui.fragment;\r
+\r
+import com.actionbarsherlock.app.SherlockFragment;\r
+import com.owncloud.android.ui.activity.LandingActivity;\r
+import com.owncloud.android.ui.adapter.LandingScreenAdapter;\r
+\r
+import android.os.Bundle;\r
+import android.view.LayoutInflater;\r
+import android.view.View;\r
+import android.view.ViewGroup;\r
+import android.widget.ListView;\r
+import com.owncloud.android.R;\r
+\r
+/**\r
+ * Used on the Landing page to display what Components of the ownCloud there\r
+ * are. Like Files, Music, Contacts, etc.\r
+ * \r
+ * @author Lennart Rosam\r
+ * \r
+ */\r
+public class LandingPageFragment extends SherlockFragment {\r
+\r
+    @Override\r
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,\r
+            Bundle savedInstanceState) {\r
+        View root = inflater.inflate(R.layout.landing_page_fragment, container);\r
+        return root;\r
+    }\r
+\r
+    @Override\r
+    public void onActivityCreated(Bundle savedInstanceState) {\r
+        super.onActivityCreated(savedInstanceState);\r
+\r
+        ListView landingScreenItems = (ListView) getView().findViewById(\r
+                R.id.homeScreenList);\r
+        landingScreenItems.setAdapter(new LandingScreenAdapter(getActivity()));\r
+        landingScreenItems\r
+                .setOnItemClickListener((LandingActivity) getActivity());\r
+    }\r
+\r
+}\r