Custom conference UI for older sdk
Simplify to workaround display bugs on 1.5 and 1.6 versions.
This commit is contained in:
parent
f4466f78fc
commit
15e005bc27
4 changed files with 49 additions and 3 deletions
|
@ -39,7 +39,7 @@
|
||||||
<LinearLayout android:id="@+id/callee_block" android:orientation="vertical"
|
<LinearLayout android:id="@+id/callee_block" android:orientation="vertical"
|
||||||
android:layout_toRightOf="@id/picture" android:layout_toLeftOf="@id/callee_statuses"
|
android:layout_toRightOf="@id/picture" android:layout_toLeftOf="@id/callee_statuses"
|
||||||
android:layout_width="fill_parent" android:layout_height="fill_parent"
|
android:layout_width="fill_parent" android:layout_height="fill_parent"
|
||||||
android:layout_alignParentTop="true" android:layout_alignParentBottom="true">
|
android:layout_centerVertical="true">
|
||||||
<TextView android:id="@+id/name" style="@style/callee_name" />
|
<TextView android:id="@+id/name" style="@style/callee_name" />
|
||||||
<TextView android:id="@+id/address" style="@style/callee_address" />
|
<TextView android:id="@+id/address" style="@style/callee_address" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
42
res/layout/conf_callee_older_devices.xml
Normal file
42
res/layout/conf_callee_older_devices.xml
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
<?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" >
|
||||||
|
|
||||||
|
<ImageView android:id="@+id/picture" android:layout_width="48px"
|
||||||
|
android:src="@drawable/unknown_person" android:layout_height="48px"
|
||||||
|
android:paddingLeft="5px" android:scaleType="centerInside"/>
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout android:id="@+id/callee_block" android:orientation="vertical"
|
||||||
|
android:layout_width="wrap_content" android:layout_height="fill_parent">
|
||||||
|
<TextView android:id="@+id/name" style="@style/callee_name" />
|
||||||
|
<TextView android:id="@+id/address" style="@style/callee_address" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View android:layout_height="fill_parent" android:layout_width="wrap_content" android:layout_weight="1"/>
|
||||||
|
|
||||||
|
|
||||||
|
<ImageButton android:id="@+id/addVideo" android:src="@drawable/conf_video"
|
||||||
|
android:layout_width="wrap_content" android:layout_height="wrap_content" />
|
||||||
|
<ImageButton android:id="@+id/merge_to_conference"
|
||||||
|
android:src="@drawable/conf_merge" android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
<ImageButton android:id="@+id/remove_from_conference"
|
||||||
|
android:src="@drawable/conf_remove" android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
<ImageButton android:id="@+id/unhook_call" android:src="@drawable/conf_unhook"
|
||||||
|
android:layout_width="wrap_content" android:layout_height="wrap_content" />
|
||||||
|
<ImageButton android:id="@+id/terminate_call" android:src="@drawable/conf_terminate"
|
||||||
|
android:layout_width="wrap_content" android:layout_height="wrap_content" />
|
||||||
|
<ImageButton android:id="@+id/pause" android:src="@drawable/conf_pause"
|
||||||
|
android:layout_width="wrap_content" android:layout_height="wrap_content" />
|
||||||
|
<ImageButton android:id="@+id/resume" android:src="@drawable/conf_resume"
|
||||||
|
android:layout_width="wrap_content" android:layout_height="wrap_content" />
|
||||||
|
|
||||||
|
<TextView android:id="@+id/status_label" style="@style/callee_status"
|
||||||
|
android:layout_height="fill_parent" />
|
||||||
|
<ImageView android:id="@+id/callee_status_paused" style="@style/callee_status"
|
||||||
|
android:src="@drawable/conf_status_paused" />
|
||||||
|
<ImageView android:id="@+id/callee_status_inconf" style="@style/callee_status"
|
||||||
|
android:src="@drawable/conf_status_inconf" />
|
||||||
|
</LinearLayout>
|
|
@ -26,7 +26,7 @@
|
||||||
<Button android:text="@string/AddCallButtonText" android:id="@+id/addCall"
|
<Button android:text="@string/AddCallButtonText" android:id="@+id/addCall"
|
||||||
android:layout_width="wrap_content" android:layout_height="wrap_content" />
|
android:layout_width="wrap_content" android:layout_height="wrap_content" />
|
||||||
|
|
||||||
<org.linphone.ui.HangCallButton android:id="@+id/incallHang" android:layout_width="wrap_content" android:layout_height="wrap_content"
|
<org.linphone.ui.HangCallButton android:id="@+id/incallHang" android:layout_width="0dip" android:layout_height="wrap_content"
|
||||||
android:src="@drawable/mini_stopcall_red" android:layout_weight="1" />
|
android:src="@drawable/mini_stopcall_red" android:layout_weight="1" />
|
||||||
|
|
||||||
<Button android:id="@+id/incallNumpadShow" android:text="@string/show_send_dtmfs_button"
|
<Button android:id="@+id/incallNumpadShow" android:text="@string/show_send_dtmfs_button"
|
||||||
|
|
|
@ -431,7 +431,11 @@ public class ConferenceActivity extends ListActivity implements
|
||||||
|
|
||||||
public View getView(int position, View v, ViewGroup parent) {
|
public View getView(int position, View v, ViewGroup parent) {
|
||||||
if (v == null) {
|
if (v == null) {
|
||||||
v = getLayoutInflater().inflate(R.layout.conf_callee, null);
|
if (Version.sdkAboveOrEqual(Version.API06_ECLAIR_20)) {
|
||||||
|
v = getLayoutInflater().inflate(R.layout.conf_callee, null);
|
||||||
|
} else {
|
||||||
|
v = getLayoutInflater().inflate(R.layout.conf_callee_older_devices, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final LinphoneCall call = linphoneCalls.get(position);
|
final LinphoneCall call = linphoneCalls.get(position);
|
||||||
|
|
Loading…
Reference in a new issue