Clear the transparency in a color - Android Graphics

Android examples for Graphics:Color

Description

Clear the transparency in a color

Demo Code

/*******************************************************************************
 * Copyright (c) 2011 MadRobot./*from w w w .ja  va2  s.  com*/
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Lesser Public License v2.1
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * 
 * Contributors:
 *  Elton Kent - initial API and implementation
 ******************************************************************************/
//package com.java2s;

public class Main {
    /**
     * Clear the transparency in a color
     * 
     * @param color
     * @return
     */
    public static int clearTransparency(int color) {
        return color & 0x00FFFFFF;
    }
}

Related Tutorials