diff --git a/res/layout-land/incall.xml b/res/layout-land/incall.xml index 30402fe3d..f0a7704fe 100644 --- a/res/layout-land/incall.xml +++ b/res/layout-land/incall.xml @@ -31,6 +31,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" + android:adjustViewBounds="true" android:contentDescription="@string/content_description_switch_camera" android:layout_marginTop="40dp" android:src="@drawable/switch_camera" @@ -175,6 +176,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" + android:adjustViewBounds="true" android:contentDescription="@string/content_description_pause" android:scaleType="fitXY" android:src="@drawable/pause_off" /> @@ -185,6 +187,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" + android:adjustViewBounds="true" android:contentDescription="@string/content_description_conference" android:scaleType="fitXY" android:src="@drawable/conference" /> @@ -216,6 +219,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" + android:adjustViewBounds="true" android:contentDescription="@string/content_description_hang_up" android:scaleType="fitXY" android:src="@drawable/hangup" /> @@ -247,6 +251,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" + android:adjustViewBounds="true" android:contentDescription="@string/content_description_numpad" android:scaleType="fitXY" android:src="@drawable/dialer_alt" /> diff --git a/res/layout/incall.xml b/res/layout/incall.xml index 895ed6b9b..b988e95f1 100644 --- a/res/layout/incall.xml +++ b/res/layout/incall.xml @@ -31,6 +31,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" + android:adjustViewBounds="true" android:contentDescription="@string/content_description_switch_camera" android:layout_marginTop="40dp" android:visibility="invisible" @@ -191,6 +192,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" + android:adjustViewBounds="true" android:contentDescription="@string/content_description_pause" android:scaleType="fitXY" android:src="@drawable/pause_off" /> @@ -201,6 +203,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" + android:adjustViewBounds="true" android:contentDescription="@string/content_description_conference" android:scaleType="fitXY" android:src="@drawable/conference" /> @@ -210,6 +213,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" + android:adjustViewBounds="true" android:contentDescription="@string/content_description_hang_up" android:scaleType="fitXY" android:src="@drawable/hangup" /> @@ -219,6 +223,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" + android:adjustViewBounds="true" android:contentDescription="@string/content_description_numpad" android:scaleType="fitXY" android:src="@drawable/dialer_alt" /> diff --git a/src/org/linphone/InCallActivity.java b/src/org/linphone/InCallActivity.java index 7fec1f382..42b4ac538 100644 --- a/src/org/linphone/InCallActivity.java +++ b/src/org/linphone/InCallActivity.java @@ -124,6 +124,9 @@ public class InCallActivity extends FragmentActivity implements if (savedInstanceState != null) { // Fragment already created, no need to create it again (else it will generate a memory leak with duplicated fragments) + isSpeakerEnabled = savedInstanceState.getBoolean("Speaker"); + isMicMuted = savedInstanceState.getBoolean("Mic"); + refreshInCallActions(); return; } @@ -145,6 +148,14 @@ public class InCallActivity extends FragmentActivity implements } } + @Override + protected void onSaveInstanceState(Bundle outState) { + outState.putBoolean("Speaker", isSpeakerEnabled); + outState.putBoolean("Mic", isMicMuted); + + super.onSaveInstanceState(outState); + } + private void initUI() { video = (TextView) findViewById(R.id.video); video.setOnClickListener(this);