bmelnychuk / AndroidTreeView

AndroidTreeView. TreeView implementation for android
Apache License 2.0
3k stars 621 forks source link

Child Nodes Left Margin and setDisplayHomeAsUpEnabled not working #10

Closed ghost closed 9 years ago

ghost commented 9 years ago

I implemented the library on my android app, but i have 2 problems:

This happened to someone ?

bmelnychuk commented 9 years ago

There is similar issue with padding for android 4 (if Im not mistaken). I don't think that treeView can disable setDisplayHomeAsUpEnabled functionality. Does it work if you remove treeView from fragment?

ghost commented 9 years ago

Just tried setDisplayHomeAsUpEnabled without the treeView and still not work, probably not related. About the padding issue, Is there a workaround for it?

ghost commented 9 years ago

UPDATE: if setDisplayHomeAsUpEnabled doesn't work in the fragment treeview do this on onOptionsItemSelected:

public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.expandAll: tView.expandAll(); break; case R.id.collapseAll: tView.collapseAll(); break; case android.R.id.home: NavUtils.navigateUpFromSameTask(getActivity()); /* IMPORTANT PART HERE*/ return true; } return true; }

bmelnychuk commented 9 years ago

Padding issue should be fixed with latest changes