本文整理了Java中android.widget.Button.setStateListAnimator()
方法的一些代码示例,展示了Button.setStateListAnimator()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.setStateListAnimator()
方法的具体详情如下:
包路径:android.widget.Button
类名称:Button
方法名:setStateListAnimator
暂无
代码示例来源:origin: huangfangyi/YiChat
private View getBottomView(final int index, int drawableRes) {
View view = getLayoutInflater().inflate(R.layout.widget_main_button, null);
Button button = (Button) view.findViewById(R.id.button);
button.setCompoundDrawablesWithIntrinsicBounds(0, drawableRes, 0, 0);
// button.setCompoundDrawables(null, dr, null, null);
button.setText(mTitles[index]);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (tabs[index] != null) {
tabs[index].select();
}
}
});
if (isCompatible(Build.VERSION_CODES.LOLLIPOP)) {
button.setStateListAnimator(null);
}
TextView textView = (TextView) view.findViewById(R.id.unread_msg_number);
if (index == 0) {
unreadLabel = textView;
} else if (index == 1) {
unreadInvitionLable = textView;
}else if(index == 2){
unreadFriendLable= textView;
}
return view;
}
代码示例来源:origin: YiChat/android_YiChat_Lite
private View getBottomView(final int index, int drawableRes) {
View view = getLayoutInflater().inflate(R.layout.widget_main_button, null);
Button button = (Button) view.findViewById(R.id.button);
button.setCompoundDrawablesWithIntrinsicBounds(0, drawableRes, 0, 0);
// button.setCompoundDrawables(null, dr, null, null);
button.setText(mTitles[index]);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (tabs[index] != null) {
tabs[index].select();
}
}
});
if (isCompatible(Build.VERSION_CODES.LOLLIPOP)) {
button.setStateListAnimator(null);
}
TextView textView = (TextView) view.findViewById(R.id.unread_msg_number);
if (index == 0) {
unreadLabel = textView;
} else if (index == 1) {
unreadInvitionLable = textView;
}
return view;
}
代码示例来源:origin: derry/delion
/**
* DataReductionPromoScreen constructor.
*
* @param context An Android context.
*/
public DataReductionPromoScreen(Context context) {
super(context, R.style.DataReductionPromoScreenDialog);
setContentView(getContentView(context), new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT));
// Remove the shadow from the enable button.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Button enableButton = (Button) findViewById(R.id.enable_button);
enableButton.setStateListAnimator(null);
}
}
内容来源于网络,如有侵权,请联系作者删除!