Fix empty fragment for tablet version
This commit is contained in:
parent
c7bc95e28a
commit
bc57fde9c9
1 changed files with 50 additions and 40 deletions
|
@ -109,7 +109,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
|||
private ChatFragment chatFragment;
|
||||
private Fragment.SavedState dialerSavedState;
|
||||
private boolean newProxyConfig;
|
||||
private boolean isAnimationDisabled = false, preferLinphoneContacts = false;
|
||||
private boolean isAnimationDisabled = true, preferLinphoneContacts = false;
|
||||
private OrientationEventListener mOrientationHelper;
|
||||
private LinphoneCoreListenerBase mListener;
|
||||
private LinearLayout mTabBar;
|
||||
|
@ -382,6 +382,9 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
|||
case ABOUT:
|
||||
newFragment = new AboutFragment();
|
||||
break;
|
||||
case EMPTY:
|
||||
newFragment = new EmptyFragment();
|
||||
break;
|
||||
case CHAT_LIST:
|
||||
newFragment = new ChatListFragment();
|
||||
chatListFragment = newFragment;
|
||||
|
@ -453,15 +456,22 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
|||
LinearLayout ll = (LinearLayout) findViewById(R.id.fragmentContainer2);
|
||||
|
||||
FragmentTransaction transaction = getFragmentManager().beginTransaction();
|
||||
|
||||
if(newFragmentType == FragmentsAvailable.EMPTY){
|
||||
ll.setVisibility(View.VISIBLE);
|
||||
transaction.replace(R.id.fragmentContainer2, newFragment);
|
||||
transaction.commitAllowingStateLoss();
|
||||
getFragmentManager().executePendingTransactions();
|
||||
} else {
|
||||
if (newFragmentType.shouldAddItselfToTheRightOf(currentFragment)) {
|
||||
ll.setVisibility(View.VISIBLE);
|
||||
|
||||
if(newFragmentType == FragmentsAvailable.CONTACT_EDITOR){
|
||||
if (newFragmentType == FragmentsAvailable.CONTACT_EDITOR) {
|
||||
transaction.addToBackStack(newFragmentType.toString());
|
||||
}
|
||||
transaction.replace(R.id.fragmentContainer2, newFragment);
|
||||
} else {
|
||||
if(newFragmentType == FragmentsAvailable.EMPTY) {
|
||||
if (newFragmentType == FragmentsAvailable.EMPTY) {
|
||||
ll.setVisibility(View.VISIBLE);
|
||||
transaction.replace(R.id.fragmentContainer2, new EmptyFragment());
|
||||
}
|
||||
|
@ -502,6 +512,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
|||
}
|
||||
fragmentsHistory.add(currentFragment);
|
||||
}
|
||||
}
|
||||
|
||||
public void displayHistoryDetail(String sipUri, LinphoneCallLog log) {
|
||||
LinphoneAddress lAddress;
|
||||
|
@ -551,7 +562,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
|||
}
|
||||
|
||||
public void displayEmptyFragment(){
|
||||
changeCurrentFragment(FragmentsAvailable.HISTORY_LIST,new Bundle());
|
||||
changeCurrentFragment(FragmentsAvailable.EMPTY, new Bundle());
|
||||
}
|
||||
|
||||
@SuppressLint("SimpleDateFormat")
|
||||
|
@ -1271,7 +1282,6 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
|||
if (call.getCurrentParamsCopy().getVideoEnabled()) {
|
||||
//startVideoActivity(call);
|
||||
} else {
|
||||
Log.w("outgoing call");
|
||||
//startIncallActivity(call);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue