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


Java Crouton.cancelAllCroutons方法代碼示例

本文整理匯總了Java中de.keyboardsurfer.android.widget.crouton.Crouton.cancelAllCroutons方法的典型用法代碼示例。如果您正苦於以下問題:Java Crouton.cancelAllCroutons方法的具體用法?Java Crouton.cancelAllCroutons怎麽用?Java Crouton.cancelAllCroutons使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在de.keyboardsurfer.android.widget.crouton.Crouton的用法示例。


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

示例1: onMapClick

import de.keyboardsurfer.android.widget.crouton.Crouton; //導入方法依賴的package包/類
/**
 * This callback is executed when a click occurs somewhere in map.
 * If there is
 * @param point
 */
@Override
public void onMapClick(LatLng point) {
    if(expectingLocation){
        Crouton.cancelAllCroutons();
        expectingLocation=false;

        if(expectingAction == ACTION_NEW_PIN){
            new EditPinDialog(this, new Place(point.latitude, point.longitude), this).show();
            expectingAction = ACTION_NONE;
        }
        else if(expectingAction == ACTION_GET_ORIGIN){
            new ReverseGeocodingTask(getBaseContext()).execute(point.latitude, point.longitude);
        }
        else if(expectingAction == ACTION_GET_DESTINATION){
            new ReverseGeocodingTask(getBaseContext()).execute(point.latitude, point.longitude);
        }

    }
    else{
        removeSelectedMarker();
    }
}
 
開發者ID:dklisiaris,項目名稱:geopin,代碼行數:28,代碼來源:MainMapActivity.java

示例2: onQuerySuccess

import de.keyboardsurfer.android.widget.crouton.Crouton; //導入方法依賴的package包/類
/**
 * Ответ от сервера
 * @param res
 */
@Override
public void onQuerySuccess(ShikiStatusResult res) {
    if(activity == null)
        return;
    activity.getAC().getLoaderController().hide();
    // success auth
    if(res.isSuccess() && activity.getAC().getShikiUser().getId()!=null){
        activity.startActivity(new Intent(activity, MainActivity.class));
        activity.finish();
    // error auth
    } else if(res.isError() && !TextUtils.isEmpty(res.getMsg())){
        Crouton.cancelAllCroutons();
        Crouton.makeText(activity, res.getMsg(), Style.ALERT).show();
    }
}
 
開發者ID:LeshiyGS,項目名稱:shikimori,代碼行數:20,代碼來源:AuthFragment.java

示例3: onPause

import de.keyboardsurfer.android.widget.crouton.Crouton; //導入方法依賴的package包/類
@Override
public void onPause() {
	super.onPause();

	commitPending();
	stopJingles();
	Crouton.cancelAllCroutons();

	// Clears data structures
	// selectedNotes.clear();
	if (mAdapter != null) {
		mAdapter.clearSelectedItems();
	}
	listView.clearChoices();
	if (mActionMode != null) {
		mActionMode.finish();
	}
}
 
開發者ID:kanpol,項目名稱:omni-note,代碼行數:19,代碼來源:ListFragment.java

示例4: display

import de.keyboardsurfer.android.widget.crouton.Crouton; //導入方法依賴的package包/類
/**
 * Method used to display message in an activity
 *
 * @param pActivity
 *            activity
 * @param msg
 * @param success
 */
public static void display(final Activity pActivity, final CharSequence msg, final CoutonColor coutonColor) {

	int color = 0;
	switch (coutonColor) {
	case GREEN:
		color = pActivity.getResources().getColor(R.color.green_success);
		break;
	case ORANGE:
		color = pActivity.getResources().getColor(R.color.orange);
		break;
	case BLACK:
	default:
		color = pActivity.getResources().getColor(R.color.black_error);
	}

	// Remove all previous crouton
	Crouton.cancelAllCroutons();
	// Build style
	Style style = new Style.Builder().setBackgroundColorValue(color) //
			.setPaddingDimensionResId(R.dimen.crouton_padding) //
			.setGravity(Gravity.CENTER) //
			.setTextAppearance(R.style.Crouton_TextApparence) //
			.build();

	Crouton.showText(pActivity, msg, style, R.id.crouton);
}
 
