微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

android.support.v7.app.AppCompatDialogFragment的实例源码

项目:TYT    文件T_SearchOrderFormActivity.java   
private void createSublimePicker() {
    SublimePickerFragment pickerFrag = new SublimePickerFragment();
    pickerFrag.setCallback(mFragmentCallback);

    SublimeOptions options = new SublimeOptions();
    options.setdisplayOptions(SublimeOptions.ACTIVATE_DATE_PICKER); // 设置显示什么选择器(日期,时间)
    options.setPickerToShow(SublimeOptions.Picker.DATE_PICKER); // 设置显示什么选择器(日期,时间)
    options.setCanPickDaterange(true); // 设置长按拖动进行日期范围选择

    Bundle bundle = new Bundle();
    bundle.putParcelable("SUBLIME_OPTIONS",options);
    pickerFrag.setArguments(bundle);

    pickerFrag.setStyle(AppCompatDialogFragment.STYLE_NO_TITLE,0);
    pickerFrag.show(getSupportFragmentManager(),"SUBLIME_PICKER");

}
项目:TYT    文件T_AccountSearchActivity.java   
private void createSublimePicker() {
    SublimePickerFragment pickerFrag = new SublimePickerFragment();
    pickerFrag.setCallback(mFragmentCallback);

    SublimeOptions options = new SublimeOptions();
    options.setdisplayOptions(SublimeOptions.ACTIVATE_DATE_PICKER); // 设置显示什么选择器(日期,时间)
    options.setPickerToShow(SublimeOptions.Picker.DATE_PICKER); // 设置显示什么选择器(日期,时间)
    options.setCanPickDaterange(true); // 设置长按拖动进行日期范围选择

    Bundle bundle = new Bundle();
    bundle.putParcelable("SUBLIME_OPTIONS","SUBLIME_PICKER");

}
项目:TYT    文件T_NewNoticeForeignExchangeActivity.java   
private void createSublimePicker() {
    SublimePickerFragment pickerFrag = new SublimePickerFragment();
    pickerFrag.setCallback(mFragmentCallback);

    SublimeOptions options = new SublimeOptions();
    options.setdisplayOptions(SublimeOptions.ACTIVATE_DATE_PICKER); // 设置显示什么选择器(日期,时间)
    options.setPickerToShow(SublimeOptions.Picker.DATE_PICKER); // 设置显示什么选择器(日期,时间)
    options.setCanPickDaterange(false); // 设置长按拖动进行日期范围选择

    Bundle bundle = new Bundle();
    bundle.putParcelable("SUBLIME_OPTIONS","SUBLIME_PICKER");

}
项目:Programmers    文件ResetPasswordDialogFragment.java   
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    presenter = new Presenter(this);

    //Prepare the Dialog
    progressDialog = new ProgressDialog(getActivity());
    progressDialog.setIndeterminate(true);
    progressDialog.setCancelable(false);

    setStyle(AppCompatDialogFragment.STYLE_NO_TITLE,R.style.AppTheme);
}
项目:Simplicitybrowser    文件MainActivity.java   
@Override
public void onCreateHomeScreenShortcut(AppCompatDialogFragment dialogFragment) {
    EditText shortcutNameEditText = dialogFragment.getDialog().findViewById(R.id.shortcut_name_edittext);
    Intent intent1 = new Intent(getApplicationContext(),MainActivity.class);
    intent1.setAction(Intent.ACTION_VIEW);
    intent1.setData(Uri.parse(mSearchView.getText().toString()));
    intent1.putExtra("duplicate",false);
    ShortcutInfoCompat pinShortcutInfo = new ShortcutInfoCompat.Builder(MainActivity.this,webViewTitle)
            .setShortLabel(shortcutNameEditText.getText().toString())
            .setIcon(IconCompat.createWithBitmap(StaticUtils.getCircleBitmap(favoriteIcon)))
            .setIntent(intent1)
            .build();
    ShortcutManagerCompat.requestPinShortcut(MainActivity.this,pinShortcutInfo,null);
}
项目:farmers-market-finder    文件MainActivity.java   
@Override
public boolean onoptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
        case android.R.id.home:
            return true;
        case R.id.action_about:
            AppCompatDialogFragment frag = new AboutDialogFragment();
            frag.show(getSupportFragmentManager(),"dialog1");
            return true;
    }
    return super.onoptionsItemSelected(item);
}
项目:NewMoviesExpress    文件LoadingDialogFragment.java   
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Bundle args = getArguments();
    if (args != null) {
        mPrompt = args.getString(KEY_PROMPT);
    }
    setStyle(AppCompatDialogFragment.STYLE_NO_FRAME,getTheme());
}
项目:RedReader    文件Sessionlistadapter.java   
public Sessionlistadapter(final Context context,final URI url,final UUID current,Sessionchangelistener.SessionChangeType type,final AppCompatDialogFragment fragment) {
    this.context = context;
    this.current = current;
    this.type = type;
    this.fragment = fragment;

    sessions = new ArrayList<>(
        CacheManager.getInstance(context).getSessions(url,RedditaccountManager.getInstance(context).getDefaultAccount()));

    final TypedArray attr = context.obtainStyledAttributes(new int[]{R.attr.rrIconRefresh,});
    rrIconRefresh = ContextCompat.getDrawable(context,attr.getResourceId(0,0));
    attr.recycle();
}
项目:guitarixDroid    文件MainActivity.java   
@Override
public boolean onoptionsItemSelected(MenuItem item) {
    int id = item.getItemId();

    // setting menu activity is launched
    if (id == R.id.action_settings) {
        Intent settings = new Intent(this,SettingsActivity.class);
        startActivity(settings);
        return true;
    }

    // about activity is launched
    if (id == R.id.action_about) {
        AppCompatDialogFragment newFragment = AboutDialogFragment.newInstance();
        newFragment.show(getSupportFragmentManager(),"dialog");
        return true;
    }

    // connect action
    if (id == R.id.action_connect) {
        presenter.onConnectMenuClicked();
        return true;
    }

    // clear all preset
    if (id == R.id.action_clear_preset) {
        new MaterialDialog.Builder(this)
                .title("Clear all the presets?")
                .content("This will clear all the guitarix presets stored on the device. guitarix presets will remain intact.  Do you wish to continue?")
                .positiveText(R.string.agree)
                .negativeText("Cancel")
                .onPositive(new MaterialDialog.SingleButtonCallback() {
                    @Override
                    public void onClick(@NonNull MaterialDialog dialog,@NonNull DialogAction which) {
                        presenter.clearallPreset();
                    }
                })
                .show();
        return true;
    }

    return super.onoptionsItemSelected(item);
}
项目:Programmers    文件ViewImageDIalogFragment.java   
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setStyle(AppCompatDialogFragment.STYLE_NO_TITLE,R.style.AppTheme);
}
项目:Programmers    文件IntentUtils.java   
public static void showFragment(Activity activity,Bundle bundle,AppCompatDialogFragment fragmentClass) {
    FragmentTransaction ft = ((AppCompatActivity) activity).getSupportFragmentManager().beginTransaction();
    fragmentClass.setArguments(bundle);
    fragmentClass.show(ft,null);
}
项目:Programmers    文件IntentUtils.java   
public static void showFragment(Activity activity,AppCompatDialogFragment fragmentClass) {
    FragmentTransaction ft = ((AppCompatActivity) activity).getSupportFragmentManager().beginTransaction();
    fragmentClass.show(ft,null);
}
项目:Simplicitybrowser    文件CreateShortcut.java   
void onCreateHomeScreenShortcut(AppCompatDialogFragment dialogFragment);

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。