darvds / ribbonmenu Goto Github PK
View Code? Open in Web Editor NEWNavigation menu for Android (based off Google+ app)
License: Apache License 2.0
Navigation menu for Android (based off Google+ app)
License: Apache License 2.0
I'm using Holo Dark in my application, which makes the text illegible. Adding 'android:theme="@android:style/Theme.Holo.Light"' to the RibbonMenuView does not help and there is no textColor attribute for this View.
Is there any solution for this? Thanks!
Hi,
I like you library very much. Great work here.
If you have little time you could clean the duplicate packages in this library.
Here's a link where the duplicates starts :
https://github.com/darvds/RibbonMenu/tree/master/library/src/com
Again, nice work ! :)
You can fix the problem by adding the following code in RibbonMenuView.
@Override protected void
onRestoreInstanceState(Parcelable state)
{
SavedState ss = (SavedState)state;
super.onRestoreInstanceState(ss.getSuperState());
if (ss.bShowMenu)
showMenu();
else
hideMenu();
}
@Override protected Parcelable
onSaveInstanceState()
{
Parcelable superState = super.onSaveInstanceState();
SavedState ss = new SavedState(superState);
ss.bShowMenu = (rbmOutsideView.getVisibility() != View.GONE);
return ss;
}
static class SavedState extends BaseSavedState {
boolean bShowMenu;
SavedState(Parcelable superState) {
super(superState);
}
private SavedState(Parcel in) {
super(in);
bShowMenu = (in.readInt() == 1);
}
@Override
public void writeToParcel(Parcel out, int flags) {
super.writeToParcel(out, flags);
out.writeInt(bShowMenu ? 1 : 0);
}
public static final Parcelable.Creator<SavedState> CREATOR
= new Parcelable.Creator<SavedState>() {
public SavedState createFromParcel(Parcel in) {
return new SavedState(in);
}
public SavedState[] newArray(int size) {
return new SavedState[size];
}
};
}
I having some difficulty getting this up and running. I'm new to Android app dev btw. Everything seems to be imported correctly but the app keeps crashing. The app loads if I uncomment this line in the mainActivity onCreate
getActionBar().setDisplayHomeAsUpEnabled(true);
Debug mode isn't showing me anything either. Any way you can help me out?
Can anyone help me? I am trying to figure it out how to change the menu background color. No Sucess.
regards
Please stick to the Java / Android naming conventions. In this case, it would be good to rename the call back interface:
public interface OnRibbonMenuSelectedListener {
public void onRibbonMenuItemClick(View item);
}
@OverRide
public void RibbonMenuItemClick(int itemId)
the itemid return "false".
to fix it you need to change
"callback.RibbonMenuItemClick(menuItems.get(position).id);"
to
"callback.RibbonMenuItemClick(position);"
LukeMovement.
When importing the sample into Eclipse and running it, there are errors in scr/com.darvds.ribbonmenu.sample/RibbonsampleActivity.java
@OverRide
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(com.darvds.ribbonmenu.sample.R.layout.main);
rbmView = (RibbonMenuView) findViewById(R.id.ribbonMenuView1);
rbmView.setMenuClickCallback(this);
rbmView.setMenuItems(R.menu.ribbon_menu);
getActionBar().setDisplayHomeAsUpEnabled(true);
}
"R.layout.main" have to be changed to "com.darvds.ribbonmenu.sample.R.layout.main" in order to fix the error bugs
This is just a question not an issue, but is there anyway to have this appear on the right side of a device. I tried changing your code a little, changing gravity of the layouts and such, but that didn't do anything. Any advice. Thank you. Great library
Hello,
I love Your library, it looks awesome. I would like to dynamically set the icons of menuitems. Right now when I call:
MenuItem avatar = (MenuItem) mRibbonMenu.findViewById(R.id.ribbon_menu_avatar);
avatar.setTitle("hello world");
I get NullPointerException.
It would be also nice to be able to set custom adapter for the menu so I can style it like regular layout. Is that possible?
Hi
Library looks very nice. I had a problem when using it on a pre-honeycomb device: awful black bleeding through the list whenever it is touched. This also happens on honeycomb+ devices if minSDKversion is set below honeycomb.
To get around it, all that's needed is to set the cacheColorHint to the same colour as the background on the ListView:
android:cacheColorHint="#303030"
android:background="#303030"
As described a long time ago, here: http://www.curious-creature.org/2008/12/22/why-is-my-list-black-an-android-optimization/
Annoying problem. Simple fix.
There is another small issue with setting the background in your code:
public void setBackgroundColor(int color){
rbmListView.setBackgroundResource(color);
}
That's kinda mis-named I think. You are overriding the method to set a colour in order to set a resource instead.
Please add some screenshots of yours menu for better propagation of your project.
Hi there,
We are using your library in an android app. By the way your library is pretty good.
Would you be able to create a tag with the latest version so that we can reference it from our project?
thanks,
Mauricio
The project and the source files do not state what license they are available under. Right now, nobody is allowed to do anything with your code, unless they wish to violate your copyright over those files. If that is your intention, that's fine, though you might want to specifically mention in the README that this code is not available under any open source license, just to clear up confusion.
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.