gpt4 book ai didi

android - 在弹出窗口android中显示 Activity

转载 作者:太空狗 更新时间:2023-10-29 13:30:35 25 4
gpt4 key购买 nike

我的任务是制作一个看起来像 facebook 通知屏幕的 Activity 请看附图

enter image description here

任何人都可以帮我提供教程或示例,帮助我使 Activity 看起来像这样吗?

最佳答案

//试试这个,我想它可能对你有帮助

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);

关于android - 在弹出窗口android中显示 Activity ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15879213/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com