JavaFX: Customize the layout of composite standard controls like Accordion or TreeView - layout

While exploring the basic concepts of JavaFX, the following question arose:
Is there a way to customize the layout of composite controls (such as TreeView or Accordion)?
For example, to achieve a horizontal arrangement of child elements or to introduce animations.

Some controls include API for controlling their layout. For example, you can set the orientation of a ListView to Horizontal or Vertical or switch animation on or off in a TitledPane.
You can write your own skins to apply to existing controls and modify their layout.
Public API for control skinning is provided in Java 8.
Use the -fx-skin attribute to change a skin via css.
More details are in the JavaFX wiki control skinning section.
Using custom skins you can completely change the layout and animations for a control. See for instance this carousel skin of a TreeView.

Related

How to properly display a focus rectangle in a compact SplitView menu item

I'm building my first Universal Windows Platform (UWP) App and am trying to implement the popular "Hamburger Menu" using the SplitView class.
Inspired by many samples, the items hosted on the SplitView pane are re-styled RadioButton controls, with a vertical highlight-rectangle, an icon and a text. The appearance is similar to that of the Groove app.
I'm now trying to implement navigation and selection using the keyboard, and this now bring a little focus-rect around the items in the SplitView pane. However, since the pane clips its contents when its DisplayMode is either CompactInline or CompactOverlay, the focus rectangle is also clipped, which is not the behavior a user would expect.
Please, can anyone advise on how to property display the focus rectangle in this situation ?
Just an idea, what if you set the width of all radio button's to be same as the CompactPaneLength property of SplitView. The default is 48 DIPs.

sapui5 custom responsive design layout

I am new to SAPUI5 and I am having trouble creating a layout which should be responsive, I tried responsive layout, responsive grid layout but with no luck, also to mention below every label a textbox should be there.
Are you aware of the example pages from SAP?
https://openui5.hana.ondemand.com/test-resources/sap/ui/layout/demokit/ResponsiveGridLayout.html
Klick on "show source" to see how they did it.

Toolbar UI Login - Inbox by Gmail App

I'm looking at different variations of login screens which have material design elements.
I found the Inbox app quite interesting.
The toolbar (action bar) appears to be mid screen. And the (action bar) snaps up to the right position when editing text.
Questions:
Is this a standard behaviour across 5.0?
How do they achieve this?
The UI element you are seeing on the top, playing the role of an ActionBar is actually the Toolbar widget.
A Toolbar is a generalization of action bars for use within application layouts. While an action bar is traditionally part of an Activity's opaque window decor controlled by the framework, a Toolbar may be placed at any arbitrary level of nesting within a view hierarchy. An application may choose to designate a Toolbar as the action bar for an Activity using the setActionBar() method.
You can have multiple toolbars in an Activity. The toolbars can have different heights. The standard height of the toolbar in portrait is 56dp.
Update:
Default height:
Mobile Landscape: 48dp
Mobile Portrait: 56dp
Tablet/Desktop: 64dp
For extended app bars, the height is equal to the default height plus content increment(s).
You can read more from the Material design specification.
For implementing it you just set the layout_height attribute in the layout file. Of course extracting the number as a dimension resource is always a good idea.

Montouch tablview as subview issue

I am new to Xamarin IOS and I have a problem with creating nested layouts in IOS as like in Android(some text controls and a list view) . I added a tableview but not sure how to add some text and image controls in a view and add the tableview below the text and image controls. Also I am using ViewPager in Android and is there an equivalent control that I can use in IOS?
Yes, you should use UIScrollView and enable paggin there. The only issue that you need always to set the ContentSize for it, to make it scroll properly. So you should set the common Size of inner content.
You should check out monotouch.dialog for rapid tableview development. Once you get the hang of it, it makes creating tables a lot easier.

How to make grid view in j2me

I am very new in j2me. I want to design following type layout and components.
Mean I want to arrange my items in gridview. And after clicking on each item I will move to another form.
I am using simple lcdui. Please suggest me how can I do this. Means how can I arrange these items in gridview and what items should I use here buttons or something else.
You may provide me some suitable links.
In J2ME you have two options for UI: Form and Canvas.
Forms are a very simple way to display information without dealing with the graphical side of things, where Canvas is a blank screen and you need to draw the objects and their behaviors.
There is a third way: the guys at Sun has created a framework called (LWUIT which stands for Light Weight UI Toolkit). This toolkit provides the simplicity of Forms and the UI control of Canvas.
Hope i helped.

Resources