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 ChatFragment chatFragment;
|
||||||
private Fragment.SavedState dialerSavedState;
|
private Fragment.SavedState dialerSavedState;
|
||||||
private boolean newProxyConfig;
|
private boolean newProxyConfig;
|
||||||
private boolean isAnimationDisabled = false, preferLinphoneContacts = false;
|
private boolean isAnimationDisabled = true, preferLinphoneContacts = false;
|
||||||
private OrientationEventListener mOrientationHelper;
|
private OrientationEventListener mOrientationHelper;
|
||||||
private LinphoneCoreListenerBase mListener;
|
private LinphoneCoreListenerBase mListener;
|
||||||
private LinearLayout mTabBar;
|
private LinearLayout mTabBar;
|
||||||
|
@ -382,6 +382,9 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
||||||
case ABOUT:
|
case ABOUT:
|
||||||
newFragment = new AboutFragment();
|
newFragment = new AboutFragment();
|
||||||
break;
|
break;
|
||||||
|
case EMPTY:
|
||||||
|
newFragment = new EmptyFragment();
|
||||||
|
break;
|
||||||
case CHAT_LIST:
|
case CHAT_LIST:
|
||||||
newFragment = new ChatListFragment();
|
newFragment = new ChatListFragment();
|
||||||
chatListFragment = newFragment;
|
chatListFragment = newFragment;
|
||||||
|
@ -453,6 +456,13 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
||||||
LinearLayout ll = (LinearLayout) findViewById(R.id.fragmentContainer2);
|
LinearLayout ll = (LinearLayout) findViewById(R.id.fragmentContainer2);
|
||||||
|
|
||||||
FragmentTransaction transaction = getFragmentManager().beginTransaction();
|
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)) {
|
if (newFragmentType.shouldAddItselfToTheRightOf(currentFragment)) {
|
||||||
ll.setVisibility(View.VISIBLE);
|
ll.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
|
@ -502,6 +512,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
||||||
}
|
}
|
||||||
fragmentsHistory.add(currentFragment);
|
fragmentsHistory.add(currentFragment);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void displayHistoryDetail(String sipUri, LinphoneCallLog log) {
|
public void displayHistoryDetail(String sipUri, LinphoneCallLog log) {
|
||||||
LinphoneAddress lAddress;
|
LinphoneAddress lAddress;
|
||||||
|
@ -551,7 +562,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
||||||
}
|
}
|
||||||
|
|
||||||
public void displayEmptyFragment(){
|
public void displayEmptyFragment(){
|
||||||
changeCurrentFragment(FragmentsAvailable.HISTORY_LIST,new Bundle());
|
changeCurrentFragment(FragmentsAvailable.EMPTY, new Bundle());
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("SimpleDateFormat")
|
@SuppressLint("SimpleDateFormat")
|
||||||
|
@ -1271,7 +1282,6 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
||||||
if (call.getCurrentParamsCopy().getVideoEnabled()) {
|
if (call.getCurrentParamsCopy().getVideoEnabled()) {
|
||||||
//startVideoActivity(call);
|
//startVideoActivity(call);
|
||||||
} else {
|
} else {
|
||||||
Log.w("outgoing call");
|
|
||||||
//startIncallActivity(call);
|
//startIncallActivity(call);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue