Creating Custom Panel Container for Flex Mobile Application - mobile

I am trying to create a Component in MXML which will should allow me to add a MXML in it .
Result would look very much like a Panel, only that it would have buttons in the header and the content area would be populated by MXML reference i add .
On a mobile/Tablet, i want to be able to display multiple forms, data or charts in my view.
Kindly guide me how this can be done.
regards. Heramb

All this can be done by creating a custom skin. From your description it sounds like you're going to want to create a custom skin for a ViewNavigatorApplication or TabbedViewNavigatorApplication, or something else along those lines. There is also the spark.skins.mobile.SkinnableContainerSkin, which can be used to skin the SkinnableContainer class, which is about the most general container you could begin with. But since you say you're targeting mobile, I'm guessing you'll want to skin the application.
Jason SJ has a tutorial on making a custom TabbedViewNavigatorApplicationSkin: Video: How to Skin a TabbedViewNavigatorApplication
Even if you don't want the Tabbed View, skinning for the other Application models should be similar.
For more reference on Skinning for mobile:
Jason SJ has a three part tutorial: Flex Mobile Skins
Chapter on Skinning in the official reference Developing Mobile Applications with Flex
Also, if you're totally new to skinning Flex containers, I'd recommend getting to know the Flex 4 skinning architecture first. In which case, check out:
Skinning Spark Containers section in the official Using Flex 4.5 reference.
the videos on skinning in Day 5 of the Flex in a Week Series
Note
Since you are targeting mobile, make sure that you use the spark.skins.mobile package and not any of the Flex 4.1 or older skins, as most of them are not recommended for mobile. Also, don't use the spark.components.Panel class, since it is also not recommended.

Related

Are there "helpers" in Codename One to write Material Design apps as in Android

I have designed and released a mobile app for Android and iOS which is often depicted by the users as poorly designed. Indeed the app only features buttons scattered around the main Form that each opens a different form to show pieces of information or do an action. The app uses CN1 flat blue theme along with material icons but it does not look enough to make it material designed.
Thus I am planning to redesign the app and make it a material design one. While reading the material design specifications the tasks appears huge because there are many parameters to take into account to stick to the specifications although there is no obligation to apply them all.
However according to Android developers site and this SO question it seems that Android (version 5.0 onwards) provides helpers (eg a material design theme) to help follow the material design specifications. Are there such helpers in Codename One, or do I have to do it manualy (ie creating shadows, animations linked to actions, component styles, typo, dialogs ...) ? Or put another way, is there a way to give CN1 some hints about the app (primary color is xyz, this piece of information is a subheading, ...) and let CN1 apply the material design rules (animations between forms, shadows, ...) ?
Hope my question makes sense and can receive some help different (if possible) from what is provided in this SO question about Codename One support of Material Design as my app is already using material icons and native typos.
Thanks in advance for the help provided,
Cheers,
If you check out apps such as JAT or buua you will notice they apply the material design principals very well.
The Toolbar class should already comply with most material design principals by default and the FontImage class includes the standard material design icons.
We have task specific classes such as BubbleTransition to implement effects such as the floating button turning into a dialog etc.
What I find most important in material design and design in general is:
Typography - use a proper native: font that matches the occasion and looks good on the device.
Spacing - use spacing intelligently and use millimeters to keep it consistent between devices.
Colors - pick a palette and stick to it consistently, material design has some great color palettes that really make the app shine.
Simplicity - don't try to much. Simple is gorgeous. Yes you can add more shadows, animations etc. but you don't really need those and very few users would really notice that work. Everyone will notice if the app is minimalistic (in a good way).
Screenshots of the app might not be good form on stackoverflow but if you post screenshots/link to your app in the discussion forum I'd be happy to give you specific tips. Notice that hiring a designer to do some work or using a design template would be very helpful too.

Trinidad Component

How can I make my application web responsive design that is already design for desktop PC using Trinidad Component in ADF 11g?
Is it possible for with Trinidad component design application that support web responsive design?
Responsive design requires some form of tidy HTML but most importantly a style sheet.
Style sheets are no problem in Trinidad. See the skinning documentation on how to customize your style sheet.
The HTML is a different story. If you are using Trinidad's core renderkit you will end up with a lot of tables. Not the best choice for responsive design. You could create your own renderkit... Never tried it, but I assume it's a lot of work.
If your application isn't too complex, you might might be able to pull it off just using skinning.

WPF Modules in a Apps View

