本文整理汇总了Java中com.andexert.library.RippleView类的典型用法代码示例。如果您正苦于以下问题:Java RippleView类的具体用法?Java RippleView怎么用?Java RippleView使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RippleView类属于com.andexert.library包,在下文中一共展示了RippleView类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initializeView
import com.andexert.library.RippleView; //导入依赖的package包/类
private void initializeView(AttributeSet attrs, int defStyleAttr) {
if (attrs != null && !isInEditMode()) {
final TypedArray attributes = mContext.getTheme().obtainStyledAttributes(attrs, R.styleable.KeyboardButtonView,
defStyleAttr, 0);
String text = attributes.getString(R.styleable.KeyboardButtonView_lp_keyboard_button_text);
Drawable image = attributes.getDrawable(R.styleable.KeyboardButtonView_lp_keyboard_button_image);
boolean rippleEnabled = attributes.getBoolean(R.styleable.KeyboardButtonView_lp_keyboard_button_ripple_enabled, true);
LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
KeyboardButtonView view = (KeyboardButtonView) inflater.inflate(R.layout.view_keyboard_button, this);
if (text != null) {
TextView textView = (TextView) view.findViewById(R.id.keyboard_button_textview);
if (textView != null) {
textView.setText(text);
}
}
if (image != null) {
ImageView imageView = (ImageView) view.findViewById(R.id.keyboard_button_imageview);
if (imageView != null) {
imageView.setImageDrawable(image);
imageView.setVisibility(View.VISIBLE);
}
}
mRippleView = (RippleView) view.findViewById(R.id.pin_code_keyboard_button_ripple);
mRippleView.setRippleAnimationListener(this);
if (mRippleView != null) {
if (!rippleEnabled) {
mRippleView.setVisibility(View.INVISIBLE);
}
}
}
}
示例2: initview
import com.andexert.library.RippleView; //导入依赖的package包/类
private void initview() {
if (mView == null) {
mInflater = LayoutInflater.from(getContext());
mView = mInflater.inflate(R.layout.toolbar, null);
mLRippleView = (RippleView) mView.findViewById(R.id.more);
mRRippleView = (RippleView) mView.findViewById(R.id.more1);
toolbar_rightButton = (ImageView) mView.findViewById(R.id.id_btn_right);
toolbar_title = (TextView) mView.findViewById(R.id.id_tv_title);
toolbar_searchview = (EditText) mView.findViewById(R.id.id_et_search);
toolbar_leftButton = (ImageView) mView.findViewById(R.id.id_ib_navigation);
ActionBar.LayoutParams lp = new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT);
addView(mView, lp);
// if (showSearchView) {
// showSearchview();
// hideTitle();
// } else {
// hideSearchview();
// showTitle();
// if (title != null) {
// toolbar_title.setText(title);
// }
// }
// Log.d("left_button_icon", "initview:5"+left_button_icon);
// if (left_button_icon != null) {
//
// toolbar_leftButton.setBackground(left_button_icon);
// toolbar_leftButton.setVisibility(VISIBLE);
// }
//
// if (right_button_icon != null) {
// toolbar_rightButton.setImageDrawable(right_button_icon);
// toolbar_rightButton.setVisibility(VISIBLE);
// }
}
}
示例3: initView
import com.andexert.library.RippleView; //导入依赖的package包/类
private void initView() {
View view = mInflater.inflate(R.layout.tab_title, this, true);
mTitleTextView = (TextView) view.findViewById(R.id.tv_tab_title);
mLeftButton = (ImageView) view.findViewById(R.id.iv_tab_left);
mRightTextView = (TextView) view.findViewById(R.id.tv_tab_ringht);
mLRippleView = (RippleView) view.findViewById(R.id.more);
mRRippleView = (RippleView) view.findViewById(R.id.more1);
}
示例4: initEvent
import com.andexert.library.RippleView; //导入依赖的package包/类
private void initEvent() {
mRvSearchCancel.setOnRippleCompleteListener(new RippleView.OnRippleCompleteListener() {
@Override
public void onComplete(RippleView rippleView) {
finish();
}
});
}
示例5: onComplete
import com.andexert.library.RippleView; //导入依赖的package包/类
@Override
public void onComplete(RippleView rippleView) {
//水波纹动画完成后自动切换TabView状态
// toggle();
if (mOnRippleCompleteListener != null) {
mOnRippleCompleteListener.onComplete(this);
}
}
示例6: getView
import com.andexert.library.RippleView; //导入依赖的package包/类
@Override
public View getView(final int position, View convertView, ViewGroup viewGroup) {
ViewHolder holder;
if (convertView == null) {
convertView = mInflater.inflate(R.layout.sort_item,null);
holder = new ViewHolder();
/**得到各个控件的对象*/
holder.sortName = (TextView) convertView.findViewById(R.id.sort_left_name);
holder.sortImageView = (ImageView) convertView.findViewById(R.id.sort_left);
holder.mRippleView = (RippleView) convertView.findViewById(R.id.myripple);
convertView.setTag(holder);//绑定ViewHolder对象
}else{
holder = (ViewHolder)convertView.getTag();//取出ViewHolder对象
}
holder.sortName.setText(dataList.get(position).get("title").toString());
holder.sortImageView.setImageResource((Integer) dataList.get(position).get("image"));
holder.mRippleView.setOnRippleCompleteListener(new RippleView.OnRippleCompleteListener() {
@Override
public void onComplete(RippleView rippleView) {
Intent intent = new Intent();
intent.setClass(getActivity(), SortActivity.class);
intent.putExtra("title", dataList.get(position).get("title").toString());
startActivity(intent);
}
});
return convertView;
}
示例7: getView
import com.andexert.library.RippleView; //导入依赖的package包/类
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
if (getItemViewType(position) == TYPE_MENU_ITEM) {
MenuItemViewHolder holder;
if (convertView == null) {
convertView = inflater.inflate(R.layout.item_global_menu, parent, false);
holder = new MenuItemViewHolder(convertView);
convertView.setTag(holder);
} else {
holder = (MenuItemViewHolder) convertView.getTag();
}
GlobalMenuItem item = getItem(position);
holder.tvLabel.setText(item.label);
holder.ivIcon.setImageResource(item.iconResId);
holder.ivIcon.setVisibility(item.iconResId == 0 ? View.GONE : View.VISIBLE);
holder.mRippleView.setOnRippleCompleteListener(new RippleView.OnRippleCompleteListener() {
@Override
public void onComplete(RippleView rippleView) {
System.out.println("完成!!!!!!!!!!!!!!!");
listener.OnComplete(1, position);
}
});
return convertView;
} else {
return inflater.inflate(R.layout.item_menu_divider, parent, false);
}
}
示例8: initializeView
import com.andexert.library.RippleView; //导入依赖的package包/类
private void initializeView(AttributeSet attrs, int defStyleAttr) {
if (attrs != null && !isInEditMode()) {
final TypedArray attributes = mContext.getTheme().obtainStyledAttributes(attrs, R.styleable.KeyboardButtonView,
defStyleAttr, 0);
String text = attributes.getString(R.styleable.KeyboardButtonView_lp_keyboard_button_text);
Drawable image = attributes.getDrawable(R.styleable.KeyboardButtonView_lp_keyboard_button_image);
boolean rippleEnabled = attributes.getBoolean(R.styleable.KeyboardButtonView_lp_keyboard_button_ripple_enabled, true);
attributes.recycle();
LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
KeyboardButtonView view = (KeyboardButtonView) inflater.inflate(R.layout.view_keyboard_button, this);
if (text != null) {
TextView textView = (TextView) view.findViewById(R.id.keyboard_button_textview);
if (textView != null) {
textView.setText(text);
}
}
if (image != null) {
ImageView imageView = (ImageView) view.findViewById(R.id.keyboard_button_imageview);
if (imageView != null) {
imageView.setImageDrawable(image);
imageView.setVisibility(View.VISIBLE);
}
}
mRippleView = (RippleView) view.findViewById(R.id.pin_code_keyboard_button_ripple);
mRippleView.setRippleAnimationListener(this);
if (mRippleView != null) {
if (!rippleEnabled) {
mRippleView.setVisibility(View.INVISIBLE);
}
}
}
}
示例9: updateRippleColor
import com.andexert.library.RippleView; //导入依赖的package包/类
private void updateRippleColor(int color) {
try {
Field field = RippleView.class.getDeclaredField("rippleColor");
field.setAccessible(true);
field.setInt(ripple, color);
} catch (Exception e) {
e.printStackTrace();
}
}
示例10: PairedDeviceViewHolder
import com.andexert.library.RippleView; //导入依赖的package包/类
public PairedDeviceViewHolder (View itemView) {
super(itemView);
/*
* We save all the views in public properties to be accessible.
*/
this.rippleView = (RippleView) itemView.findViewById(R.id.ripple_view);
this.connection = (TextView) itemView.findViewById(R.id.paired_device_connection);
this.name = (TextView) itemView.findViewById(R.id.paired_device_name);
this.address = (TextView) itemView.findViewById(R.id.paired_device_address);
}
示例11: toggleRipple
import com.andexert.library.RippleView; //导入依赖的package包/类
private void toggleRipple (RippleView ripple, final View view0, final View view1) {
this.setupRipple(ripple);
ripple.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick (View v) {
if (view0.getVisibility() == View.GONE) {
view1.startAnimation(getHideAnimation(view1, view0));
} else if (view1.getVisibility() == View.GONE) {
view0.startAnimation(getHideAnimation(view0, view1));
}
}
});
}
示例12: ClientViewHolder
import com.andexert.library.RippleView; //导入依赖的package包/类
public ClientViewHolder (View item) {
super(item);
this.name = (TextView) item.findViewById(R.id.name);
this.email = (TextView) item.findViewById(R.id.email);
this.location = (TextView) item.findViewById(R.id.location);
this.coords = (TextView) item.findViewById(R.id.coords);
this.profileImage = (ImageView) item.findViewById(R.id.profile_image);
this.nameRipple = (RippleView) item.findViewById(R.id.name_ripple);
this.coordsRipple = (RippleView) item.findViewById(R.id.coords_ripple);
this.imageRipple = (RippleView) item.findViewById(R.id.image_ripple);
}
示例13: controlDevice
import com.andexert.library.RippleView; //导入依赖的package包/类
public void controlDevice (final RippleView view, final PairedDevice device) {
final MainActivity self = this;
final Intent intent = new Intent(this, ControllerActivity.class);
intent.putExtra("device", device);
this.controlIntent = intent;
if (!view.isRunning()) {
self.startControlDevice(intent);
} else {
view.setAnimationFinishListener(self.rippleViewListener);
}
}
示例14: initView
import com.andexert.library.RippleView; //导入依赖的package包/类
/**
* 初始化布局
*/
private void initView() {
initViewPager();
mTabGroup.setOnCheckedChangeListener(new TabGroup.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(TabGroup group, int checkedId) {
switch (checkedId) {
case R.id.tab_chat:
setCurrentFragment(TAB_CHAT);
break;
case R.id.tb_pic:
setCurrentFragment(TAB_PIC);
break;
case R.id.tb_app:
setCurrentFragment(TAB_APP);
break;
case R.id.tb_user:
setCurrentFragment(TAB_USER);
break;
}
}
});
//init tab badge view && ripple view,the others setted in activity_main.xml
mChatTabView
.setBadgeColor(getResources().getColor(android.R.color.holo_blue_dark))
.setmDefaultTopPadding((int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 2, getResources().getDisplayMetrics()))
.setBadgeShown(true)
.setTabRippleCentered(false)
.setTabRippleColor(android.R.color.holo_blue_dark)
.setTabRippleDuration(100)
//override setOnRippleCompleteListener method in rippleView
.setOnRippleCompleteListener(new RippleView.OnRippleCompleteListener() {
@Override
public void onComplete(RippleView rippleView) {
mChatTabView.setChecked(true);
}
});
((TabView) mTabGroup.getChildAt(1)).setBadgeCount(999)
.setmDefaultTopPadding((int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 2, getResources().getDisplayMetrics()))
.setBadgeShown(true)
.setTabRippleEnable(false);
}
示例15: 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("这里这里这里这里这里这里这里这里这里这里这里这里这里");
//
// }
// });
}