本文整理汇总了Java中android.support.design.widget.TextInputLayout.setTag方法的典型用法代码示例。如果您正苦于以下问题:Java TextInputLayout.setTag方法的具体用法?Java TextInputLayout.setTag怎么用?Java TextInputLayout.setTag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.support.design.widget.TextInputLayout
的用法示例。
在下文中一共展示了TextInputLayout.setTag方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: changePacketSelection
import android.support.design.widget.TextInputLayout; //导入方法依赖的package包/类
private void changePacketSelection(@NonNull Packet packet) {
final LayoutInflater inflater = getLayoutInflater();
final ViewGroup formContainer = this.formContainer;
TransitionManager.beginDelayedTransition(formContainer, new AutoTransition().setDuration(150));
formContainer.removeAllViews();
final PacketParameter[] parameters = packet.parameters;
final int paramLen = parameters.length;
for (int i = 0; i < paramLen; i++) {
final PacketParameter param = parameters[i];
final TextInputLayout inputLayout = (TextInputLayout) inflater.inflate(R.layout.input_field, formContainer, false);
inputLayout.setTag(param);
inputLayout.setHint(param.id());
final EditText inputField = inputLayout.getEditText();
if (inputField != null) {
inputField.setText(param.value());
}
formContainer.addView(inputLayout);
}
}