-package eu.alefzero.owncloud.ui.fragment;
-
-import eu.alefzero.owncloud.R;
-import android.app.Activity;
-import android.os.Bundle;
-import android.support.v4.app.Fragment;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-
-public class ActionBar extends Fragment {
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- }
- @Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
- View v = inflater.inflate(R.layout.action_bar, container, false);
- return v;
- }
-
- @Override
- public void onAttach(Activity activity) {
- super.onAttach(activity);
- }
-}
+/* 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 eu.alefzero.owncloud.ui.fragment;\r
+\r
+import eu.alefzero.owncloud.R;\r
+import android.app.Activity;\r
+import android.os.Bundle;\r
+import android.support.v4.app.Fragment;\r
+import android.view.LayoutInflater;\r
+import android.view.View;\r
+import android.view.ViewGroup;\r
+\r
+/**\r
+ * A custom ActionBar implementation used in the FileDisplayActivity\r
+ * @author Bartek Przybylski\r
+ *\r
+ */\r
+public class ActionBar extends Fragment {\r
+\r
+ @Override\r
+ public void onCreate(Bundle savedInstanceState) {\r
+ super.onCreate(savedInstanceState);\r
+ \r
+ }\r
+ @Override\r
+ public View onCreateView(LayoutInflater inflater, ViewGroup container,\r
+ Bundle savedInstanceState) {\r
+ View v = inflater.inflate(R.layout.action_bar, container, false);\r
+ return v;\r
+ }\r
+ \r
+ @Override\r
+ public void onAttach(Activity activity) {\r
+ super.onAttach(activity);\r
+ }\r
+ \r
+ public void setPath(String path) {\r
+ if (getPathLayout() != null)\r
+ getPathLayout().addPath(path);\r
+ }\r
+ \r
+ public String getCurrentPath() {\r
+ if (getPathLayout() != null)\r
+ return getPathLayout().getFullPath();\r
+ return "";\r
+ }\r
+ \r
+ private PathLayout getPathLayout() {\r
+ return (PathLayout) getActivity().findViewById(R.id.pathLayout1);\r
+ }\r
+}\r