LayoutInflater inflater = (LayoutInflater)context.getSystemService( Context.LAYOUT_INFLATER_SERVICE);
View view = inflater.inflate(R.layout.your_view_id, null);
Android从XML中创建View
最新推荐文章于 2024-07-15 23:56:49 发布
LayoutInflater inflater = (LayoutInflater)context.getSystemService( Context.LAYOUT_INFLATER_SERVICE);
View view = inflater.inflate(R.layout.your_view_id, null);