Robotium ListView with Buttons, can't click on the buttons in the list - robotium

I have a dragablelistview with a title and imagebuttons for each item to delete that item.
How do I click on the imageview?
clickInList(int , int) does not work (unless i am doing it wrong?)

Try
clickOnText(String) or clickOnImage(int) clickOnImageButton(int) instead

Try to obtain the view of the list item, something like this :
//get the list view
ListView myList = (ListView)solo.getView(R.id.list);
//get the list element at the position you want
View listElement = myLyst.getChildAt(position);
//click on imageView inside that list element
solo.clickOnView(solo.getView(listEelement.findViewById(R.id.image_button)));

Related

Visibility of expanding last view in the expandable RecyclerView

I want the things in the last expandable item to be fully visible when it is clicked,Now what is happening means when I click on last item it expands down, but I manually need to scroll up again to see the the things inside the expanded item.How can the last expandable item be fully visible.
I am using Recyclerview.
I have found the solution which I wanted, I used
recyclerView.smoothScrollToPosition(selectedPosition);
after setting the adapter. So now the things in the last expandable item is fully visible when it is clicked.
Just a supplementary:
If you use h6ah4i/advrecyclerview, you can use the following code snippet:
#Override
public boolean onHookGroupExpand(int groupPosition, boolean fromUser) {
// NOTE21: collapse all other groups when one item expand.
mExpMgr.collapseAll();
// NOTE21: Visibility of expanding last view in the expandable recyclerview
if (groupPosition == getGroupCount() - 1) {
mRecyclerView.smoothScrollToPosition(groupPosition + getChildCount(groupPosition));
}
return true;
}

How to access ScrollRect items and get it selected and clicked?

I am using Myo so my inputs are not the same as keypress and mouse.
I am trying to access items in the scroll UI Panel. Here is a snapshot of my Unity3D hierarchy.
http://imgur.com/f0cIJWl
As you can see, I have
-StoreMenu
-ScrollPanel
-ScrollRect
-ShopItems (list of items)
How can I possibly scroll and highlight the list of item. And on certain input gesture, get it selected ?
I'ved only managed this far:
scrollpanel = GameObject.Find("ScrollPanel");
scrollRect = scrollpanel.GetComponent<ScrollRect>();
scrollRect.GetComponent<ScrollRect>();
scrollRect.verticalNormalizedPosition = 0.5f;
I can get the scrollrect, move to certain position in the scroll but items are not highlighted.
Thanks in advance.
TRY THIS : http://docs.unity3d.com/462/Documentation/ScriptReference/EventSystems.EventSystem.SetSelectedGameObject.html
This can be used to Set the object as selected

How to get submenu item count and submenu name in barsubitem ribbon VB.NET

I have a winform with ribbon menu and i want to hide barbuttonitem in barsubitem on ribboncontrol.
The question is how can i get count on barsubitem? and how to get barbuttonitem name in barsubitem? and how to set visibility on barbuttonitem in barsubitem?
if possible i need this answer ASAP.
Tq
You can use the BarSubItem.ItemLinks collection to access items and use the BarItemLink.Visible property to hide it. Like:
int count = barSubItem1.ItemLinks.Count;
BarItemLink itemLink = barSubItem1.ItemLinks.OfType<BarItemLink>().First(link => link.Item.Name == "your_name");
itemLink.Visible = false;

Sencha Touch 2.0 Multiple List Item Buttons

Does anyone know if it is possible to have multiple icon buttons on a Sencha Touch list item that listen to different events? If so, how can I accomplish this?
For instance, say I have a list of people and there's an icon for email, phone and a map to their location for each person. I want to show 3 small icons and be able to map each icon to do 3 separate actions.
This depends on how you are creating your buttons.
If the buttons are simple HTML using itemTpl, you can just listen to the itemtap event on List and use the event argument to detect which button you pressed. You could do this via a custom attribute or even a className:
myListItemTapListener: function(list, index, target, e) {
var el = Ext.get(e.getTarget());
if (el.hasClass('map')) {
this.navigate(index);
} else if(el.hasClass('email')) {
this.email(index);
} else if(el.hasClass('phone')) {
this.phone(index);
}
}
If your buttons are actual Ext.Button's inside a component List, you can simply add a listener onto each button when you create the component. There is an example of how to do this in the DataView Guide in the Sencha Docs.
Component DataView may help you. You can see this [guide]: http://docs.sencha.com/touch/2-0/#!/guide/dataview-section-4
I have wrote a [demo]: https://github.com/hs3180/Sencha-Touch-Component-DataView
, in app/view/,
Main.js, a dataview component with useComponets true, and set defaultType to 'demo.view.Item'.
Item.js, a DataItem, the visible content of each item is a panel ( in Card.js ). I use datamap to link name in record ( within store ) to userName ( in demo.view.Card ).
Card.js, a Panel for each person. A user name title and 3 buttons.

flex edit menu operations on multiple textareas

I have a grid in which one column is having itemrenderer as textarea. My application is menu controled. Now I want to perform edit operations on the textarea using menu items.
Like if I select some text from a textarea in the grid, then I select a menu item "Cut" then it should cut the selected text from the textarea. In this manner I would lie to perform all operations.
I am not getting how to get that the operation is to be performed on which textarea?
inside your menu item click handler, try:
var fcs:IFocusManagerComponent = focusManager.getFocus();
if(fcs is TextArea)
{
var txt:String = TextArea(fcs).text;
System.setClipboard(txt);
}