android.text.method.SingleLineTransformationMethod Java Examples
The following examples show how to use
android.text.method.SingleLineTransformationMethod.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AutofitHelper.java From stynico with MIT License | 6 votes |
private static int getMaxLines(AppCompatTextView view) { int maxLines = -1; // No limit (Integer.MAX_VALUE also means no limit) TransformationMethod method = view.getTransformationMethod(); if (method != null && method instanceof SingleLineTransformationMethod) { maxLines = 1; } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { // setMaxLines() and getMaxLines() are only available on android-16+ maxLines = view.getMaxLines(); } return maxLines; }
Example #2
Source File: DetailFragment.java From Passbook with Apache License 2.0 | 6 votes |
void changeDisplay(View view, int pos) { if(mShowPwd) { return; } Account.Entry entry = mItems.get(pos); if(entry.mType == AccountManager.EntryType.PASSWORD || entry.mType == AccountManager.EntryType.PIN) { boolean showed = mPwdShowed.get(pos); ViewHolder holder = (ViewHolder)view.getTag(); if(showed) { holder.mValue.setTransformationMethod( PasswordTransformationMethod.getInstance()); } else { holder.mValue.setTransformationMethod( SingleLineTransformationMethod.getInstance()); } mPwdShowed.set(pos, !showed); } }
Example #3
Source File: AutofitHelper.java From kAndroid with Apache License 2.0 | 5 votes |
private static int getMaxLines(TextView view) { int maxLines = -1; // No limit (Integer.MAX_VALUE also means no limit) TransformationMethod method = view.getTransformationMethod(); if (method != null && method instanceof SingleLineTransformationMethod) { maxLines = 1; } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { // setMaxLines() and getMaxLines() are only available on android-16+ maxLines = view.getMaxLines(); } return maxLines; }
Example #4
Source File: TextUtil.java From VideoOS-Android-SDK with GNU General Public License v3.0 | 5 votes |
static int getMaxLines(TextView view) { int maxLines = -1; // No limit (Integer.MAX_VALUE also means no limit) TransformationMethod method = view.getTransformationMethod(); if (method != null && method instanceof SingleLineTransformationMethod) { maxLines = 1; } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { // setMaxLines() and getMaxLines() are only available on android-16+ maxLines = view.getMaxLines(); } return maxLines; }
Example #5
Source File: AutofitHelper.java From DarkCalculator with MIT License | 5 votes |
private static int getMaxLines(TextView view) { int maxLines = -1; // No limit (Integer.MAX_VALUE also means no limit) TransformationMethod method = view.getTransformationMethod(); if (method != null && method instanceof SingleLineTransformationMethod) { maxLines = 1; } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { // setMaxLines() and getMaxLines() are only available on android-16+ maxLines = view.getMaxLines(); } return maxLines; }