private void loadThemeInformation( boolean reloadGallery ) { ThemeService service = new ThemeService( this ); themeInformation = service.queryTheme( packageName , destClassName ); if( themeInformation.isInstalled() ) { Context dstContext = null; try { dstContext = createPackageContext( packageName , Context.CONTEXT_IGNORE_SECURITY ); } catch( NameNotFoundException e ) { e.printStackTrace(); return; } Log.v( LOG_TAG , "2222222222222222destClassName = " + destClassName ); ContentConfig destContent = new ContentConfig(); destContent.loadConfig( dstContext , destClassName ); themeInformation.loadInstallDetail( dstContext , destContent ); if( reloadGallery ) { themeLocalAdapter = new ThemePreviewLocalAdapter( this , destContent , dstContext , false ); galleryPreview.setAdapter( themeLocalAdapter ); } return; } if( reloadGallery ) { galleryPreview.setAdapter( new ThemePreviewHotAdapter( this , packageName , downModule , false ) ); } }
private void updateShowInfo() { TextView text = (TextView)findViewById( R.id.textAppName ); text.setText( themeInformation.getDisplayName() ); text.setOnClickListener( new View.OnClickListener() { @Override public void onClick( View arg0 ) { finish(); } } ); ImageButton buttonApply = (ImageButton)findViewById( R.id.buttonApply ); ImageButton buttonUsed = (ImageButton)findViewById( R.id.buttonUsed ); if( curPackageName.equals( packageName ) && curClassName.equals( destClassName ) ) { buttonApply.setVisibility( View.INVISIBLE ); buttonUsed.setVisibility( View.VISIBLE ); } else { buttonApply.setVisibility( View.VISIBLE ); buttonUsed.setVisibility( View.INVISIBLE ); } }