How to make the hint text of TextInputLayout vertically center? - material-components

Our design team follow the iOS catalog app , the hint text of TextInputLayout is vertically center, but when I try Android it is not. I don't seem to find an option to make it. So why they are different ? Or there's some way to make it?

This is a bug with the implementation of TextInputLayout in the material design library. We have fixed this internally and will be releasing the updated component soon.
As a work around you may be able to set the padding on the child TextInputEditText to adjust it so it is centered.

Related

Possible to support StickyHeaders for CN1?

I really like the idea of StickyHeaders (https://www.codenameone.com/blog/sticky-headers.html), they're great for usability, but the CN1 implementation was never fully developed or included in CN1. Solutions exist for iOS and Android (https://github.com/emilsjolander/StickyListHeaders and http://applidium.github.io/HeaderListView/).
The two main features I'm missing in the old implementation are: that each header visually 'pushes' the previous out of the top of the screen (and vice-versa when scrolling down), and that the stickyheader which is 'stuck' at the top of the screen is the actual stickyheader itself, so that eg. buttons inside it will work.
Are there any plans to add this to CN1 sometime soon? Or anyone who has implemented a similar solution (I tried Chibuike Mba's alternative implementation mentioned on the original blog post but it doesn't cover the features I'd like)?
Alternatively, any pointers to how I might implement this myself?
I've already tried a couple of times, but given up since I don't master the details of CN1 graphics etc well enough. The approach mentioned here How to make sticky section headers (like iOS) in Android? sounds like a good approach (add a container on top for the stickyheader, scroll that container when the next stickyheader arrives), but then how to force the size and scrolling of such a container?)
This should be much simpler to implement today as we have two helpful features:
Scroll listener
Layered pane
You can use the scroll listener to detect the location of a header and appropriately place another component in the NORTH of a Container within the layered pane. Then as scrolling happens and you detect a new header is coming in you can just place it in an X/Y position below the existing component and use animateLayout to push it out.

Tips to make Codename One PeerComponents z-ordering working

I created a PeerComponent, that is a port in Codename One of the Horizon Camera SDKs. At the moment, it simply shows a live-preview of the camera.
I tried to add a Label over the PeerComponent: the Label is on top only in Android. On iOS, the Label is on bottom (that means invisible).
I've done a lot of trials to get a correct z-ording on iOS, without success.
My question is which tips, suggestions or checks can I do to make z-ordering working properly on iOS also. Thanks.
Normally it should "just work", there is no special treatment. I think horizon paints in an area we rely on and doesn't paint when we expect it to. Looking at their sample code I see that they reference top and bottom elements which might allow working around this.

UIScrollView Canvas Equivalent?

I'm currently putting together a PoC for the web. I've done about 9 years of iOS development so I think in those contexts/concepts. What I need to build is something similar to a UIScrollView/CATiledLayer for the web.
I need to build out a tool that allows users to build their own flowcharts, something I've already built on iOS. I'm prototyping on the web and I'm not sure where to get started. I've played around with a few canvas libraries thus far.
I want to build something that can have a fixed viewport with other components rendered off-screen. The viewport has fixed bounds that you can expand and allows me to put subcomponents in the view and move them around if I'd like to.
My web/javascript experience is pretty much Ember, React and plain old ES5/ES6. My HTML skills aren't that strong and I think I may have missed something fundamental.
My goal is to have something that can work with an existing react stack my company uses. I'm happy to roll my own solution but would love to get advice about the right direction to pursue. I feel like I have almost nil domain knowledge in this area.
This JS library, Dracula should be of great help to you since you're working with drag and drop flowcharts. You can see a working example here. NOTE: This lib is based on SVG and doesn't use canvas.
Here's another beautiful live demo: Source code for JS Flowchart here
Also take a look at this Dragon drop fiddle
And regarding ScrollView in HTML, you can simply use divs with css styles overflow-y: scroll and/or overflow-x: scroll. Using flex layouts, apart from giving you mobile-like development feel, will help you have so much control over your layouts based on the screen size.
Hope this should get you started.

React-native transform view to fullscreen

I'm trying to do this animation (the pesto bruschetta)
I have a listView with a couple of cards with a specific width/height. and I need to make one fullScreen with additionnal information when I click on it (so with the onPress).
I'm using : react-native: 0.30.0 and react-native-router-flux: 3.33.0 for the routing between Scene/Activity
Anyone whould have an idea of how to do the fullscreen transformation?
Specifically to react-native-router-flux or not. I have tried using LayoutAnimation from react-native, but nothing was working (and the only exmaple i found online wasn't compiling)
read code for react-native-lightbox.

Off canvas with Foundation4

I have been working on Foundation 4 framework.I just want to know whether off canvas layout system is required for this version or not. As per my knowledge its not required because they have added mobile support with 'Mobile First' theme.
Please correct if i am wrong.
Thanks,
Srinivas
Off Canvas Layouts is not required for Foundation 4 because it was written for version 3. But while it was written for V3 it can work with F4. I know, and not only by opinion, but as a matter of fact, as I have played with it already and have a proto using F4 with off canvas layout specifically with the sliding panel similar to this.
For better UI in small devices Off Canvas Layout is awesome. Like if You hit a button and a panel slides in from the left (or depending on how you look at it, the main panel slides out of the way). You should really use it. And Of course, if you have downloaded the latest release from github repo or via website it is already come with Zurb Foundation 4.

Resources