Fix some bug

This commit is contained in:
Erwan Croze 2018-08-23 12:19:10 +02:00
parent 4d60f6d4f0
commit 0c8eacec41
7 changed files with 60 additions and 39 deletions

View file

@ -47,6 +47,7 @@
android:id="@+id/action_menu"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_alignParentTop="true"
android:layout_marginTop="10dp">
<ImageView
@ -88,8 +89,8 @@
<ImageView
android:id="@+id/contact_picture"
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_width="180dp"
android:layout_height="180dp"
android:adjustViewBounds="true"
android:contentDescription="@string/content_description_contact_picture"
android:src="@drawable/avatar_big_secure1"/>
@ -109,8 +110,7 @@
android:id="@+id/remote_pause"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#e6ff6600"
android:gravity="center"
android:background="#ff6600"
android:visibility="gone">
<RelativeLayout
@ -118,13 +118,14 @@
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true">
android:layout_alignParentTop="false">
<ImageView
android:id="@+id/pause2"
android:layout_width="70dp"
android:layout_height="60dp"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_alignParentTop="true"
android:contentDescription="@string/content_description_pause"
android:src="@drawable/pause_big_default"/>
</RelativeLayout>
@ -134,6 +135,7 @@
android:layout_width="115dp"
android:layout_height="115dp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_gravity="center"
android:src="@drawable/waiting_time"/>
@ -153,7 +155,8 @@
android:layout_width="match_parent"
android:layout_height="80dp"
android:layout_alignParentBottom="true"
android:layout_marginTop="-5dp"
android:layout_below="@+id/avatar_layout"
android:layout_marginTop="5dp"
android:alpha="0.8"
android:background="@color/colorH"
android:orientation="vertical">
@ -181,6 +184,7 @@
android:id="@+id/calls_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/active_call"
android:layout_alignParentBottom="true"
android:layout_gravity="bottom"
android:background="@color/colorH"
@ -196,7 +200,7 @@
android:background="#e6ff6600"
android:gravity="center_vertical"
android:orientation="vertical"
android:visibility="gone">
android:visibility="visible">
<ImageView
android:layout_width="115dp"
@ -386,7 +390,7 @@
android:layout_weight="0.5"
android:background="#aeaeae"
android:contentDescription="@string/content_description_add_call"
android:padding="15dp"
android:padding="10dp"
android:src="@drawable/options_add_call_button"
android:visibility="invisible"/>
@ -429,7 +433,7 @@
android:layout_weight="0.5"
android:background="#aeaeae"
android:contentDescription="@string/content_description_transfer"
android:padding="15dp"
android:padding="10dp"
android:src="@drawable/options_transfer_call_button"
android:visibility="invisible"/>
@ -472,7 +476,7 @@
android:background="#aeaeae"
android:contentDescription="@string/content_description_conference"
android:padding="10dp"
android:src="@drawable/options_start_conference_button"
android:src="@drawable/conference_default"
android:visibility="invisible"/>
</LinearLayout>

View file

@ -12,9 +12,10 @@
<ImageView
android:id="@+id/contactPicture"
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@drawable/avatar" />
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginLeft="10dp"
android:src="@drawable/avatar_small_secure1"/>
<LinearLayout
@ -39,21 +40,22 @@
style="@style/font2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="20dp"
android:gravity="center_vertical|right"/>
android:gravity="center_vertical|right"
android:paddingLeft="20dp"
/>
</LinearLayout>
<ImageView
android:id="@+id/quitConference"
android:src="@drawable/conference_exit_default"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_marginRight="15dp"
android:adjustViewBounds="true"
android:contentDescription="@string/content_description_exit_conference"
android:layout_width="30dp"
android:layout_height="30dp"
android:gravity="center_vertical"
android:scaleType="fitCenter"
android:adjustViewBounds="true" />
android:gravity="center_vertical"
android:scaleType="fitCenter"
android:src="@drawable/conference_exit_default"/>
</LinearLayout>

View file

@ -11,9 +11,9 @@
<ImageView
android:id="@+id/contact_picture"
android:src="@drawable/conference_start"
android:layout_width="40dp"
android:layout_height="40dp"/>
android:layout_height="40dp"
android:src="@drawable/conference_default"/>
<TextView
android:id="@+id/contact_name"

View file

@ -93,12 +93,10 @@
android:id="@+id/call"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="1"
android:adjustViewBounds="true"
android:adjustViewBounds="false"
android:background="@color/colorH"
android:scaleType="center"
android:src="@drawable/call_alt_start_over"/>
android:src="@drawable/call_start"/>
</LinearLayout>

View file

