Fix Galaxy S FC + tablet UI improved

This commit is contained in:
Sylvain Berfini 2012-08-27 12:59:06 +02:00
parent f597d81225
commit 8341021cfd
3 changed files with 11 additions and 8 deletions

View file

@ -319,7 +319,7 @@
android:title="@string/pref_audio_hacks_use_galaxys_hack_title" /> android:title="@string/pref_audio_hacks_use_galaxys_hack_title" />
<EditTextPreference <EditTextPreference
android:key="@string/pref_audio_use_specific_mode_key" android:key="@string/pref_audio_use_specific_mode_key"
android:title="@string/pref_audio_use_specific_mode_title" android:title="@string/pref_audio_use_specific_mode_title"
android:summary="@string/pref_audio_use_specific_mode_summary" android:summary="@string/pref_audio_use_specific_mode_summary"
android:defaultValue="0" android:numeric="integer" /> android:defaultValue="0" android:numeric="integer" />

View file

@ -256,16 +256,22 @@ public class LinphoneActivity extends FragmentActivity implements OnClickListene
if (statusFragment != null) { if (statusFragment != null) {
statusFragment.closeStatusBar(); statusFragment.closeStatusBar();
} }
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
LinearLayout ll = (LinearLayout) findViewById(R.id.fragmentContainer2);
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
if (newFragmentType.shouldAddItselfToTheRightOf(currentFragment)) { if (newFragmentType.shouldAddItselfToTheRightOf(currentFragment)) {
LinearLayout ll = (LinearLayout) findViewById(R.id.fragmentContainer2);
ll.setVisibility(View.VISIBLE); ll.setVisibility(View.VISIBLE);
transaction.addToBackStack(newFragmentType.toString()); transaction.addToBackStack(newFragmentType.toString());
transaction.replace(R.id.fragmentContainer2, newFragment); transaction.replace(R.id.fragmentContainer2, newFragment);
} else { } else {
if (newFragmentType == FragmentsAvailable.DIALER) {
ll.setVisibility(View.GONE);
} else {
ll.setVisibility(View.INVISIBLE);
}
if (!withoutAnimation && !getResources().getBoolean(R.bool.disable_animations) && currentFragment.shouldAnimate()) { if (!withoutAnimation && !getResources().getBoolean(R.bool.disable_animations) && currentFragment.shouldAnimate()) {
if (newFragmentType.isRightOf(currentFragment)) { 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); 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);
@ -274,9 +280,6 @@ public class LinphoneActivity extends FragmentActivity implements OnClickListene
} }
} }
LinearLayout ll = (LinearLayout) findViewById(R.id.fragmentContainer2);
ll.setVisibility(View.GONE);
try { try {
getSupportFragmentManager().popBackStackImmediate(newFragmentType.toString(), FragmentManager.POP_BACK_STACK_INCLUSIVE); getSupportFragmentManager().popBackStackImmediate(newFragmentType.toString(), FragmentManager.POP_BACK_STACK_INCLUSIVE);
} catch (java.lang.IllegalStateException e) { } catch (java.lang.IllegalStateException e) {

View file

@ -296,7 +296,7 @@ public class PreferencesActivity extends LinphonePreferencesActivity implements
addEchoPrefsListener(); addEchoPrefsListener();
if (Hacks.needSoftvolume()) checkAndDisableCheckbox(R.string.pref_audio_soft_volume_key); if (Hacks.needSoftvolume()) checkAndDisableCheckbox(R.string.pref_audio_hacks_use_galaxys_hack_key);
if (!LinphoneManager.getLc().isTunnelAvailable()){ if (!LinphoneManager.getLc().isTunnelAvailable()){
hidePreferenceCategory(R.string.pref_tunnel_key); hidePreferenceCategory(R.string.pref_tunnel_key);