Fix preview rotation issue + stretched menu height

This commit is contained in:
Sylvain Berfini 2012-08-07 11:57:15 +02:00
parent 9b7e4bfac9
commit b2694a1393
3 changed files with 20 additions and 12 deletions

View file

@ -42,7 +42,7 @@
<LinearLayout <LinearLayout
android:id="@+id/menu" android:id="@+id/menu"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="90dp" android:layout_height="wrap_content"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:orientation="horizontal" > android:orientation="horizontal" >
@ -55,6 +55,7 @@
android:id="@+id/history" android:id="@+id/history"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:contentDescription="@string/content_description_history" android:contentDescription="@string/content_description_history"
android:scaleType="fitXY" android:scaleType="fitXY"
android:src="@drawable/history" /> android:src="@drawable/history" />
@ -74,8 +75,9 @@
<ImageView <ImageView
android:id="@+id/contacts" android:id="@+id/contacts"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:layout_weight="0.2" android:layout_weight="0.2"
android:adjustViewBounds="true"
android:contentDescription="@string/content_description_contacts" android:contentDescription="@string/content_description_contacts"
android:scaleType="fitXY" android:scaleType="fitXY"
android:src="@drawable/contacts" /> android:src="@drawable/contacts" />
@ -83,9 +85,9 @@
<ImageView <ImageView
android:id="@+id/dialer" android:id="@+id/dialer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:layout_weight="0.25" android:layout_weight="0.25"
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:contentDescription="@string/content_description_dialer" android:contentDescription="@string/content_description_dialer"
android:scaleType="fitEnd" android:scaleType="fitEnd"
android:src="@drawable/dialer" /> android:src="@drawable/dialer" />
@ -93,8 +95,9 @@
<ImageView <ImageView
android:id="@+id/settings" android:id="@+id/settings"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:layout_weight="0.2" android:layout_weight="0.2"
android:adjustViewBounds="true"
android:contentDescription="@string/content_description_settings" android:contentDescription="@string/content_description_settings"
android:scaleType="fitXY" android:scaleType="fitXY"
android:src="@drawable/settings" /> android:src="@drawable/settings" />
@ -107,8 +110,8 @@
<ImageView <ImageView
android:id="@+id/chat" android:id="@+id/chat"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:layout_weight="0.2" android:adjustViewBounds="true"
android:contentDescription="@string/content_description_chat" android:contentDescription="@string/content_description_chat"
android:scaleType="fitXY" android:scaleType="fitXY"
android:src="@drawable/chat" /> android:src="@drawable/chat" />

View file

@ -29,7 +29,7 @@
<LinearLayout <LinearLayout
android:id="@+id/menu" android:id="@+id/menu"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="90dp" android:layout_height="wrap_content"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:orientation="horizontal"> android:orientation="horizontal">
@ -42,6 +42,7 @@
android:id="@+id/history" android:id="@+id/history"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:contentDescription="@string/content_description_history" android:contentDescription="@string/content_description_history"
android:scaleType="fitXY" android:scaleType="fitXY"
android:src="@drawable/history" /> android:src="@drawable/history" />
@ -61,8 +62,9 @@
<ImageView <ImageView
android:id="@+id/contacts" android:id="@+id/contacts"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:layout_weight="0.2" android:layout_weight="0.2"
android:adjustViewBounds="true"
android:contentDescription="@string/content_description_contacts" android:contentDescription="@string/content_description_contacts"
android:scaleType="fitXY" android:scaleType="fitXY"
android:src="@drawable/contacts" /> android:src="@drawable/contacts" />
@ -72,6 +74,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="0.2" android:layout_weight="0.2"
android:adjustViewBounds="true"
android:contentDescription="@string/content_description_dialer" android:contentDescription="@string/content_description_dialer"
android:scaleType="fitXY" android:scaleType="fitXY"
android:src="@drawable/dialer" /> android:src="@drawable/dialer" />
@ -79,8 +82,9 @@
<ImageView <ImageView
android:id="@+id/settings" android:id="@+id/settings"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:layout_weight="0.2" android:layout_weight="0.2"
android:adjustViewBounds="true"
android:contentDescription="@string/content_description_settings" android:contentDescription="@string/content_description_settings"
android:scaleType="fitXY" android:scaleType="fitXY"
android:src="@drawable/settings" /> android:src="@drawable/settings" />
@ -93,8 +97,8 @@
<ImageView <ImageView
android:id="@+id/chat" android:id="@+id/chat"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:layout_weight="0.2" android:adjustViewBounds="true"
android:contentDescription="@string/content_description_chat" android:contentDescription="@string/content_description_chat"
android:scaleType="fitXY" android:scaleType="fitXY"
android:src="@drawable/chat" /> android:src="@drawable/chat" />

View file

@ -629,6 +629,7 @@ public class LinphoneActivity extends FragmentActivity implements OnClickListene
public void startIncallActivity(LinphoneCall currentCall) { public void startIncallActivity(LinphoneCall currentCall) {
Intent intent = new Intent(this, InCallActivity.class); Intent intent = new Intent(this, InCallActivity.class);
intent.putExtra("VideoEnabled", false); intent.putExtra("VideoEnabled", false);
startOrientationSensor();
startActivityForResult(intent, callActivity); startActivityForResult(intent, callActivity);
} }