Giter VIP home page Giter VIP logo

android-actionsheet's Introduction

Hi there 👋

android-actionsheet's People

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

android-actionsheet's Issues

It will not work api level<17 ?

It is giving exception here for api level. i think you should give this method only in api level>=17.

Please check here: manager.isDestroyed()

You can write like this to avoid the problem:
if(Build.VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN_MR2){
}else{
}

Action sheet overlapping on bottom navigation bar on lolipop devices.

While using action sheet and testing on lolipop devices, the action sheet appears above the bottom navigation bar (eg Nexus5) and click event also taking from navigation bar.
How could I use the same action sheet on lolipop devices avoiding overlapping of navigation bar and action sheet?

Back Handling

While the action bar sheet is open and the user press back the application is crashing.

Side, top, and bottom paddings

Hi,
I see that padding parameter applied to all four sides.
Could you instead make it like sidePadding, topPadding, and bottomPadding?
I can do it myself, but it would be better if this was available for others as well.

java.lang.IllegalStateException: Activity has been destroyed

java.lang.IllegalStateException: Activity has been destroyed
at android.support.v4.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1399)
at android.support.v4.app.BackStackRecord.commitInternal(BackStackRecord.java:637)
at android.support.v4.app.BackStackRecord.commitAllowingStateLoss(BackStackRecord.java:620)
at com.talkweb.cloudcampus.view.ActionSheet.show(ActionSheet.java:65)
at com.talkweb.cloudcampus.view.ActionSheet$Builder.show(ActionSheet.java:484)
at com.talkweb.cloudcampus.jsbridge.WebActivity.selectImage(WebActivity.java:477)
at com.talkweb.cloudcampus.jsbridge.WebActivity$CustomChromeClient.openFileChooser(WebActivity.java:343)
at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:859)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4829)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
at dalvik.system.NativeStart.main(Native Method)

已将ActionSheet的show方法中讲commit改为commitAllowingStateLoss,不知为何出现这样的报错?

Only load one item and cancel

Hi there,
I tried to using this plugin with 2 button named camera and gallery.
But when I invoke it, it only showed one button.
Could be something wrong here. Then could we check that?
Thanks a lot.
Kind regards,

Scrolling?

In iOS, when we have too many items in the Action Sheet, more than can be displayed on screen, it automatically starts scrolling.

Is there any chance of scrolling being implemented in the action sheet? Please at least give suggestions on how this could be done, and I'll try to implement it.

How to show the ActionSheet like QQ ?

You know , in high version of Android, the menu key can't be intercepted through onKeyDown method as long press will call to show "recent task".
So, do you know how to show the ActionSheet by press down the menu key and hide it when press again?

Multiple Actionsheets

如何实现多个actionsheet在同一活动不同的选项?
Android的工作室告诉“ onOtherButtonClick ”已被使用。
请帮帮我

The actionsheet is hided

When I use phone of HUAWEI MT7-TL10, I meet this problem:
qq 20160308151751
can not watch the cancel button.Please help me fix it, thanks

NPE : Attempt to invoke virtual method 'void android.support.v4.app.FragmentManager.popBackStack()' on a null object reference

Application crashed if using support library. Try to use getSupportedFragmentManager instead.

public void dismiss() {
    if (mDismissed) {
        return;
    }
    mDismissed = true;
    new Handler().post(new Runnable() {
        public void run() {
            getFragmentManager().popBackStack();
            FragmentTransaction ft = getFragmentManager().beginTransaction();
            ft.remove(ActionSheet.this);
            ft.commitAllowingStateLoss();
        }
    });
}

I am getting crash when try to dismiss actionsheet.

Hello,

I am getting this fatal exception when try to dismiss & open actionsheet several times continuously.

Here's the full stack trace.

Fatal Exception: java.lang.IllegalStateException
Can not perform this action after onSaveInstanceState
raw
android.support.v4.app.FragmentManagerImpl.checkStateLoss (FragmentManager.java:1377)
android.support.v4.app.FragmentManagerImpl.popBackStack (FragmentManager.java:495)
com.baoyz.actionsheet.ActionSheet.dismiss (ActionSheet.java:98)
com.baoyz.actionsheet.ActionSheet.onClick (ActionSheet.java:387)
android.view.View.performClick (View.java:5254)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1199)

Would you please tell me how I can get over with this issue?

Thank you!

报如下异常:java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState

java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
at android.support.v4.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1377)
at android.support.v4.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1395)
at android.support.v4.app.BackStackRecord.commitInternal(BackStackRecord.java:637)
at android.support.v4.app.BackStackRecord.commit(BackStackRecord.java:616)
at com.talkweb.cloudcampus.view.ActionSheet.show(ActionSheet.java:65)
at com.talkweb.cloudcampus.view.ActionSheet$Builder.show(ActionSheet.java:482)
at com.talkweb.cloudcampus.ui.common.ImageViewPagerActivity.LongPress(ImageViewPagerActivity.java:128)
at com.talkweb.cloudcampus.ui.common.ImageViewPagerActivity$ImagePagerAdapter$2.onLongClick(ImageViewPagerActivity.java:155)
at com.talkweb.cloudcampus.view.gallery.touchview.TouchImageView$1.onLongPress(TouchImageView.java:146)
at android.view.GestureDetector.dispatchLongPress(GestureDetector.java:690)
at android.view.GestureDetector.access$200(GestureDetector.java:37)
at android.view.GestureDetector$GestureHandler.handleMessage(GestureDetector.java:266)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:5372)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:825)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:641)

很难复现的情况,不知道是不是使用方法的问题?

android:allowBackup should not be used in library

Error:Execution failed for task ':app:processDebugManifest'.

Manifest merger failed : Attribute application@allowBackup value=(false) from AndroidManifest.xml:27:9-36
is also present at [com.baoyz.actionsheet:library:1.1.0] AndroidManifest.xml:12:9-35 value=(true)
Suggestion: add 'tools:replace="android:allowBackup"' to element at AndroidManifest.xml:25:5-178:19 to override

Text on the buttons are all caps

All the texts on the buttons are by default all capitalized. I think when setting text on a button, we need to setAllCaps(false) to disable that. Or is there an API from this ActionSheet library that we can use to disable all caps?

Thanks!

getNavBarHeight(Context context) bug

I found on the HUAWEI phone test, NavBar transparent, get to the NavaBarHeight=0(android 5.1), which is not right, it should be used to obtain the following program NavBarHeight:

`
public int getNavBarHeight(Context context) {
int navigationBarHeight = 0;
Resources rs = context.getResources();
int id = rs.getIdentifier("navigation_bar_height", "dimen", "android");
if (id > 0 && checkDeviceHasNavigationBar(context)) {
navigationBarHeight = rs.getDimensionPixelSize(id);
}

    return navigationBarHeight;
}

private boolean checkDeviceHasNavigationBar(Context context) {
    boolean hasNavigationBar = false;
    Resources rs = context.getResources();
    int id = rs.getIdentifier("config_showNavigationBar", "bool", "android");
    if (id > 0) {
        hasNavigationBar = rs.getBoolean(id);
    }
    try {
        Class systemPropertiesClass = Class.forName("android.os.SystemProperties");
        Method m = systemPropertiesClass.getMethod("get", String.class);
        String navBarOverride = (String) m.invoke(systemPropertiesClass, "qemu.hw.mainkeys");
        if ("1".equals(navBarOverride)) {
            hasNavigationBar = false;
        } else if ("0".equals(navBarOverride)) {
            hasNavigationBar = true;
        }
    } catch (Exception e) {
        e.printStackTrace();
    }

    return hasNavigationBar;

}`

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.