Xamarin.Forms. Is there any way to split the Screen into 2 different pages (CarouselPage & Page) - xamarin

Hello I am trying to get a Page in Xamarin.Forms with a swappable "boxView" in the middle. Pretty much the same that the carouselPage does, but not in the whole screen but just a small rectangle inside my main Page.
Is that possible??

Not out of the box I'd say since it is a Carousel*Page*. Said that you can still implement it by yourself (using a Custom Renderer, View, etc.).

Related

How to do a scale open animation in Flutter?

I'm trying to do this animation in flutter :
https://material.io/guidelines/motion/choreography.html#choreography-creation
My problem is that I have absolutely no idea how to do that.
As far as I know, widgets in flutter don't know their position nor the position or other widgets at all.
And you can't access context.size inside the build method.
I tried to use Hero animation to do it. Or ScaleTransition. But it's definitely not working.
You can use showMenu to dynamically show a popup menu at a given location. Consider using PopupMenuButton, which is an IconButton that automatically shows a menu when it is tapped. There's an example in the Gallery. If showMenu doesn't do what you want, you can copy the code in popup_menu.dart and customize it to make your own version. It uses CustomSingleChildLayout and PopupRoute.
If you just want to absolutely position a Material or Card on top of other elements, you can give it some elevation and use a Positioned within a Stack. You can use an AnimatedSize to adjust the element's size with a Curve. This won't interact with the back button on Android automatically, so if you want that, you may have to use addLocalHistoryEntry or PopupRoute.
If I understand you correct - you want to show square widget, and animation is not suitable at most because widget doesn't know its size.
In this case you can try MediaQuery.of(context).size.width - it returns width of your screen, so you can use it for calculating widgets size

Adaptive Layout in Xcode 7.0.1

I have an app that displays properly in portrait view but truncates in landscape view:
From the research I have done it looks like I need to understand Size Classes and Adaptive Layout. However, I am only concerned with layout on iPhone 6, not across different devices (eg iPad).
Before jumping into Adaptive Layout and Size Classes, which seems quite a complex topic, I just wanted to ask if there is a simple way to make this app display properly in both portrait and landscape for iPhone 6.
Thanks in advance!
Yes, you can do it without size classes, but it requires a reasonable modification to your UI.
If you think about it then having a picker always visible makes no sense for you. Looking at your image I am puzzled as to which date is currently being adjusted.
What you want to do instead, is to make your picker appear after user clicks on one of the dates. You can make it slide up from the bottom. In addition, you can add a label above it which will clearly indicate which date the user is currently modifying. That label can be placed in the toolbar to make it easy to add "Done" and "Cancel" buttons to the left and to the right.
In my view it would make much more sense and would also solve your problem. The rest of the UI can be put in the scroll view if you don't have enough space on old devices (e.g. 3.5 inch iPhones)

Resizing WebView with window

I have a NSView that houses about a dozen WebViews populated with HTML generated from the application. When I first init them, I wait for - (void)webView:didFinishLoadForFrame: to fire before laying them out and adding them to the view based on the documentView frame.
How would I go about resizing these WebViews along with the window? Is there a way to get the desired size of the WebView for a given width?
Since all you're using the web views for is rendering MarkDown, you should instead investigate MacDown or MarkdownLive. These render MarkDown directly into an NSTextView. This will be MUCH more efficient than multiple WebView objects.
In future, you should ensure that your question includes what you're actually trying to achieve because there's often a simpler way to do what you want than the way you think it perhaps should be achieved.

webkit slide in and slide out a page

I'm new to webkit animations and I have been trying out to do this kind of animation
http://demo.jeffrey-way.com/tutsMobile/#site.php?siteName=psdtuts
If you click the list element you will see page sliding in and sliding out.
I want to implement this animation to my app which is built with backbone.js, underscore.js, zepto.js
I could use jqTouch or jquery mobile but I would like to make it as light weight as possible, because I'm building it only for IOS. So thats way I wan't to implement it by my self.
Any hints to make this implementation or should I go with jqTouch?
In this example, there is some sort of (I hate to be vague...) ajax based content loading system. Take a look at the source:
<div data-role="page" id="article.php?siteName=psdtuts&origLink=http%3A%2F%2Fpsd.tutsplus.com%2F%3Fp%3D15026" class="ui-page ui-body-c">
When you first visit, that div doesn't exist. It's created by javascript when content is required, then filled with that content, then translated (animated) into the viewport.
Here is a step by step, deduced from a quick look at the page:
Base page is loaded, including css, javascript, nav list
Script is waiting for a nav item to be clicked.
Upon clicking, an ajax request is made to the content corresponding to the clicked item; determined by href="article.php?siteName=psdtuts&origLink=http://psd.tutsplus.com/?p=15081". My guess? This ajax request is getting content from the same place as psdtuts.com, likely in a database.
While that stuff is loading, javascript shows a loading animation. When loading is complete, it's hidden again.
Once the new content-filled div is created, it is given a default position with its left edge placed right outside of the right edge of the screen. Upon the event of being positioned, javascript then determines the view's dimensions and translates the div across the horizontal dimension. At the same time, the nav list is moved the same direction and distance.
When back is clicked, the view's dimensions are determined again (In case the window size changed) and the nav and content are translated to the right, hiding the content and showing the navigation again.
Repeat
I could be off from how this exact sample is being done, but... Well, this would work.
You wouldn't be that crazy to use a framework for something like this, but I can understand wanting to do a custom job. It would certainly be faster for users, but slower for you. Depending on your intent, that would be just fine.
edit: If you're only serving this to users with webkit, using a framework is even less necessary... If you're not worrying about cross browser support, there's really not a lot going on here that you couldn't accomplish easily with raw javascript.
The only reason I use jQuery for example, most of the time, is to ensure things work alright in most use cases. It just smooths so many things out... Even if 95% of the framework isn't being utilized, it's worth it when you've got a deadline.
I founded out one good example
http://andrew.hedges.name/blog/2009/05/29/animating-your-iphone-web-application

Could you recommend an image carousel?

I have a .NET 2.0 web project. I need a simple image carousel. What I would prefer is the main image on the top, and a scrolling bar with smaller images on the bottom. When the user hovers over or clicks the smaller image, it would populate the larger image space.
If you know of anything like this, even 3rd party paid controls, please recommend them.
jQuery is the way to go here is the google search result:
http://www.google.com/search?aq=0&oq=jquery+image+car&sourceid=chrome&ie=UTF-8&q=jquery+image+carousel

Resources