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


Java Bundle.putFloat方法代碼示例

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


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

示例1: onSaveInstanceState

import android.os.Bundle; //導入方法依賴的package包/類
@Override
protected Parcelable onSaveInstanceState() {
    final Bundle bundle = new Bundle();
    bundle.putParcelable(INSTANCE_STATE, super.onSaveInstanceState());
    bundle.putInt(INSTANCE_TEXT_COLOR, getTextColor());
    bundle.putFloat(INSTANCE_TEXT_SIZE, getProgressTextSize());
    bundle.putFloat(INSTANCE_REACHED_BAR_HEIGHT, getReachedBarHeight());
    bundle.putFloat(INSTANCE_UNREACHED_BAR_HEIGHT, getUnreachedBarHeight());
    bundle.putInt(INSTANCE_REACHED_BAR_COLOR, getReachedBarColor());
    bundle.putInt(INSTANCE_UNREACHED_BAR_COLOR, getUnreachedBarColor());
    bundle.putInt(INSTANCE_MAX, getMax());
    bundle.putInt(INSTANCE_PROGRESS, getProgress());
    bundle.putString(INSTANCE_SUFFIX, getSuffix());
    bundle.putString(INSTANCE_PREFIX, getPrefix());
    return bundle;
}
 
開發者ID:liuyongfeng90,項目名稱:JKCloud,代碼行數:17,代碼來源:NumberProgressBar.java

示例2: onSaveInstanceState

import android.os.Bundle; //導入方法依賴的package包/類
@Override
protected Parcelable onSaveInstanceState() {
    final Bundle bundle = new Bundle();
    bundle.putParcelable(INSTANCE_STATE, super.onSaveInstanceState());
    bundle.putInt(INSTANCE_TEXT_COLOR, getTextColor());
    bundle.putFloat(INSTANCE_TEXT_SIZE, getProgressTextSize());
    bundle.putFloat(INSTANCE_REACHED_BAR_HEIGHT, getReachedBarHeight());
    bundle.putFloat(INSTANCE_UNREACHED_BAR_HEIGHT, getUnreachedBarHeight());
    bundle.putInt(INSTANCE_REACHED_BAR_COLOR, getReachedBarColor());
    bundle.putInt(INSTANCE_UNREACHED_BAR_COLOR, getUnreachedBarColor());
    bundle.putInt(INSTANCE_MAX, getMax());
    bundle.putInt(INSTANCE_PROGRESS, getProgress());
    bundle.putString(INSTANCE_SUFFIX, getSuffix());
    bundle.putString(INSTANCE_PREFIX, getPrefix());
    bundle.putBoolean(INSTANCE_TEXT_VISIBILITY, getProgressTextVisibility());
    return bundle;
}
 
開發者ID:LonelyMushroom,項目名稱:aarLibrary,代碼行數:18,代碼來源:NumberProgressBar.java

示例3: onSaveInstanceState

import android.os.Bundle; //導入方法依賴的package包/類
@Override
protected Parcelable onSaveInstanceState() {
	Parcelable superState = super.onSaveInstanceState();

	Bundle state = new Bundle();
	state.putParcelable(STATE_PARENT, superState);
	state.putFloatArray(STATE_COLOR, mHSVColor);
	float[] hsvColor = new float[3];
	Color.colorToHSV(mColor, hsvColor);
	if (hsvColor[1] < hsvColor[2]) {
		state.putFloat(STATE_SATURATION, hsvColor[1]);
	} else {
		state.putFloat(STATE_VALUE, hsvColor[2]);
	}

	return state;
}
 
開發者ID:Datatellit,項目名稱:xlight_android_native,代碼行數:18,代碼來源:SVBar.java

示例4: onSaveInstanceState

import android.os.Bundle; //導入方法依賴的package包/類
@Override
public Parcelable onSaveInstanceState() {
    Bundle bundle = new Bundle();
    bundle.putParcelable("instanceState", super.onSaveInstanceState());
    bundle.putFloat("saveScale", normalizedScale);
    bundle.putFloat("matchViewHeight", matchViewHeight);
    bundle.putFloat("matchViewWidth", matchViewWidth);
    bundle.putInt("viewWidth", viewWidth);
    bundle.putInt("viewHeight", viewHeight);
    matrix.getValues(m);
    bundle.putFloatArray("matrix", m);
    bundle.putBoolean("imageRendered", imageRenderedAtLeastOnce);
    return bundle;
}
 
