# Dialog with ActionBar's

• Hello! Starting the second activate in a standard way:

``````public void showCalendarActivity()
{
Intent intentTask = new Intent(this, CalendarActivity.class);
}
``````

If I start a second activate as Dialog:

``````public void showCalendarActivity()
{
Dialog dialog = new Dialog(this);
dialog.setContentView(R.layout.activity_calendar);
dialog.show();
}
``````

Is there a way to get this:

I mean. Dialog, but with ActionBar's top?

UPDATE

Using the advice, added Toolbar and in the manifested style. `android:theme="@style/Theme.AppCompat.Dialog"`♪ Calling the first way that the usual activate is:

``````Intent intentTask = new Intent(this, CalendarActivity.class);
``````

Something similar to the desired result:

But somehow the calendar became "transparent." How do we eliminate this problem? And how do we remove the title from the Tulbar? The title is not given in the layout. And how do we focus on the top?

To that effect:

It's even better to get the top script off, too.

• In order for your Assytities to be displayed as a dialogue in the manifesto file, set the following theme:

``````<activity android:theme="@android:style/Theme.Dialog" />
``````

Either, using support library:

`````` <activity android:theme="@style/Theme.AppCompat.Dialog"/>
``````

2

2

2

2

2

2

2

2

2

2

2

2

2

2

2