Dhiraj Jadhav
Dhiraj Jadhav

Reputation: 11

How to popup an activity in Android?

I am working with chat application. I have developed a grid layout for smileys. I have two activities A and B. A is for chat window with smiley button and B for smileys grid layout. Activity B has some to generate a layout of smileys. I want to popup an activity B when user presses smiley button in A. How to achieve this??

Upvotes: 1

Views: 118

Answers (3)

Emil Adz
Emil Adz

Reputation: 41099

You can create a simple activity and for it's design, create a layout that is not full screen layout:

Then add this Activity in the manifest file and add this theme to it:

android:theme="@android:style/Theme.Translucent.NoTitleBar"

And then you can add a blur effect to the surrounding of this Activity by adding this in onCreate of this Activity:

getWindow().setFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND, WindowManager.LayoutParams.FLAG_BLUR_BEHIND);

Upvotes: 0

MR. Kumar
MR. Kumar

Reputation: 679

If i have got your problem then You can create layout with smiley image statically and call in Activity B and use in Activity A.

Upvotes: 1

MikroDel
MikroDel

Reputation: 6735

Edit you manifest file with:

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

Upvotes: 2

Related Questions