经常用到的引用xml文件,记下来,方便下次查看。
CalendarActivity activity = (CalendarActivity)context;
LinearLayout headLayout = (LinearLayout) activity.getLayoutInflater().inflate(R.layout.main_header, null);
LinearLayout ll = (LinearLayout) activity.findViewById(R.id.ll_header);
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View mView= inflater.inflate(R.layout.edit, null);
LinearLayout ll = (LinearLayout) mView.findViewById(R.id.ll_header);