manuelpeinado / refreshactionitem Goto Github PK
View Code? Open in Web Editor NEWAndroid - An action bar item which acts both as a refresh button and as a progress indicator
License: Apache License 2.0
Android - An action bar item which acts both as a refresh button and as a progress indicator
License: Apache License 2.0
Hi,
first: great library, thank you for your work.
Could you please update ABS to 4.3.1?
Thanks
Hameno
Hi, it would be great if you could redistribute the package without the support library included and only referenced through Maven. As is today, it generates conflicts with other packages that uses this support library (in gradle builds).
Everytime I use showBadge(String text) it places FrameLayout inside of FrameLayout leading eventually to StackOverflow error. You can confirm it with HierarchyViewer tool. Potential fix is to remove all views before adding new views in BadgeView class like that: (untested with other methods, seems to work with showBadge(String text)):
} else {
// TODO verify that parent is indeed a ViewGroup
ViewGroup group = (ViewGroup) parent;
int index = group.indexOfChild(target);
group.removeAllViews();
group.addView(target);
this.setVisibility(View.GONE);
group.addView(this);
group.invalidate();
}
Hi Manuel Peinado,
I'm trying to use this library, I followed your instructions to add this library in my project but I'm experiencing an error in onCreateOptionsMenu method.
This is the body of my onCreateOptionsMenu method:
getSupportMenuInflater().inflate(R.menu.activity_home, menu);
MenuItem item = menu.findItem(R.id.refresh_menu);
if (item != null) {
mRefreshActionItem = (RefreshActionItem) item.getActionView();
mRefreshActionItem.setMenuItem(item);
mRefreshActionItem.setMax(100);
mRefreshActionItem.setRefreshActionListener(this);
loadData();
}
// return super.onCreateOptionsMenu(menu);
return true;
and I get the NullPointerException in the following line:
mRefreshActionItem.setMenuItem(item);.
As you can see, only the mRefreshActionItem object can be null. My question is: why do I get this exception???
As of SDK tools r14 library resource id's are not final and thus should not be used in switch statements.
More on this can be read in the SDK changelog http://tools.android.com/recent/buildchangesinrevision14
java: /Users/menor/workspace android/RefreshActionItem-master/library/gen/com/manuelpeinado/refreshactionitem/R.java:6: duplicate class: com.manuelpeinado.refreshactionitem.R
I've read something about Maven. I think it's maven stuff...
Related links:
androidannotations/androidannotations#423
How can we create Dynamic Menu with this menu ??
Need urgent help..
expecting +ve response..!!!
It would be great to get an AAR of this in the maven central repo so we can use this inside Android Studio projects.
Theres a good resource here for how to package it up and submit:
http://gmariotti.blogspot.it/2013/09/publish-aar-file-to-maven-central-with.html
hi man!
i mean how can i to add the menu item just like this ๐
SubMenu rootMenu = menu.addSubMenu("");
MenuItem rootMenuItem = rootMenu.getItem();
rootMenuItem.setIcon(R.drawable.actionbar_icon_overflow);
rootMenuItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
rootMenu.add(android.view.Menu.NONE, 1, android.view.Menu.NONE, "1");
rootMenu.add(android.view.Menu.NONE, 2, android.view.Menu.NONE, "2");
when i select "1",i need the top bar show progress ,just like your StyledActivity! ( mSaveButton.showProgress(true);)
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.