mirror of
https://github.com/zxing/zxing.git
synced 2025-02-02 05:41:08 -08:00
Add option to disable front light
git-svn-id: https://zxing.googlecode.com/svn/trunk@1259 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
987865b83a
commit
fbd48c4c74
|
@ -89,6 +89,8 @@
|
|||
<string name="preferences_name">Nastavení</string>
|
||||
<string name="preferences_play_beep_title">Zvuky</string>
|
||||
<string name="preferences_vibrate_title">Vibrace</string>
|
||||
<string name="preferences_front_light_title">Přední světla</string>
|
||||
<string name="preferences_front_light_summary">Povolte přední světlo, pokud je k dispozici</string>
|
||||
<string name="preferences_result_title">Výsledek nastavení</string>
|
||||
<string name="preferences_custom_product_search_title">Vlastní vyhledávání URL.</string>
|
||||
<string name="preferences_custom_product_search_summary">Použít % jako zástupný symbol pro ID produktu</string>
|
||||
|
|
|
@ -89,6 +89,8 @@
|
|||
<string name="preferences_name">Einstellungen</string>
|
||||
<string name="preferences_play_beep_title">Ton</string>
|
||||
<string name="preferences_vibrate_title">Vibration</string>
|
||||
<string name="preferences_front_light_title">Vor Licht</string>
|
||||
<string name="preferences_front_light_summary">Aktivieren Sie vor Licht, wenn verfügbar</string>
|
||||
<string name="preferences_result_title">Ergebnis-Einstellungen</string>
|
||||
<string name="preferences_custom_product_search_title">Eigene Such-URL</string>
|
||||
<string name="preferences_custom_product_search_summary">Verwenden Sie %s als Platzhalter für die Produkt-ID</string>
|
||||
|
|
|
@ -89,6 +89,8 @@
|
|||
<string name="preferences_name">Configuración</string>
|
||||
<string name="preferences_play_beep_title">Bip</string>
|
||||
<string name="preferences_vibrate_title">Vibrar</string>
|
||||
<string name="preferences_front_light_title">Luz delantera</string>
|
||||
<string name="preferences_front_light_summary">Activar luz delantera si está disponible</string>
|
||||
<string name="preferences_result_title">Configuración de resultados</string>
|
||||
<string name="preferences_custom_product_search_title">Búsqueda de productos con URL personalizada</string>
|
||||
<string name="preferences_custom_product_search_summary">Usar %s como un marcador de posición para el identificador de producto</string>
|
||||
|
|
|
@ -89,6 +89,8 @@
|
|||
<string name="preferences_name">Asetukset</string>
|
||||
<string name="preferences_play_beep_title">Piip</string>
|
||||
<string name="preferences_vibrate_title">Värinä</string>
|
||||
<string name="preferences_front_light_title">Valo edessä</string>
|
||||
<string name="preferences_front_light_summary">Activoi valo edessä, jos käytettävissä</string>
|
||||
<string name="preferences_result_title">Tuloksien asetukset</string>
|
||||
<string name="preferences_custom_product_search_title">Mukautettu hakukone</string>
|
||||
<string name="preferences_custom_product_search_summary">Käytä %s paikkana tuotetunnukselle</string>
|
||||
|
|
|
@ -89,6 +89,8 @@
|
|||
<string name="preferences_name">Paramètres</string>
|
||||
<string name="preferences_play_beep_title">Bip</string>
|
||||
<string name="preferences_vibrate_title">Vibrer</string>
|
||||
<string name="preferences_front_light_title">Phare avant</string>
|
||||
<string name="preferences_front_light_summary">Activer phare avant si disponible</string>
|
||||
<string name="preferences_result_title">Paramètres de résultat</string>
|
||||
<string name="preferences_custom_product_search_title">URL personnalisée de recherche</string>
|
||||
<string name="preferences_custom_product_search_summary">Utiliser %s à la place de l\'identifiant du produit</string>
|
||||
|
|
|
@ -89,6 +89,8 @@
|
|||
<string name="preferences_name">Impostazioni</string>
|
||||
<string name="preferences_play_beep_title">Suona</string>
|
||||
<string name="preferences_vibrate_title">Vibra</string>
|
||||
<string name="preferences_front_light_title">Luce anteriore</string>
|
||||
<string name="preferences_front_light_summary">Consentire la luce anteriore, se disponibile</string>
|
||||
<string name="preferences_result_title">Impostazioni risultato</string>
|
||||
<string name="preferences_custom_product_search_title">URL ricerca prodotto personalizzata</string>
|
||||
<string name="preferences_custom_product_search_summary">Utilizza %s come segnaposto per l\'ID del prodotto</string>
|
||||
|
|
|
@ -89,6 +89,8 @@
|
|||
<string name="preferences_name">設定</string>
|
||||
<string name="preferences_play_beep_title">通知音</string>
|
||||
<string name="preferences_vibrate_title">バイブ</string>
|
||||
<string name="preferences_front_light_title">フロントライト</string>
|
||||
<string name="preferences_front_light_summary">有効にするフロントライト可能な場合</string>
|
||||
<string name="preferences_result_title">検索結果の設定</string>
|
||||
<string name="preferences_custom_product_search_title">カスタム商品サーチ URL</string>
|
||||
<string name="preferences_custom_product_search_summary">URL中の「%s」はスキャン結果に置換される</string>
|
||||
|
|
|
@ -89,6 +89,8 @@
|
|||
<string name="preferences_name">Instellingen</string>
|
||||
<string name="preferences_play_beep_title">Piepen</string>
|
||||
<string name="preferences_vibrate_title">Trillen</string>
|
||||
<string name="preferences_front_light_title">Voorzijde licht</string>
|
||||
<string name="preferences_front_light_summary">Inschakelen voorzijde licht, indien beschikbaar</string>
|
||||
<string name="preferences_result_title">Instellingen voor resultaat</string>
|
||||
<string name="preferences_custom_product_search_title">Zoek aangepaste URL</string>
|
||||
<string name="preferences_custom_product_search_summary">Gebruik %s voor de plaats van het product ID</string>
|
||||
|
|
|
@ -81,14 +81,16 @@
|
|||
<string name="msg_sbc_searching_book">Поиск книги\u2026</string>
|
||||
<string name="msg_share_explanation">Вы можете поделиться данными, сканировав штрих-код с вашего экрана другим телефоном.</string>
|
||||
<string name="msg_share_subject_line">Тут содержимое отсканированных Вами штрих-кодов</string>
|
||||
<string name="preferences_name">Настройки</string>
|
||||
<string name="preferences_general_title">Общие настройки</string>
|
||||
<string name="preferences_actions_title">Когда штрих-код найден\u2026</string>
|
||||
<string name="preferences_copy_to_clipboard_title">Копировать в буфер обмена</string>
|
||||
<string name="preferences_decode_1D_title">Распознавать линейные штрих-коды</string>
|
||||
<string name="preferences_decode_QR_title">Распознавать QR-коды</string>
|
||||
<string name="preferences_actions_title">Когда штрих-код найден\u2026</string>
|
||||
<string name="preferences_general_title">Общие настройки</string>
|
||||
<string name="preferences_name">Настройки</string>
|
||||
<string name="preferences_play_beep_title">Пищать</string>
|
||||
<string name="preferences_vibrate_title">Вибрировать</string>
|
||||
<string name="preferences_copy_to_clipboard_title">Копировать в буфер обмена</string>
|
||||
<string name="preferences_front_light_title">Передние омыватели</string>
|
||||
<string name="preferences_front_light_summary">Включите свет, если передние доступно</string>
|
||||
<string name="preferences_result_title">Настройки результата</string>
|
||||
<string name="preferences_custom_product_search_title">URL пользовательского поиска</string>
|
||||
<string name="preferences_custom_product_search_summary">%s будет заменён на ID товара</string>
|
||||
|
|
|
@ -89,6 +89,8 @@
|
|||
<string name="preferences_name">Inställningar</string>
|
||||
<string name="preferences_play_beep_title">Pip</string>
|
||||
<string name="preferences_vibrate_title">Vibrera</string>
|
||||
<string name="preferences_front_light_title">Ljuset framför</string>
|
||||
<string name="preferences_front_light_summary">Aktivera ljuset framför, om det finns</string>
|
||||
<string name="preferences_result_title">Resultatinställningar</string>
|
||||
<string name="preferences_custom_product_search_title">Anpassad sök-URL</string>
|
||||
<string name="preferences_custom_product_search_summary">Skriv %s där produktens ID ska placeras</string>
|
||||
|
|
|
@ -89,6 +89,8 @@
|
|||
<string name="preferences_name">设置</string>
|
||||
<string name="preferences_play_beep_title">提示音</string>
|
||||
<string name="preferences_vibrate_title">振动</string>
|
||||
<string name="preferences_front_light_title">前灯</string>
|
||||
<string name="preferences_front_light_summary">使前灯如果可用</string>
|
||||
<string name="preferences_result_title">结果设置</string>
|
||||
<string name="preferences_custom_product_search_title">自定义搜索网址</string>
|
||||
<string name="preferences_custom_product_search_summary">使用%s作为产品ID占位</string>
|
||||
|
|
|
@ -89,6 +89,8 @@
|
|||
<string name="preferences_name">設置</string>
|
||||
<string name="preferences_play_beep_title">提示音</string>
|
||||
<string name="preferences_vibrate_title">振動</string>
|
||||
<string name="preferences_front_light_title">前燈</string>
|
||||
<string name="preferences_front_light_summary">使前燈如果可用</string>
|
||||
<string name="preferences_result_title">結果設置</string>
|
||||
<string name="preferences_custom_product_search_title">自定義搜索網址</string>
|
||||
<string name="preferences_custom_product_search_summary">使用%s作為佔位符的產品ID</string>
|
||||
|
|
|
@ -89,6 +89,8 @@
|
|||
<string name="preferences_name">Settings</string>
|
||||
<string name="preferences_play_beep_title">Beep</string>
|
||||
<string name="preferences_vibrate_title">Vibrate</string>
|
||||
<string name="preferences_front_light_title">Front light</string>
|
||||
<string name="preferences_front_light_summary">Enable front light, if available</string>
|
||||
<string name="preferences_result_title">Result settings</string>
|
||||
<string name="preferences_custom_product_search_title">Custom search URL</string>
|
||||
<string name="preferences_custom_product_search_summary">Use %s as a placeholder for the product ID</string>
|
||||
|
|
|
@ -24,6 +24,11 @@
|
|||
android:key="preferences_decode_QR"
|
||||
android:defaultValue="true"
|
||||
android:title="@string/preferences_decode_QR_title"/>
|
||||
<CheckBoxPreference
|
||||
android:key="preferences_front_light"
|
||||
android:defaultValue="true"
|
||||
android:title="@string/preferences_front_light_title"
|
||||
android:summary="@string/preferences_front_light_summary"/>
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/preferences_actions_title">
|
||||
<CheckBoxPreference
|
||||
|
|
|
@ -19,6 +19,7 @@ package com.google.zxing.client.android;
|
|||
import com.google.zxing.ResultPoint;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.graphics.PixelFormat;
|
||||
import android.graphics.Point;
|
||||
import android.graphics.Rect;
|
||||
|
@ -26,6 +27,7 @@ import android.hardware.Camera;
|
|||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.util.Log;
|
||||
import android.view.Display;
|
||||
import android.view.SurfaceHolder;
|
||||
|
@ -157,7 +159,10 @@ final class CameraManager {
|
|||
}
|
||||
|
||||
setCameraParameters();
|
||||
FlashlightManager.enableFlashlight();
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
if (prefs.getBoolean(PreferencesActivity.KEY_FRONT_LIGHT, true)) {
|
||||
FlashlightManager.enableFlashlight();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ public final class PreferencesActivity extends PreferenceActivity
|
|||
static final String KEY_PLAY_BEEP = "preferences_play_beep";
|
||||
static final String KEY_VIBRATE = "preferences_vibrate";
|
||||
static final String KEY_COPY_TO_CLIPBOARD = "preferences_copy_to_clipboard";
|
||||
static final String KEY_FRONT_LIGHT = "preferences_front_light";
|
||||
|
||||
static final String KEY_HELP_VERSION_SHOWN = "preferences_help_version_shown";
|
||||
public static final String KEY_NOT_OUR_RESULTS_SHOWN = "preferences_not_out_results_shown";
|
||||
|
|
Loading…
Reference in a new issue