当前位置: 首页>>代码示例>>Java>>正文


Java Bundle.getDouble方法代码示例

本文整理汇总了Java中android.os.Bundle.getDouble方法的典型用法代码示例。如果您正苦于以下问题:Java Bundle.getDouble方法的具体用法?Java Bundle.getDouble怎么用?Java Bundle.getDouble使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.os.Bundle的用法示例。


在下文中一共展示了Bundle.getDouble方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: create

import android.os.Bundle; //导入方法依赖的package包/类
public static FlyingItem create(Bundle bundle) {

        Bitmap bitmap = bundle.getParcelable("mBitmap");
        FlyingItem item2 = new FlyingItem(bitmap);

        item2.mX = bundle.getDouble("mX");
        item2.mXv = bundle.getDouble("mXv");
        item2.mY = bundle.getDouble("mY");
        item2.mYv = bundle.getDouble("mYv");
        item2.mSpinv = bundle.getDouble("mSpinv");
        item2.mSpin = bundle.getDouble("mSpin");
        item2.mBoom = bundle.getBoolean("mBoom");
        item2.mText = bundle.getString("mText");
        item2.fade = bundle.getBoolean("fade");

        item2.mPaint = new Paint();
        item2.mPaint.setColor(bundle.getInt("mPaintColor"));
        item2.mPaint.setAlpha(bundle.getInt("mPaintAlpha"));
        item2.mScale = bundle.getDouble("mScale");
        item2.mHit = bundle.getBoolean("mHit");
        item2.mValue = bundle.getInt("mValue");
        return item2;

    }
 
开发者ID:quaap,项目名称:SeafoodBerserker,代码行数:25,代码来源:FlyingItem.java

示例2: onActivityCreated

import android.os.Bundle; //导入方法依赖的package包/类
@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    if (savedInstanceState != null) {
        t = savedInstanceState.getDouble("time");
        final ISciList<Double> xValues1 = savedInstanceState.getParcelable("xValues1");
        final ISciList<Double> yValues1 = savedInstanceState.getParcelable("yValues1");
        final ISciList<Double> xValues2 = savedInstanceState.getParcelable("xValues2");
        final ISciList<Double> yValues2 = savedInstanceState.getParcelable("yValues2");
        final ISciList<Double> xValues3 = savedInstanceState.getParcelable("xValues3");
        final ISciList<Double> yValues3 = savedInstanceState.getParcelable("yValues3");
        ds1.append(xValues1, yValues1);
        ds2.append(xValues2, yValues2);
        ds3.append(xValues3, yValues3);
    }
}
 
开发者ID:ABTSoftware,项目名称:SciChart.Android.Examples,代码行数:17,代码来源:FifoChartsFragment.java

示例3: onActivityCreated

import android.os.Bundle; //导入方法依赖的package包/类
@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    if (savedInstanceState != null) {
        t = savedInstanceState.getDouble("time");
        yValue = savedInstanceState.getDouble("yValue");

        final double xVisibleRangeMin = savedInstanceState.getDouble("xVisibleRangeMin");
        final double xVisibleRangeMax = savedInstanceState.getDouble("xVisibleRangeMax");
        xVisibleRange.setMinMaxDouble(xVisibleRangeMin, xVisibleRangeMax);

        final ISciList<Double> xValues1 = savedInstanceState.getParcelable("xValues1");
        final ISciList<Double> yValues1 = savedInstanceState.getParcelable("yValues1");
        ds1.append(xValues1, yValues1);
    }
}
 
开发者ID:ABTSoftware,项目名称:SciChart.Android.Examples,代码行数:17,代码来源:AnimatingLineChartFragment.java

示例4: restoreStates

import android.os.Bundle; //导入方法依赖的package包/类
@Override
public void restoreStates(@Nullable Bundle savedInstanceState) {
    Bundle mapViewSavedInstanceState = null;
    if (savedInstanceState != null) {
        eventBitmapIntent = savedInstanceState.getParcelable(EVENT_BITMAP_SAVED_STATE);
        updateEventImage(ImagePicker.getImageFromResult(this,  ImagePicker.PICK_IMAGE_REQUEST_CODE, RESULT_OK, eventBitmapIntent));
        year = savedInstanceState.getInt(YEAR_SAVED_STATE);
        month = savedInstanceState.getInt(MONTH_SAVED_SAVED_STATE);
        dayOfMonth = savedInstanceState.getInt(DAY_OF_MONTH_SAVED_STATE);
        hour = savedInstanceState.getInt(HOUR_SAVED_STATE);
        minutes = savedInstanceState.getInt(MINUTES_SAVED_STATE);
        latitude = savedInstanceState.getDouble(EVENT_LATITUDE_SAVED_STATE);
        longitude = savedInstanceState.getDouble(EVENT_LONGITUDE_SAVED_STATE);
        iso3 = savedInstanceState.getString(EVENT_ISO3_CODE_SAVED_STATE);
        addedUsers = savedInstanceState.getParcelableArrayList(ADDED_USERS_SAVED_STATE);
        mapViewSavedInstanceState = savedInstanceState.getBundle(MAP_VIEW_SAVED_STATE);
    } else {
        addedUsers = new ArrayList<>();
        addedUsers.add(PreferencesUtils.getLoggedUser(this));
    }

    if (mapView != null)
        mapView.onCreate(mapViewSavedInstanceState);

    tvAdmins.setText(getString(R.string.add_admins_with_number, addedUsers.size()));
}
 
