Skip to content
Snippets Groups Projects
Commit c2bd7b69 authored by Alexandre Lision's avatar Alexandre Lision
Browse files

* #30787: adjustements in history

parent d60b929e
Branches
Tags
No related merge requests found
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="center" android:layout_gravity="center"
android:gravity="center" android:gravity="center"
android:text="@string/no_history" android:text="@string/hist_no_history"
android:textSize="30sp" /> android:textSize="30sp" />
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -40,6 +40,7 @@ as that of the covered work. ...@@ -40,6 +40,7 @@ as that of the covered work.
android:id="@+id/photo" android:id="@+id/photo"
android:layout_width="70dp" android:layout_width="70dp"
android:layout_height="70dp" android:layout_height="70dp"
android:layout_centerVertical="true"
android:scaleType="centerCrop" /> android:scaleType="centerCrop" />
<TextView <TextView
...@@ -47,10 +48,10 @@ as that of the covered work. ...@@ -47,10 +48,10 @@ as that of the covered work.
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentTop="true" android:layout_alignParentTop="true"
android:layout_toRightOf="@+id/photo"
android:singleLine="true"
android:layout_toLeftOf="@+id/action_call" android:layout_toLeftOf="@+id/action_call"
android:layout_toRightOf="@+id/photo"
android:paddingLeft="@dimen/padding_small" android:paddingLeft="@dimen/padding_small"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceMedium" /> android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView <TextView
...@@ -71,16 +72,12 @@ as that of the covered work. ...@@ -71,16 +72,12 @@ as that of the covered work.
android:paddingLeft="@dimen/padding_small" android:paddingLeft="@dimen/padding_small"
android:textAppearance="?android:attr/textAppearanceSmall" /> android:textAppearance="?android:attr/textAppearanceSmall" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/duration"
android:layout_toRightOf="@+id/photo" >
<TextView <TextView
android:id="@+id/incomings" android:id="@+id/incomings"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignLeft="@+id/duration"
android:layout_below="@+id/duration"
android:paddingLeft="@dimen/padding_small" android:paddingLeft="@dimen/padding_small"
android:textAppearance="?android:attr/textAppearanceSmall" /> android:textAppearance="?android:attr/textAppearanceSmall" />
...@@ -88,6 +85,8 @@ as that of the covered work. ...@@ -88,6 +85,8 @@ as that of the covered work.
android:id="@+id/outgoings" android:id="@+id/outgoings"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignLeft="@+id/duration"
android:layout_below="@+id/incomings"
android:paddingLeft="@dimen/padding_small" android:paddingLeft="@dimen/padding_small"
android:textAppearance="?android:attr/textAppearanceSmall" /> android:textAppearance="?android:attr/textAppearanceSmall" />
...@@ -95,6 +94,8 @@ as that of the covered work. ...@@ -95,6 +94,8 @@ as that of the covered work.
android:id="@+id/missed" android:id="@+id/missed"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignLeft="@+id/duration"
android:layout_below="@+id/outgoings"
android:paddingLeft="@dimen/padding_small" android:paddingLeft="@dimen/padding_small"
android:textAppearance="?android:attr/textAppearanceSmall" /> android:textAppearance="?android:attr/textAppearanceSmall" />
...@@ -102,11 +103,13 @@ as that of the covered work. ...@@ -102,11 +103,13 @@ as that of the covered work.
android:id="@+id/replay" android:id="@+id/replay"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="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:paddingLeft="@dimen/padding_small"
android:text="@string/replay_button" android:text="@string/hist_replay_button"
android:textAppearance="?android:attr/textAppearanceSmall" android:textAppearance="?android:attr/textAppearanceSmall"
android:visibility="gone" /> android:visibility="gone" />
</LinearLayout>
<ImageButton <ImageButton
android:id="@+id/action_call" android:id="@+id/action_call"
......
...@@ -64,12 +64,16 @@ as that of the covered work. ...@@ -64,12 +64,16 @@ as that of the covered work.
<string name="menu_item_settings_interface">Interface</string> <string name="menu_item_settings_interface">Interface</string>
<!-- Dialing Fragment --> <!-- 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> <string name="dial_hint">Entrez un numéro</string>
<!-- History Fragment --> <!-- History Fragment -->
<string name="replay_button">Écouter</string> <string name="hist_replay_button">Écouter</string>
<string name="no_history">Pas d\'historique</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 --> <!-- Home Fragment -->
<string name="home_conferences_title">Conférences</string> <string name="home_conferences_title">Conférences</string>
......
...@@ -64,12 +64,16 @@ as that of the covered work. ...@@ -64,12 +64,16 @@ as that of the covered work.
<string name="menu_item_settings_interface">Interface</string> <string name="menu_item_settings_interface">Interface</string>
<!-- Dialing Fragmennt --> <!-- 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> <string name="dial_hint">Type phone number</string>
<!-- History Fragment --> <!-- History Fragment -->
<string name="replay_button">Replay</string> <string name="hist_replay_button">Replay</string>
<string name="no_history">No history</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 --> <!-- Home Fragment -->
<string name="home_conferences_title">Conferences</string> <string name="home_conferences_title">Conferences</string>
......
...@@ -125,7 +125,7 @@ public class DialingFragment extends Fragment implements OnTouchListener { ...@@ -125,7 +125,7 @@ public class DialingFragment extends Fragment implements OnTouchListener {
String to = textField.getText().toString(); String to = textField.getText().toString();
if (to.contentEquals("")) { if (to.contentEquals("")) {
textField.setError(getString(R.string.error_no_number_dialed)); textField.setError(getString(R.string.dial_error_no_number_dialed));
} else { } else {
mCallbacks.onCallDialed(to); mCallbacks.onCallDialed(to);
} }
......
...@@ -218,9 +218,10 @@ public class HistoryFragment extends ListFragment implements LoaderCallbacks<Arr ...@@ -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())); 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.missed.setText(getString(R.string.hist_missed_calls, dataset.get(pos).getMissed_sum()));
entryView.outgoing.setText("Out:" + dataset.get(pos).getOutgoing_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) { if (dataset.get(pos).getCalls().lastEntry().getValue().getRecordPath().length() > 0) {
entryView.replay.setVisibility(View.VISIBLE); entryView.replay.setVisibility(View.VISIBLE);
...@@ -233,11 +234,11 @@ public class HistoryFragment extends ListFragment implements LoaderCallbacks<Arr ...@@ -233,11 +234,11 @@ public class HistoryFragment extends ListFragment implements LoaderCallbacks<Arr
if ((Boolean) v.getTag(R.id.replay)) { if ((Boolean) v.getTag(R.id.replay)) {
mCallbacks.getService().startRecordedFilePlayback(dataset.get(pos).getCalls().lastEntry().getValue().getRecordPath()); mCallbacks.getService().startRecordedFilePlayback(dataset.get(pos).getCalls().lastEntry().getValue().getRecordPath());
v.setTag(R.id.replay, false); v.setTag(R.id.replay, false);
((Button)v).setText("Stop"); ((Button)v).setText(getString(R.string.hist_replay_button_stop));
} else { } else {
mCallbacks.getService().stopRecordedFilePlayback(dataset.get(pos).getCalls().lastEntry().getValue().getRecordPath()); mCallbacks.getService().stopRecordedFilePlayback(dataset.get(pos).getCalls().lastEntry().getValue().getRecordPath());
v.setTag(R.id.replay, true); v.setTag(R.id.replay, true);
((Button)v).setText("Replay"); ((Button)v).setText(getString(R.string.hist_replay_button));
} }
} catch (RemoteException e) { } catch (RemoteException e) {
// TODO Auto-generated catch block // TODO Auto-generated catch block
...@@ -247,7 +248,7 @@ public class HistoryFragment extends ListFragment implements LoaderCallbacks<Arr ...@@ -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()); entryView.duration.setText(dataset.get(pos).getTotalDuration());
return rowView; return rowView;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment