use of android.support.v4.app.ActivityOptionsCompat in project Remindy by abicelis.
the class ProgrammedLocationBasedTaskViewHolder method onClick.
@Override
public void onClick(View view) {
int id = view.getId();
switch(id) {
case R.id.item_task_programmed_location_based_container:
Pair[] pairs = new Pair[1];
pairs[0] = new Pair<View, String>(mCategoryIcon, mFragment.getResources().getString(R.string.transition_task_list_category));
// pairs[1] = new Pair<View, String>(mTitle, mFragment.getResources().getString(R.string.transition_task_list_title));
// pairs[2] = new Pair<View, String>(mDescription, mFragment.getResources().getString(R.string.transition_task_list_description));
ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(mFragment.getActivity(), pairs);
Intent openTaskDetailActivity = new Intent(mFragment.getActivity(), TaskDetailActivity.class);
openTaskDetailActivity.putExtra(TaskDetailActivity.TASK_ID_TO_DISPLAY, mCurrent.getId());
openTaskDetailActivity.putExtra(TaskDetailActivity.TASK_POSITION, mReminderPosition);
if (mClickListener != null) {
mClickListener.onItemClicked(mReminderPosition, openTaskDetailActivity, options.toBundle());
}
break;
}
}
use of android.support.v4.app.ActivityOptionsCompat in project Remindy by abicelis.
the class ProgrammedRepeatingTaskViewHolder method onClick.
@Override
public void onClick(View view) {
int id = view.getId();
switch(id) {
case R.id.item_task_programmed_repeating_container:
Pair[] pairs = new Pair[1];
pairs[0] = new Pair<View, String>(mCategoryIcon, mFragment.getResources().getString(R.string.transition_task_list_category));
// pairs[1] = new Pair<View, String>(mTitle, mFragment.getResources().getString(R.string.transition_task_list_title));
// pairs[2] = new Pair<View, String>(mDescription, mFragment.getResources().getString(R.string.transition_task_list_description));
ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(mFragment.getActivity(), pairs);
Intent openTaskDetailActivity = new Intent(mFragment.getActivity(), TaskDetailActivity.class);
openTaskDetailActivity.putExtra(TaskDetailActivity.TASK_ID_TO_DISPLAY, mCurrent.getId());
openTaskDetailActivity.putExtra(TaskDetailActivity.TASK_POSITION, mReminderPosition);
if (mClickListener != null) {
mClickListener.onItemClicked(mReminderPosition, openTaskDetailActivity, options.toBundle());
}
break;
}
}
use of android.support.v4.app.ActivityOptionsCompat in project EffectiveAndroid by rallat.
the class TopArticleListActivity method onClick.
private void onClick(View view) {
int position = recyclerView.getChildLayoutPosition(view);
Article data = adapter.getItem(position);
View innerContainer = view.findViewById(R.id.container_inner_item);
Intent startIntent = new Intent(this, ArticleActivity.class);
startIntent.putExtra(ArticleActivity.EXTRA_ARTICLE, data);
ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(this, innerContainer, ArticleActivity.TRANSITION_SHARED_ELEMENT);
ActivityCompat.startActivity(this, startIntent, options.toBundle());
}
use of android.support.v4.app.ActivityOptionsCompat in project seven_develop by seven123456.
the class HomeFragment method initRecyclerHeadView.
private void initRecyclerHeadView(List<HomeBannerInfos> homeBannerInfos) {
bannerViewAdapter = new BannerViewAdapter(R.layout.recycler_item_banner, homeBannerInfos, getContext());
bannerLayout.setAdapter(bannerViewAdapter);
bannerViewAdapter.setOnItemChildClickListener(new BaseQuickAdapter.OnItemChildClickListener() {
@Override
public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
HomeBannerInfos homeBannerInfos = (HomeBannerInfos) adapter.getItem(position);
HomeToWebViewInfo homeToWebViewInfo = new HomeToWebViewInfo();
Intent intent = new Intent(getContext(), HomeNewsDetailActivity.class);
homeToWebViewInfo.title = homeBannerInfos.getTitle();
homeToWebViewInfo.imgUrl = homeBannerInfos.getImagePath();
homeToWebViewInfo.h5Url = homeBannerInfos.getUrl();
intent.putExtra("newsInfo", homeToWebViewInfo);
ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation((Activity) getContext(), view.findViewById(R.id.iv_banner_image), getResources().getString(R.string.transition_news_img));
ActivityCompat.startActivity(getContext(), intent, options.toBundle());
}
});
}
Aggregations