在Activity任意位置添加View
2022-01-27 本文已影响0人
咚咚_Coding

View decorView = activity.getWindow().getDecorView();
FrameLayout contentParent = decorView.findViewById(android.R.id.content);
LinearLayout container = new LinearLayout(activity);
contentParent.addView(container);
container.addView("your views")