Recently I came to know about this trend called Neumorphism. Its normally used in android and webisite but I to achieve same in effect in UWP in Windows App. This effect requires 2 shadows light and dark in opposite directions to make object look like its merged with background. UWP dont have shadow effect so I used Drop Shadow Panel from "Microsoft.Toolkit.Uwp.UI.Controls" nuget package but it dosent look like its natural.
Can anyone please tell me what would be more better way to achieve this ?
Related
all!
Is there any way to build custom camera component in codename one?
I googled and got about PeerComponents, however don't know how to use it.
I just would like to use it as Label component with 2 buttons (Taking picture button and retaking picture button)
Kindly provide some small sample code for me. Best regards.
[UPDATE]
I need this because of following reason.
First of all, I need square Image taken by camera, and user should be able to know how the picture will be taken.
2 resolutions here:
First, if I have to use full screen camera, it will be better to draw or overlay square rectangle on camera view so that user can know which area will be taken.
Second, if overlaying and drawing is difficult (or should use native code for that), I need some custom components for camera area such like PeerComponent. So I would like to place it anywhere of screen area as square rectangle. Then, users won't need any overlay or drawing something on it because it is already square.
That's all what I need.
Regards.
Yes, it's certainly possible to create a component like this, and we do intend to create one at some point in the future. You can beat us to the punch.
First, you should familiarize yourself with how native interfaces work. This video is a good start:
https://www.codenameone.com/how-do-i---access-native-device-functionality-invoke-native-interfaces.html
This series of blog posts demonstrates how to wrap 3rd party SDKs into codename one on Android and iOS.
https://www.codenameone.com/blog/integrating-3rd-party-native-sdks-part-1.html
https://www.codenameone.com/blog/integrating-3rd-party-native-sdks-part-2.html
https://www.codenameone.com/blog/integrating-3rd-party-native-sdks-part-3.html
Although it doesn't include an example with PeerComponent, it is helpful for getting a grasp on the process. Adding peer components into the mix is really just a matter of returning the corresponding "View" type from a native interface. On Android, that is an android.view.View, on iOS it is a UIView, in Javascript it is an DOM element, in UWP it is a FrameworkElement, and in the simulator, it is a javax.swing.JComponent.
This blog post does include an example of a peer component, but it is targeting UWP:
https://www.codenameone.com/blog/uwp-native-interfaces-mix-c-java.html
Once you have a grasp of the material, you should look at relevant examples. Currently the most complete example I'm aware of of a cn1lib that implements a native peer is the Google Maps lib:
https://github.com/codenameone/codenameone-google-maps
You can see the Android native implementation here, and the iOS native implementation here
You may want to refer to the existing code for image capture in Codename One as well.
Android: https://github.com/codenameone/CodenameOne/blob/master/Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java#L5788-L5811
https://github.com/codenameone/CodenameOne/blob/master/Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java#L5701-L5714
Though it uses intent to open the native capture dialog, so it may not be too relevant.
IOS: https://github.com/codenameone/CodenameOne/blob/master/Ports/iOSPort/nativeSources/IOSNative.m#L2879-L2927
I need to make a picker like this in the picture below:
What you see is a TimePicker and I took it just to give you an example. I would like to have one with about 200 numbers on the left and 100 on the right (for example). How can I do it in a Xamarin.Forms PCL project?
The first problem you'll face is that the picker control you see here is a native iOS control. The Xamarin.Forms TimePicker is basically not a physical control in itself but it translates to a native control on each platform. That's why it will look different on Android and UWP devices because they provide their own picker controls, as seen in the picture below.
Now, if you're ok with the controls looking different, you could use custom renderers to modify each native control or even replace them to provide the functionality you need. I thought I'd outline the basic steps for you to get you started:
Create a new Xamarin.Forms control called CustomPicker or something.
Create custom renderers for each platform.
On iOS, you can use the UIPickerView and specify numberOfComponents, numberOfRows and the data source.
On Android, you might want to use a 3rd party control since by default, there are no scrolling picker controls like the one on iOS. WheelPicker looks promising.
On UWP, you might be able to work something out using the PickerFlyoutBase. I have limited knowledge on the platform but you should be able to find something quite easily.
As you can see, it's going to be quite an effort to get the scroll picker working on each platform.
Edit: You could also look into native embedding, which lets you embed native controls into Xamarin.Forms app's pages.
Native Embedding
Embedding native controls into Xamarin.Forms
We've developed a two-column picker for Xamarin.Forms (Android and iOS).
Sample:
https://github.com/HorusSoftwareUY/MaterialDesignControlsPlugin#materialdoublepicker
Screenshots:
Android
iOS
We added this control to MaterialDesignControls NuGet (https://www.nuget.org/packages/Plugin.MaterialDesignControls/), where you can find other interesting controls with the material design look and feel.
Contributions are welcome!
I am developing application for Windows Phone 8.1.
I have developed live tile for my app. I am trying to find a way to configure live tile change animation. By default I see kind of Flip animation. It looks a little annoying. I do want to change it.
So, how to configure live tile change animation?
You can't change it, which in my eyes is the best choice for a consistent user experience and performance of the start screen.
I'm following this guide to create some animations to my app and thought about writing a very light not distracting animation to my tab bar. I've searched apple guidelines but didn't saw anything against it, yet, I don't think I've ever seen an app doing something similar. Is that because it's not allowed or is there another reason I'm missing?
Any one knows an app that does something similar?
I'm using a simple slide in/out effect for the tab bar in my App.
No problems in the review.
The code I'm using is at https://stackoverflow.com/a/5272497/725594
I designed a web app for iPhone and am now trying my hands at a native Objective-C version, and I'd like to retain some continuity with my original design. Since my web version uses CSS, I was able to customize the color palette, even though the UI was designed to imitate a native iPhone UI. I'd like to use a similar color scheme for my native app, but it doesn't seem so easy out of the box. I've gone through a couple tutorials and played around a bit with Interface Builder, inspecting the individual settings available for each control. My biggest questions are:
Is it possible to (or how do I) change the color of a Round Rect Button?
Is it possible to (or how do I) change the color of cells in a Table View?
Where in the Cocoa Touch Library can I find the standard iOS UI buttons, e.g. the green "Call Back" and red "Delete" buttons in the native voice mail?
Thanks
Nope, I don't think so. And you probably shouldn't anyways. In my opinion it's better to rather stay consistent with the OS and not the web... What you can do is to use a custom image.
UITableViewCell has a property named backgroundView, which is only present if you have a grouped style. This view has -- just like every other view -- a background color. If you don't have this and want to color individual cells, build a custom cell where you put in a view as background view.
As far as I know, they are not publicly available. However, you may find a lot of template images etc on the web that you can use.