@ -1055,7 +1055,15 @@ public class LinphoneActivity extends LinphoneGenericActivity implements OnClick
AddressType address = new AddressText(this, null);
address.setDisplayedName(name);
address.setText(number);
LinphoneManager.getInstance().newOutgoingCall(address);
if (isCallTransfer()) {
Core lc = LinphoneManager.getLc();
if (lc.getCurrentCall() == null) {
return;
}
lc.transferCall(lc.getCurrentCall(), address.getText().toString());
} else {
LinphoneManager.getInstance().newOutgoingCall(address);
}
}
public void startIncallActivity(Call currentCall) {
@ -1118,11 +1126,14 @@ public class LinphoneActivity extends LinphoneGenericActivity implements OnClick
}
private void initInCallMenuLayout(final boolean callTransfer) {
/*goToDialerFragment();
selectMenu(FragmentsAvailable.DIALER);
DialerFragment dialerFragment = DialerFragment.instance();
if (dialerFragment != null) {
((DialerFragment) dialerFragment).resetLayout(callTransfer);
}
}*/
// Obiane Spec
displayContacts(false);
}
public void resetClassicMenuLayoutAndGoBackToCallIfStillRunning() {

View file

@ -611,8 +611,11 @@ public class CallActivity extends LinphoneGenericActivity implements OnClickList
}
//Enabled transfer button
if(isTransferAllowed && !LinphoneManager.getLc().soundResourcesLocked())
if(isTransferAllowed && !LinphoneManager.getLc().soundResourcesLocked()) {
enabledTransferButton(true);
} else {
enabledTransferButton(false);
}
//Enable conference button
if(LinphoneManager.getLc().getCallsNb() > 1 && LinphoneManager.getLc().getCallsNb() > confsize && !LinphoneManager.getLc().soundResourcesLocked()) {
@ -638,7 +641,6 @@ public class CallActivity extends LinphoneGenericActivity implements OnClickList
if(!isTablet()){
speaker.setEnabled(true);
}
transfer.setEnabled(true);
pause.setEnabled(true);
dialer.setEnabled(true);
}
@ -779,16 +781,20 @@ public class CallActivity extends LinphoneGenericActivity implements OnClickList
private void enabledTransferButton(boolean enabled){
if(enabled) {
transfer.setEnabled(true);
transfer.setAlpha(1f);
} else {
transfer.setEnabled(false);
transfer.setAlpha(0.4f);
}
}
private void enabledConferenceButton(boolean enabled){
if (enabled) {
conference.setEnabled(true);
conference.setAlpha(1f);
} else {
conference.setEnabled(false);
conference.setAlpha(0.4f);
}
}
@ -1042,7 +1048,7 @@ public class CallActivity extends LinphoneGenericActivity implements OnClickList
displayVideoCall(false);
numpad.setVisibility(View.GONE);
//options.setImageResource(R.drawable.options_default);
options.setImageAlpha(125);
options.setImageAlpha(255);
}
}, SECONDS_BEFORE_HIDING_CONTROLS);
}
@ -1093,7 +1099,7 @@ public class CallActivity extends LinphoneGenericActivity implements OnClickList
//Hide options
if (addCall.getVisibility() == View.VISIBLE) {
//options.setImageResource(R.drawable.options_disabled);
options.setImageAlpha(125);
options.setImageAlpha(255);
if (isTransferAllowed) {
transfer.setVisibility(View.INVISIBLE);
}
@ -1106,7 +1112,7 @@ public class CallActivity extends LinphoneGenericActivity implements OnClickList
addCall.setVisibility(View.VISIBLE);
conference.setVisibility(View.VISIBLE);
//options.setImageResource(R.drawable.options_default);
options.setImageAlpha(255);
options.setImageAlpha(100);
transfer.setEnabled(LinphoneManager.getLc().getCurrentCall() != null);
}
}

View file

@ -79,7 +79,7 @@ public class DialerFragment extends Fragment {
/*if (LinphoneManager.getLcIfManagerNotDestroyedOrNull() != null && LinphoneManager.getLcIfManagerNotDestroyedOrNull().getVideoActivationPolicy().getAutomaticallyInitiate()) {
mCall.setImageResource(R.drawable.call_video_start);
} else {*/
mCall.setImageResource(R.drawable.call_alt_start_selected);
mCall.setImageResource(R.drawable.call_start);
//}
}
@ -203,7 +203,7 @@ public class DialerFragment extends Fragment {
mCall.setImageResource(R.drawable.call_transfer);
mCall.setExternalClickListener(transferListener);
} else {
mCall.setImageResource(R.drawable.call_alt_start_selected);
mCall.setImageResource(R.drawable.call_start);
//mCall.setImageResource(R.drawable.call_add);
//mCall.resetClickListener();
}
@ -215,7 +215,7 @@ public class DialerFragment extends Fragment {
/*if (LinphoneManager.getLc().getVideoActivationPolicy().getAutomaticallyInitiate()) {
mCall.setImageResource(R.drawable.call_video_start);
} else {*/
mCall.setImageResource(R.drawable.call_alt_start_selected);
mCall.setImageResource(R.drawable.call_start);
//}
mAddContact.setEnabled(false);
//mAddContact.setImageResource(R.drawable.contact_add_button);