diff --git a/SWADroid/src/es/ugr/swad/swadroid/modules/downloads/DirectoryNavigator.java b/SWADroid/src/es/ugr/swad/swadroid/modules/downloads/DirectoryNavigator.java index 5389c68c..a11b3894 100644 --- a/SWADroid/src/es/ugr/swad/swadroid/modules/downloads/DirectoryNavigator.java +++ b/SWADroid/src/es/ugr/swad/swadroid/modules/downloads/DirectoryNavigator.java @@ -117,7 +117,7 @@ public class DirectoryNavigator NodeList childs = node.getChildNodes(); DirectoryItem item; - System.out.println(childs.getLength()); + System.out.println("Num of childs"+childs.getLength()); for(int i=0; i parent, View v, int position, long id) { TextView text = (TextView) v.findViewById(R.id.icon_text); - String path = text.getText().toString();//parent.getItemAtPosition(position).toString(); - ArrayList newBrowser = navigator.subDirectory(path); + String path = text.getText().toString(); + + ArrayList newBrowser = navigator.subDirectory(path); + ((NodeAdapter)grid.getAdapter()).change(newBrowser); + actualPathText.setText(navigator.getPath()); + ((NodeAdapter)grid.getAdapter()).change(newBrowser); } })); @@ -143,9 +137,10 @@ public class DownloadsManager extends MenuActivity { navigator = new DirectoryNavigator(tree); //GridView ArrayList r = (ArrayList) navigator.goToRoot(); - String path = Global.getSelectedCourseShortName() ; + + String path = navigator.getPath() ; + actualPathText.setText(path); - actualPathText.setText(courseName+ " "+navigator.getPath()); grid.setAdapter(new NodeAdapter(this,r)); } @@ -154,22 +149,24 @@ public class DownloadsManager extends MenuActivity { }*/ - public class GridViewOnItemSelectedListener implements OnItemSelectedListener { +/* public class GridViewOnItemSelectedListener implements OnItemSelectedListener { public void onItemSelected(AdapterView parent, View view, int pos, long id) { - String path = parent.getItemAtPosition(pos).toString(); + String directoryName = parent.getItemAtPosition(pos).toString(); - ArrayList newBrowser = navigator.subDirectory(path); - actualPathText.setText(courseName+ " "+navigator.getPath()); + ArrayList newBrowser = navigator.subDirectory(directoryName); + String path = navigator.getPath(); + actualPathText.setText(path); + ((NodeAdapter)grid.getAdapter()).change(newBrowser); } public void onNothingSelected(AdapterView parent) { // Do nothing. } - } + }*/ }