Author: kmorin Date: 2014-02-04 19:31:27 +0100 (Tue, 04 Feb 2014) New Revision: 46 Url: http://forge.codelutin.com/projects/wlo/repository/revisions/46 Log: fixes #4186 Les lignes du tableau des nombres par taille ne prennent pas tout la largeur Added: trunk/res/values/colors.xml Modified: trunk/res/layout/main.xml trunk/res/layout/measurement.xml trunk/res/layout/measurement_table_fragment.xml trunk/res/layout/measurement_table_row.xml trunk/res/values-fr/strings.xml trunk/res/values/strings.xml trunk/src/fr/ifremer/wlo/measurement/LogsFragment.java trunk/src/fr/ifremer/wlo/measurement/TableAdapter.java trunk/src/fr/ifremer/wlo/utils/BaseModelArrayAdapter.java Modified: trunk/res/layout/main.xml =================================================================== --- trunk/res/layout/main.xml 2014-02-04 14:27:37 UTC (rev 45) +++ trunk/res/layout/main.xml 2014-02-04 18:31:27 UTC (rev 46) @@ -5,6 +5,11 @@ android:layout_width="match_parent" android:layout_height="match_parent"> + <ImageView android:layout_width="match_parent" + android:layout_height="wrap_content" + android:src="@drawable/wlo_ico" + android:layout_weight="1"/> + <TextView style="@style/MainTitle" android:text="@string/app_name" android:layout_weight="1"/> Modified: trunk/res/layout/measurement.xml =================================================================== --- trunk/res/layout/measurement.xml 2014-02-04 14:27:37 UTC (rev 45) +++ trunk/res/layout/measurement.xml 2014-02-04 18:31:27 UTC (rev 46) @@ -163,6 +163,6 @@ android:layout_height="match_parent" android:layout_gravity="start" android:choiceMode="singleChoice" - android:background="@android:color/holo_blue_dark"/> + android:background="@color/dark_gray"/> </android.support.v4.widget.DrawerLayout> \ No newline at end of file Modified: trunk/res/layout/measurement_table_fragment.xml =================================================================== --- trunk/res/layout/measurement_table_fragment.xml 2014-02-04 14:27:37 UTC (rev 45) +++ trunk/res/layout/measurement_table_fragment.xml 2014-02-04 18:31:27 UTC (rev 46) @@ -1,12 +1,11 @@ <?xml version="1.0" encoding="utf-8"?> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:orientation="vertical" - android:layout_width="match_parent" - android:layout_height="match_parent"> +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent"> <ListView android:id="@+id/table_content" - android:layout_width="wrap_content" + android:layout_width="match_parent" android:layout_height="match_parent"/> -</LinearLayout> \ No newline at end of file +</FrameLayout> \ No newline at end of file Modified: trunk/res/layout/measurement_table_row.xml =================================================================== --- trunk/res/layout/measurement_table_row.xml 2014-02-04 14:27:37 UTC (rev 45) +++ trunk/res/layout/measurement_table_row.xml 2014-02-04 18:31:27 UTC (rev 46) @@ -10,19 +10,23 @@ android:layout_height="wrap_content" android:layout_weight="1" android:textAppearance="?android:attr/textAppearanceListItemSmall" - android:gravity="center_vertical" - android:paddingLeft="?android:attr/listPreferredItemPaddingLeft" - android:paddingRight="?android:attr/listPreferredItemPaddingRight" + android:gravity="center_vertical|right" + android:paddingLeft="20dp" + android:paddingRight="20dp" android:minHeight="?android:attr/listPreferredItemHeightSmall"/> + <View android:layout_height="match_parent" + android:layout_width="2px" + android:background="@color/dark_gray"/> + <TextView android:id="@+id/table_nb" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:textAppearance="?android:attr/textAppearanceListItemSmall" - android:gravity="center_vertical" - android:paddingLeft="?android:attr/listPreferredItemPaddingLeft" - android:paddingRight="?android:attr/listPreferredItemPaddingRight" + android:gravity="center_vertical|right" + android:paddingLeft="20dp" + android:paddingRight="20dp" android:minHeight="?android:attr/listPreferredItemHeightSmall"/> </LinearLayout> \ No newline at end of file Added: trunk/res/values/colors.xml =================================================================== --- trunk/res/values/colors.xml (rev 0) +++ trunk/res/values/colors.xml 2014-02-04 18:31:27 UTC (rev 46) @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <color name="gray">#404040</color> + <color name="dark_gray">#202020</color> +</resources> \ No newline at end of file Modified: trunk/res/values/strings.xml =================================================================== --- trunk/res/values/strings.xml 2014-02-04 14:27:37 UTC (rev 45) +++ trunk/res/values/strings.xml 2014-02-04 18:31:27 UTC (rev 46) @@ -15,8 +15,9 @@ --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="app_name">WLO</string> + <string name="app_name">Wild Life Observations</string> + <!-- Common --> <string name="yes">Yes</string> <string name="no">No</string> Modified: trunk/res/values-fr/strings.xml =================================================================== --- trunk/res/values-fr/strings.xml 2014-02-04 14:27:37 UTC (rev 45) +++ trunk/res/values-fr/strings.xml 2014-02-04 18:31:27 UTC (rev 46) @@ -15,7 +15,6 @@ --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="app_name">WLO</string> <!-- Common --> <string name="yes">Oui</string> Modified: trunk/src/fr/ifremer/wlo/measurement/LogsFragment.java =================================================================== --- trunk/src/fr/ifremer/wlo/measurement/LogsFragment.java 2014-02-04 14:27:37 UTC (rev 45) +++ trunk/src/fr/ifremer/wlo/measurement/LogsFragment.java 2014-02-04 18:31:27 UTC (rev 46) @@ -97,7 +97,20 @@ result += StringUtils.join(cats, " - "); return result; } - }); + }) { + @Override + public View getView(int position, View convertView, ViewGroup parent) { + View result = super.getView(position, convertView, parent); + int color; + if (position % 2 == 0) { + color = R.color.dark_gray; + } else { + color = android.R.color.black; + } + result.setBackgroundResource(color); + return result; + } + }; dialogBuilder = new AlertDialog.Builder(activity) .setTitle(R.string.input_deletion_confirmation_title) Modified: trunk/src/fr/ifremer/wlo/measurement/TableAdapter.java =================================================================== --- trunk/src/fr/ifremer/wlo/measurement/TableAdapter.java 2014-02-04 14:27:37 UTC (rev 45) +++ trunk/src/fr/ifremer/wlo/measurement/TableAdapter.java 2014-02-04 18:31:27 UTC (rev 46) @@ -3,8 +3,8 @@ /* * #%L * WLO - * $Id:$ - * $HeadURL:$ + * $Id$ + * $HeadURL$ * %% * Copyright (C) 2013 - 2014 Ifremer * %% @@ -28,6 +28,8 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.view.ViewParent; +import android.widget.AbsListView; import android.widget.BaseAdapter; import android.widget.TextView; import fr.ifremer.wlo.R; @@ -79,8 +81,7 @@ if (convertView == null) { convertView = LayoutInflater.from(context) - .inflate(R.layout.measurement_table_row, parent, false); -// convertView.setLayoutParams(new AbsListView.LayoutParams(AbsListView.LayoutParams.MATCH_PARENT, AbsListView.LayoutParams.WRAP_CONTENT)); + .inflate(R.layout.measurement_table_row, null); viewHolder = new ViewHolder(); viewHolder.sizeText = (TextView) convertView.findViewById(R.id.table_size); @@ -97,7 +98,7 @@ int color; if (position % 2 == 0) { - color = android.R.color.holo_blue_dark; + color = R.color.gray; } else { color = android.R.color.black; } Modified: trunk/src/fr/ifremer/wlo/utils/BaseModelArrayAdapter.java =================================================================== --- trunk/src/fr/ifremer/wlo/utils/BaseModelArrayAdapter.java 2014-02-04 14:27:37 UTC (rev 45) +++ trunk/src/fr/ifremer/wlo/utils/BaseModelArrayAdapter.java 2014-02-04 18:31:27 UTC (rev 46) @@ -155,7 +155,7 @@ TextView text; if (convertView == null) { - view = mInflater.inflate(resource, parent, false); + view = mInflater.inflate(resource, null); } else { view = convertView; }