I am in the early stages of designing a WPF MVVM application. I will have several modules in my application and will be adding more in the future. I want the home screen to feel almost like that of a tablet with the modules displayed as icons similar to apps on a tablet. I was looking for some advise on what WPF control would best help me get this desired look and feel. I would some advice on this and if anyone has a link to an example where some else has implemented something similar
I would suggest first you go and see how Prism framework works for a modular wpf application (one of the best architectures)
Secondly, your UI should be a hardcoded main screen with the tile icons for each module or wrappanel in itemscontrol with datatemplate defined as a tile. Also you can check this sample oriented in WinRT lookalike GUI.

How to reuse content with Sencha Touch

I want to build a mobile site in Sencha which showing HTML content on a tablet device, containing many objects/divisions/containers with similar layouts and properties.
Take this example window:
Is there a best practice or recommended way to achieve reusability and DRY for writing those containers in Sencha Touch 2?
What types of objects would you use? Does it make sense to use HTML div objects + CSS?
Also, does it make sense to use Sencha in this case?
Here is how you would achieve that layout using Sencha Touch:
Unfortunately it is pretty hard to explain, but hopefully it makes sense.
I've also created a very simple example of this layout, viewable here: http://www.senchafiddle.com/#jxiA8 (make sure you press Run).
As for which objects/components; they would all be Ext.Containers. Ideally you would use the MVC structure to create custom classes (which would extend Ext.Container) for each of these items.
This is definitely a great use case for Sencha Touch. It is great for creating rich applications like this.
Best approach to render the list of items in the Orange and Yellow containers is probably with a DataView.
Relying on itemTpl to draw each item as per the official documentation of the Ext.dataview.DataView component or using an item renderer, as per the dive into dataview article. (Note that the code in that article may not work as sencha as changed a lot between the different beta versions - #rdougan's associated demo on github may be more recent).
I did expand on the layout code contributed by #rdougan to add an example of how to implement the Reusable dataviews (gist).
That demo code also contains a quickly baked solution for data injection (applyStore and injectStore), so to make it possible to define an "OrangeContainer" once and only once and pass down different data for the "highlighted" and "list" versions of the views at the top and bottom of the screen, respectively. I have no idea whether this is a good or reliable way to do it. I would be interested in feedback on this.

Why do WPF apps look like web pages?

I apologize for my newbie question by why do WPF apps look like web pages?
I am new to gui and still shopping for a book to learn gui programming. The push seems to be in the direction of WPF but all the screenshots of WPF applications that I've seen look like cheap web pages. Frankly I'd be ashamed to sell an app that looked like a web page.
I realize that WPF is built on XML technology but can you not build normal looking WPF apps in Visual Studio (via button("widget")) drag-n-drop? In other words an app that does not look like a web page?
How can WPF be a replacement for WinForms or the like when it doesn't provide the same standard application look?
The default look of WPF applications is admittedly rather simple, but WPF allows unprecedented control over how your application looks.
Here are some examples, all of them WPF applications.
If you are to deveop an application under .net and are able to target .net 3.5 or above, you will want to use wpf. If you don't know much about ui technology and want to work with .net, understanding windows forms is useful but not necessary. You should learn wpf regardless.
2 perks that I have found while using the framework:
- it is very easy to inject branding and custom interactivity into your app. It is then very easy to change these when your sales guy decides the want it blue, not red.
- the way components are organized on screen is relational like a webpage, not coordinate based like windows forms. This is ideal for scenarios when translated strings will change length (English to German for example). Under usual circumstances the ui will resize itself automatically at runtime to make it all fit.
If you just throw in controls and don't change the style of anything, your first wpf applications will look almost identical to native win32 applications. It is very easy to change this, but you will achieve great results regardless of the "look" you choose. Microsoft also provide the tools to create new ui components that look like native buttons. There are a host of other features that will make you grin while learning!
This is not a technical note, but at the moment wpf is a highly sellable skill and looks great on a cv! Companies want great branding in their apps. Wpf helps that happen.
WPF does provide the same appication look wich is the default look. When you drag and drop your controls onto the design surface (just like in windows forms, MFC ...) the controls look as you would expect them to look under the current theme. Chances are that you have seen quite some WPF applications without noticing. Just because they look like any other app.
The reason you might see more WPF based applications that have some sort of custom look and feel to them is simple because it is so much easier to do what ever you like to your GUI than in any other GUI framework on any platform. This is both blessing and curse. While you being absolutely flexible it is easy to do absolutely horrible stuff.
user440267, I believe that the most application in WPF are built using normal Windows. But there is an option which we don't create a window, instead we create a page, which behave like you think.

Resources