開發者ID:JackuyLiu,項目名稱:Android-NFC-Paycard-Reader,代碼行數:35,代碼來源:CroutonUtils.java

示例5: onOptionsItemSelected

import de.keyboardsurfer.android.widget.crouton.Crouton; //導入方法依賴的package包/類
@Override
public boolean onOptionsItemSelected(final MenuItem item) {
	if (mActionBarDrawerToggle.onOptionsItemSelected(item)) {
		Crouton.cancelAllCroutons();
		return true;
	}
	return super.onOptionsItemSelected(item);
}
 
開發者ID:JackuyLiu,項目名稱:Android-NFC-Paycard-Reader,代碼行數:9,代碼來源:HomeActivity.java

示例6: prepareCamera

import de.keyboardsurfer.android.widget.crouton.Crouton; //導入方法依賴的package包/類
public static void prepareCamera(Activity ctx) {
    try {
        Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
        Uri mImageCaptureUri;
        String state = Environment.getExternalStorageState();
        if (Environment.MEDIA_MOUNTED.equals(state)) {
            if (Uri.fromFile(CroperinoFileUtil.newCameraFile()) != null) {
                if (Build.VERSION.SDK_INT >= 23) {
                    mImageCaptureUri = FileProvider.getUriForFile(ctx,
                            ctx.getApplicationContext().getPackageName() + ".provider",
                            CroperinoFileUtil.newCameraFile());
                } else {
                    mImageCaptureUri = Uri.fromFile(CroperinoFileUtil.newCameraFile());
                }
            } else {
                mImageCaptureUri = FileProvider.getUriForFile(ctx,
                        ctx.getApplicationContext().getPackageName() + ".provider",
                        CroperinoFileUtil.newCameraFile());
            }
        } else {
            mImageCaptureUri = InternalStorageContentProvider.CONTENT_URI;
        }
        intent.putExtra(android.provider.MediaStore.EXTRA_OUTPUT, mImageCaptureUri);
        intent.putExtra("return-data", true);
        ctx.startActivityForResult(intent, CroperinoConfig.REQUEST_TAKE_PHOTO);
    } catch (Exception e) {
        Crouton.cancelAllCroutons();
        if (e instanceof ActivityNotFoundException) {
            Crouton.makeText(ctx, "Activity not found", Style.ALERT).show();
        } else if (e instanceof IOException) {
            Crouton.makeText(ctx, "Image file captured not found", Style.ALERT).show();
        } else {
            Crouton.makeText(ctx, "Camera access failed", Style.ALERT).show();
        }
    }
}
 
開發者ID:ekimual,項目名稱:croperino,代碼行數:37,代碼來源:Croperino.java

示例7: onPause

import de.keyboardsurfer.android.widget.crouton.Crouton; //導入方法依賴的package包/類
@Override
public void onPause() {
    super.onPause();
    searchQueryInstant = searchQuery;
    stopJingles();
    Crouton.cancelAllCroutons();
    if (!keepActionMode) {
        commitPending();
        list.clearChoices();
        if (getActionMode() != null) {
            getActionMode().finish();
        }
    }
}
 
開發者ID:ApplicationFactory,項目名稱:PEP---Notes,代碼行數:15,代碼來源:ListFragment.java

示例8: onUndo

import de.keyboardsurfer.android.widget.crouton.Crouton; //導入方法依賴的package包/類
@Override
public void onUndo(Parcelable undoToken) {
    // Cycles removed items to re-insert into adapter
    for (Note note : modifiedNotes) {
        //   Manages uncategorize or archive  undo
        if ((undoCategorize && !Navigation.checkNavigationCategory(undoCategoryMap.get(note)))
                || undoArchive && !Navigation.checkNavigation(Navigation.NOTES)) {
            if (undoCategorize) {
                note.setCategory(undoCategoryMap.get(note));
            } else if (undoArchive) {
                note.setArchived(undoArchivedMap.get(note));
            }
            listAdapter.replace(note, listAdapter.getPosition(note));
            // Manages trash undo
        } else {
            list.insert(undoNotesList.keyAt(undoNotesList.indexOfValue(note)), note);
        }
    }

    listAdapter.notifyDataSetChanged();

    selectedNotes.clear();
    undoNotesList.clear();
    modifiedNotes.clear();

    undoTrash = false;
    undoArchive = false;
    undoCategorize = false;
    undoNotesList.clear();
    undoCategoryMap.clear();
    undoArchivedMap.clear();
    undoCategorizeCategory = null;
    Crouton.cancelAllCroutons();

    if (getActionMode() != null) {
        getActionMode().finish();
    }
    ubc.hideUndoBar(false);
    fab.showFab();
}
 
