I use a MvxTableViewController with custom cells within MvxTableViewCell and xib file to display a list of blog post. Each blog post can contains 1 to 3 items of differents type (Picture, Text and Sound).
I added 3 UIImageView. These 3 ImageView appear depending on contents of the blog post. I would like to know what’s the best way to do this with MVVMCross. How can i bind ViewModel property to UIImageView's position ?
The link below represented the desired result :
http://s25.postimg.org/li38jzdsf/Screen.png
Related
Hello everyone.
I have a tree of items as shown on image above (Items tree).
I need to display this tree in a way that is shown on an image (Views).
It has two views, Tree View and List view. Tree view should display the whole tree of items, and list view should display properties for a selected item in a tree view. (On an image it displays properties for a cat item)
The way it is implemented right now is displayed at "Current implementation" part of an image. TreeModel contains item tree, and when you click on an item in a TreeView, current item is sent to a ListModel to display it's properties.
The issue thagt i encounter here is that in both views items are editable. In a tree view you can edit item's names, and this change should appear in a list view as well. The same goes for opposite direction. Changing name of a Cat item should reflect on a treeView cat item.
Since it is two different models, the change is made only when you hover over another view.
What i currently did is for a changed item in one of views, i search for a item in a another view via QModelIndex::match() and then just update that part of a view via emit dataChanged(). I am not sure this a good way. So if maybe you can give me some ideas on how this can be done better.
Thank you.
You should have only one model. The QAbstractItemView::setRootIndex method is all you need: you can set the current item in the tree as the root for the table view. Alternatively, you could use a proxy viewmodel to adapt the data for display in a particular form.
I'd like to ask a tricky question to you about Drupal.
I created a new content type which includes lots of fields.
I want to find a module that adds a 'Add another' link to the adding content screen which will duplicate certain fields.
Example:
I have fields named Panel1 Photo, Panel1 Info, Panel2 Photo, Panel2 Info...
When adding a new content of this type, if I want to enter 3 panels, I want this module to create 3 fields of Photo and Info for me, and maybe 4 or 5 at other times.
I hope you will understand what I ask.
Thank you in advance.
You could have each field set to allow multiple values which would put the add another button you talk about. If you make a field collection with the field collection module you will be able to group those fields together and you can allow multiple values for the field collection. Let me know if you haven't found the add another button.
Install the field collection module then in the content type create a field collection with panel and photo fields.
When you create your first content page you will start with one panel and photo and a + button. The + button gives you the ability to create ever more panels and photos grouped together.
Hey I was wondering how could I create a listview which had multiple headings..i.e
Heading 1
Details template
Details template
Details template
Heading 2
Details template
Details template
U can use Parent and child list view in Parent list view main heading comes and in child list view remaining headings comes.
i want to change the number of items returned by a view. I changed the code as
$view->set_items_per_page(2);
in hook_views_query_alter();
But it is not showing the required result. But there is color difference after 2 records. Is it required any other settings I put my pager as off in view.
ie Use Pager:off . I want to use this on draggable view table. Is it possible?
Pls help me
if you are only altering the query programmatically and view exist then
1] Go to your view basic settings and click on item to display
bottom of your view you will get the 2 text boxes.
2] In first text box put the number you want, in your case put 2 and leave second text box 0. and hit the update default display button and save your view.
I've got an <mx:Button> in my application, I have 10 items in an XML Node. What I'd like to do is when the button is clicked show the next 5 XML Nodes.
How do I achieve this?
My code is as follows at the mo :
<mx:Button x="1380.65" y="582.65" styleName="rightButton"/>
The style is just setting the up / over and down states of the button. But I want it to function and show the XML nodes in groups of 5.
How are you displaying the first five items?
If you're displaying things in a list or DataGrid, I believe you can set the verticalScrollPosition to scroll the list via a button click.
If you are displaying items using TextInputs, custom component, or other non-renderer-based classes, you just need to manually write some code to update the display elements based on the currently displayed index and what is next.
Can you offer a running sample? That may us direct you!