Reputation: 9404
I have a task to make an activity that look like facebook notification screen please see the attached image
can any one please help me with tutorial or example that will help me to make activity looks like this ?
Upvotes: 3
Views: 5319
Reputation: 9404
To do this effect I have used a normal activity with dialog theme and set it's background to transparent, and override onAttachActivity event to set the position and width and height of my new activity as I want
Upvotes: 1
Reputation: 2198
//Try this i think it may be help u
LayoutInflater inflater = (LayoutInflater) youractivityname.this
.getSystemService(LAYOUT_INFLATER_SERVICE);
View pview;
pview = inflater.inflate(R.layout.Yourlayoutname, null);
PopupWindow cp = new PopupWindow(pview, LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT, true);
cp.setBackgroundDrawable(new BitmapDrawable());
cp.showAtLocation(v, Gravity.CENTER, 0, 0);
cp.update(0, 0, 500, 350);
Upvotes: 1