Android中得到布局文件对象有两种方式第一种,在Activity所在类中
this.getLayoutInflater().inflater(R.layout.布局文件名,null);
第二种,在非Activity所在类中
Context.getSystemService(Context.LAYOUT_INFLATER_SERVICE).inflater(R.layout.布局文件名,null);
Copyright @ 2025 as798982083 Powered by .NET 9.0 on Kubernetes Powered by: .Text and ASP.NET Theme by: .NET Monster