use of android.app.DialogFragment in project android_packages_apps_Dialer by MoKee.
the class InCallActivity method onCreate.
@Override
protected void onCreate(Bundle icicle) {
Log.d(this, "onCreate()... this = " + this);
super.onCreate(icicle);
// set this flag so this activity will stay in front of the keyguard
// Have the WindowManager filter out touch events that are "too fat".
int flags = WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED | WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON | WindowManager.LayoutParams.FLAG_IGNORE_CHEEK_PRESSES;
getWindow().addFlags(flags);
// Setup action bar for the conference call manager.
requestWindowFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
if (getActionBar() != null) {
getActionBar().setDisplayHomeAsUpEnabled(true);
getActionBar().setDisplayShowTitleEnabled(true);
getActionBar().hide();
}
// TODO(klp): Do we need to add this back when prox sensor is not available?
// lp.inputFeatures |= WindowManager.LayoutParams.INPUT_FEATURE_DISABLE_USER_ACTIVITY;
// Since activity is created newly, clear full screen flag. This will ensure that
// the flag is in sync with actual UI when UI is recreated due to orientation change.
InCallPresenter.getInstance().clearFullscreen();
setContentView(R.layout.incall_screen);
internalResolveIntent(getIntent());
mIsLandscape = getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE;
final boolean isRtl = TextUtils.getLayoutDirectionFromLocale(Locale.getDefault()) == View.LAYOUT_DIRECTION_RTL;
if (mIsLandscape) {
mSlideIn = AnimationUtils.loadAnimation(this, isRtl ? R.anim.dialpad_slide_in_left : R.anim.dialpad_slide_in_right);
mSlideOut = AnimationUtils.loadAnimation(this, isRtl ? R.anim.dialpad_slide_out_left : R.anim.dialpad_slide_out_right);
} else {
mSlideIn = AnimationUtils.loadAnimation(this, R.anim.dialpad_slide_in_bottom);
mSlideOut = AnimationUtils.loadAnimation(this, R.anim.dialpad_slide_out_bottom);
}
mSlideIn.setInterpolator(AnimUtils.EASE_IN);
mSlideOut.setInterpolator(AnimUtils.EASE_OUT);
mSlideOut.setAnimationListener(mSlideOutListener);
// If the dialpad fragment already exists, retrieve it. This is important when rotating as
// we will not be able to hide or show the dialpad after the rotation otherwise.
Fragment existingFragment = getFragmentManager().findFragmentByTag(DialpadFragment.class.getName());
if (existingFragment != null) {
mDialpadFragment = (DialpadFragment) existingFragment;
}
if (icicle != null) {
// to receive it.
if (icicle.containsKey(SHOW_DIALPAD_EXTRA)) {
boolean showDialpad = icicle.getBoolean(SHOW_DIALPAD_EXTRA);
mShowDialpadRequest = showDialpad ? DIALPAD_REQUEST_SHOW : DIALPAD_REQUEST_HIDE;
mAnimateDialpadOnShow = false;
}
mDtmfText = icicle.getString(DIALPAD_TEXT_EXTRA);
SelectPhoneAccountDialogFragment dialogFragment = (SelectPhoneAccountDialogFragment) getFragmentManager().findFragmentByTag(TAG_SELECT_ACCT_FRAGMENT);
if (dialogFragment != null) {
dialogFragment.setListener(mSelectAcctListener);
}
}
mInCallOrientationEventListener = new InCallOrientationEventListener(this);
if (CallList.getInstance().isDsdaEnabled()) {
mDsdaTabLayout = (TabLayout) findViewById(R.id.dsda_tabs);
mDsdaTabLayout.addOnTabSelectedListener(this);
mSubManager = SubscriptionManager.from(this);
mSubManager.addOnSubscriptionsChangedListener(mSubListener);
mSubInfos = mSubManager.getActiveSubscriptionInfoList();
}
Log.d(this, "onCreate(): exit");
}
use of android.app.DialogFragment in project android_packages_apps_Dialer by MoKee.
the class FillCallLogTestActivity method showTimePickerDialog.
/**
* Shows a time picker dialog, storing the results in the time field.
*/
public void showTimePickerDialog(View v) {
DialogFragment newFragment = new TimePickerFragment();
newFragment.show(getFragmentManager(), "timePicker");
}
use of android.app.DialogFragment in project android_packages_apps_Dialer by MoKee.
the class FilteredNumberCompatInstrumentationTest method testShowBlockNumberDialogFlow_AlreadyBlocked.
public void testShowBlockNumberDialogFlow_AlreadyBlocked() throws InterruptedException {
if (!CompatUtils.isNCompatible()) {
return;
}
ContentValues values = new ContentValues();
values.put(BlockedNumbers.COLUMN_ORIGINAL_NUMBER, NUMBER);
mContentResolver.insert(BlockedNumbers.CONTENT_URI, values);
FilteredNumberCompat.setHasMigratedToNewBlocking(false);
getInstrumentation().runOnMainSync(new Runnable() {
@Override
public void run() {
FilteredNumberCompat.showBlockNumberDialogFlow(mContentResolver, null, NUMBER, COUNTRY_ISO, E164_NUMBER, R.id.floating_action_button_container, mFragmentManager, null);
}
});
getInstrumentation().waitForIdleSync();
final DialogFragment migrateDialogFragment = (DialogFragment) mFragmentManager.findFragmentByTag("MigrateBlockedNumbers");
assertTrue(migrateDialogFragment.getDialog().isShowing());
getInstrumentation().runOnMainSync(new Runnable() {
@Override
public void run() {
((AlertDialog) migrateDialogFragment.getDialog()).getButton(DialogInterface.BUTTON_POSITIVE).performClick();
}
});
getInstrumentation().waitForIdleSync();
assertNull(mFragmentManager.findFragmentByTag("BlockNumberDialog"));
}
use of android.app.DialogFragment in project xabber-android by redsolution.
the class MucPrivateChatInvitationDialog method newInstance.
public static DialogFragment newInstance(AccountJid account, UserJid contact) {
DialogFragment fragment = new MucPrivateChatInvitationDialog();
setArguments(account, contact, fragment);
return fragment;
}
use of android.app.DialogFragment in project NotificationPeekPort by lzanita09.
the class DialogHelper method showAboutDialog.
public static void showAboutDialog(Activity activity) {
FragmentManager fm = activity.getFragmentManager();
FragmentTransaction ft = fm.beginTransaction();
((DialogFragment) Fragment.instantiate(activity, AboutDialogFragment.class.getName())).show(ft, ABOUT_DIALOG_TAG);
}
Aggregations