Example usage for android.os Bundle getByte

List of usage examples for android.os Bundle getByte

Introduction

In this page you can find the example usage for android.os Bundle getByte.

Prototype

@Override
public Byte getByte(String key, byte defaultValue) 

Source Link

Document

Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.

Usage

From source file:Main.java

public static byte interceptByteParam(Bundle savedInstanceState, Intent intent, String paramName) {
    byte ret = 0;

    if (savedInstanceState != null) {
        ret = savedInstanceState.getByte(paramName, (byte) 0);
    } else {/*from  ww w  . j a  va  2  s.  c o  m*/
        if (intent != null) {
            Bundle incomming = intent.getExtras();
            if (incomming != null) {
                ret = incomming.getByte(paramName, (byte) 0);
            }
        }
    }

    return ret;
}

From source file:de.stadtrallye.rallyesoft.fragments.TasksOverviewFragment.java

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.tasks_overview, container, false);

    list = (ListView) v.findViewById(R.id.tasks_list);

    if (android.os.Build.VERSION.SDK_INT >= 11)
        setLayoutTransition((ViewGroup) v);

    list.setOnItemClickListener(this);
    list.setOnItemLongClickListener(this);
    //      list.setFastScrollEnabled(true);

    grp_map = (ViewGroup) v.findViewById(R.id.map);

    if (savedInstanceState != null) {
        size = savedInstanceState.getByte(Std.SIZE, size);
    }// w ww. j av a2  s .c o m
    setSize(size);

    return v;
}