本文整理了Java中android.widget.AutoCompleteTextView.setPadding()
方法的一些代码示例,展示了AutoCompleteTextView.setPadding()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AutoCompleteTextView.setPadding()
方法的具体详情如下:
包路径:android.widget.AutoCompleteTextView
类名称:AutoCompleteTextView
方法名:setPadding
暂无
代码示例来源:origin: ckcz123/PKUHelper-Android
autoComplete.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14);
int padding = Util.sp2px(this, 5);
autoComplete.setPadding(autoComplete.getPaddingLeft(), padding, autoComplete.getPaddingRight(), padding);
autoComplete.clearFocus();
代码示例来源:origin: AmaldevTA/ChipLayout
private AutoCompleteTextView createAutoCompleteTextView(Context context) {
final LayoutParams lparamsTextView = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
lparamsTextView.setMargins(0, 0, 10, 0);
lparamsTextView.gravity = Gravity.CENTER;
final AutoCompleteTextView autoCompleteTextView = new AutoCompleteTextView(context);
autoCompleteTextView.setBackgroundColor(Color.parseColor("#00FFFFFF"));
autoCompleteTextView.setLayoutParams(lparamsTextView);
autoCompleteTextView.setHint(" ");
autoCompleteTextView.setPadding(10,0,10,10);
autoCompleteTextView.setSingleLine(true);
autoCompleteTextView.setTextColor(textColor);
autoCompleteTextView.setHintTextColor(hintColor);
autoCompleteTextView.setCursorVisible(true);
return autoCompleteTextView;
}
内容来源于网络,如有侵权,请联系作者删除!