開發者ID:hsj-xiaokang,項目名稱:OSchina_resources_android,代碼行數:15,代碼來源:TouchImageView.java

示例5: bundleThumbnail

import android.os.Bundle; //導入方法依賴的package包/類
private static void bundleThumbnail(PlanarYUVLuminanceSource source,
                                    Bundle bundle) {
    int[] pixels = source.renderThumbnail();
    int width = source.getThumbnailWidth();
    int height = source.getThumbnailHeight();
    Bitmap bitmap = Bitmap.createBitmap(pixels, 0, width, width, height,
            Bitmap.Config.ARGB_8888);
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    bitmap.compress(Bitmap.CompressFormat.JPEG, 50, out);
    bundle.putByteArray(DecodeThread.BARCODE_BITMAP, out.toByteArray());
    bundle.putFloat(DecodeThread.BARCODE_SCALED_FACTOR, (float) width
            / source.getWidth());
}
 
開發者ID:angcyo,項目名稱:RLibrary,代碼行數:14,代碼來源:DecodeHandler.java

示例6: onSaveInstanceState

import android.os.Bundle; //導入方法依賴的package包/類
@Override
protected Parcelable onSaveInstanceState() {
    Parcelable superState = super.onSaveInstanceState();

    Bundle state = new Bundle();
    state.putParcelable(STATE_PARENT, superState);
    state.putFloat(STATE_ANGLE, mAngle);
    state.putInt(STATE_OLD_COLOR, mCenterOldColor);
    state.putBoolean(STATE_SHOW_OLD_COLOR, mShowCenterOldColor);

    return state;
}
 
開發者ID:pooyafaroka,項目名稱:PlusGram,代碼行數:13,代碼來源:ColorPickerView.java

示例7: onSaveInstanceState

import android.os.Bundle; //導入方法依賴的package包/類
/**
 * Save badges and current position
 *
 * @param outState bundle to saveInstance
 */
public void onSaveInstanceState(Bundle outState) {
    outState.putInt(CURRENT_SELECTED_ITEM_BUNDLE_KEY, currentSelectedItem);
    outState.putInt(CENTRE_BUTTON_ICON_KEY, centreButtonIcon);
    outState.putInt(SPACE_BACKGROUND_COLOR_KEY, spaceBackgroundColor);
    outState.putBoolean(BADGE_FULL_TEXT_KEY, shouldShowBadgeWithNinePlus);
    outState.putFloat(VISIBILITY, this.getTranslationY());

    if (badgeSaveInstanceHashMap.size() > 0)
        outState.putSerializable(BADGES_ITEM_BUNDLE_KEY, badgeSaveInstanceHashMap);
    if (changedItemAndIconHashMap.size() > 0)
        outState.putSerializable(CHANGED_ICON_AND_TEXT_BUNDLE_KEY, changedItemAndIconHashMap);
}
 
開發者ID:sinhaDroid,項目名稱:BlogBookApp,代碼行數:18,代碼來源:SpaceNavigationView.java

示例8: bundleThumbnail

import android.os.Bundle; //導入方法依賴的package包/類
private static void bundleThumbnail(PlanarYUVLuminanceSource source,
		Bundle bundle) {
	int[] pixels = source.renderThumbnail();
	int width = source.getThumbnailWidth();
	int height = source.getThumbnailHeight();
	Bitmap bitmap = Bitmap.createBitmap(pixels, 0, width, width, height,
			Bitmap.Config.ARGB_8888);
	ByteArrayOutputStream out = new ByteArrayOutputStream();
	bitmap.compress(Bitmap.CompressFormat.JPEG, 50, out);
	bundle.putByteArray(DecodeThread.BARCODE_BITMAP, out.toByteArray());
	bundle.putFloat(DecodeThread.BARCODE_SCALED_FACTOR, (float) width
			/ source.getWidth());
}
 
開發者ID:dufangyu1990,項目名稱:LeCatApp,代碼行數:14,代碼來源:DecodeHandler.java

示例9: showPreview

import android.os.Bundle; //導入方法依賴的package包/類
public void showPreview(float x, float y, int width, int height) throws RemoteException {
    Message msg = Message.obtain(null, CameraHeadService.SHOW_PREVIEW);
    msg.replyTo = mMessenger;
    Bundle b = new Bundle();
    b.putFloat("x", x);
    b.putFloat("y", y);
    b.putInt("w", width);
    b.putInt("h", height);
    msg.setData(b);
    if (mService != null)
        mService.send(msg);
    else
        bindService();

}
 