开发者ID:GrenderG,项目名称:Protestr,代码行数:27,代码来源:CreateEventActivity.java

示例5: RNPushNotificationAttributes

import android.os.Bundle; //导入方法依赖的package包/类
public RNPushNotificationAttributes(Bundle bundle) {
    id = bundle.getString(ID);
    message = bundle.getString(MESSAGE);
    fireDate = bundle.getDouble(FIRE_DATE);
    title = bundle.getString(TITLE);
    ticker = bundle.getString(TICKER);
    autoCancel = bundle.getBoolean(AUTO_CANCEL);
    largeIcon = bundle.getString(LARGE_ICON);
    smallIcon = bundle.getString(SMALL_ICON);
    bigText = bundle.getString(BIG_TEXT);
    subText = bundle.getString(SUB_TEXT);
    number = bundle.getString(NUMBER);
    sound = bundle.getString(SOUND);
    color = bundle.getString(COLOR);
    group = bundle.getString(GROUP);
    userInteraction = bundle.getBoolean(USER_INTERACTION);
    playSound = bundle.getBoolean(PLAY_SOUND);
    vibrate = bundle.getBoolean(VIBRATE);
    vibration = bundle.getDouble(VIBRATION);
    actions = bundle.getString(ACTIONS);
    tag = bundle.getString(TAG);
    repeatType = bundle.getString(REPEAT_TYPE);
    repeatTime = bundle.getDouble(REPEAT_TIME);
    ongoing = bundle.getBoolean(ONGOING);
}
 
开发者ID:zzzkk2009,项目名称:react-native-leancloud-sdk,代码行数:26,代码来源:RNPushNotificationAttributes.java

示例6: getIntentUpdateUi

import android.os.Bundle; //导入方法依赖的package包/类
/**
 * get intent to update ui
 * @author leibing
 * @createTime 2017/6/13
 * @lastModify 2017/6/13
 * @param
 * @return
 */
private void getIntentUpdateUi() {
    Bundle bundle = getIntent().getExtras();
    int redEnvelopePosition = -1;
    if (bundle != null){
        mData = (ArrayList<UseRedEnvelopeModel>) bundle.getSerializable(PAGE_INTENT_RED_ENVELOPE_LIST);
        originDiscountAmount = bundle.getDouble(PAGE_INTENT_ORIGIN_RED_ENVELOPE_VALUE);
        totalDiscountAmount = originDiscountAmount;
        redEnvelopePosition = bundle.getInt(PAGE_INTENT_RED_ENVELOPE_OPTIMAL_POSITION, -1);
    }
    // 更新数据源
    if (mAdapter != null)
        mAdapter.setData(mData);
    if (redEnvelopePosition != -1){
        itemCheck(redEnvelopePosition, true);
    }
}
 
开发者ID:leibing8912,项目名称:JkShoppingCart,代码行数:25,代码来源:UseRedEnvelopeActivity.java

示例7: getDate

import android.os.Bundle; //导入方法依赖的package包/类
private void getDate(Bundle args) {
    mTitle     = args.getString( getString(R.string.key_title) );
    mContent   = args.getString( getString(R.string.key_content) );
    isLocation = args.getBoolean( getString(R.string.key_is_location) );
    mData      = args.getLong( getString(R.string.key_data), 0 );
    if ( isLocation ) {
        mLatitude  = args.getDouble( getString(R.string.key_latitude) );
        mLongitude = args.getDouble( getString(R.string.key_longitude) );
    }
}
 
开发者ID:OldBigBuddha,项目名称:AlarmWithL-T,代码行数:11,代码来源:ShowDateDialogFragment.java

示例8: onCreate

