Expandable List View setonchildlistener not working - kotlin

I was working with expandable list view in kotlin. I wanted it to open a new activity when I clicked on a child in the list. But I couldn't do it. If you know of a way to do this, please be helpful.
enter image description here
this tried method

try with method: setOnItemClickListener instead of childClickListener.

Related

Materialcss modal not working with datatables.js

I am trying to build an admin dashboard using material design framework. As a part of it, I am trying to add modal-trigger element inside a <td></td> tag of a table that uses datatable.js library. But when I click on the trigger no modal is appearing. Did anyone face similar issue before?
I think that what's happening is that your trigger isn't in the DOM when you draw the table, but without seeing your code I can't be sure. Generally, it will trigger a modal when it is clicked or something? You might want to change the actual triggering to clicking on a td with a given class contained within the table so something like this:
$(".modal-trigger").click(function(){//Open Modal});
This would work on the first page but not after the first draw of the table as the event had been registered before the elements were within the DOM. Rather, you'd need to listen to the click within the table like this:
$("#table-id").on("click", ".modal-trigger", function(){//Open Modal});
I hope that makes sense and that it helps, if not perhaps work up a JSFiddle illustrating your issue?

Creating view elements in VM using aurelia

Is what I am trying to do in this gist possible?
https://gist.run/?id=bea803b05ad8d5b5e3e0afd59bb8dbb1
In app.html, I'm trying to use a repeat.for to create a custom element called button-row
In app.js, I'm creating two button row instances which I then place into a button row array so that I can use the repeat.for to iterate over it and create the button rows on the app.html view.
In button-row.html, I have a repeat.for to create the buttons using the btns array and setting the name of the button.
In button-row.js, I have two properties. label is the label for the button row and btns is the array of all the button names I want to create.
Sorry if this is a noob question, I have only been working with web development and aurelia for about a month.
Instantiating the ButtonRow objects yourself won't work. Aurelia instantiates the instances. you'll need to use the binding system to pass in the information to the custom element. I updated your gist here: https://gist.run/?id=6ec71143f566571960b7a182d4d98ed4
Also, you should refrain from abbreviating words like "Button" let your tooling save you the keystrokes, while making your code more readable :-)

Sencha Touch dataview list items are not displaying even though they are populated

I have a dataview list view working in another part of my application and is working fine. So I'm using the same principle in another view. I'm trying to display some labels in each row.
I've tried everything to try and get this to work, but to no avail. I've attached a screen-shot of the problem.
It appears the label is in fact in the DOM, but nothing displays. It also looks like if I select an item, the item selected class isn't added either. Is this a clue as to why it isn't working?
So if the item is in the DOM, why on earth is it not being displayed? In my example I have 2 rows in the DOM, which I inspected using the following selector:
Ext.DomQuery.select(".x-data-item");
Any help greatly appreciated?

Sencha Touch - Multiple instance of one panel generated on adding to viewport

I have generated fieldset (textboxes,selectfield etc) inside panel. After login done i display this panel using bellow code from my controller.js
Ext.Viewport.add({xtype: 'IntakePanel'});
Ext.Viewport.setActiveItem({xtype: 'IntakePanel'});
But after this if i try to inspect i can found two panels are there
And due to this if i try to access fields of panel i got array with length 2/4 etc.
I try to remove it using
Ext.Viewport.remove(Ext.Viewport.getActiveItem(), true);
but doesn't help much.
Please help me on this.
Thanks
I think the framework is reinstantiating your component because when you pass only the xtype, it can't know you are trying to reference the same instance as before. try adding an id to your instance and instead of passing an xtype to setActiveItem, give it the result of a component query.
Ext.ComponentQuery.query('#yourCompoId'):

Sencha touch list with index bar : auto scroll

I'm starting in sencha touch ,and I try to create an application.only,I have a problem. I use a list with indexbar. this list is in a panel. and I wonder if it's possible to add an event listener to the panel, to jump to an index to the next. Let me explain with an example:
-We have a list of products and these products are sorted by their type (phones,computers...), the indexbar lets you know what type of product it is.
-To switch from one type to another,We Have to scroll.
What I seek to do is put a listener to the panel so that the scroll from one type to another is automatic every time you tap on the panel or on a next button. for example.
Please excuse my english and help
Thank you.
Try using dom property scrollTop .
For example:
el.dom.scrollTop = 1000;//this will push the panel down by 1000px;
You can always get the el, dom from panel/element properties/ attributes list.