Enhance incall view on old phones.
This commit is contained in:
parent
f35953df19
commit
7b6ac0a93f
5 changed files with 13 additions and 28 deletions
|
@ -1,16 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent" android:layout_height="48px"
|
||||
android:layout_width="fill_parent" android:layout_height="52sp"
|
||||
android:background="@drawable/conf_callee_bg">
|
||||
|
||||
<ImageView android:id="@+id/picture" android:layout_width="48px"
|
||||
android:src="@drawable/unknown_person" android:layout_height="48px"
|
||||
<ImageView android:id="@+id/picture" android:layout_width="52sp"
|
||||
android:src="@drawable/unknown_person" android:layout_height="52sp"
|
||||
android:paddingLeft="5px" android:scaleType="centerInside"/>
|
||||
|
||||
|
||||
<LinearLayout android:id="@+id/callee_block" android:orientation="vertical"
|
||||
android:layout_toRightOf="@id/picture" android:layout_toLeftOf="@id/callee_statuses"
|
||||
android:layout_width="fill_parent" android:layout_height="48px">
|
||||
android:layout_width="fill_parent" android:layout_height="52sp">
|
||||
<TextView android:id="@+id/name" style="@style/callee_name" />
|
||||
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content">
|
||||
<Chronometer android:id="@+id/callee_duration" style="@style/callee_address"
|
||||
|
|
|
@ -60,16 +60,16 @@
|
|||
ui:unchecked="@drawable/incall_pause"
|
||||
ui:bgdrawables="true" />
|
||||
|
||||
<ImageButton android:id="@+id/conf_simple_video"
|
||||
<Button android:id="@+id/conf_simple_video"
|
||||
style="@style/incall_control"
|
||||
android:background="@drawable/incall_back" />
|
||||
android:text="@string/conf_simple_video_bt_txt"
|
||||
android:background="@drawable/clavier_bg" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/incallHang"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/clavier_bg"
|
||||
android:minHeight="60dip"
|
||||
android:src="@drawable/stopcall_red" />
|
||||
|
@ -80,10 +80,10 @@
|
|||
android:layout_height="wrap_content" android:layout_width="fill_parent"
|
||||
android:layout_above="@id/incall_controls_layout">
|
||||
<ImageView android:id="@+id/incall_picture" android:visibility="gone"
|
||||
android:layout_centerInParent="true" android:paddingBottom="15px"
|
||||
android:layout_centerInParent="true" android:paddingBottom="8dip"
|
||||
android:layout_height="wrap_content" android:layout_width="wrap_content"
|
||||
android:layout_gravity="center" android:scaleType="fitCenter"
|
||||
android:minWidth="192px" android:minHeight="192px"
|
||||
android:minWidth="120dip" android:minHeight="120dip"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
|
||||
|
|
|
@ -10,14 +10,10 @@
|
|||
</style>
|
||||
|
||||
<style name="incall_control" parent="@android:style/Widget.ImageButton">
|
||||
<item name="android:height">104px</item>
|
||||
<item name="android:width">164px</item>
|
||||
<item name="android:layout_height">104px</item>
|
||||
<item name="android:layout_height">65dip</item>
|
||||
<item name="android:layout_width">fill_parent</item>
|
||||
<item name="android:layout_weight">1</item>
|
||||
<item name="android:background">@android:color/transparent</item>
|
||||
<item name="android:scaleType">fitCenter</item>
|
||||
<item name="android:adjustViewBounds">true</item>
|
||||
</style>
|
||||
|
||||
<declare-styleable name="ToggleImageButton">
|
||||
|
|
|
@ -60,8 +60,8 @@
|
|||
<string name="hangup">Hang up</string>
|
||||
<string name="conf_simple_merge_bt_txt">Merge</string>
|
||||
<string name="conf_simple_transfer_bt_txt">Transfer</string>
|
||||
<string name="conf_simple_video_bt_txt">Add video</string>
|
||||
<string name="conf_simple_no_current_call">No active call</string>
|
||||
<string name="conf_simple_video_bt_txt">video</string>
|
||||
<!-- <string name="conf_simple_no_current_call">No active call</string>-->
|
||||
<string name="show_send_dtmfs_button">Dialpad</string>
|
||||
|
||||
<string name="conf_conference">Conference</string>
|
||||
|
|
|
@ -111,7 +111,7 @@ public class IncallActivity extends AbstractCalleesActivity implements
|
|||
if (mMayDoVideo) {
|
||||
findViewById(R.id.conf_simple_video).setOnClickListener(this);
|
||||
} else {
|
||||
findViewById(R.id.conf_simple_video).setVisibility(GONE);
|
||||
findViewById(R.id.conf_simple_video).setVisibility(View.GONE);
|
||||
}
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
@ -162,13 +162,6 @@ public class IncallActivity extends AbstractCalleesActivity implements
|
|||
|
||||
setCalleePicture(view, currentCall.getRemoteAddress());
|
||||
view.setVisibility(VISIBLE);
|
||||
if (Version.sdkStrictlyBelow(Version.API06_ECLAIR_201)) {
|
||||
// Fix really big image on older devices
|
||||
ViewGroup.LayoutParams layout = view.getLayoutParams();
|
||||
layout.height = 96;
|
||||
layout.width = 96;
|
||||
view.setLayoutParams(layout);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -280,8 +273,6 @@ public class IncallActivity extends AbstractCalleesActivity implements
|
|||
if (!LinphoneManager.getInstance().addVideo()) {
|
||||
LinphoneActivity.instance().startVideoActivity(vCall, 0);
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(this, R.string.conf_simple_no_current_call, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@ -294,8 +285,6 @@ public class IncallActivity extends AbstractCalleesActivity implements
|
|||
LinphoneCall tCall = lc().getCurrentCall();
|
||||
if (tCall != null) {
|
||||
prepareForTransferingExistingOrNewCall(tCall);
|
||||
} else {
|
||||
Toast.makeText(this, R.string.conf_simple_no_current_call, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue