本文整理汇总了Java中android.text.LoginFilter类的典型用法代码示例。如果您正苦于以下问题:Java LoginFilter类的具体用法?Java LoginFilter怎么用?Java LoginFilter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LoginFilter类属于android.text包,在下文中一共展示了LoginFilter类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onCreateView
import android.text.LoginFilter; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.wizard_account_configure, container, false);
mManualConfigButton = (Button) v.findViewById(R.id.manual_setup);
mManualConfigButton.setOnClickListener(this);
mNextButton = (Button) v.findViewById(R.id.next);
mNextButton.setOnClickListener(this);
mSelectAccountButton = (Button) v.findViewById(R.id.select_account_btn);
mSelectAccountButton.setOnClickListener(this);
mErrorLabel = (TextView) v.findViewById(R.id.error_label);
mSettingsWarningLabel = (TextView) v.findViewById(R.id.settings_warn_label);
mAccountJID = (EditText) v.findViewById(R.id.account_username);
mAccountPassword = (EditText) v.findViewById(R.id.account_password);
InputFilter[] orgFilters = mAccountJID.getFilters();
InputFilter[] newFilters = new InputFilter[orgFilters.length + 1];
int i;
for (i = 0; i < orgFilters.length; i++)
newFilters[i] = orgFilters[i];
newFilters[i] = new LoginFilter.UsernameFilterGeneric();
mAccountJID.setFilters(newFilters);
mAccountJID.addTextChangedListener(mJidTextWatcher);
mAccountPassword.addTextChangedListener(mPasswordTextWatcher);
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) // true to disable the feature until ready
v.findViewById(R.id.account_layout).setVisibility(View.GONE);
return v;
}
开发者ID:BoogieMAN2K,项目名称:Beem,代码行数:27,代码来源:AccountConfigureFragment.java
示例2: onCreateView
import android.text.LoginFilter; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View root = inflater.inflate(R.layout.fragment_morphing, container, false);
if (root == null) {
return null;
}
View pickApp = root.findViewById(R.id.morph_pick_app);
pickApp.setOnClickListener(this);
View pickIcon = root.findViewById(R.id.morph_pick_icon);
pickIcon.setOnClickListener(this);
View share = root.findViewById(R.id.morph_share);
share.setOnClickListener(this);
View reset = root.findViewById(R.id.morph_reset);
reset.setOnClickListener(this);
View morph = root.findViewById(R.id.morph_execute);
morph.setOnClickListener(this);
//TODO: Figure out way to have real max length. In case we pad with spaces.
InputFilter lengthFilter = new InputFilter.LengthFilter(getString(R.string.morphable_app_name).length());
InputFilter asciiFilter = new LoginFilter.PasswordFilterGMail(); // Encodes ISO-8859-1 (Extended Ascii)
mName = (EditText) root.findViewById(R.id.morph_edit_name);
mName.setFilters(new InputFilter[]{lengthFilter, asciiFilter});
mIcon = (ImageView) root.findViewById(R.id.morph_edit_icon);
FontManager.handleFontTags(root);
return root;
}
开发者ID:droidstealth,项目名称:droid-stealth,代码行数:37,代码来源:MorphingFragment.java
注:本文中的android.text.LoginFilter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论