第一种:
LayoutInflater inflater = getLayoutInflater(); 直接在Activity中得到。
第二种:
LayoutInflater inflater2 = LayoutInflater.from(context);通过context来得到。
第三种:
context.getSystemService(LAYOUT_INFLATER_SERVICE);也是通过context得到
第一种:
LayoutInflater inflater = getLayoutInflater(); 直接在Activity中得到。
第二种:
LayoutInflater inflater2 = LayoutInflater.from(context);通过context来得到。
第三种:
context.getSystemService(LAYOUT_INFLATER_SERVICE);也是通过context得到