開發者ID:ApplicationFactory,項目名稱:PEP---Notes,代碼行數:41,代碼來源:ListFragment.java

示例9: onPause

import de.keyboardsurfer.android.widget.crouton.Crouton; //導入方法依賴的package包/類
@Override
protected void onPause() {
    super.onPause();
    Crouton.cancelAllCroutons();
    if (mInterstitialAd.isLoaded()) {
        mInterstitialAd.show();
    }
}
 
開發者ID:ApplicationFactory,項目名稱:PEP---Notes,代碼行數:9,代碼來源:MainActivity.java

示例10: onDestroy

import de.keyboardsurfer.android.widget.crouton.Crouton; //導入方法依賴的package包/類
@Override
public void onDestroy() {
    LOGI(TAG, "onDestroy()");
    Crouton.cancelAllCroutons();
    try {
        MainThreadBus.get().unregister(this);
    } catch (Throwable t) {
        LOGE(TAG, "Unable to unregister from Otto.", t);
    }
    super.onDestroy();
}
 
開發者ID:Tombarr,項目名稱:Noyze,代碼行數:12,代碼來源:ConfigurationActivity.java

示例11: onPause

import de.keyboardsurfer.android.widget.crouton.Crouton; //導入方法依賴的package包/類
@Override
protected void onPause() {
    super.onPause();
    m_eventBus.unregister(this);
    Crouton.cancelAllCroutons();
    dismissDialog();
}
 
開發者ID:johncarpenter,項目名稱:MarketAndroid,代碼行數:8,代碼來源:BaseActivity.java

示例12: onDestroy

import de.keyboardsurfer.android.widget.crouton.Crouton; //導入方法依賴的package包/類
/**
 * Clean the file cache when root activity exits.
 */
@Override
protected void onDestroy() {
    super.onDestroy();
    if (BuildConfig.DEBUG) Log.d(getLogTag(), "onDestroy");
    Crouton.cancelAllCroutons();
}
 
開發者ID:brk3,項目名稱:glimmr,代碼行數:10,代碼來源:BaseActivity.java

示例13: show

import de.keyboardsurfer.android.widget.crouton.Crouton; //導入方法依賴的package包/類
/**
 * Show a usage tip via an INFO style crouton.  Tips are shown once per session unless the
 * force param is true.
 * @param activity
 * @param tip
 * @param force
 */
public void show(Activity activity, String tip, boolean force) {
    SharedPreferences defaultSharedPrefs =
            PreferenceManager.getDefaultSharedPreferences(activity);
    boolean enable = defaultSharedPrefs.getBoolean(Constants.KEY_ENABLE_USAGE_TIPS, false);
    if (!enable) {
        if (BuildConfig.DEBUG) Log.d(TAG, "Usage tips disabled in preferences");
        return;
    }
    if (!force && !mShownTips.contains(tip)) {
        Crouton.cancelAllCroutons();
        Crouton.makeText(activity, tip, Style.INFO).show();
        mShownTips.add(tip);
    }
}
 
開發者ID:brk3,項目名稱:glimmr,代碼行數:22,代碼來源:UsageTips.java

示例14: onDestroy

import de.keyboardsurfer.android.widget.crouton.Crouton; //導入方法依賴的package包/類
@Override
protected void onDestroy() {
	Crouton.cancelAllCroutons();
	super.onDestroy();
}
 
開發者ID:JackuyLiu,項目名稱:Android-NFC-Paycard-Reader,代碼行數:6,代碼來源:HomeActivity.java

示例15: onDestroy

import de.keyboardsurfer.android.widget.crouton.Crouton; //導入方法依賴的package包/類
@Override
public void onDestroy() {
    this.cancelRequests();
    Crouton.cancelAllCroutons();
}
 
開發者ID:alessandrogurgel,項目名稱:pedefacil,代碼行數:6,代碼來源:PlaceRemoteProvider.java


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