Question: i am creating project that have many activity. The first time i use navigation drawer as default activity. Then i create new basic activity inside it. i set my primary colour something like green. And the problem is i don't know why background colour at top different between the navigation drawer and basic activity. The drawer navigation has Green background but the Basic Activity its Grey background colour. i check my Android Manifest it have same App Theme No Action Bar. I want both have same(green) background colour.. Any suggest? Thank you

Drawer Navigation layout.
[![this is drawer navigation layout look like in top action bar](https://i.stack.imgur.com/iJQpx.jpg)](https://i.stack.imgur.com/iJQpx.jpg)

Basic Activity layout
[![this is basic activity layout on action bar](https://i.stack.imgur.com/WzZm5.jpg)](https://i.stack.imgur.com/WzZm5.jpg)

Answer: 
You need to change your base $available\_dates structure to one of those 2:

```
$available_dates = array(
    '2017-11-28'=>array(),
    '2017-11-29'=>array(),
    '2017-11-30'=>array(),
);

```

or

```
$available_dates = Array
(
    [0] => array('date'=>'2017-11-28' , 'times'=>array())
    [1] => array('date'=>'2017-11-29' , 'times'=>array())
    [2] => array('date'=>'2017-11-30' , 'times'=>array())
)

```

the purpuse is to save the "times" in inner array.

and then when you are iterate $available\_dates take the date from the key (option 1) or take the date from the inner "date" new key (option 2),
and for every json result from API ... enter to "times" array

```
foreach($available_dates AS $k=>$date) {

    $url = "HTTP API END POINT";
    $json = json_decode(get_JSON($url),true);
    $total_records = intval($json['total']);

    $tour_times = array();

    for($b=0;$b<$total_records;$b++) {
         //$tour_time is a string e.g. 11:30 AM
         $tour_time = $json['item'][$b]['time'];

         //Keep track, add to my time array
         $tour_times[] = $tour_time;
    }

    //option 1
    $available_dates[$k] = $tour_times;

    // option 2
    $available_dates[$k]['times'] = $tour_times;
}

```
You can add things like this:

```
$previous_date = $available_dates[$a];

$available_dates[$a] = array();

$available_dates[$a][] = $previous_date;

$merge = array_merge($available_dates[$a], $tour_times);

```