当前位置: 首页>>代码示例>>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;未经允许,请勿转载。