BrotherV/Floating-ArcMenu

ArcMenu always is on middle of the screen

Closed this issue ยท 5 comments

How i can get it to the right of the screen. Like this demo?
Image Demo

Just look at the xml file,
<com.bvapp.arcmenulibrary.ArcMenu
android:id="@+id/arcMenu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
arc:menuType="normal"
arc:menuChildSize="48dp"
arc:menuGravity="Bottom_Right"
arc:menuClickAnim="true"
arc:menuChildAnim="false"
arc:menuShadowElevation="true"
arc:menuNormalColor="@color/colorAccent"
arc:menuImage="@mipmap/map"
android:layout_gravity="bottom|right"/>

you must define menuGravity="Bottom_Right" and layout_gravity="bottom|right" in xml file.

But if you want to put it in the middle and right side of screen, look at this xml code and define your xml code like this.
<com.bvapp.arcmenulibrary.ArcMenu
android:id="@+id/arcMenu4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
arc:menuType="normal"
arc:menuChildSize="48dp"
arc:menuGravity="Right_Middle"
arc:menuClickAnim="true"
arc:menuChildAnim="false"
arc:menuShadowElevation="true"
arc:menuNormalColor="@android:color/holo_orange_dark"
arc:menuImage="@mipmap/tools"
android:layout_gravity="right|center_horizontal"/>

Hi @BrotherV , I was using the wrong label. I was using xmlns:arc="http://schemas.android.com/apk/tools" instead of xmlns:arc="http://schemas.android.com/apk/res-auto"

Using res-auto solved the problem.

Hi, if you have any problem or have any idea to make this library better, don't hesitate and tell me. Have nice day.

Hi again @BrotherV How i can apply style to the items? i see a function called applyStyle then i set a drawable circle shape xml to this function but this not working. How i can implement a style to the items?
Thanks in advance.