I have to inflate the same layout file multiple time when app start
for (FilterInfo info : mFilters) {
View itemView = inflater.inflate(R.layout.item_bounce_gallery, mFilterLinear, false);
TextView textView = (TextView) itemView.findViewById(R.id.text);
textView.setText(info.displayText);
itemView.setOnClickListener(this);
mFilterLinear.addView(itemView);
}
The mFilters contains too many filters which about 20, so this loop is really time-consuming...I notice each time it uses the same layout, so i wonder is there any solution to speed up this? In theory just copy the data without read the layout from the disk..
0 comments:
Post a Comment