some action for fragments ui
[pub/Android/ownCloud.git] / src / eu / alefzero / owncloud / ui / fragment / ActionBar.java
index 95ddef8..9a3291b 100644 (file)
@@ -1,5 +1,6 @@
 package eu.alefzero.owncloud.ui.fragment;
 
+import eu.alefzero.owncloud.PathLayout;
 import eu.alefzero.owncloud.R;
 import android.app.Activity;
 import android.os.Bundle;
@@ -26,4 +27,19 @@ public class ActionBar extends Fragment {
   public void onAttach(Activity activity) {
     super.onAttach(activity);
   }
+  
+  public void setPath(String path) {
+    if (getPathLayout() != null)
+      getPathLayout().addPath(path);
+  }
+  
+  public String getCurrentPath() {
+    if (getPathLayout() != null)
+       return getPathLayout().getFullPath();
+    return "";
+  }
+  
+  private PathLayout getPathLayout() {
+    return (PathLayout) getActivity().findViewById(R.id.pathLayout1);
+  }
 }