mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-18 03:48:08 +00:00
Fix contact list in tablet version
Disable old animations
This commit is contained in:
parent
fdbfd18363
commit
232eeffe13
2 changed files with 5 additions and 5 deletions
|
|
@ -324,7 +324,7 @@ public class ContactsListFragment extends Fragment implements OnClickListener, O
|
|||
}
|
||||
|
||||
public void displayFirstContact(){
|
||||
if(contactsList.getAdapter().getCount() > 0) {
|
||||
if(contactsList.getAdapter() != null && contactsList.getAdapter().getCount() > 0) {
|
||||
LinphoneActivity.instance().displayContact((Contact) contactsList.getAdapter().getItem(0), false);
|
||||
} else {
|
||||
LinphoneActivity.instance().displayEmptyFragment();
|
||||
|
|
|
|||
|
|
@ -424,7 +424,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
|||
private void changeFragment(Fragment newFragment, FragmentsAvailable newFragmentType, boolean withoutAnimation) {
|
||||
FragmentTransaction transaction = getFragmentManager().beginTransaction();
|
||||
|
||||
if (!withoutAnimation && !isAnimationDisabled && currentFragment.shouldAnimate()) {
|
||||
/*if (!withoutAnimation && !isAnimationDisabled && currentFragment.shouldAnimate()) {
|
||||
if (newFragmentType.isRightOf(currentFragment)) {
|
||||
transaction.setCustomAnimations(R.anim.slide_in_right_to_left,
|
||||
R.anim.slide_out_right_to_left,
|
||||
|
|
@ -436,7 +436,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
|||
R.anim.slide_in_right_to_left,
|
||||
R.anim.slide_out_right_to_left);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
if (newFragmentType != FragmentsAvailable.DIALER
|
||||
|| newFragmentType != FragmentsAvailable.CONTACTS_LIST
|
||||
|
|
@ -495,13 +495,13 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
|||
transaction.replace(R.id.fragmentContainer2, new EmptyFragment());
|
||||
}
|
||||
|
||||
if (!withoutAnimation && !isAnimationDisabled && currentFragment.shouldAnimate()) {
|
||||
/*if (!withoutAnimation && !isAnimationDisabled && currentFragment.shouldAnimate()) {
|
||||
if (newFragmentType.isRightOf(currentFragment)) {
|
||||
transaction.setCustomAnimations(R.anim.slide_in_right_to_left, R.anim.slide_out_right_to_left, R.anim.slide_in_left_to_right, R.anim.slide_out_left_to_right);
|
||||
} else {
|
||||
transaction.setCustomAnimations(R.anim.slide_in_left_to_right, R.anim.slide_out_left_to_right, R.anim.slide_in_right_to_left, R.anim.slide_out_right_to_left);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
transaction.replace(R.id.fragmentContainer, newFragment);
|
||||
}
|
||||
transaction.commitAllowingStateLoss();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue