private void init() { LayoutInflater layoutInflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); layoutInflater.inflate(R.layout.book_folder_layout, this); folderName = (TextView) findViewById(R.id.view_cell_bookname_textView); downloadingView = findViewById(R.id.downloading_view); ThemeBean themeBean = ThemeManagerSingleton.getInstance.getNewThemeModel().getThemeBean(); Drawable numberTextBackDrawable = ThemeBuilder.getBitmapAccordingScreenDensity( getContext(), themeBean.getBookCountBackgroundInFolderCell()); textView = (TextView) findViewById(R.id.book_number_textView); textView.setBackgroundDrawable(numberTextBackDrawable); // TODO try { byte imgdata[] = ThemeBuilder.InputStreamToByte( ThemeBuilder.getInputStreamAccordingScreenDensity(getContext(), "downloading")); ((GifMovieView) downloadingView).setMovieByteArray(imgdata); } catch (IOException e) { e.printStackTrace(); } gridLayout = (MyGridLayout) findViewById(R.id.book_folder_gridLayout); gridLayout.setColumnCount(2); gridLayout.setRowCount(2); }