r71 - in trunk: res/layout src/fr/ifremer/wlo
Author: kmorin Date: 2014-03-11 11:48:25 +0100 (Tue, 11 Mar 2014) New Revision: 71 Url: http://forge.codelutin.com/projects/wlo/repository/revisions/71 Log: fixes #4681 [ESPECES COMMERCIALES] Dans la liste, afficher les cat?\195?\169gorie de tri, ?\195?\169tat et pr?\195?\169sentation Added: trunk/res/layout/commercial_species_list_item.xml Modified: trunk/res/layout/location_list_item.xml trunk/src/fr/ifremer/wlo/CommercialSpeciesActivity.java Copied: trunk/res/layout/commercial_species_list_item.xml (from rev 69, trunk/res/layout/location_list_item.xml) =================================================================== --- trunk/res/layout/commercial_species_list_item.xml (rev 0) +++ trunk/res/layout/commercial_species_list_item.xml 2014-03-11 10:48:25 UTC (rev 71) @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="utf-8"?> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <LinearLayout android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal"> + + <TextView android:id="@+id/commercial_species_fao_code" + android:text="@string/undefined" + android:textSize="20sp" + android:layout_marginLeft="5dp" + android:layout_width="wrap_content" + android:layout_height="wrap_content"/> + + </LinearLayout> + + <LinearLayout android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal"> + + <TextView android:id="@+id/commercial_species_sort_category" + android:text="@string/undefined" + android:textSize="16sp" + android:layout_marginLeft="5dp" + android:layout_width="wrap_content" + android:layout_height="wrap_content"/> + + <TextView android:text="-" + android:textSize="16sp" + android:layout_marginLeft="5dp" + android:layout_width="wrap_content" + android:layout_height="wrap_content"/> + + <TextView android:id="@+id/commercial_species_state" + android:text="@string/undefined" + android:textSize="16sp" + android:layout_marginLeft="5dp" + android:layout_width="wrap_content" + android:layout_height="wrap_content"/> + + <TextView android:text="-" + android:textSize="16sp" + android:layout_marginLeft="5dp" + android:layout_width="wrap_content" + android:layout_height="wrap_content"/> + + <TextView android:id="@+id/commercial_species_presentation" + android:text="@string/undefined" + android:textSize="16sp" + android:layout_marginLeft="5dp" + android:layout_width="wrap_content" + android:layout_height="wrap_content"/> + + </LinearLayout> + +</LinearLayout> Modified: trunk/res/layout/location_list_item.xml =================================================================== --- trunk/res/layout/location_list_item.xml 2014-03-11 10:30:07 UTC (rev 70) +++ trunk/res/layout/location_list_item.xml 2014-03-11 10:48:25 UTC (rev 71) @@ -11,7 +11,7 @@ <TextView android:id="@+id/location_location" android:text="@string/undefined" - android:textSize="16sp" + android:textSize="20sp" android:layout_marginLeft="5dp" android:layout_width="wrap_content" android:layout_height="wrap_content"/> Modified: trunk/src/fr/ifremer/wlo/CommercialSpeciesActivity.java =================================================================== --- trunk/src/fr/ifremer/wlo/CommercialSpeciesActivity.java 2014-03-11 10:30:07 UTC (rev 70) +++ trunk/src/fr/ifremer/wlo/CommercialSpeciesActivity.java 2014-03-11 10:48:25 UTC (rev 71) @@ -28,6 +28,7 @@ import android.support.v4.widget.SimpleCursorAdapter; import com.google.common.collect.Maps; import fr.ifremer.wlo.models.CommercialSpeciesModel; +import fr.ifremer.wlo.models.referentials.CommercialSpecies; import fr.ifremer.wlo.utils.WloItemListViewBinder; import java.util.Map; @@ -44,9 +45,19 @@ @Override protected SimpleCursorAdapter createAdapter() { - return new SimpleCursorAdapter(this, android.R.layout.simple_list_item_1, null, - new String[] { CommercialSpeciesModel.COLUMN_FAO_CODE }, - new int[] { android.R.id.text1 }, 0); + return new SimpleCursorAdapter(this, R.layout.commercial_species_list_item, null, + new String[] { + CommercialSpeciesModel.COLUMN_FAO_CODE, + CommercialSpeciesModel.COLUMN_SORT_CATEGORY, + CommercialSpeciesModel.COLUMN_STATE, + CommercialSpeciesModel.COLUMN_PRESENTATION + }, + new int[] { + R.id.commercial_species_fao_code, + R.id.commercial_species_sort_category, + R.id.commercial_species_state, + R.id.commercial_species_presentation + }, 0); } @Override @@ -84,9 +95,8 @@ protected SimpleCursorAdapter.ViewBinder getAdapterBinder() { Map<Integer, WloItemListViewBinder.DataType> types = Maps.newHashMap(); types.put(1, WloItemListViewBinder.DataType.COMMERCIAL_SPECIES); - types.put(2, WloItemListViewBinder.DataType.MENSURATION); - types.put(3, WloItemListViewBinder.DataType.STATE); - types.put(4, WloItemListViewBinder.DataType.PRESENTATION); + types.put(6, WloItemListViewBinder.DataType.STATE); + types.put(7, WloItemListViewBinder.DataType.PRESENTATION); return new WloItemListViewBinder(this, types); } } \ No newline at end of file
participants (1)
-
kmorin@users.forge.codelutin.com