当前位置: 首页>>代码示例>>Java>>正文


Java RippleView.setOnRippleCompleteListener方法代码示例

本文整理汇总了Java中com.andexert.library.RippleView.setOnRippleCompleteListener方法的典型用法代码示例。如果您正苦于以下问题:Java RippleView.setOnRippleCompleteListener方法的具体用法?Java RippleView.setOnRippleCompleteListener怎么用?Java RippleView.setOnRippleCompleteListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.andexert.library.RippleView的用法示例。


在下文中一共展示了RippleView.setOnRippleCompleteListener方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initCovertView

import com.andexert.library.RippleView; //导入方法依赖的package包/类
@Override
	public void initCovertView(View convertView, final int position) {
		
		final ShowOrderFeaturedBean vo = voList.get(position);
		
//		ImageView userPhoto = (ImageView)convertView.findViewById(R.id.showorder_list_user_avater);
//		ImgLoadUtil.displayImageWithAnimation(vo.getAvatar(), userPhoto);
		
		TextView userName = (TextView)convertView.findViewById(R.id.showorder_list_user_name);
		userName.setText(vo.getTitle().replace("今日最佳:", ""));

		final ImageView like = (ImageView)convertView.findViewById(R.id.btnLike);
		like.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View view) {
				if(mDbService.queryLike("WHERE NEWID = "+ vo.getId()).size() == 0){
					Like likeBean = new Like();
					likeBean.setAvatar(vo.getAvatar());
					likeBean.setCover(vo.getCover());
					likeBean.setCreateTime(vo.getCreateTime());
					likeBean.setDetailNew(vo.getDetailNew());
					likeBean.setNewid(vo.getId() + "");
					likeBean.setTitle(vo.getTitle());
					likeBean.setCategory(vo.getCategory());
					mDbService.saveLike(likeBean);
					updateHeartButton(like, true, position);
					System.out.println("daxiao === " + likeAnimations.size());
				}
			}
		});

		System.out.println("LikeList === " + mDbService.queryLike("WHERE NEWID = " + vo.getId()).size());
		if(mDbService.queryLike("WHERE NEWID = "+ vo.getId()).size() != 0){
			like.setBackgroundResource(R.mipmap.ic_heart_red);
		}else{
			like.setBackgroundResource(R.mipmap.ic_heart_outline_grey);
		}
		
		TextView publishTime = (TextView)convertView.findViewById(R.id.new_time);
		publishTime.setText(TimeUtil.getMonthAndDay(vo.getCreateTime()));

		TextView category = (TextView)convertView.findViewById(R.id.new_sort);
		category.setText("#"+vo.getCategory());
		
		ImageView orderImg = (ImageView)convertView.findViewById(R.id.showorder_list_img);
		ImgLoadUtil.displayImageWithAnimationAndNoCorner(vo.getCover(), orderImg);

		RippleView mRippleView = (RippleView)convertView.findViewById(R.id.item_rippleview);
		mRippleView.setOnRippleCompleteListener(new RippleView.OnRippleCompleteListener() {
			@Override
			public void onComplete(RippleView rippleView) {
				Intent intent = new Intent();
				intent.setClass(getActivity(), ToolbarControlDetailListViewActivity.class);
				intent.putExtra("today_new_title", vo.getTitle().replace("今日最佳:", ""));
				intent.putExtra("today_new_url", vo.getDetail());
				intent.putExtra("today_new_id", vo.getId());
				intent.putExtra("today_new_cover",vo.getCover());
				intent.putExtra("today_new_time",vo.getCreateTime());
				intent.putExtra("today_new_avatar",vo.getAvatar());
				intent.putExtra("today_new_buyurl", vo.getBuyurl());
				intent.putExtra("today_detail_new_url", vo.getDetailNew());
				intent.putExtra("today_new_category", vo.getCategory());
				System.out.println("=================  " + vo.getDetailNew());

				startActivity(intent);
			}
		});
//		ImageView aboveImg = (ImageView)convertView.findViewById(R.id.showorder_list_img_above);
//		convertView.setOnClickListener(new View.OnClickListener() {
//			@Override
//			public void onClick(View v) {
//
//				System.out.println("这里这里这里这里这里这里这里这里这里这里这里这里这里");
//
//			}
//		});
	}
 
开发者ID:x251089003,项目名称:EveryXDay,代码行数:78,代码来源:FragmentShowOrderFeaturedContent.java

示例2: getView

