本文整理了Java中android.widget.Button.setFocusableInTouchMode()
方法的一些代码示例,展示了Button.setFocusableInTouchMode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.setFocusableInTouchMode()
方法的具体详情如下:
包路径:android.widget.Button
类名称:Button
方法名:setFocusableInTouchMode
暂无
代码示例来源:origin: luili16/UIMocker
@Override
public void run() {
button1.setText("I");
button1.setFocusableInTouchMode(true);
button1.requestFocus();
}
});
代码示例来源:origin: openMF/mobile-wallet
@OnClick(R.id.btn_mobile)
public void onMobileSelected() {
mBtnMobile.setFocusable(true);
mBtnMobile.setFocusableInTouchMode(true);
mBtnMobile.setBackgroundResource(R.drawable.button_round_primary);
mBtnVpa.setBackgroundResource(R.drawable.button_round_stroke);
mBtnMobile.setTextColor(getResources().getColor(android.R.color.white));
mBtnVpa.setTextColor(getResources().getColor(android.R.color.black));
mTilVpa.setVisibility(View.GONE);
mRlMobile.setVisibility(View.VISIBLE);
}
代码示例来源:origin: openMF/mobile-wallet
@OnClick(R.id.btn_vpa)
public void onVPASelected() {
mBtnVpa.setFocusable(true);
mBtnVpa.setFocusableInTouchMode(true);
mBtnVpa.setBackgroundResource(R.drawable.button_round_primary);
mBtnMobile.setBackgroundResource(R.drawable.button_round_stroke);
mBtnVpa.setTextColor(getResources().getColor(android.R.color.white));
mBtnMobile.setTextColor(getResources().getColor(android.R.color.black));
mRlMobile.setVisibility(View.GONE);
mTilVpa.setVisibility(View.VISIBLE);
}
代码示例来源:origin: NoEndToLF/ChinaMapView
private void initView() {
province_listview = (ListView) findViewById(R.id.province_listview);
mapview = (ChinaMapView) findViewById(R.id.view);
colorView = (ColorView) findViewById(R.id.colorView);
changeType = (Button) findViewById(R.id.changeType);
changeType.setFocusable(true);
changeType.setFocusableInTouchMode(true);
//changeType.setVisibility(View.GONE);
changeType.setText(ColorChangeUtil.nameStrings[0]);
}
/**
内容来源于网络,如有侵权,请联系作者删除!