Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.graphics.RectF;

public class Main {
    public static RectF toRectF(String flattened) {
        float[] bounds = new float[4];
        String[] strings = flattened.split(" ");
        for (int i = 0; i < 4; i++)
            bounds[i] = Float.parseFloat(strings[i]);
        return new RectF(bounds[0], bounds[1], bounds[2], bounds[3]);
    }
}