Question: I have a csv file with three columns and I want to get the third column into an Iterator. I want to filter out the headers by using the trytoDouble method in combination of the Pattern Matching.

```
def trytoDouble(s: String): Option[Double] = {
  try {
    Some(s.toDouble)
  } catch {
    case e: Exception => None
  }
}

val asdf = Source.fromFile("my.csv").getLines().map(_.split(",").map(_.trim).map(utils.trytoDouble(_))).map{
  _ match {
    case Array(a, b, Some(c: Double)) => c
  }
}

```

results in

> 
> An exception or error caused a run to abort: [Lscala.Option;@2b4a2ec7 (of class [Lscala.Option;) 
>  scala.MatchError: [Lscala.Option;@2b4a2ec7 (of class [Lscala.Option;)
> 
> 
> 

what did I do wrong?

Answer: 
Try this

```
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
            getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
            getWindow().setStatusBarColor(Color.TRANSPARENT);
        }

```

and remove this **android:fitsSystemWindows=”true”** from **XML**
Create a **`Custom`** class

```
public class CommonStatusBarColor {

     public void StatusBarColor(Activity activity, String colorCode)
        {
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
            {
                Window window =activity.getWindow();
                window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
                window.setStatusBarColor(Color.parseColor(colorCode));
            }

        }

}

```

Then Call in **`onCreateView`** section.

```
 CommonStatusBarColor commonStatusBarColorObj =new CommonStatusBarColor();
 commonStatusBarColorObj.StatusBarColor(getActivity(),"#00ffffff"); // set your color

```