RelativeLayout is used for creating adaptive layouts based on their parent’s and other views’ position and dimensions.
For me RelativeLayout is the solution to apply an image as the background for some components. Say, I have a Label on page and would like to overlay it with a background image:
Each element in the RelativeLayout can define a constraint (RelativeLayout.YConstraint, RelativeLayout.XConstraint, RelativeLayout.WidthConstraint, RelativeLayout.HeightConstraint) which defines how the element relates to other items. Read the rest of this entry »
Working with SVG consists of two parts: designing itself and development. They are tired very closely and depend each on another. The nature of SVG as both an image format and a XML format, every step taken in the graphics editor directly affects the resulting code.
I love to work with Adobe Illustrator, so I started with my design firstly. The final image should be:
Creating your *.svg image is the most critical step — if you have problems making it work, probably it’s because your SVG assets weren’t correctly produced.
1. The design stage: drawing vector image.
I decided to draw my picture using ‘path’.
*The ‘path’ element is the most powerful element in the SVG library of basic shapes (lines, curves, arcs, etc.). The shape of a path element is defined by one attribute – ‘d’ (‘d’ stands for data and it could just as well stand for directions.).
There are a number of stroke related properties within SVG that allow us to control the details of strokes, some of them are: stroke, stroke-width, stroke-linecap, stroke-dasharray, stroke-dashoffset.
You have a great website with responsive design and number of tables which fit the smaller viewports well.. say, like described in my post Responsive Tables. Every table has horizontal scroll for mobile-sized view, without breaking layout. It happens because of CSS settings for the table ‘display:block;’ and ‘overflow-x:auto;’. A user can swipe right and left to horizontal scroll the table to see the content.
A bad news is the user has no indication that they can swipe to the right (the momentum effect) – many mobile browsers don’t show scrollbars at all, while some show them only while scrolling…
The days of using images to provide the visual effects are over. Now we can create gradients, shadows, rounded corners, use animations with styles only. And spinner image is not the exception.
So if I need spinner for my project, I use spin.js by Felix Gnass usually. It’s highly configurable, resolution independent, uses VML as fallback in old IEs,
uses @keyframe animations, falling back to setTimeout().
Spin.js dynamically creates spinning activity indicators that can be used as resolution-independent replacement for AJAX loading GIFs.
The only thing I missed with this library was an overlay option – to cover the rest of the page and prevent a user from clicking any element while the required content is loading.
I decided to add a ‘div’ which appears while spinner is working and removed after content has been loaded: