Fixed landscape incall view on phones (and by the way uniformised all imageview buttons into textviews in all incall views)

This commit is contained in:
Sylvain Berfini 2014-02-27 12:12:19 +01:00
parent dd0d5dfc3f
commit 945a96435c
6 changed files with 65 additions and 113 deletions

View file

@ -55,33 +55,30 @@
<LinearLayout
android:id="@+id/menu"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:gravity="bottom"
android:orientation="horizontal" >
<ImageView
<TextView
android:id="@+id/pause"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:adjustViewBounds="true"
android:contentDescription="@string/content_description_pause"
android:scaleType="fitXY"
android:src="@drawable/pause_off" />
android:background="@drawable/pause_off"
android:gravity="center"
android:paddingTop="30dp" />
<ImageView
<TextView
android:id="@+id/conference"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:adjustViewBounds="true"
android:contentDescription="@string/content_description_conference"
android:scaleType="fitXY"
android:src="@drawable/conference" />
android:background="@drawable/conference"
android:gravity="center"
android:paddingTop="30dp" />
<TextView
android:id="@+id/video"
@ -105,15 +102,14 @@
android:layout_height="wrap_content"
android:layout_weight="1" />
<ImageView
<TextView
android:id="@+id/hangUp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.94"
android:adjustViewBounds="true"
android:contentDescription="@string/content_description_hang_up"
android:scaleType="fitXY"
android:src="@drawable/hangup" />
android:background="@drawable/hangup"
android:gravity="center"
android:paddingTop="30dp" />
<TextView
android:id="@+id/speaker"
@ -219,15 +215,14 @@
</LinearLayout>
<ImageView
android:id="@+id/dialer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:adjustViewBounds="true"
android:contentDescription="@string/content_description_numpad"
android:scaleType="fitXY"
android:src="@drawable/dialer_alt" />
<TextView
android:id="@+id/dialer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/dialer_alt"
android:gravity="center"
android:paddingTop="30dp" />
</LinearLayout>

View file

@ -207,46 +207,34 @@
android:background="@android:color/black"
android:orientation="horizontal" >
<ImageView
<TextView
android:id="@+id/pause"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:adjustViewBounds="true"
android:contentDescription="@string/content_description_pause"
android:scaleType="fitXY"
android:src="@drawable/pause_off" />
android:background="@drawable/pause_off" />
<ImageView
<TextView
android:id="@+id/conference"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:adjustViewBounds="true"
android:contentDescription="@string/content_description_conference"
android:scaleType="fitXY"
android:src="@drawable/conference" />
android:background="@drawable/conference" />
<ImageView
<TextView
android:id="@+id/hangUp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.97"
android:adjustViewBounds="true"
android:contentDescription="@string/content_description_hang_up"
android:scaleType="fitXY"
android:src="@drawable/hangup" />
android:background="@drawable/hangup" />
<ImageView
<TextView
android:id="@+id/dialer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:adjustViewBounds="true"
android:contentDescription="@string/content_description_numpad"
android:scaleType="fitXY"
android:src="@drawable/dialer_alt" />
android:background="@drawable/dialer_alt" />
</LinearLayout>

View file

@ -53,7 +53,6 @@
<RelativeLayout
android:id="@+id/menu"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="match_parent">
@ -139,38 +138,30 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
<TextView
android:id="@+id/conference"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/content_description_conference"
android:scaleType="fitXY"
android:src="@drawable/conference" />
android:background="@drawable/conference" />
<ImageView
<TextView
android:id="@+id/pause"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/content_description_pause"
android:scaleType="fitXY"
android:src="@drawable/pause_off" />
android:background="@drawable/pause_off" />
<ImageView
<TextView
android:id="@+id/dialer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/content_description_numpad"
android:scaleType="fitXY"
android:src="@drawable/dialer_alt" />
android:background="@drawable/dialer_alt" />
<ImageView
<TextView
android:id="@+id/hangUp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/content_description_hang_up"
android:scaleType="fitXY"
android:src="@drawable/hangup" />
android:background="@drawable/hangup" />
</LinearLayout>

View file

@ -53,7 +53,6 @@
<RelativeLayout
android:id="@+id/menu"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="match_parent">
@ -139,38 +138,30 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
<TextView
android:id="@+id/conference"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/content_description_conference"
android:scaleType="fitXY"
android:src="@drawable/conference" />
android:background="@drawable/conference" />
<ImageView
<TextView
android:id="@+id/pause"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/content_description_pause"
android:scaleType="fitXY"
android:src="@drawable/pause_off" />
android:background="@drawable/pause_off" />
<ImageView
<TextView
android:id="@+id/dialer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/content_description_numpad"
android:scaleType="fitXY"
android:src="@drawable/dialer_alt" />
android:background="@drawable/dialer_alt" />
<ImageView
<TextView
android:id="@+id/hangUp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/content_description_hang_up"
android:scaleType="fitXY"
android:src="@drawable/hangup" />
android:background="@drawable/hangup" />
</LinearLayout>

View file

