Giter Site home page Giter Site logo

nc_popup_android's Introduction

๐Ÿ’ป Web developer
โœ๏ธ Author of azwan082.my

nc_popup_android's People

Contributors

azwan082 avatar manumaticx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

nc_popup_android's Issues

Is there any way to use this module with ListViews?

I tried using this module with ListViews but the app crashes when trying to show the menu.

I have an ItemTemplate which looks like this:

<ItemTemplate name="route" >
  <View class="cardData" bindId="cardData">
    <View class="views" >
      <Label class="blackLabel bigLabel" bindId="routeName" />
      <ImageView bindId="icon" class="icons" right="8dp" onClick="showMenu" />
    </View>
  </View>
</ItemTemplate>

And then here's the showMenu function:

function showMenu(e) {
  var item = $.section.getItemAt(e.itemIndex);
	
  var popup = require('nc.popup');
	
  var menu = popup.createPopupMenu({
    options: ['Item A', 'Item B', 'Item C'],
    view: item.icon
  });
  menu.addEventListener('click', function(e) {
    alert('Selected item: '+e.index);
  });
  menu.addEventListener('dismiss', function() {
    alert('popup menu has been dismissed');
  });
  menu.show();
}

This is the error shown in Appcelerator's console:

[ERROR] : KrollProxy: (main) [1272,5745] Error creating proxy
[ERROR] : KrollProxy: java.lang.IllegalArgumentException: 'view' is required
[ERROR] : KrollProxy: at nc.popup.PopupMenuProxy.handleCreationDict(PopupMenuProxy.java:65)
[ERROR] : KrollProxy: at org.appcelerator.kroll.KrollProxy.handleCreationArgs(KrollProxy.java:196)
[ERROR] : KrollProxy: at org.appcelerator.kroll.KrollProxy.setupProxy(KrollProxy.java:129)
[ERROR] : KrollProxy: at org.appcelerator.kroll.KrollProxy.createProxy(KrollProxy.java:137)
[ERROR] : KrollProxy: at org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method)
[ERROR] : KrollProxy: at org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:62)
[ERROR] : KrollProxy: at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:921)
[ERROR] : KrollProxy: at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1144)
[ERROR] : KrollProxy: at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:363)
[ERROR] : KrollProxy: at android.os.Handler.dispatchMessage(Handler.java:98)
[ERROR] : KrollProxy: at android.os.Looper.loop(Looper.java:154)
[ERROR] : KrollProxy: at android.app.ActivityThread.main(ActivityThread.java:6119)
[ERROR] : KrollProxy: at java.lang.reflect.Method.invoke(Native Method)
[ERROR] : KrollProxy: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
[ERROR] : KrollProxy: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

dismiss event gets fired always

Great job, nice module! Just what I was currently looking for :)

I was just testing the example code and discovered that the dismiss event is always firing, even when you select an option.

using popup menu as SubMenu on ActionBar

Before we use to add the popup menu on the actionBar like this
But since Ti SDK 7.5+ this is crashing the app.
We found out that when the view is coming from the ActionBar, the activity cannot find the view (MenuItemProxy) by ID.
Does someone know how to fix it?

Thanks!

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.