Code Monkey home page Code Monkey logo

circlemenu's People

Contributors

hitomis 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

circlemenu's Issues

openMenuIcon is not showing sometimes...

Hello,
When "setMainMenu(...)" is called after "onSizeChanged(...)", openMenuIcon is not showing sometimes.

So you have to call "resetMainDrawableBounds()" in "setMainMenu(...)".
This gonna be better to prevent openMenuIcon.draw(canvas) not working.

Have nice work!

Here is my fixes.

public CircleMenu2 setMainMenu(int mainMenuColor, int openMenuRes, int closeMenuRes) {
    this.openMenuIcon = this.convertDrawable(openMenuRes);
    this.closeMenuIcon = this.convertDrawable(closeMenuRes);
    this.mainMenuColor = mainMenuColor;
    **resetMainDrawableBounds();**
    return this;
}

public CircleMenu2 setMainMenu(int mainMenuColor, Bitmap openMenuBitmap, Bitmap closeMenuBitmap) {
    this.openMenuIcon = this.convertBitmap(openMenuBitmap);
    this.closeMenuIcon = this.convertBitmap(closeMenuBitmap);
    this.mainMenuColor = mainMenuColor;
    **resetMainDrawableBounds();**
    return this;
}

public CircleMenu2 setMainMenu(int mainMenuColor, Drawable openMenuDrawable, Drawable closeMenuDrawable) {
    this.openMenuIcon = openMenuDrawable;
    this.closeMenuIcon = closeMenuDrawable;
    this.mainMenuColor = mainMenuColor;
    **resetMainDrawableBounds();**
    return this;
}

main icon is default empty

hi,
my problem :
http://uupload.ir/files/u3oq_demo.gif.gif
my code is
`
circleMenu = (CircleMenu) findViewById(R.id.circle_menu);
circleMenu.setMainMenu(Color.parseColor("#FF4081"), R.mipmap.ic_more_vert_white, R.mipmap.eqiq_icon_cancel)
.addSubMenu(Color.parseColor("#FF6A00"), R.mipmap.ic_bookmark_border_white_24dp)
.addSubMenu(Color.parseColor("#8A39FF"), R.mipmap.ic_share)
.addSubMenu(Color.parseColor("#30A400"), R.mipmap.abc_ic_ab_back)
.addSubMenu(Color.parseColor("#FF4B32"), R.mipmap.dll)
.addSubMenu(Color.parseColor("#258CFF"), R.mipmap.ic_action_pause)
.setOnMenuSelectedListener(new OnMenuSelectedListener() {

                @Override
                public void onMenuSelected(int index) {

                }

            }).setOnMenuStatusChangeListener(new OnMenuStatusChangeListener() {

        @Override
        public void onMenuOpened() {}

        @Override
        public void onMenuClosed() {}

    });

`

To be open as default

Hello, I want to menu be open as default. is that possible?
Thank for this great menu.

Close menu

Hi @Hitomis , i use this library. i write this code but when click on back button, not close the menu! when press back button close activity!

@Override public void onBackPressed() { if (profile_circleMenu.isOpened()) { profile_circleMenu.closeMenu(); } super.onBackPressed(); }

how can close menu with backButton?

Thnx ❤️

Main activity goes blank

Main activity where I am loading child fragments gets empty, till all the fragments are laoded. Please help.

How to remove padding

Hi, Thanks for this great library.
I want remove padding, i set menu in this position :

        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"

but in this position show padding left and bottom! i want not padding in this menu, how can edit your CircleMenu.java for set padding=0 ?

Thanks ❤️

Button icon disappears on recycler view

When i recycle the view with the button, the icon of the recycled view disappears. Im using the setMainMenu void inside the onBindViewHolder function. Any ideas on how can i fix this?

BUG

activity设置横屏显示,在点选菜单的时候,关闭动画开始的时候,会在4个角的任意一角出现半圆,请悉知!

猜测:关闭动画应该是画布移动0,0导致的

想问您个问题

我现在的需求是双击屏幕上任意一点 弹出几个按钮 您能给点建议吗

hello dear Hitomis

i have this Issues
CircleMenu-master\cmlibrary\build.gradle
No service of type Factory available in projectScopeService
after open file
problem in
apply plugin: 'com.github.dcendents.android-maven'

apply plugin: 'com.android.library'
// JitPack Maven
apply plugin: 'com.github.dcendents.android-maven'
// Group
group='com.github.Hitomi'

android {
compileSdkVersion 24
buildToolsVersion "24.0.2"

defaultConfig {
    minSdkVersion 14
    targetSdkVersion 24
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.1.1'
}

thank you and have nice day

主按键图片

当不设置主按键的图片资源时,它的引用为null,为何不创建一个默认的呢?

How to setVisibility ?

I want gone this menu and use this code circleMenu.setVisibility(View.INVISIBLE); but not work!

Add Ids.

How to give each menu option to add ID?

OnClickListner on menu icons

Hi Hitomis, I want to add onClickListner on the sub-menus. I added the following code but it is not working.

Intent intent1 = new Intent(this,Activity2.class); this.startActivity(intent1); return true;

Please help me to add the onClickListner.

Kotlin Issue

Not able to perform onMenuSelectedListener on Sub Menu in Android Kotlin...

Add Text

How can add label text title to each menu
Thank you in advance

when starting activity the circle does not turn fully

With this the circle does not turn fully, it turns half way and open the new activity. how would I solve the issue?

circleMenu.setOnMenuSelectedListener(new OnMenuSelectedListener() {

                                             @Override
                                             public void onMenuSelected(int index) {
                                                 switch (index) {
                                                     case 0:
                                                         Toast.makeText(Circle.this, "Home Button Clicked", Toast.LENGTH_SHORT).show();
                                                         break;
                                                     case 1:
                                                         startActivity(new Intent(Circle.this, track.class));
                                                         break;

Long press

hello, I want to ask, is it possible to add long press listener in the circular main menu

Button outside the circle view

hello Hitomi,
i have 5 Buttons in my Activity, when i click on the any button, its menu should be opened as a circle

i tried to put the implementation of the circle menu inside the onclick of btn_car button but it did't work
` @OverRide
public void onClick(View v) {
switch (v.getId()){
case R.id.btn_car:
//Here the implementation of circle Menu of Car, when btn_car is clicked

       break;`

Can you please help?

SetClickable SetEnable take no effect

SetClickable SetEnable take no effect.
I would like to prevent multiple clicks when an async call is made, but SetClickable SetEnable take no effect. The menu is always enabled.

Rendering problem

java.lang.NullPointerException
at com.hitomi.cmlibrary.CircleMenu.resetMainDrawableBounds(CircleMenu.java:660)
at com.hitomi.cmlibrary.CircleMenu.onSizeChanged(CircleMenu.java:174)
at android.view.View.sizeChange(View.java:17638)
at android.view.View.setFrame(View.java:17600)
at android.view.View.layout(View.java:17517)
at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1079)
at android.view.View.layout(View.java:17520)
at android.view.ViewGroup.layout(ViewGroup.java:5612)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:17520)
at android.view.ViewGroup.layout(ViewGroup.java:5612)
at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1079)
at android.view.View.layout(View.java:17520)
at android.view.ViewGroup.layout(ViewGroup.java:5612)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:345)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:429)
at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:389)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:548)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:533)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:966)
at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:533)
at com.android.tools.idea.rendering.RenderTask.lambda$inflate$70(RenderTask.java:659)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

This is the issue i am getting with the new version of the Hitomis library

icon with text

can we use center as oval button and text.. or the center button invisible and other visible..
and also need add text below the icon.. is there any solution?

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.