@ -54,7 +54,6 @@
<LinearLayout
android:id="@+id/menu"
android:visibility="invisible"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
@ -252,46 +251,34 @@
android:background="@android:color/black"
android:orientation="horizontal" >
<ImageView
<TextView
android:id="@+id/pause"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:adjustViewBounds="true"
android:contentDescription="@string/content_description_pause"
android:scaleType="fitXY"
android:src="@drawable/pause_off" />
android:background="@drawable/pause_off" />
<ImageView
<TextView
android:id="@+id/conference"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:adjustViewBounds="true"
android:contentDescription="@string/content_description_conference"
android:scaleType="fitXY"
android:src="@drawable/conference" />
android:background="@drawable/conference" />
<ImageView
<TextView
android:id="@+id/hangUp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.97"
android:adjustViewBounds="true"
android:contentDescription="@string/content_description_hang_up"
android:scaleType="fitXY"
android:src="@drawable/hangup" />
android:background="@drawable/hangup" />
<ImageView
<TextView
android:id="@+id/dialer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:adjustViewBounds="true"
android:contentDescription="@string/content_description_numpad"
android:scaleType="fitXY"
android:src="@drawable/dialer_alt" />
android:background="@drawable/dialer_alt" />
</LinearLayout>

View file

@ -83,8 +83,8 @@ public class InCallActivity extends FragmentActivity implements
private Handler mHandler = new Handler();
private Handler mControlsHandler = new Handler();
private Runnable mControls;
private ImageView pause, hangUp, dialer, switchCamera, conference;
private TextView video, micro, speaker, options, addCall, transfer;
private ImageView switchCamera;
private TextView pause, hangUp, dialer, video, micro, speaker, options, addCall, transfer, conference;
private TextView audioRoute, routeSpeaker, routeReceiver, routeBluetooth;
private LinearLayout routeLayout;
private StatusFragment status;
@ -203,14 +203,14 @@ public class InCallActivity extends FragmentActivity implements
options = (TextView) findViewById(R.id.options);
options.setOnClickListener(this);
options.setEnabled(false);
pause = (ImageView) findViewById(R.id.pause);
pause = (TextView) findViewById(R.id.pause);
pause.setOnClickListener(this);
pause.setEnabled(false);
hangUp = (ImageView) findViewById(R.id.hangUp);
hangUp = (TextView) findViewById(R.id.hangUp);
hangUp.setOnClickListener(this);
conference = (ImageView) findViewById(R.id.conference);
conference = (TextView) findViewById(R.id.conference);
conference.setOnClickListener(this);
dialer = (ImageView) findViewById(R.id.dialer);
dialer = (TextView) findViewById(R.id.dialer);
dialer.setOnClickListener(this);
dialer.setEnabled(false);
numpad = (Numpad) findViewById(R.id.numpad);
@ -319,9 +319,9 @@ public class InCallActivity extends FragmentActivity implements
List<LinphoneCall> pausedCalls = LinphoneUtils.getCallsInState(LinphoneManager.getLc(), Arrays.asList(State.Paused));
if (pausedCalls.size() == 1) {
pause.setImageResource(R.drawable.pause_on);
pause.setBackgroundResource(R.drawable.pause_on);
} else {
pause.setImageResource(R.drawable.pause_off);
pause.setBackgroundResource(R.drawable.pause_off);
}
}
}
@ -572,7 +572,7 @@ public class InCallActivity extends FragmentActivity implements
isVideoCallPaused = true;
showAudioView();
}
pause.setImageResource(R.drawable.pause_on);
pause.setBackgroundResource(R.drawable.pause_on);
}
} else {
List<LinphoneCall> pausedCalls = LinphoneUtils.getCallsInState(lc, Arrays.asList(State.Paused));
@ -584,7 +584,7 @@ public class InCallActivity extends FragmentActivity implements
isVideoCallPaused = false;
showVideoView();
}
pause.setImageResource(R.drawable.pause_off);
pause.setBackgroundResource(R.drawable.pause_off);
}
} else if (call != null) {
lc.resumeCall(call);
@ -592,7 +592,7 @@ public class InCallActivity extends FragmentActivity implements
isVideoCallPaused = false;
showVideoView();
}
pause.setImageResource(R.drawable.pause_off);
pause.setBackgroundResource(R.drawable.pause_off);
}
}
}
@ -734,7 +734,7 @@ public class InCallActivity extends FragmentActivity implements
return;
}
dialer.setImageResource(R.drawable.dialer_alt);
dialer.setBackgroundResource(R.drawable.dialer_alt);
if (isAnimationDisabled) {
numpad.setVisibility(View.GONE);
} else {
@ -768,7 +768,7 @@ public class InCallActivity extends FragmentActivity implements
if (numpad.getVisibility() == View.VISIBLE) {
hideNumpad();
} else {
dialer.setImageResource(R.drawable.dialer_alt_back);
dialer.setBackgroundResource(R.drawable.dialer_alt_back);
if (isAnimationDisabled) {
numpad.setVisibility(View.VISIBLE);
} else {