write Boolean from Parcel - Android android.os

Android examples for android.os:Parcel

Description

write Boolean from Parcel

Demo Code


//package com.java2s;
import android.os.Parcel;

public class Main {
    private static int TRUE = 1;
    private static int FALSE = 0;

    public static void writeBoolean(Parcel dest, boolean value) {
        dest.writeInt(value ? TRUE : FALSE);
    }//w  ww. j  ava  2  s  .  c  o m
}

Related Tutorials