autofocus

CameraSource .setAutoFocusEnabled(true) returns: Camera auto focus is not supported on this device although device supports auto focus

雨燕双飞 提交于 2019-12-19 04:13:22
问题 Below is my barcode scanner activity, everything works fine except for the setAutoFocusEnabled(true). It returns a message on runtime that says my device does not support auto focus although the Samsung Tab E T561 is an auto focus enabled device. import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.util.SparseArray; import android.view.SurfaceHolder; import android.view.SurfaceView; import android.view.View; import android.widget

is it autofocus=“autofocus” or autofocus?

社会主义新天地 提交于 2019-12-18 11:14:29
问题 I seem to recall most (maybe all) attributes in previously versions of HTML (before HTML5) required attributes to have values, like readonly="readonly" . Is this true for HTML5 and the autofocus attribute? 回答1: In HTML, you use boolean attributes with or without values as you like. A boolean, for W3C, like autofocus can be written like that autofocus or autofocus="autofocus" or also autofocus="" . If you don't want autofocus just don't write it. I think you are confused because XHTML requires

autofocus doesn't work when used with ng-include

左心房为你撑大大i 提交于 2019-12-13 15:43:07
问题 I want to set focus to one of the input box in partial view like . and including this by This is working fine when page loads for the first time. but when I change the partials autofocus doesn't work . I believe it is because of autofocus work on pageload how can it make work here 回答1: I am not sure how to fix the problem of page reload but I think we can work out another solution here. I wrote a small directive once to conditionally set focus on an input element. Here is the code: function

Prevent user from installing my app if capability not met

烂漫一生 提交于 2019-12-13 15:17:45
问题 I working on an app and its primary need is auto focus camera. How can I prevent users to install this app if they don't have an auto focus camera? 回答1: well if you really want to prevent users from installing your app if they don't have a autofocus camera then you can add "UIRequiredDeviceCapabilities" key in your info.plist file and can add "auto-focus-camera" value to it. for more info you can visit my blog entry - http://www.makebetterthings.com/blogs/iphone/how-to-prevent-apps-to-being

How to add HTML5 auto focus to a rails form?

流过昼夜 提交于 2019-12-12 12:06:25
问题 I have a text field = text_field_tag('search_text_1', params[:search_text], options = {:type => 'search'} ) which generates <input id="search_text" name="search_text_1" type="search"> that I want to add HTML5 autofocus to, as in = text_field_tag('search_text_1', params[:search_text], options = {:type => 'search', :autofocus => true} ) This generates <input autofocus="autofocus" id="search_text" name="search_text_1" type="search"> which does actually work, but how I can I get the actual HTML

Angular2 recursive component - set input autofocus

戏子无情 提交于 2019-12-11 17:51:19
问题 I'm creating a tree view similar to workflowy (for practice mostly), and this simple version is working but I can't figure out how to set the input focus when a new component is added. I've tried adding the autofocus property on the input and using ViewChild to set focus after ngAfterViewInit. It seems to work when adding the first component but not thereafter. Here is a stackblitz to show where i'm at: https://stackblitz.com/edit/angular-input-autofocus 回答1: the easer way to "autofocus" in a

Automatically passing focus betwen EditText

瘦欲@ 提交于 2019-12-11 05:39:04
问题 Since my question asking about separating characters that are typed in an EditText into groups or blocks didn't receive much attention, I've come here with another question on an alternative way to accomplish what I need. So, my idea is to have four EditText that have 4 char length. Now what I want is to change the focus as the user type, from an EdutText to another when the limit is reached. Example: Let's say we have EditText A, B, C, D; the first to gain focus is EditText A, then when the

android camera focal length nd focal distances do not change

别说谁变了你拦得住时间么 提交于 2019-12-10 23:57:06
问题 I am trying to detect a value that changes when the camera auto focuses, i expected the focal length and focal distances to change. I have ran my app with FOCUS_MODE_CONTINUOUS_PICTURE. the auto focus works, i called getFocalLength() every second to see the changes in values, i always got 4.6, no matter how much i move the camera. I also tried getFocusDistances() , it returns infinity for all 3 outputs all the time. the values these functions return should change when the focus changes, but

Android FOCUS_MODE_CONTINUOUS_VIDEO and capturing preview frames

别来无恙 提交于 2019-12-10 10:59:49
问题 I'm developing an image recognition app and would like the camera to focus automatically all the time. The folks at ZXing have solved this problem by calling autofocus() every few seconds, but on some cameras this doesn't focus smoothly, but zips to one end and refocuses. On my Alcatel 995, gingerbread 2.3.3 API level 10 phone, it actually makes an alarming click every time this happens. This phone doesn't support FOCUS_MODE_CONTINUOUS_PICTURE. I tried using FOCUS_MODE_CONTINUOUS_VIDEO, which

Distance to “point of interest” in iphone auto focus

我的梦境 提交于 2019-12-09 12:09:31
问题 In iphone, I want to calculate the distance from the camera to the subject. I was wondering maybe iphone camera's "Active Auto Focus" provide me the distance to the subject (point of interest)?? many thanks in advance. p.s. guys if you think it is not possible plz let me know ;) 回答1: As far as I'm aware, it's not possible - see here for more info on what you can and can't do. You can tell when the camera is autofocusing, but nothing more. I'm sure there is probably some more info you can get