Android examples for android.os:Bundle
intercept Float Param from Bundle
import android.content.Intent; import android.os.Bundle; import android.os.Parcelable; public class Main{ public static float interceptFloatParam(Bundle savedInstanceState, Intent intent, String paramName) { float ret = 0; if (savedInstanceState != null) { ret = savedInstanceState.getFloat(paramName, 0); } else {/*from w w w . ja va 2 s. c om*/ if (intent != null) { Bundle incomming = intent.getExtras(); if (incomming != null) { ret = incomming.getFloat(paramName, 0); } } } return ret; } }