1、方法1LinearLayout layout=(LinearLayout)LayoutInflater.from(getApplicationContext()).inflate(R.layout.list_view_item_text, null);LinearLayout layout=(LinearLayout)LayoutInflater.from(MainActivity.this).inflate(R.layout.list_view_item_text, null);2、方法2LayoutInflater layoutInflater=(LayoutInflater) get Read More