@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); binding = DataBindingUtil.setContentView(this, R.layout.activity_project_details); ButterKnife.bind(this); KickMaterialApp.component.inject(this); binding.setProject(projectDetailsField.observable()); supportPostponeEnterTransition(); handleArguments(); injectViewsAndSetUpToolbar(); getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayShowTitleEnabled(false); // Hide default toolbar title binding.scrollView.addCallbacks(this); minTitlesMarginTop = ViewUtils.dpToPx(32, getApplicationContext()); maxTitlesMarginTop = getResources().getDimensionPixelSize(R.dimen.titles_container_margin_top) - getResources().getDimensionPixelSize(R.dimen.status_bar_height); maxTitlesMarginLeft = ViewUtils.dpToPx(32, getApplicationContext()); maxTitlePaddingRight = ViewUtils.dpToPx(72, getApplicationContext()); maxParallaxValue = getResources().getDimensionPixelSize(R.dimen.project_details_photo_height) / 3; titleFontMaxSize = getResources().getDimensionPixelSize(R.dimen.font_21); titleFontMinSize = getResources().getDimensionPixelSize(R.dimen.font_16); imageHeight = getResources().getDimensionPixelSize(R.dimen.project_details_photo_height); imageWidth = (int) (imageHeight * ProjectsAdapter.IMAGE_RATIO); binding.detailsContainer.startAnimation( AnimationUtils.loadAnimation(ProjectDetailsActivity.this, R.anim.slide_from_bottom)); loadProjectData(); launchPostTransitionAnimations(); }
private void postProjectDetails() { ProjectIdAndSignature params = ProjectIdAndSignature.create(project.id, project.getDetailsQueryMap()); projectDetailsField.postValue(params); }