put Float value to Bundle, or return empty Bundle - Android android.os

Android examples for android.os:Bundle

Description

put Float value to Bundle, or return empty Bundle

Demo Code

import android.os.Bundle;
import java.util.ArrayList;

public class Main{

    public static Bundle putFloat(Bundle bundle, String key, float value) {
        if (bundle == null) {
            bundle = new Bundle();
        }/*  w w  w .j a  v  a  2s  .  c om*/
        bundle.putFloat(key, value);
        return bundle;
    }
}

Related Tutorials