Issue
I am newbie to android programming. Now I'm making file manager for Android OS and my question is how to make path navigation just like at the pic below (I mean this "buttons" that reflects path to current directory and all directories before it) ? What widget should I use? Can anyone give me brief guide how to make it? Here is the pic...
Solution
You could use Button with tagging path
View.OnClickListener listener = new View.OnClickListener() {
@Override public void onClick(View v) {
File path = (File) v.getTag();
}
};
LinearLayout breadcrumbs = new LinearLayout(...);
breadcrumbs.setOrientation(LinearLayout.HORIZONTAL);
Button path1 = new Button(...);
path1.setTag(new File(...)); // will be retrieved on click
path1.setOnClickListener(listener); // so now on code above you can open path
// ... add bread crumbs
breadcrumbs.addView(path1);
Simple example on how it was built, feel free to ask more expanding answer
Answered By - Ozik Abdullaev
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.