Question: I am making ActionBar where is date and a button. This is my code:

```
public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        ActionBar actionBar = getActionBar();
        String dateString = (String) android.text.format.DateFormat.format("yyyy/MM/dd", new java.util.Date());
        actionBar.setTitle(dateString); 

    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, menu);
        Button add = (Button) findViewById(R.id.add);
        Button edit = (Button) findViewById(R.id.edit);
        Button discard = (Button) findViewById(R.id.discard);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
            case R.id.add:
                Intent intent = new Intent(MainActivity.this, Add.class);
                startActivity(intent); 

               break;
        }
        return false;
        }
    }

```

And a problem is that the Date appears in ActionBar but button don't. Why the button don't appear?

Answer: 
Accessing sub-collection will be worked on, 

meanwhile you can use this workaround: <http://console.neo4j.org/r/f7lmtk>

```
start n=node(*) 
where has(n.name) 
with collect(n.name) as names 
return reduce(a=[], x in names : a + filter(y in [x] : length(a)<2)) as two_names

```

`Reduce` is used to build up the result list in the aggregator
And `filter` is used instead of the conditional `case ... when ...` which is only available in 2.0

`filter(y in [x] : length(a)<2)` returns a list with the element when the condition is true and an empty list when the condition is false

adding that result to the accumulator with `reduce` builds up the list incrementally
Be careful, the new **filter** syntax is:

filter(x IN a.array **WHERE** length(x)= 3)