r49 - in trunk: res/layout res/values res/values-fr res/xml src/fr/ifremer/wlo src/fr/ifremer/wlo/measurement src/fr/ifremer/wlo/models src/fr/ifremer/wlo/storage src/fr/ifremer/wlo/utils
Author: kmorin Date: 2014-02-17 14:32:31 +0100 (Mon, 17 Feb 2014) New Revision: 49 Url: http://forge.codelutin.com/projects/wlo/repository/revisions/49 Log: refs #4264 Recevoir les mesures de l'ichtyom?\195?\168tre fixes #4192 [SAISIE] ?\195?\137cran des poids [niveau 5 ?\195?\160 7] Added: trunk/res/layout/vertical_separator.xml Modified: trunk/res/layout/weights.xml trunk/res/values-fr/strings.xml trunk/res/values/strings.xml trunk/res/xml/preferences.xml trunk/src/fr/ifremer/wlo/WeightsActivity.java trunk/src/fr/ifremer/wlo/measurement/MeasurementActivity.java trunk/src/fr/ifremer/wlo/models/CategoryWeightModel.java trunk/src/fr/ifremer/wlo/models/ScientificSpeciesModel.java trunk/src/fr/ifremer/wlo/storage/WloSqlOpenHelper.java trunk/src/fr/ifremer/wlo/utils/WloAutoCompleteTextView.java Added: trunk/res/layout/vertical_separator.xml =================================================================== --- trunk/res/layout/vertical_separator.xml (rev 0) +++ trunk/res/layout/vertical_separator.xml 2014-02-17 13:32:31 UTC (rev 49) @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8"?> + +<View xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="2dip" + android:layout_marginTop="5dip" + android:layout_marginBottom="5dip" + android:background="@android:color/darker_gray"/> \ No newline at end of file Modified: trunk/res/layout/weights.xml =================================================================== --- trunk/res/layout/weights.xml 2014-02-14 14:49:07 UTC (rev 48) +++ trunk/res/layout/weights.xml 2014-02-17 13:32:31 UTC (rev 49) @@ -10,19 +10,11 @@ android:layout_weight="1" android:fillViewport="true"> - <LinearLayout android:orientation="vertical" + <LinearLayout android:id="@+id/container" + android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content"> - <TextView android:text="@string/commercial_species_total_unloaded_weight" - android:layout_width="match_parent" - android:layout_height="wrap_content"/> - - <EditText android:id="@+id/total_unloaded_weight" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:inputType="numberDecimal"/> - </LinearLayout> </ScrollView> Modified: trunk/res/values/strings.xml =================================================================== --- trunk/res/values/strings.xml 2014-02-14 14:49:07 UTC (rev 48) +++ trunk/res/values/strings.xml 2014-02-17 13:32:31 UTC (rev 49) @@ -171,6 +171,8 @@ <!-- Weights --> <string name="weights_title">Weights</string> <string name="commercial_species_total_unloaded_weight">Total unloaded weight</string> + <string name="scientific_species_sample_weight">Sample weight</string> + <string name="scientific_species_categories">Weights per category</string> <!--File chooser--> <string name="file_chooser_location">Location</string> Modified: trunk/res/values-fr/strings.xml =================================================================== --- trunk/res/values-fr/strings.xml 2014-02-14 14:49:07 UTC (rev 48) +++ trunk/res/values-fr/strings.xml 2014-02-17 13:32:31 UTC (rev 49) @@ -164,6 +164,8 @@ <!-- Weights --> <string name="weights_title">Poids</string> <string name="commercial_species_total_unloaded_weight">Poids total débarqué</string> + <string name="scientific_species_sample_weight">Poids d\'échantillon</string> + <string name="scientific_species_categories">Poids par catégorie</string> <!--File chooser--> <string name="file_chooser_location">Emplacement</string> Modified: trunk/res/xml/preferences.xml =================================================================== --- trunk/res/xml/preferences.xml 2014-02-14 14:49:07 UTC (rev 48) +++ trunk/res/xml/preferences.xml 2014-02-17 13:32:31 UTC (rev 49) @@ -16,7 +16,7 @@ android:title="@string/preferences_weight_unit" android:entries="@array/preferences_weight_unit_entries" android:entryValues="@array/preferences_weight_unit_values" - android:defaultValue="0"/> + android:defaultValue="1"/> <ListPreference android:key="preferences_date_format" android:title="@string/preferences_date_format" Modified: trunk/src/fr/ifremer/wlo/WeightsActivity.java =================================================================== --- trunk/src/fr/ifremer/wlo/WeightsActivity.java 2014-02-14 14:49:07 UTC (rev 48) +++ trunk/src/fr/ifremer/wlo/WeightsActivity.java 2014-02-17 13:32:31 UTC (rev 49) @@ -1,19 +1,31 @@ package fr.ifremer.wlo; import android.content.Intent; +import android.content.SharedPreferences; +import android.database.Cursor; +import android.graphics.Typeface; import android.os.Bundle; +import android.preference.PreferenceManager; +import android.text.InputType; +import android.text.TextWatcher; import android.util.Log; import android.view.View; import android.widget.EditText; -import com.google.common.collect.Multimap; -import fr.ifremer.wlo.models.BaseModel; +import android.widget.LinearLayout; +import android.widget.TextView; +import com.google.common.base.Function; +import fr.ifremer.wlo.models.CategoryWeightModel; import fr.ifremer.wlo.models.CommercialSpeciesModel; +import fr.ifremer.wlo.models.ScientificSpeciesModel; +import fr.ifremer.wlo.preferences.ListItemPreference; +import fr.ifremer.wlo.preferences.StringPreference; +import fr.ifremer.wlo.storage.DataCache; import fr.ifremer.wlo.storage.WloSqlOpenHelper; import fr.ifremer.wlo.utils.BaseTextWatcher; import org.apache.commons.lang3.StringUtils; -import java.lang.reflect.InvocationTargetException; -import java.util.Collection; +import java.util.ArrayList; +import java.util.List; /** * @author Kevin Morin (Code Lutin) @@ -25,32 +37,131 @@ public static final String INTENT_COMMERCIAL_SPECIES = "commercialSpecies"; + protected LinearLayout container; + protected CommercialSpeciesModel commercialSpeciesModel; + protected List<ScientificSpeciesModel> scientficSpeciesModels; + + protected List<CategoryWeightModel> categoryWeightModels = new ArrayList<>(); + + protected int weightUnit; + + protected String weightUnitLabel; + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + container = (LinearLayout) findViewById(R.id.container); + + SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this); + String weightUnitString = sharedPref.getString(ListItemPreference.WEIGHT_UNIT.getKey(), "1"); + weightUnit = Integer.parseInt(weightUnitString); + switch (weightUnit) { + case 1000: + weightUnitLabel = "kg"; + break; + default: + weightUnitLabel = "g"; + break; + } + commercialSpeciesModel = (CommercialSpeciesModel) getIntent().getSerializableExtra(INTENT_COMMERCIAL_SPECIES); getSupportActionBar().setSubtitle(commercialSpeciesModel.toString(this)); - final EditText totalUnloadedWeightText = (EditText) findViewById(R.id.total_unloaded_weight); - Log.d(TAG, "TotalUnloadedWeight " + commercialSpeciesModel.getTotalUnloadedWeight()); - totalUnloadedWeightText.setText(String.valueOf(commercialSpeciesModel.getTotalUnloadedWeight())); - totalUnloadedWeightText.addTextChangedListener(new BaseTextWatcher() { + // create total unloaded weight label + createWeightLabel(getString(R.string.commercial_species_total_unloaded_weight)); + + // create total unloaded weight field + createEditText(commercialSpeciesModel.getTotalUnloadedWeight(), new Function<Integer, Void>() { @Override - public void onTextChanged(CharSequence s, int start, int before, int count) { - Integer newValue = null; - Log.d(TAG, "onTextChanged " + s); - if (StringUtils.isNotEmpty(s)) { - newValue = Integer.parseInt(s.toString()); - } - Log.d(TAG, "TotalUnloadedWeight " + newValue); - commercialSpeciesModel.setTotalUnloadedWeight(newValue); - totalUnloadedWeightText.setSelection(start + count); + public Void apply(Integer input) { + commercialSpeciesModel.setTotalUnloadedWeight(input); + return null; } + }); + // get all scientific species + WloSqlOpenHelper woh = new WloSqlOpenHelper(this); + Cursor allScientificSpeciesCursor = woh.getAllScientificSpecies(commercialSpeciesModel.getId()); + scientficSpeciesModels = WloSqlOpenHelper.transformCursorIntoCollection(allScientificSpeciesCursor, + new Function<Cursor, ScientificSpeciesModel>() { + @Override + public ScientificSpeciesModel apply(Cursor input) { + ScientificSpeciesModel scientificSpeciesModel = + new ScientificSpeciesModel(WeightsActivity.this, input); + scientificSpeciesModel.setParent(commercialSpeciesModel); + return scientificSpeciesModel; + } }); + + for (final ScientificSpeciesModel scientificSpecies : scientficSpeciesModels) { + + // add separator + getLayoutInflater().inflate(R.layout.vertical_separator, container); + + // add label + TextView labelView = new TextView(this); + labelView.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD)); + labelView.setTextAppearance(this, android.R.style.TextAppearance_Large); + labelView.setText(scientificSpecies.toString(this)); + container.addView(labelView); + + // add label + createWeightLabel(getString(R.string.scientific_species_sample_weight)); + + // create the sample weight field + createEditText(scientificSpecies.getSampleWeight(), new Function<Integer, Void>() { + @Override + public Void apply(Integer input) { + scientificSpecies.setSampleWeight(input); + return null; + } + }); + + // weight per category + TextView weightByCategoryView = new TextView(this); + weightByCategoryView.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD)); + weightByCategoryView.setTextAppearance(this, android.R.style.TextAppearance_Medium); + weightByCategoryView.setText(R.string.scientific_species_categories); + container.addView(weightByCategoryView); + + // get all the category weights + Cursor categoryWeighs = woh.getAllCategoryWeigths(scientificSpecies.getId()); + categoryWeightModels = WloSqlOpenHelper.transformCursorIntoCollection(categoryWeighs, + new Function<Cursor, CategoryWeightModel>() { + @Override + public CategoryWeightModel apply(Cursor input) { + CategoryWeightModel result = new CategoryWeightModel(input); + result.setParent(scientificSpecies); + return result; + } + }); + + for (final CategoryWeightModel categoryWeightModel : categoryWeightModels) { + + // create the weight field + String category1Id = categoryWeightModel.getCategory1(); + String category2Id = categoryWeightModel.getCategory2(); + String category3Id = categoryWeightModel.getCategory3(); + String label = (category1Id != null ? DataCache.getGenderById(this, category1Id).getLabel() : "NA") + ", " + + (category2Id != null ? DataCache.getMaturityById(this, category2Id).getLabel() : "NA") + ", " + + (category3Id != null ? DataCache.getAgeById(this, category3Id).getLabel() : "NA"); + + // add label + createWeightLabel(label); + + createEditText(categoryWeightModel.getWeight(), new Function<Integer, Void>() { + @Override + public Void apply(Integer input) { + categoryWeightModel.setWeight(input); + return null; + } + }); + } + } + woh.close(); } @Override @@ -63,6 +174,13 @@ return ScientificSpeciesActivity.class; } + @Override + public Intent getSupportParentActivityIntent() { + Intent intent = super.getSupportParentActivityIntent(); + intent.putExtra(ScientificSpeciesActivity.INTENT_EXTRA_PARENT_MODEL, commercialSpeciesModel); + return intent; + } + public void validate(View view) { saveModel(); finish(); @@ -70,9 +188,56 @@ /* Protected methods */ + protected TextView createWeightLabel(String label) { + TextView textView = new TextView(this); + textView.setText(label + " (" + weightUnitLabel + ")"); + container.addView(textView); + return textView; + } + + protected TextWatcher getTextWatcher(final EditText editText, final Function<Integer, Void> setWeightFunction) { + return new BaseTextWatcher() { + @Override + public void onTextChanged(CharSequence s, int start, int before, int count) { + Integer newValue = null; + if (StringUtils.isNotEmpty(s)) { + newValue = Integer.parseInt(s.toString()); + } + setWeightFunction.apply(newValue); + editText.setSelection(start + count); + } + }; + } + + protected EditText createEditText(Integer value, Function<Integer, Void> setWeightFunction) { + final EditText editText = new EditText(this); + + int inputType = InputType.TYPE_CLASS_NUMBER; + String textValue; + + if (weightUnit > 1) { + inputType |= InputType.TYPE_NUMBER_FLAG_DECIMAL; + } + + if (weightUnit > 1 && value != null) { + float floatValue = (float) value / weightUnit; + textValue = String.format("%.3f", floatValue); + + } else { + textValue = String.valueOf(value); + } + editText.setInputType(inputType); + editText.setText(textValue); + editText.addTextChangedListener(getTextWatcher(editText, setWeightFunction)); + container.addView(editText); + + return editText; + } + protected void saveModel() { WloSqlOpenHelper woh = new WloSqlOpenHelper(this); - Log.d(TAG, "TotalUnloadedWeight " + commercialSpeciesModel.getTotalUnloadedWeight()); + woh.saveData(categoryWeightModels); + woh.saveData(scientficSpeciesModels); woh.saveData(commercialSpeciesModel); woh.close(); } Modified: trunk/src/fr/ifremer/wlo/measurement/MeasurementActivity.java =================================================================== --- trunk/src/fr/ifremer/wlo/measurement/MeasurementActivity.java 2014-02-14 14:49:07 UTC (rev 48) +++ trunk/src/fr/ifremer/wlo/measurement/MeasurementActivity.java 2014-02-17 13:32:31 UTC (rev 49) @@ -35,6 +35,7 @@ import android.os.Message; import android.os.Messenger; import android.os.Vibrator; +import android.speech.tts.TextToSpeech; import android.support.v4.app.ActionBarDrawerToggle; import android.support.v4.widget.DrawerLayout; import android.text.Editable; @@ -63,25 +64,20 @@ import fr.ifremer.wlo.VesselFormActivity; import fr.ifremer.wlo.WloBaseActivity; import fr.ifremer.wlo.WloModelEditionActivity; -import fr.ifremer.wlo.models.referentials.Age; -import fr.ifremer.wlo.models.referentials.Maturity; +import fr.ifremer.wlo.models.CategoryWeightModel; import fr.ifremer.wlo.models.referentials.Mensuration; import fr.ifremer.wlo.storage.DataCache; import fr.ifremer.wlo.models.BaseModel; import fr.ifremer.wlo.models.CommercialSpeciesModel; -import fr.ifremer.wlo.models.LocationModel; import fr.ifremer.wlo.models.MeasurementModel; import fr.ifremer.wlo.models.MeasurementsModel; import fr.ifremer.wlo.models.MetierModel; import fr.ifremer.wlo.models.ScientificSpeciesModel; import fr.ifremer.wlo.models.VesselModel; -import fr.ifremer.wlo.models.referentials.Gender; import fr.ifremer.wlo.storage.WloSqlOpenHelper; -import fr.ifremer.wlo.utils.BaseModelArrayAdapter; import fr.ifremer.wlo.utils.BaseTextWatcher; import fr.ifremer.wlo.utils.BigFinFeedReaderRecord; import fr.ifremer.wlo.utils.UIUtils; -import org.apache.commons.lang3.ObjectUtils; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; @@ -95,7 +91,7 @@ * @author kmorin <kmorin@codelutin.com> * @since 0.1 */ -public class MeasurementActivity extends WloBaseActivity implements AdapterView.OnItemSelectedListener { +public class MeasurementActivity extends WloBaseActivity implements AdapterView.OnItemSelectedListener, TextToSpeech.OnInitListener { private static final String TAG = "MeasurementActivity"; @@ -106,6 +102,8 @@ protected static final String TABLE_TAB = "table"; protected static final String LOGS_TAB = "logs"; + protected static final int CHECK_TTS_REQUEST_CODE = 42; + protected WloSqlOpenHelper soh = new WloSqlOpenHelper(this); protected TabHost tabs; @@ -124,6 +122,9 @@ protected ListView mDrawerList; + protected TextToSpeech textToSpeech; + protected boolean useTextToSpeech = false; + @Override protected Integer getContentView() { return R.layout.measurement; @@ -289,22 +290,33 @@ BigFinFeedReaderRecord record = (BigFinFeedReaderRecord) msg.obj; if (record != null && record.getLength() != null) { - final ToneGenerator tg = new ToneGenerator(AudioManager.STREAM_NOTIFICATION, ToneGenerator.MAX_VOLUME); - tg.startTone(ToneGenerator.TONE_PROP_BEEP); + int size = Math.round(record.getLength()); + measurement.setSize(size); + MeasurementModel savedMeasurement = addMeasurement(); + + if (useTextToSpeech) { + String formattedSize = UIUtils.getFormattedSize(savedMeasurement.getSize(), measurements.getPrecision()); + textToSpeech.speak(formattedSize, TextToSpeech.QUEUE_ADD, null); + + } else { + ToneGenerator tg = new ToneGenerator(AudioManager.STREAM_NOTIFICATION, ToneGenerator.MAX_VOLUME); + tg.startTone(ToneGenerator.TONE_PROP_BEEP); + } + // Get instance of Vibrator from current Context Vibrator v = (Vibrator) getSystemService(VIBRATOR_SERVICE); // Vibrate for 300 milliseconds v.vibrate(300); - - int size = Math.round(record.getLength()); - measurement.setSize(size); - addMeasurement(null); } break; } } }); + + Intent checkIntent = new Intent(); + checkIntent.setAction(TextToSpeech.Engine.ACTION_CHECK_TTS_DATA); + startActivityForResult(checkIntent, CHECK_TTS_REQUEST_CODE); } @Override @@ -317,7 +329,15 @@ @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); - if (resultCode == RESULT_OK) { + + if (requestCode == CHECK_TTS_REQUEST_CODE && resultCode == TextToSpeech.Engine.CHECK_VOICE_DATA_PASS) { + // Succès, au moins un moteur de TTS à été trouvé, on l'instancie + textToSpeech = new TextToSpeech(this, this); + if (textToSpeech.isLanguageAvailable(Locale.FRANCE) == TextToSpeech.LANG_COUNTRY_AVAILABLE) { + textToSpeech.setLanguage(Locale.FRANCE); + } + + } else if (resultCode == RESULT_OK) { switch (requestCode) { case 1: vessel = (VesselModel) data.getSerializableExtra(WloModelEditionActivity.INTENT_EXTRA_MODEL); @@ -359,6 +379,7 @@ protected void onDestroy() { super.onDestroy(); soh.close(); + textToSpeech.shutdown(); } @Override @@ -398,6 +419,11 @@ } } + @Override + public void onInit(int status) { + useTextToSpeech = status == TextToSpeech.SUCCESS; + } + /* Public methods */ public void incSize(View source) { @@ -409,20 +435,40 @@ } public void addMeasurement(View source) { + addMeasurement(); + } + + /* Protected methods */ + + protected MeasurementModel addMeasurement() { measurement.setDate(Calendar.getInstance()); measurement.roundSize(measurements.getPrecision()); - soh.saveData(measurement); - measurements.addMeasurement(measurement); Integer size = measurement.getSize(); String cat1 = measurement.getCategory1(); String cat2 = measurement.getCategory2(); String cat3 = measurement.getCategory3(); + + Cursor categoryWeightModelCursor = soh.getCategoryWeight(scientificSpecies.getId(), cat1, cat2, cat3); + if (categoryWeightModelCursor.getCount() == 0) { + CategoryWeightModel categoryWeightModel = new CategoryWeightModel(); + categoryWeightModel.setCategory1(cat1); + categoryWeightModel.setCategory2(cat2); + categoryWeightModel.setCategory3(cat3); + categoryWeightModel.setParent(scientificSpecies); + soh.saveData(categoryWeightModel); + } + + soh.saveData(measurement); + measurements.addMeasurement(measurement); + + MeasurementModel result = measurement; + initFishMeasurement(size, cat1, cat2, cat3); + + return result; } - /* Protected methods */ - protected void initFishMeasurement(Integer size, String cat1, String cat2, String cat3) { measurement = new MeasurementModel(); measurement.addPropertyChangeListener(new PropertyChangeListener() { Modified: trunk/src/fr/ifremer/wlo/models/CategoryWeightModel.java =================================================================== --- trunk/src/fr/ifremer/wlo/models/CategoryWeightModel.java 2014-02-14 14:49:07 UTC (rev 48) +++ trunk/src/fr/ifremer/wlo/models/CategoryWeightModel.java 2014-02-17 13:32:31 UTC (rev 49) @@ -36,7 +36,7 @@ protected String category1; protected String category2; protected String category3; - protected int weight; + protected Integer weight; public CategoryWeightModel() { } @@ -78,11 +78,11 @@ firePropertyChange(COLUMN_CATEGORY_3, oldValue, category3); } - public int getWeight() { + public Integer getWeight() { return weight; } - public void setWeight(int weight) { + public void setWeight(Integer weight) { Object oldValue = this.weight; this.weight = weight; firePropertyChange(COLUMN_WEIGHT, oldValue, weight); Modified: trunk/src/fr/ifremer/wlo/models/ScientificSpeciesModel.java =================================================================== --- trunk/src/fr/ifremer/wlo/models/ScientificSpeciesModel.java 2014-02-14 14:49:07 UTC (rev 48) +++ trunk/src/fr/ifremer/wlo/models/ScientificSpeciesModel.java 2014-02-17 13:32:31 UTC (rev 49) @@ -58,7 +58,7 @@ protected ScientificSpecies name; protected boolean takingActivation; protected String comment; - protected int sampleWeight; + protected Integer sampleWeight; public ScientificSpeciesModel() { } @@ -102,11 +102,11 @@ firePropertyChange(COLUMN_COMMENT, oldValue, comment); } - public int getSampleWeight() { + public Integer getSampleWeight() { return sampleWeight; } - public void setSampleWeight(int sampleWeight) { + public void setSampleWeight(Integer sampleWeight) { Object oldValue = this.sampleWeight; this.sampleWeight = sampleWeight; firePropertyChange(COLUMN_SAMPLE_WEIGHT, oldValue, sampleWeight); Modified: trunk/src/fr/ifremer/wlo/storage/WloSqlOpenHelper.java =================================================================== --- trunk/src/fr/ifremer/wlo/storage/WloSqlOpenHelper.java 2014-02-14 14:49:07 UTC (rev 48) +++ trunk/src/fr/ifremer/wlo/storage/WloSqlOpenHelper.java 2014-02-17 13:32:31 UTC (rev 49) @@ -67,7 +67,7 @@ private static final String TAG = "WloOpenHelper"; public static final String DATABASE_NAME = "wlo.db"; - public static final int DATABASE_VERSION = 15; + public static final int DATABASE_VERSION = 16; public static final String TEXT_TYPE = " TEXT"; public static final String BIGINT_TYPE = " BIGINT"; @@ -532,6 +532,22 @@ return cursor; } + public Cursor getCategoryWeight(String scientificSpeciesId, String category1Id, + String category2Id, String category3Id) { + SQLiteDatabase db = getReadableDatabase(); + String cat1Condition = category1Id == null ? " IS NULL" : " = '" + category1Id + "'"; + String cat2Condition = category2Id == null ? " IS NULL" : " = '" + category2Id + "'"; + String cat3Condition = category3Id == null ? " IS NULL" : " = '" + category3Id + "'"; + Cursor cursor = db.query(CategoryWeightModel.TABLE_NAME, CategoryWeightModel.ALL_COLUMNS, + CategoryWeightModel.COLUMN_SCIENTIFIC_SPECIES_ID + " = ? AND " + + CategoryWeightModel.COLUMN_CATEGORY_1 + cat1Condition + " AND " + + CategoryWeightModel.COLUMN_CATEGORY_2 + cat2Condition + " AND " + + CategoryWeightModel.COLUMN_CATEGORY_3 + cat3Condition, + new String[]{ scientificSpeciesId }, + null, null, null); + return cursor; + } + // Referentials public Cursor getAllRefAges() { Modified: trunk/src/fr/ifremer/wlo/utils/WloAutoCompleteTextView.java =================================================================== --- trunk/src/fr/ifremer/wlo/utils/WloAutoCompleteTextView.java 2014-02-14 14:49:07 UTC (rev 48) +++ trunk/src/fr/ifremer/wlo/utils/WloAutoCompleteTextView.java 2014-02-17 13:32:31 UTC (rev 49) @@ -28,6 +28,7 @@ import android.util.AttributeSet; import android.util.Log; import android.view.View; +import android.view.inputmethod.EditorInfo; import android.widget.AdapterView; import android.widget.AutoCompleteTextView; @@ -80,6 +81,7 @@ } } }); + setImeOptions(EditorInfo.IME_FLAG_NO_EXTRACT_UI); } @Override
participants (1)
-
kmorin@users.forge.codelutin.com