import com.andexert.library.RippleView; //导入方法依赖的package包/类
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
    final Like vo = likeList.get(position);

    if (convertView == null) {
        convertView = inflater.inflate(R.layout.like_item,null);
    }

    TextView userName = (TextView)convertView.findViewById(R.id.showorder_list_user_name);
    userName.setText(vo.getTitle().replace("今日最佳:", ""));

    ImageView orderImg = (ImageView)convertView.findViewById(R.id.showorder_list_img);
    ImgLoadUtil.displayImageWithAnimationAndNoCorner(vo.getCover(), orderImg);

    TextView publishTime = (TextView)convertView.findViewById(R.id.new_time);
    publishTime.setText(TimeUtil.getMonthAndDay(vo.getCreateTime()));

    TextView category = (TextView)convertView.findViewById(R.id.new_sort);
    category.setText("#"+vo.getCategory());

    Button delete = (Button)convertView.findViewById(R.id.id_remove);
    delete.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            mDbService.deleteLike(vo.getId());
            likeList.remove(position);
            notifyDataSetChanged();
            mListView.closeOpenedItems();
        }
    });

    RippleView mRippleView = (RippleView)convertView.findViewById(R.id.item_rippleview);
    mRippleView.setOnRippleCompleteListener(new RippleView.OnRippleCompleteListener() {
        @Override
        public void onComplete(RippleView rippleView) {
            Intent intent = new Intent();
            intent.setClass(getActivity(), ToolbarControlDetailListViewActivity.class);
            intent.putExtra("today_new_title", vo.getTitle().replace("今日最佳:", ""));
            intent.putExtra("today_new_id", Integer.parseInt(vo.getNewid()));
            intent.putExtra("today_detail_new_url", vo.getDetailNew());
            intent.putExtra("today_new_cover",vo.getCover());
            intent.putExtra("today_new_time",vo.getCreateTime());
            intent.putExtra("today_new_avatar",vo.getAvatar());

            startActivity(intent);
        }
    });
    return convertView;
}
 
开发者ID:x251089003,项目名称:EveryXDay,代码行数:50,代码来源:FragmentLike.java

示例3: initCovertView

import com.andexert.library.RippleView; //导入方法依赖的package包/类
@Override
    public void initCovertView(View convertView, final int position) {
        final ShowOrderFeaturedBean vo = voList.get(position);

//        ImageView userPhoto = (ImageView)convertView.findViewById(R.id.showorder_list_user_avater);
//        ImgLoadUtil.displayImageWithAnimation(vo.getAvatar(), userPhoto);

        TextView userName = (TextView)convertView.findViewById(R.id.showorder_list_user_name);
        userName.setText(vo.getTitle().replace("今日最佳:", ""));

        final ImageView like = (ImageView)convertView.findViewById(R.id.btnLike);
        like.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if(mDbService.queryLike("WHERE NEWID = "+ vo.getId()).size() == 0){
                    Like likeBean = new Like();
                    likeBean.setAvatar(vo.getAvatar());
                    likeBean.setCover(vo.getCover());
                    likeBean.setCreateTime(vo.getCreateTime());
                    likeBean.setDetailNew(vo.getDetailNew());
                    likeBean.setNewid(vo.getId() + "");
                    likeBean.setTitle(vo.getTitle());
                    likeBean.setCategory(vo.getCategory());
                    mDbService.saveLike(likeBean);
                    updateHeartButton(like, true, position);
                    System.out.println("daxiao === " + likeAnimations.size());
                }
            }
        });

        System.out.println("LikeList === " + mDbService.queryLike("WHERE NEWID = " + vo.getId()).size());
        if(mDbService.queryLike("WHERE NEWID = "+ vo.getId()).size() != 0){
            like.setBackgroundResource(R.mipmap.ic_heart_red);
        }else{
            like.setBackgroundResource(R.mipmap.ic_heart_outline_grey);
        }

        TextView publishTime = (TextView)convertView.findViewById(R.id.new_time);
        publishTime.setText(TimeUtil.getMonthAndDay(vo.getCreateTime()));

        TextView category = (TextView)convertView.findViewById(R.id.new_sort);
        category.setText("#"+vo.getCategory());

        ImageView orderImg = (ImageView)convertView.findViewById(R.id.showorder_list_img);
        ImgLoadUtil.displayImageWithAnimationAndNoCorner(vo.getCover(), orderImg);

        RippleView mRippleView = (RippleView)convertView.findViewById(R.id.item_rippleview);
        mRippleView.setOnRippleCompleteListener(new RippleView.OnRippleCompleteListener() {
            @Override
            public void onComplete(RippleView rippleView) {
                Intent intent = new Intent();
                intent.setClass(SortActivity.this, ToolbarControlDetailListViewActivity.class);
                intent.putExtra("today_new_title", vo.getTitle().replace("今日最佳:", ""));
                intent.putExtra("today_new_url", vo.getDetail());
                intent.putExtra("today_new_id", vo.getId());
                intent.putExtra("today_new_buyurl", vo.getBuyurl());
                intent.putExtra("today_detail_new_url", vo.getDetailNew());
                intent.putExtra("today_new_cover",vo.getCover());
                intent.putExtra("today_new_time",vo.getCreateTime());
                intent.putExtra("today_new_avatar",vo.getAvatar());
                intent.putExtra("today_new_category", vo.getCategory());
                startActivity(intent);
            }
        });
    }
 
开发者ID:x251089003,项目名称:EveryXDay,代码行数:66,代码来源:SortActivity.java


注:本文中的com.andexert.library.RippleView.setOnRippleCompleteListener方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。