I would like to build a navigation enabled Silverlight app with a slight difference. I don't want to load the entire screen area just a part of it and only in some scenarios.
For example #/Customer/Cases loads /Customer/Cases.xaml in the entire screen area. But #/Customer/Cases/Orders loads /Customer/Cases/Orders.xaml in an area where a data grid was displayed (slides to the right maybe).
How do I tell the parent navigation frame not to load the entire #URL but just a part of it? And vis versa for the child navigation frame?
Has anyone done anything like this before?
Please let me know if doesn't make any sense, it's quite hard to explain :)
One possibility would be to have two frames.
In the inner-frame you set:
InnerFrame.JournalOwnership = JournalOwnership.OwnsJournal;
The link #/Customer/Cases/Orders loads the page /Customer/Cases.xaml?Orders in the outer-frame. The outer-frame than knows it should navigate the inner frame to /Customer/Cases/Orders.xaml
Check out Ultimate Framework - Silverlight Navigation Framework that supports unlimited parallel and nested frames with Prism
Related
I am developing app using codename one .On login screen when toastbar gets loading container moves down.
I have attached screen shot in which i have shown exact error.
If I rotate the device or simulator it produced same effect.I used border layout and value of includeNativeBool = true
Can you please let me know how to resolve it?
Thanks in advance
I have attched screen shots of my form structure
There is no scrollability in this layout. I'm also guessing you assigned percentage heights in the table layout and some nuances might change.
Container1 should be scrollable on the y axis but that might break your entire layout because you rely on problematic behaviors of table layout so it will fit "exactly" it wasn't designed for that.
I am developing a little application to manage messages. Such application has two panels on big screens: a sidebar with the messages list and a panel with the message details: [ ][ ]. But in case the screen is small (smartphone) and just because we want it to be responsive, the sidebar is the only thing shown and when you click on a message the details are displayed hiding the sidebar.
With Angular, the last approach is quite easy doing some routing and it works very well. My problem comes when the screen is big enough to accept both panels together, as I want Angular to still control the flow but not hide/show any panel as I want both views visible.
Is there a way to go routing (one view at a time) with Angular when the screen is small but change the behavior when the screen is big to show the two views at a time?
By the way, I'm using Bootstrap to control the responsiveness and that's working quite well (the panels hide/show depending on screen size), I'm just worried about how am I going to handle this with Angular now.
Examples
Just to see if I can explain myself better, this is what I want it to be when screen is big enough: http://plnkr.co/edit/WuN08Q?p=preview (make sure you make the preview screen big enough to see it, click on a message, and then resize to smaller size to see how the details hide)
And this when it's small: http://plnkr.co/edit/UL1OpXjzEcCU9722lpA9?p=preview
First example has two panels visible and one of them is hidden when screen becomes small, second example uses two views and works as I want it when screen is small. Now what I want is to make it behave like first example when screen is big enough and like second when it's small.
Thank you Angular wizards!
Probably not the answer you're looking for, but one solution building upons Jonathan Hair's answer is contained in a fork of you original plunker:
http://plnkr.co/edit/chdn6XDpdnqaay3VfOqI?p=preview
This solution is not preferred because you end up having to refresh when you break across your sm / large barrier (in this case 768px width) in order to get the expected rendering behavior.
I think a better approach to this problem is to not use routing. (Which is precisely what I did for your "Big view.")
As an example, here is a unified scope that utilized the bootstrap responsive utility and builds off of Jonathan's size detection. As the screen is resized, it should follow the expected behavior. No routing necessary.
http://embed.plnkr.co/b7sSyDjRLSRrJF29l01d/preview
You could use a function in the templateUrl section for routing in you app config and change the templateUrl based on current window size. I dare say you would have the same functionality in the controllers so changes to just the templateUrl should suffice.
NOTE: In my example below I have just placed the window size logic where needed, you would put this somewhere else in your app like a helper file or a service instead.
Example
http://plnkr.co/edit/udDlJT?p=preview
I have an IOS application designed for ipad. In one page, I display a report to the user and the report requires 5000 UILabels to be rendered on the screen inside a UIScrollView. This causes application to crash due to being out of memory. I know that UITableView has the functionality for loading content on demand. How can I make scroll view render only certain content and as the scrolling happens remove the content that got invisible and add the content that should be visible?
Is there any way you can reconfigure it to use a table view with custom rows, perhaps rows that consist of several labels? That model supports load on demand and resource reuse in a very natural way...
Perhaps you can be more specific on your screen layout?
You should re-cycle (i.e., reuse) the labels just like a table view recycles its table cells. This is sometimes referred to as "tiling" subviews. Tiling allows you to display more than will fit into memory.
I recommend watching WWDC 2012 Session 104. This session's tutorial creates a photo app that tiles image views in a UIScrollView. Although the photo app scrolls pages of content, rather than a grid of items, I think the video could be relevant to your app.
Here's a very brief overview of the tutorial applied to your specific case:
(1.) declare iVars that keep track of your labels:
NSMutableSet *recycledLabels;
NSMutableSet *visibleLabels;
(2.) implement a method that fetches a re-usable label:
- (UILabel *)dequeueRecycledLabel;
(3.) implement a method that does the tiling:
- (void)tileLabels; // this will add/remove labels from the scroll view
(4.) set your scroll view's delegate and call tileLabels in the scrollViewDidScroll: delegate method
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
[self tileLabels];
}
The WWDC video will help you fill in the details, which I think are applicable to your case. However, you will have to do plenty of improvising in order to make it work for your specific case. This may not be easy; but its doable.
At the end of the video, tiling with CATileLayer is discussed. I'll be honest, I didn't understand that part. But I don't think it's applicable in your case because you're not displaying large images.
I finally implemented dynamic content loading. The method I implemented is scrollViewDidScroll.
Inside this method I determined the direction of scroll by the following
bool isUp = (currentOffset.y > lastScrollOffset);
Then I determined the visible content rectangle by the following.
CGRect visibleContentRect;
visibleContentRect.origin = scrollView.contentOffset;
visibleContentRect.size = scrollView.bounds.size;
Then I had an array of View Elements and each knew its place in the scroll view because of their frame being set. Long story short, each time scroll happened, I determined the views whose frame either intersected or contained by visible content frame. I added those views to the scroll view. I also determined the ones that disappeared and removed them from scroll view and I also set those views to nil and recreated them. Once [scrollView addSubview:view] method is called, then view gets more space in the memory because it gets visible. [view removeFromSuperView] method doesn't deallocate that space. That's why setting the view to nil and recreating it is necessary.
I've seen a couple posts about the UIImage automatically loading the filename-568.png image in the new iOS6, but I can't seem to recreate it in the UIImageView class.
I'm using the Storyboard (not my app, just having to do some checks), and I've a simple layout with just the Image View scaled to fit, no code in the view controller, and I've sure the filename.png and filename-568h.png exist (as well as -568#2x.png just in case) but when I load it up in the iOS6 simulator. This has been for iOS 4 and 5, loading the #2x image for retina, doesn't seem to work in iOS6 though. Any ideas?
The image happens to be called Default.png since it is the same as the launch image, could this be the issue?
Thanks for any help in advance
iOS6 does NOT automatically load -568h as it does with the #2x images. The only exception is the default screen, but further than that you have to manually set you 568h image yourself.
I created some code to mimic the loading behavior for -568h images when using the [UIImage imageNamed:#""] method, but from the IB I do not know the way. If you are interested in such a solution, check it out at http://angelolloqui.com/blog/20-iPhone5-568h-image-loading
Typically, you should only use 568h for the launch image. If you notice yourself using different image assets within your app for the new display height, you should consider that you might be making your UI too static.
The most obvious place people want to use 568h for images is for background images. An alternative is to just have one asset that has the largest possible dimensions and align it properly using the contentMode property of UIView.
But perhaps you have something floating in the image at the top and the bottom, so contentMode doesn't solve it. You could consider that the top and bottom floaters should probably be separate views anyway.
Remember, we have always been making apps with variable heights. Every time a keyboard pops up, its as if the size of the screen has shrunk.
I have lots of windows in my project. Now I am thinking to convert it into pages then then implement it into frame navigation.
Is there any way to convert all the windows into frames?
There's a very simple way : build a new page then set the page content = the window content. But you loose some properties (width, height) some events loader (Loaded,...), and obviously some operations are not allowed on pages.
If you want to try without taking too much risk on your project, take a few windows (W1,W2,W3), then create the pages P1,P2,P3. Now create W1', W2', W3', which are just a Window with a frame linked to P1, P2, P3 respectively. This way you can check if your app can be 'translated' to page logic and begin testing navigation while still having full functionnalities for the Windowed version of your application. Note that if your application follows MVVM, the translation 'should' be easy.