Giter VIP home page Giter VIP logo

arcmenu's Introduction

ArcMenu & RayMenu

ArcMenu

An android custom view which looks like the menu in Path 2.0 (for iOS).

Preview Preview

RayMenu

Preview

About

The user experience in Path 2.0 (for iOS) is amazing, but the android version miss much.

Just for fun, I try to realize the amazing menu for android, which could be equal to the iOS version's.

Usage

If you want to use this library you must before all indicate to your application that you want to use it by launching the following command from the root directory of your application

$ android update project --library ../relative/path/to/the/library --path .

where the path is the relative path to the library directory in this repository.

To setup the menu:

ArcMenu menu = (ArcMenu) findViewById(R.id.arc_menu);

final int itemCount = ITEM_DRAWABLES.length;
for (int i = 0; i < itemCount; i++) {
	ImageView item = new ImageView(this);
	item.setImageResource(ITEM_DRAWABLES[i]);

	final int position = i;
	menu.addItem(item, new OnClickListener() {

		@Override
		public void onClick(View v) {
			Toast.makeText(MainActivity.this, "position:" + position, Toast.LENGTH_SHORT).show();
		}
	});// Add a menu item
}

If you want to change the default appearence for ArcMenu:

in arc_menu.xml

custom:childSize="50px"
custom:fromDegrees="0.0"
custom:toDegrees="300.0"

or in ArcMenu.java

arcLayout.setChildSize(50);
arcLayout.setArc(0.0f, 300.0f);    

arcmenu's People

Contributors

bryant1410 avatar dacapricorn avatar gipi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arcmenu's Issues

ArcMenu button move position, based on number of menu items

Thanks for this library!

I had no trouble integrating it into my project, but am having some trouble figuring this out: If I add 1, 2, or 3 items to the ArcMenu, the central button stags fixed. If I add more, then it moves a significant (and not predicable, yet) amount in both X and Y.

My menu is loaded dynamically, and it's not necessarily predicable how many items will be added.

Do you have any pointers as to where I should look?

The layout I am using is:

        <com.capricorn.ArcMenu
            android:id="@+id/arc_menu"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_alignParentLeft="true"
            app:childSize="30dp"
            app:fromDegrees="10.0"
            app:toDegrees="80.0" />

as I need the menu to be in the top left of the fragment for my purposes.

UPDATE: So if I change the layout width and height to fixed values, then it behaves more as I expect (because the ArcLayout depends highly on getWidth() and getHeight()). However, then I also need to make sure that the width is large enough to cope with the largest number of items I expect AND put a large negative left/top margin to cope with the extra "size".

Will have a bit more of a read through ArcLayout to see if I can retain "wrap_content" and have the behaviour I expect.

Can i add text into this menu??

I wanna to develop circle menu and in the middle put the logo of app and every menu contain it's text is it possible using this lib??

method void addItem is never used warning

hw to rectify tis problem i followed everything which was gv in the repository
i thnk its bcuz of tis warning tat arc menu app has stopped responding any help guyzz

Problem using the arc without the center button

Hi,
I'm trying to use the arc but without the composer button being visible.
I tried lot of different things and nothing simple is working.

I tried changing the png's file to empty png's and it changed the animation and showed the selected item instead of "nothing"
I tried changing the selector xml and many other "simple" method

Any suggestion ?

Keeping the expanded item expanded

Hi.

Currently when the menu items are expanded, clicking on any expanded child will result in the closure of the children. Is it possible to change the behavior so that they stay open on clicks till one clicks on the center item?

Thanks.

Menu icons not under center image

Hi,
I tryed to place the center icon in the upper left corner, it worked, but this is the problem:
The array with all the menu icons is not under the "center image"!
device-2013-08-05-171021

device-2013-08-05-170822

Arc Menu is too small for xhdpi devices

Hi i am using arc menu and its really cool!.. But the problem is its very small on xhdpi. I am testing on Samsung galaxy s3 and i have images around 64X64. pleas help me through this.

Modify Main Drawable

I didn't see it in the docs anywhere. But it would be cool to change the drawable for the initial item.

Anyone want to tackle this with an xml attr?
maybe:
arc:button="@drawable/..."

Not clear on how to add this to my project.

I copied the libary folder to my project's libs folder, and I ran the android update command, but how do I import the items? It says the import com.capricorn cannot be resolved.

Thanks very much.

vertical expanding?

How to expand the menu vertically? from bottom to top. It's posible? Thanks

How change postion arc layout ?

<FrameLayout
    android:id="@+id/control_layout"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerInParent="true"
    android:layout_gravity="bottom|center_horizontal"
    android:background="@drawable/tab_bar_registration_selector" >

    <ImageView
        android:id="@+id/control_hint"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom|center_horizontal" />
</FrameLayout>

this is my change on xml i want to make menu at buttom of layout but whan i run app there is still margin from buttom , How to solve this issue ?

ArcMenu BGColor Remains White

I am trying to implement your arcMenu in my application and everything looks fine but there is a white colored square background behind the button and its animation that I cant remove. Please help.
screen shot 2015-04-19 at 12 11 00 pm

best regards,
Mohsin

License for ArcMenu?

Thank you for making such a useful component available. Under what license can it be used in apps - is it Apache 2.0?

Change Menu Item

Can ı change menu ıtem dynamically ? Change ıtem position or ıtem background or add new ıtem to position ?

Not: Ok I did it :D

ArcMenu & ListView

hey there,
i'm trying to add ArcMenu to every item in a ListView...

problem:
for each item, it adds the whole set of menu-items again and again.
i tried to filter, if this position is already added but it doesn't work.

any clues?
thanks in advance

How to set initial button's margin and menu's margin together

I tried to move the whole arc menu to the right bottom corner so I set margin:

<com.example.ArcMenu
android:id="@+id/arc_menu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="150dp"
android:layout_marginTop="250dp"
/>

However, the red "+" sign is off, it is not moving together with the menu. What should I set?

size problem

Hi,
Can you please help me to setup the widget on my layout.
The problem is that i use the menu inside listview and when i put it inside the items layout the wrap_content property of the arcMenu grows to the maximum to include all its child items and mess my design.

I set the size of the arcMenu to fix the size i need (of the button on my layout)

android:layout_gravity="bottom|center"
android:id="@+id/arc_menu"
android:layout_width="50dp"
android:layout_height="50dp"
arc:animateHint="false"
arc:childSize="30dp"
arc:fromDegrees="180.0"
arc:hideElements="true"
arc:parentSize="50dp"
arc:toDegrees="270.0"
arc:minRadius="130dp" />

but then there is no place for the menu to open the child items and I don't see them.

how can i fix this? how to make the child items to be open over all other elements and leave the size of the parent element in the needed size?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.