import android.os.Bundle; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Bundle bundle = savedInstanceState != null ? savedInstanceState : this.getArguments();
    this.id = this.getArguments().getInt(PARAM_ID);
    this.fromDate = bundle.getLong(PARAM_FROM_DATE);
    this.toDate = bundle.getLong(PARAM_TO_DATE);
    this.kwhCost = bundle.getDouble(PARAM_KWH_COST);
    this.amountDays = (int) OhaHelper.getAmountDays(this.fromDate, this.toDate);
}
 
开发者ID:brolam,项目名称:OpenHomeAnalysis,代码行数:11,代码来源:OhaEnergyUseBillFragment.java

示例9: onRestoreInstanceState

import android.os.Bundle; //导入方法依赖的package包/类
/**
 * Overridden to restore instance state when device orientation changes. This method is called automatically if you assign an id to the RangeSeekBar widget using the {@link #setId(int)} method.
 */
@Override
protected void onRestoreInstanceState(Parcelable parcel) {
    final Bundle bundle = (Bundle) parcel;
    super.onRestoreInstanceState(bundle.getParcelable("SUPER"));
    normalizedMinValue = bundle.getDouble("MIN");
    normalizedMaxValue = bundle.getDouble("MAX");
}
 
开发者ID:reyanshmishra,项目名称:Rey-MusicPlayer,代码行数:11,代码来源:RangeSeekBar.java

示例10: getData

import android.os.Bundle; //导入方法依赖的package包/类
/**
 * Reads and returns the correct type of data from the bundle
 */
@SuppressWarnings("unchecked")
private Object getData(Bundle remoteData, RemoteDataType dataType, String keyPrefix) {
    if (DEBUG) {
        Log.v(TAG, "Parsing datatype " + dataType);
    }
    switch (dataType) {
        case Parcelable:
            return remoteData.getParcelable(RemoteEventManager.REMOTE_DATA_KEY + keyPrefix);
        case Double:
            return remoteData.getDouble(RemoteEventManager.REMOTE_DATA_KEY + keyPrefix);
        case Float:
            return remoteData.getFloat(RemoteEventManager.REMOTE_DATA_KEY + keyPrefix);
        case Integer:
            return remoteData.getInt(RemoteEventManager.REMOTE_DATA_KEY + keyPrefix);
        case Long:
            return remoteData.getLong(RemoteEventManager.REMOTE_DATA_KEY + keyPrefix);
        case Byte:
            return remoteData.getByte(RemoteEventManager.REMOTE_DATA_KEY + keyPrefix);
        case Char:
            return remoteData.getChar(RemoteEventManager.REMOTE_DATA_KEY + keyPrefix);
        case Short:
            return remoteData.getShort(RemoteEventManager.REMOTE_DATA_KEY + keyPrefix);
        case String:
            return remoteData.getString(RemoteEventManager.REMOTE_DATA_KEY + keyPrefix);
        case Boolean:
            return (remoteData.getInt(RemoteEventManager.REMOTE_DATA_KEY + keyPrefix) == 1);
        case Parceler:
            return getParcelerData(remoteData, keyPrefix);
        case Remoter:
            return getRemoterData(remoteData, keyPrefix);
        case List:
            return getListData(remoteData, keyPrefix);

    }
    return null;
}
 
开发者ID:josesamuel,项目名称:RxRemote,代码行数:40,代码来源:RemoteObservable.java

示例11: onRestoreInstanceState

import android.os.Bundle; //导入方法依赖的package包/类
/**
 * Overridden to restore instance state when device orientation changes.
 * This method is called automatically if you assign an id to the
 * RangeSeekBar widget using the {@link #setId(int)} method.
 */
@Override
protected void onRestoreInstanceState(Parcelable parcel) {
	final Bundle bundle = (Bundle) parcel;
	super.onRestoreInstanceState(bundle.getParcelable("SUPER"));
	normalizedMinValue = bundle.getDouble("MIN");
	normalizedMaxValue = bundle.getDouble("MAX");
}
 
开发者ID:smartbeng,项目名称:PaoMovie,代码行数:13,代码来源:RangeSeekBar.java

示例12: onCreateDialog