開發者ID:Dnet3,項目名稱:CustomAndroidOneSheeld,代碼行數:16,代碼來源:ColorDetectionShield.java

示例10: bundleThumbnail

import android.os.Bundle; //導入方法依賴的package包/類
private static void bundleThumbnail(PlanarYUVLuminanceSource source, Bundle bundle) {
  int[] pixels = source.renderThumbnail();
  int width = source.getThumbnailWidth();
  int height = source.getThumbnailHeight();
  Bitmap bitmap = Bitmap.createBitmap(pixels, 0, width, width, height, Bitmap.Config.ARGB_8888);
  ByteArrayOutputStream out = new ByteArrayOutputStream();    
  bitmap.compress(Bitmap.CompressFormat.JPEG, 50, out);
  bundle.putByteArray(DecodeThread.BARCODE_BITMAP, out.toByteArray());
  bundle.putFloat(DecodeThread.BARCODE_SCALED_FACTOR, (float) width / source.getWidth());
}
 
開發者ID:yun2win,項目名稱:tvConnect_android,代碼行數:11,代碼來源:DecodeHandler.java

示例11: onSaveInstanceState

import android.os.Bundle; //導入方法依賴的package包/類
@Override
protected Parcelable onSaveInstanceState() {
	Parcelable superState = super.onSaveInstanceState();

	Bundle state = new Bundle();
	state.putParcelable(STATE_PARENT, superState);
	state.putFloatArray(STATE_COLOR, mHSVColor);

	float[] hsvColor = new float[3];
	Color.colorToHSV(mColor, hsvColor);
	state.putFloat(STATE_SATURATION, hsvColor[1]);

	return state;
}
 
開發者ID:mkulesh,項目名稱:microMathematics,代碼行數:15,代碼來源:SaturationBar.java

示例12: onSaveInstanceState

import android.os.Bundle; //導入方法依賴的package包/類
@Override
protected Parcelable onSaveInstanceState() {
    Bundle b = new Bundle();
    b.putParcelable("instanceState", super.onSaveInstanceState());
    b.putFloat("degrees", mPitch);

    return b;
}
 
開發者ID:andresR8,項目名稱:AttitudeView,代碼行數:9,代碼來源:AttitudeView.java

示例13: onSaveInstanceState

import android.os.Bundle; //導入方法依賴的package包/類
@Override
public Parcelable onSaveInstanceState() {
	Bundle bundle = new Bundle();
	bundle.putParcelable("instanceState", super.onSaveInstanceState());
	bundle.putFloat("saveScale", normalizedScale);
	bundle.putFloat("matchViewHeight", matchViewHeight);
	bundle.putFloat("matchViewWidth", matchViewWidth);
	bundle.putInt("viewWidth", viewWidth);
	bundle.putInt("viewHeight", viewHeight);
	matrix.getValues(m);
	bundle.putFloatArray("matrix", m);
	bundle.putBoolean("imageRendered", imageRenderedAtLeastOnce);
	return bundle;
}
 
開發者ID:MobileDev418,項目名稱:AndroidBackendlessChat,代碼行數:15,代碼來源:TouchImageView.java

示例14: onSaveInstanceState

import android.os.Bundle; //導入方法依賴的package包/類
@Override
protected Parcelable onSaveInstanceState() {
    final Bundle bundle = new Bundle();
    bundle.putParcelable(INSTANCE_STATE, super.onSaveInstanceState());
    bundle.putInt(INSTANCE_TEXT_COLOR, getTextColor());
    bundle.putFloat(INSTANCE_TEXT_SIZE, getTextSize());
    bundle.putInt(INSTANCE_FINISHED_STROKE_COLOR, getFinishedColor());
    bundle.putInt(INSTANCE_UNFINISHED_STROKE_COLOR, getUnfinishedColor());
    bundle.putInt(INSTANCE_MAX, getMax());
    bundle.putInt(INSTANCE_PROGRESS, getProgress());
    bundle.putString(INSTANCE_SUFFIX, getSuffixText());
    bundle.putString(INSTANCE_PREFIX, getPrefixText());
    return bundle;
}
 
開發者ID:smartbeng,項目名稱:PaoMovie,代碼行數:15,代碼來源:CircleProgress.java

示例15: putFloat

import android.os.Bundle; //導入方法依賴的package包/類
public void putFloat(Bundle state, String key, float x) {
    state.putFloat(key + baseKey, x);
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:4,代碼來源:Injector.java


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