@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try { manager = ((WalletPublisherSubAppSession) subAppsSession).getWalletPublisherManager(); data = mParent.getData(); } catch (Exception ex) { exception(TAG, ex.getMessage(), ex); } }
@SuppressWarnings("unchecked") @Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); if (data == null || project == null) return; /* Projects Fields */ name.setText(project.getName()); description.setText(project.getDescription()); type.setText(project.getWalletType().name()); /* temp data fields */ mainScreenBytes = (byte[]) data.get(PublishFactoryProjectStep1.MAIN_SCREEN_KEY); iconScreenBytes = (byte[]) data.get(PublishFactoryProjectStep1.WALLET_ICON_KEY); screenShootsBytes = (ArrayList) data.get(PublishFactoryProjectStep1.SCREEN_SHOOTS_KEY); identity = (PublisherIdentity) data.get(PublishFactoryProjectStep2.PUBLISHER_IDENTITY_KEY); videoUrlString = data.get(PublishFactoryProjectStep2.VIDEO_URL_KEY) != null ? data.get(PublishFactoryProjectStep2.VIDEO_URL_KEY).toString() : ""; initialVersion = (Version) data.get(PublishFactoryProjectStep2.INIT_PLATFORM_KEY); finalVersion = (Version) data.get(PublishFactoryProjectStep2.FINAL_PLATFORM_KEY); if (mainScreenBytes != null) mainScreen.setImageDrawable( new BitmapDrawable( getResources(), BitmapFactory.decodeByteArray(mainScreenBytes, 0, mainScreenBytes.length))); if (iconScreenBytes != null) iconScreen.setImageDrawable( new BitmapDrawable( getResources(), BitmapFactory.decodeByteArray(iconScreenBytes, 0, iconScreenBytes.length))); if (screenShootsBytes != null && screenShootsBytes.size() > 0) adapter.changeDataSet(screenShootsBytes); if (videoUrlString != null) video_url.setText(videoUrlString); if (initialVersion != null) { initPlatform.setText(String.format("Initial Platform v%s", initialVersion.toString())); } if (finalVersion != null) { finalPlatform.setText(String.format("Final Platform v%s", finalVersion.toString())); } }