當前位置: 首頁>>代碼示例>>Java>>正文


Java AppCompatDialogFragment類代碼示例

本文整理匯總了Java中android.support.v7.app.AppCompatDialogFragment的典型用法代碼示例。如果您正苦於以下問題:Java AppCompatDialogFragment類的具體用法?Java AppCompatDialogFragment怎麽用?Java AppCompatDialogFragment使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


AppCompatDialogFragment類屬於android.support.v7.app包,在下文中一共展示了AppCompatDialogFragment類的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createSublimePicker

import android.support.v7.app.AppCompatDialogFragment; //導入依賴的package包/類
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");

}
 
開發者ID:jpaijh,項目名稱:TYT,代碼行數:18,代碼來源:T_SearchOrderFormActivity.java

示例2: createSublimePicker

import android.support.v7.app.AppCompatDialogFragment; //導入依賴的package包/類
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", options);
    pickerFrag.setArguments(bundle);

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

}
 
開發者ID:jpaijh,項目名稱:TYT,代碼行數:18,代碼來源:T_NewNoticeForeignExchangeActivity.java

示例3: onCreate

import android.support.v7.app.AppCompatDialogFragment; //導入依賴的package包/類
@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);
}
 
開發者ID:pedromassango,項目名稱:Programmers,代碼行數:14,代碼來源:ResetPasswordDialogFragment.java

示例4: onCreateHomeScreenShortcut

import android.support.v7.app.AppCompatDialogFragment; //導入依賴的package包/類
@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);
}
 
開發者ID:creativetrendsapps,項目名稱:SimplicityBrowser,代碼行數:15,代碼來源:MainActivity.java

示例5: onOptionsItemSelected

import android.support.v7.app.AppCompatDialogFragment; //導入依賴的package包/類
@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);
}
 
開發者ID:dakotasanchez,項目名稱:farmers-market-finder,代碼行數:13,代碼來源:MainActivity.java

示例6: onCreate

import android.support.v7.app.AppCompatDialogFragment; //導入依賴的package包/類
@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());
}
 
開發者ID:CrazyOrr,項目名稱:NewMoviesExpress,代碼行數:10,代碼來源:LoadingDialogFragment.java

示例7: SessionListAdapter

import android.support.v7.app.AppCompatDialogFragment; //導入依賴的package包/類
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();
}
 
開發者ID:QuantumBadger,項目名稱:RedReader,代碼行數:14,代碼來源:SessionListAdapter.java

示例8: onOptionsItemSelected

import android.support.v7.app.AppCompatDialogFragment; //導入依賴的package包/類
@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);
}
 
開發者ID:snappy46,項目名稱:GuitarixDroid,代碼行數:44,代碼來源:MainActivity.java

示例9: onCreate

import android.support.v7.app.AppCompatDialogFragment; //導入依賴的package包/類
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setStyle(AppCompatDialogFragment.STYLE_NO_TITLE, R.style.AppTheme);
}
 
開發者ID:pedromassango,項目名稱:Programmers,代碼行數:7,代碼來源:ViewImageDIalogFragment.java

示例10: showFragment

import android.support.v7.app.AppCompatDialogFragment; //導入依賴的package包/類
public static void showFragment(Activity activity, Bundle bundle, AppCompatDialogFragment fragmentClass) {
    FragmentTransaction ft = ((AppCompatActivity) activity).getSupportFragmentManager().beginTransaction();
    fragmentClass.setArguments(bundle);
    fragmentClass.show(ft, null);
}
 
開發者ID:pedromassango,項目名稱:Programmers,代碼行數:6,代碼來源:IntentUtils.java

示例11: onCreateHomeScreenShortcut

import android.support.v7.app.AppCompatDialogFragment; //導入依賴的package包/類
void onCreateHomeScreenShortcut(AppCompatDialogFragment dialogFragment); 
開發者ID:creativetrendsapps,項目名稱:SimplicityBrowser,代碼行數:2,代碼來源:CreateShortcut.java


注:本文中的android.support.v7.app.AppCompatDialogFragment類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。