import android.os.Bundle; //导入方法依赖的package包/类
@Override
public Dialog onCreateDialog(Bundle values) {
    if (values != null){
        mTitle = values.getString("title");
        mLatLng = new LatLng(values.getDouble("latitude"), values.getDouble("longitude"));
    }

    // See the example: https://developer.android.com/guide/topics/ui/dialogs.html?hl=zh-tw#DialogFragment
    AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());

    LayoutInflater inflater = getActivity().getLayoutInflater();
    LinearLayout detailView = (LinearLayout) inflater.inflate(R.layout.view_cluster_item_detail, null);
    builder.setView(detailView);

    ((TextView) detailView.findViewById(R.id.title)).setText(mTitle);
    String coor_wgs84_d = ProjFuncs.latLng2DString(mLatLng, false);
    ((TextView) detailView.findViewById(R.id.wgs84_d)).setText(coor_wgs84_d);
    String coor_wgs84_dms = ProjFuncs.latLng2DmsString(mLatLng, false);
    ((TextView) detailView.findViewById(R.id.wgs84_dms)).setText(coor_wgs84_dms);
    String coor_twd97 = ProjFuncs.twd2String(ProjFuncs.latlon2twd97(mLatLng), "");
    ((TextView) detailView.findViewById(R.id.twd97)).setText(coor_twd97);
    String coor_twd67 = ProjFuncs.twd2String(ProjFuncs.latlon2twd67(mLatLng), "");
    ((TextView) detailView.findViewById(R.id.twd67)).setText(coor_twd67);

    detailView.findViewById(R.id.download_trk_file).setOnClickListener(this);

    return builder.create();
}
 
开发者ID:typebrook,项目名称:FiveMinsMore,代码行数:29,代码来源:DetailDialog.java

示例13: getBoxedDouble

import android.os.Bundle; //导入方法依赖的package包/类
public Double getBoxedDouble(Bundle state, String key) {
    if (state.containsKey(key + baseKey)) {
        return state.getDouble(key + baseKey);
    }
    return null;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:7,代码来源:Injector.java

示例14: onCreate

import android.os.Bundle; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_energy_use_details);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
    Bundle bundle = getIntent().getExtras();
    this.beginDateTime = bundle.getLong(PARAM_BEGIN_DATE_TIME, 0);
    this.endDateTime = bundle.getLong(PARAM_End_DATE_TIME, 0);
    this.kwhCost = bundle.getDouble(PARAM_KWH_COST, 0.0);
    this.isShowLog = bundle.getBoolean(PARAM_SHOW_LOG, false);
    this.filterWatts = (FilterWatts) bundle.get(PARAM_FILTER_WATTS);
    this.wattsGreaterEqual = bundle.getDouble(PARAM_WATTS_GREATER_EQUAL);
    this.wattsLessEqual = bundle.getDouble(PARAM_WATTS_LESS_EQUAL);
    this.toolbar = (Toolbar) findViewById(R.id.toolbar);

    //Atualizar o título da tela
    String title = OhaHelper.formatDate(this.beginDateTime, "EEE, dd MMM yyyy");
    this.toolbar.setTitle(OhaHelper.formatCamelCase(title));
    setSupportActionBar(toolbar);
    ActionBar actionBar = getSupportActionBar();
    if (actionBar != null) {
        actionBar.setDisplayHomeAsUpEnabled(true);
    }

    this.titleEnergyUseWhValues = findViewById(R.id.titleEnergyUseWhValues);
    this.swipeRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.swipeRefreshLayout);
    this.recyclerView = (RecyclerView) this.findViewById(R.id.recyclerView);
    this.recyclerView.setLayoutManager(new LinearLayoutManager(this));
    //Instanciar o adaptador conforme o paramemto isShowLog
    if (this.isShowLog) {
        this.ohaEnergyUseAdapter = new OhaEnergyUseWattsAdapter(this);
    } else {
        this.ohaEnergyUseAdapter = new OhaEnergyUseWhAdapter(this, this.kwhCost, this);
    }
    this.recyclerView.setAdapter(this.ohaEnergyUseAdapter);

    this.floatingActionButton = (FloatingActionButton) findViewById(R.id.fab);
    this.floatingActionButton.setOnClickListener(this);
    this.swipeRefreshLayout.setOnRefreshListener(this);
    this.ohaEnergyUseLogHelper = new OhaEnergyUseLogHelper(this, this.beginDateTime, this.endDateTime, this.filterWatts, this.wattsGreaterEqual, this.wattsLessEqual);
}
 
开发者ID:brolam,项目名称:OpenHomeAnalysis,代码行数:42,代码来源:OhaEnergyUseDetailsActivity.java

示例15: getDouble

import android.os.Bundle; //导入方法依赖的package包/类
public double getDouble(Bundle state, String key) {
    return state.getDouble(key + mBaseKey);
}
 
开发者ID:evernote,项目名称:android-state,代码行数:4,代码来源:InjectionHelper.java


注:本文中的android.os.Bundle.getDouble方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。