Fix chat in call and in call view
This commit is contained in:
parent
f3fe215bc0
commit
c86bf1e990
3 changed files with 28 additions and 7 deletions
|
@ -41,6 +41,17 @@
|
|||
android:layout_height="match_parent"
|
||||
android:padding="15dp"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/back_to_call"
|
||||
android:src="@drawable/call_back"
|
||||
android:background="@drawable/toolbar_button"
|
||||
android:contentDescription="@string/content_description_call"
|
||||
android:layout_toLeftOf="@id/edit"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone"
|
||||
android:padding="15dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/contact_name"
|
||||
style="@style/font6"
|
||||
|
|
|
@ -1464,14 +1464,8 @@ public class CallActivity extends Activity implements OnClickListener {
|
|||
|
||||
//CALL INFORMATION
|
||||
private void displayCurrentCall(LinphoneCall call){
|
||||
//if(!isVideoEnabled(call)){
|
||||
// mActiveCallHeader.setVisibility(View.VISIBLE);
|
||||
// mNoCurrentCall.setVisibility(View.GONE);
|
||||
//}
|
||||
|
||||
LinphoneAddress lAddress = call.getRemoteAddress();
|
||||
TextView contactName = (TextView) findViewById(R.id.current_contact_name);
|
||||
|
||||
setContactInformation(contactName, contactPicture, lAddress);
|
||||
registerCallDurationTimer(null, call);
|
||||
}
|
||||
|
|
|
@ -113,7 +113,7 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
|
|||
private EditText message;
|
||||
private ImageView cancelUpload, edit, selectAll, deselectAll, startCall, delete, sendImage, sendMessage, cancel;
|
||||
private TextView contactName, remoteComposing;
|
||||
private ImageView back;
|
||||
private ImageView back, backToCall;
|
||||
private AutoCompleteTextView searchContactField;
|
||||
private RelativeLayout uploadLayout, textLayout, topBar, editList;
|
||||
private ListView messagesList;
|
||||
|
@ -182,6 +182,9 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
|
|||
startCall = (ImageView) view.findViewById(R.id.start_call);
|
||||
startCall.setOnClickListener(this);
|
||||
|
||||
backToCall = (ImageView) view.findViewById(R.id.back_to_call);
|
||||
backToCall.setOnClickListener(this);
|
||||
|
||||
selectAll = (ImageView) view.findViewById(R.id.select_all);
|
||||
selectAll.setOnClickListener(this);
|
||||
|
||||
|
@ -585,6 +588,14 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
|
|||
LinphoneActivity.instance().hideTabBar(false);
|
||||
}
|
||||
|
||||
if(LinphoneManager.getLc().isIncall()){
|
||||
backToCall.setVisibility(View.VISIBLE);
|
||||
startCall.setVisibility(View.INVISIBLE);
|
||||
} else {
|
||||
backToCall.setVisibility(View.INVISIBLE);
|
||||
startCall.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
LinphoneAddress lAddress;
|
||||
try {
|
||||
lAddress = LinphoneCoreFactory.instance().createLinphoneAddress(sipUri);
|
||||
|
@ -642,6 +653,11 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
|
|||
public void onClick(View v) {
|
||||
int id = v.getId();
|
||||
|
||||
if (id == R.id.back_to_call) {
|
||||
LinphoneActivity.instance().resetClassicMenuLayoutAndGoBackToCallIfStillRunning();
|
||||
return;
|
||||
}
|
||||
|
||||
if (id == R.id.select_all) {
|
||||
deselectAll.setVisibility(View.VISIBLE);
|
||||
selectAll.setVisibility(View.GONE);
|
||||
|
|
Loading…
Reference in a new issue