diff --git a/res/layout/frag_history.xml b/res/layout/frag_history.xml index d33694c80a1be3ef202ce2b4ae9cb17f9d0213f7..71b6a60200c688e60ce4cbbf7537f67b62877bd0 100644 --- a/res/layout/frag_history.xml +++ b/res/layout/frag_history.xml @@ -21,7 +21,7 @@ android:layout_height="match_parent" android:layout_gravity="center" android:gravity="center" - android:text="@string/no_history" + android:text="@string/hist_no_history" android:textSize="30sp" /> </LinearLayout> \ No newline at end of file diff --git a/res/layout/item_history.xml b/res/layout/item_history.xml index 12caefc11d0d4072eafb34f38948293a6c297c1f..12440ab400f3e66c10470660f1dcd885948af904 100644 --- a/res/layout/item_history.xml +++ b/res/layout/item_history.xml @@ -40,6 +40,7 @@ as that of the covered work. android:id="@+id/photo" android:layout_width="70dp" android:layout_height="70dp" + android:layout_centerVertical="true" android:scaleType="centerCrop" /> <TextView @@ -47,10 +48,10 @@ as that of the covered work. android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" - android:layout_toRightOf="@+id/photo" - android:singleLine="true" android:layout_toLeftOf="@+id/action_call" + android:layout_toRightOf="@+id/photo" android:paddingLeft="@dimen/padding_small" + android:singleLine="true" android:textAppearance="?android:attr/textAppearanceMedium" /> <TextView @@ -71,42 +72,44 @@ as that of the covered work. android:paddingLeft="@dimen/padding_small" android:textAppearance="?android:attr/textAppearanceSmall" /> - <LinearLayout + <TextView + android:id="@+id/incomings" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_alignLeft="@+id/duration" android:layout_below="@+id/duration" - android:layout_toRightOf="@+id/photo" > - - <TextView - android:id="@+id/incomings" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:paddingLeft="@dimen/padding_small" - android:textAppearance="?android:attr/textAppearanceSmall" /> + android:paddingLeft="@dimen/padding_small" + android:textAppearance="?android:attr/textAppearanceSmall" /> - <TextView - android:id="@+id/outgoings" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:paddingLeft="@dimen/padding_small" - android:textAppearance="?android:attr/textAppearanceSmall" /> + <TextView + android:id="@+id/outgoings" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignLeft="@+id/duration" + android:layout_below="@+id/incomings" + android:paddingLeft="@dimen/padding_small" + android:textAppearance="?android:attr/textAppearanceSmall" /> - <TextView - android:id="@+id/missed" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:paddingLeft="@dimen/padding_small" - android:textAppearance="?android:attr/textAppearanceSmall" /> + <TextView + android:id="@+id/missed" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignLeft="@+id/duration" + android:layout_below="@+id/outgoings" + android:paddingLeft="@dimen/padding_small" + android:textAppearance="?android:attr/textAppearanceSmall" /> - <Button - android:id="@+id/replay" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:paddingLeft="@dimen/padding_small" - android:text="@string/replay_button" - android:textAppearance="?android:attr/textAppearanceSmall" - android:visibility="gone" /> - </LinearLayout> + <Button + android:id="@+id/replay" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignBaseline="@+id/outgoings" + android:layout_margin="10dp" + android:layout_toRightOf="@+id/outgoings" + android:paddingLeft="@dimen/padding_small" + android:text="@string/hist_replay_button" + android:textAppearance="?android:attr/textAppearanceSmall" + android:visibility="gone" /> <ImageButton android:id="@+id/action_call" diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml index ec14928bd7944442203a7b1eb3b87ea2a87098f1..f3ce6b4b8bbedffc3500658349789cfa6e75bf45 100644 --- a/res/values-fr/strings.xml +++ b/res/values-fr/strings.xml @@ -64,12 +64,16 @@ as that of the covered work. <string name="menu_item_settings_interface">Interface</string> <!-- Dialing Fragment --> - <string name="error_no_number_dialed">Composez un numéro</string> + <string name="dial_error_no_number_dialed">Composez un numéro</string> <string name="dial_hint">Entrez un numéro</string> <!-- History Fragment --> - <string name="replay_button">Écouter</string> - <string name="no_history">Pas d\'historique</string> + <string name="hist_replay_button">Écouter</string> + <string name="hist_replay_button_stop">Stop</string> + <string name="hist_missed_calls">Manqué:%1$d</string> + <string name="hist_in_calls">Entrant:%1$d</string> + <string name="hist_out_calls">Sortant:%1$d</string> + <string name="hist_no_history">Pas d\'historique</string> <!-- Home Fragment --> <string name="home_conferences_title">Conférences</string> diff --git a/res/values/strings.xml b/res/values/strings.xml index f29589ec7568fd424d706e6299aeea4c36356de6..ba084bd2eb13cdc076c0291b9879ded37bfccd8c 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -64,12 +64,16 @@ as that of the covered work. <string name="menu_item_settings_interface">Interface</string> <!-- Dialing Fragmennt --> - <string name="error_no_number_dialed">Dial a number</string> + <string name="dial_error_no_number_dialed">Dial a number</string> <string name="dial_hint">Type phone number</string> <!-- History Fragment --> - <string name="replay_button">Replay</string> - <string name="no_history">No history</string> + <string name="hist_replay_button">Replay</string> + <string name="hist_replay_button_stop">Stop</string> + <string name="hist_no_history">No history</string> + <string name="hist_missed_calls">Missed:%1$d</string> + <string name="hist_in_calls">In:%1$d</string> + <string name="hist_out_calls">Out:%1$d</string> <!-- Home Fragment --> <string name="home_conferences_title">Conferences</string> diff --git a/src/com/savoirfairelinux/sflphone/fragments/DialingFragment.java b/src/com/savoirfairelinux/sflphone/fragments/DialingFragment.java index bc8506a8fc0c9082f9f991bd8712e6c8295d3737..a446a3a1cf768b352e550dd899f9616fa38593b1 100644 --- a/src/com/savoirfairelinux/sflphone/fragments/DialingFragment.java +++ b/src/com/savoirfairelinux/sflphone/fragments/DialingFragment.java @@ -125,7 +125,7 @@ public class DialingFragment extends Fragment implements OnTouchListener { String to = textField.getText().toString(); if (to.contentEquals("")) { - textField.setError(getString(R.string.error_no_number_dialed)); + textField.setError(getString(R.string.dial_error_no_number_dialed)); } else { mCallbacks.onCallDialed(to); } diff --git a/src/com/savoirfairelinux/sflphone/fragments/HistoryFragment.java b/src/com/savoirfairelinux/sflphone/fragments/HistoryFragment.java index 480b122999e37d3a2b812b238e60679c60a7a847..1b8b04ac7d133feeeaf250c5b64d84defd31239f 100644 --- a/src/com/savoirfairelinux/sflphone/fragments/HistoryFragment.java +++ b/src/com/savoirfairelinux/sflphone/fragments/HistoryFragment.java @@ -218,9 +218,10 @@ public class HistoryFragment extends ListFragment implements LoaderCallbacks<Arr infos_fetcher.execute(new ContactPictureTask(mContext.getActivity(), entryView.photo, dataset.get(pos).getContact().getId())); - entryView.missed.setText("Missed:" + dataset.get(pos).getMissed_sum()); - entryView.incoming.setText("In:" + dataset.get(pos).getIncoming_sum()); - entryView.outgoing.setText("Out:" + dataset.get(pos).getOutgoing_sum()); + + entryView.missed.setText(getString(R.string.hist_missed_calls, dataset.get(pos).getMissed_sum())); + entryView.incoming.setText(getString(R.string.hist_in_calls, dataset.get(pos).getIncoming_sum())); + entryView.outgoing.setText(getString(R.string.hist_out_calls, dataset.get(pos).getOutgoing_sum())); if (dataset.get(pos).getCalls().lastEntry().getValue().getRecordPath().length() > 0) { entryView.replay.setVisibility(View.VISIBLE); @@ -233,11 +234,11 @@ public class HistoryFragment extends ListFragment implements LoaderCallbacks<Arr if ((Boolean) v.getTag(R.id.replay)) { mCallbacks.getService().startRecordedFilePlayback(dataset.get(pos).getCalls().lastEntry().getValue().getRecordPath()); v.setTag(R.id.replay, false); - ((Button)v).setText("Stop"); + ((Button)v).setText(getString(R.string.hist_replay_button_stop)); } else { mCallbacks.getService().stopRecordedFilePlayback(dataset.get(pos).getCalls().lastEntry().getValue().getRecordPath()); v.setTag(R.id.replay, true); - ((Button)v).setText("Replay"); + ((Button)v).setText(getString(R.string.hist_replay_button)); } } catch (RemoteException e) { // TODO Auto-generated catch block @@ -247,7 +248,7 @@ public class HistoryFragment extends ListFragment implements LoaderCallbacks<Arr }); } - entryView.date.setText(dataset.get(pos).getCalls().lastEntry().getValue().getDate("yyyy-MM-dd")); + entryView.date.setText(dataset.get(pos).getCalls().lastEntry().getValue().getDate("hh:mm dd/MM/yyyy")); entryView.duration.setText(dataset.get(pos).getTotalDuration()); return rowView;