fython / breadcrumbsview Goto Github PK
View Code? Open in Web Editor NEWMaterial Design Breadcrumbs Navigation Widget on Android
License: MIT License
Material Design Breadcrumbs Navigation Widget on Android
License: MIT License
After putting unmodified list into setItems() method, when you try to invoke addItem() method you get reasonable java.lang.UnsupportedOperationException. It would be nice to create a new list inside setItems() method.
How do I disable drop down menu shows on pressing arrow icon
Caused by: java.lang.ClassCastException: android.view.View$BaseSavedState cannot be cast to moe.feng.common.view.breadcrumbs.BreadcrumbsView$State
12-04 17:30:09.092 10096 10096 E AndroidRuntime: at moe.feng.common.view.breadcrumbs.BreadcrumbsView.onRestoreInstanceState(BreadcrumbsView.java:210)
12-04 17:30:09.092 10096 10096 E AndroidRuntime: at android.view.View.dispatchRestoreInstanceState(View.java:17706)
12-04 17:30:09.092 10096 10096 E AndroidRuntime: at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3745)
12-04 17:30:09.092 10096 10096 E AndroidRuntime: at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3751)
12-04 17:30:09.092 10096 10096 E AndroidRuntime: at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3751)
12-04 17:30:09.092 10096 10096 E AndroidRuntime: at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3751)
12-04 17:30:09.092 10096 10096 E AndroidRuntime: at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3751)
12-04 17:30:09.092 10096 10096 E AndroidRuntime: at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3751)
12-04 17:30:09.092 10096 10096 E AndroidRuntime: at android.view.View.restoreHierarchyState(View.java:17684)
12-04 17:30:09.092 10096 10096 E AndroidRuntime: at com.android.internal.policy.PhoneWindow.restoreHierarchyState(PhoneWindow.java:2131)
12-04 17:30:09.092 10096 10096 E AndroidRuntime: at android.app.Activity.onRestoreInstanceState(Activity.java:1103)
12-04 17:30:09.092 10096 10096 E AndroidRuntime: at android.app.Activity.performRestoreInstanceState(Activity.java:1058)
12-04 17:30:09.092 10096 10096 E AndroidRuntime: at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1260)
12-04 17:30:09.092 10096 10096 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2751)
12-04 17:30:09.092 10096 10096 E AndroidRuntime: ... 9 more
Hi!
I am currently using fragments that replace the data elements on an activity and I am having a hard time keeping the app back stack "history" in-sync with BreadcrumbView.
For example:
Lets say, I have 4 fragments - A, B, C & D of the order below. All these fragments have a RecyclerView list items with onClick
listeners that use a pushFragment()
method which replaces Fragment accordingly.
Fragment order:
A->B->C->D
Problem:
If I click on B
fragment, the BreadcrumbsView updates properly however the app back stack history still persists!
So, when a user taps Back button, he still goes to C
fragment`.
I believe this could be an issue with my implementation.
Some code:
public static void pushFragment(AppCompatActivity activity, Fragment fragment) {
int holder = R.id.content_view_module_details_activity;
FragmentManager fragmentManager = activity.getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager
.beginTransaction()
.addToBackStack(null);
fragmentTransaction.replace(holder, fragment,
fragment.getClass().toString());
fragmentTransaction.commit();
}
public void handleItemClick(View view, ClassModel m) {
// Get current list of items
List<IBreadcrumbItem> items = breadcrumbsView.getItems();
// Create a new BreadcrumbItem
ArrayList<String> list = new ArrayList<>();
list.add(m.getTitle());
BreadcrumbItem breadcrumbItem = new BreadcrumbItem(list);
breadcrumbItem.setSelectedItem(m.getTitle());
items.add(breadcrumbItem);
breadcrumbsView.setItems(items);
// Set data model on rootActivity
rootActivity.setClassModel(m);
// Goto Subjects view <- goes to Fragment B
Utils.pushFragment(rootActivity, new SubjectsListFragment());
}
hello hello,请问项目中,颜色、字号等,在我通过gradle引用,是不是就不支持修改了?可以对外暴露个方法呢?谢谢
You have wrong information about your supported API levels. API level 19 does not work and crashes during runtime cause you're using the "android:tint" attribute for example in "breadcrumbs_view_item_arrow.xml".
Cannot add it in Gradle. It gives this error:
Failed to resolve: moe.feng:BreadcrumbsView:latest-version
How to use it @fython ?
it were great if you can use eg a home icon as first item or use in general icon/drawables as breadcrump item
I want to change text color can you please add this feature?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.