codenameone

Codenameone Capture Photo Upside down

扶醉桌前 提交于 2019-12-08 08:21:19
问题 using the Capture class to take photos using the front facing camera (Selfie Camera) on android, the photo comes out upside down. Is there any way we can detect that the front facing camera was used so we can rotate the image if needed? 回答1: Some cameras capture the image in the orientation of the camera sensor then mark it with a special rotation flag in EXIF to indicate that the image should be viewed in a different orientation. This is common in the back camera that always captures in

Codename One - Validate only one input at a time

て烟熏妆下的殇ゞ 提交于 2019-12-08 08:17:54
问题 A problem of the Validator class is that it validates all the inputs to which a constraint is added (that means that an error message is shown in not already filled inputs or selected pickers): Validator val = new Validator(); val.addConstraint(title, new LengthConstraint(2)); val.addConstraint(price, new NumericConstraint(true)); In this example, the validator will show an error for both title and price even if the user didn't entered a price yet. It would be more intuitive that an error is

Codename One: User interface layout on simulator and a real Android device are complete different

你。 提交于 2019-12-08 08:17:07
问题 Well, it is the first time I tested my app on a real Android device. The user interface layout is shockingly different from the simulator. Please see images: The code are the same and nothing had been modified. Android version is 5.1.1. The code to display the screen is: private final void show() { loginSignupForm = new Form(null, new BorderLayout()); Tabs loginSignupTabs = new Tabs(); Image splashScreenImage = theme.getImage("Starlent_logo25x25.png"); ((Label) loginSignupForm.getToolbar()

Why is Codename One on iOS recording audio as CAF?

杀马特。学长 韩版系。学妹 提交于 2019-12-08 08:16:42
问题 My question is related to this other SO question. I am trying to record audio in iOS via Capture.captureAudio() . It outputs an audio file that can be read on the computer but neither on iOS (iPhone 4S) nor on Android. ffmpeg -i yields : Input #0, caf, from 'myFile.m4a': Duration: 00:00:07.04, start: 0.000000, bitrate: 37 kb/s Stream #0:0: Audio: aac (aac / 0x20636161), 16000 Hz, mono, s16, 23 kb/s If I record a file with iOS via Voice Recorder app I get from ffmpeg : Input #0, mov,mp4,m4a

Codenameone - when cursor is focused on Text field with keyboard is on, will distort the screen

好久不见. 提交于 2019-12-08 08:12:49
问题 When entering data in text field on IOS in portrait mode with keyboard on, if device is flipped to landscape mode this will distort the content in the form and screen will split vertically into two halves. This will make the content display distorted fashion. If the screen is flipped when not entering data in text field will will work without any issues.Please advise. 来源: https://stackoverflow.com/questions/50263036/codenameone-when-cursor-is-focused-on-text-field-with-keyboard-is-on-will-dis

html video control is not working in codenameone app for android

五迷三道 提交于 2019-12-08 07:58:03
问题 I've a codenameone app that calls a secure website developed in html5. It uses html video control to take a snapshot. The site works in chrome perfectly. But when I call it from codenameone app, installed on Android device, the video control does not appear on the page. The required camera permissions are set in the App. The log is as below: LOGS....--------- beginning of main 09-07 15:43:39.586 23032 23085 I Adreno : QUALCOMM build : 84c9b58, I4fcced3c6d 09-07 15:43:39.586 23032 23085 I

codename one. How to share a link to your app.

久未见 提交于 2019-12-08 07:54:53
问题 What I want to achieve here is similar to what most apps do, specifically like Youtube. If I share a video on youtube the user gets a link to the video. When the link is clicked the user is automatically taken to the video in the Youtube app (if the user has the app). I want that sort of functionality. My app has different stores on it and information about the store. I want the user to be able to "Share" a store via Whatsapp, sms etc so then when the receiver clicks on the shared link they

Codename One - Transition from FormA to FormB to FormC

馋奶兔 提交于 2019-12-08 07:54:39
问题 The following code works as expected on the Codename One simulator, that is: show first Form (startForm) fade to the second Form (emptyForm) for two seconds fade to the third Form for one second (loginForm) So the transition duration should be three seconds in total. But on real devices the third Form is shown almost immediately. What's wrong in my code? // Transition from startForm to loginForm startForm.show(); startForm.setTransitionOutAnimator(CommonTransitions.createFade(2000));

Do you provide a screen reader api for visually impaired person in codename one?

徘徊边缘 提交于 2019-12-08 07:37:36
问题 In my app I want more facility of screen reader app that is useful to visually impared person means they heard button click and document. so their is any api provided that which helpful to make app more flexible? 回答1: It's called accessibility and it should be mostly "seamless" for application developers. We have an RFE for integrating that and it's technically very doable. Unfortunately it's not trivial so we didn't accomplish it in the 3.8 timeframe and I'm not sure about the 4.0 timeframe

Resources and Codename One

喜欢而已 提交于 2019-12-08 07:35:19
问题 I am using Codename One and I want to insert a lot of html pages in my app and then load them in a WebView. I want to insert html files in resources. How can I insert files in resources, maybe by using GUI builder data? What is the code to load the html files in WebView? 回答1: There are several ways to do this. If you can package every individual file into a single file you can use something like this: put the test.html in default package create WebBrowser webBrowser = new WebBrowser(); and