Java Code Examples for android.widget.TextView#getInputType()

The following examples show how to use android.widget.TextView#getInputType() . 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: RemoteViewsUtils.java    From container with GNU General Public License v3.0 5 votes vote down vote up
private boolean isSingleLine(TextView textView) {
	boolean singleLine;
	try {
		singleLine = Reflect.on(textView).get("mSingleLine");
	} catch (Exception e) {
		singleLine = (textView.getInputType() & EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE) != 0;
	}
	return singleLine;
}
 
Example 2
Source File: RemoteViewsFixer.java    From container with GNU General Public License v3.0 5 votes vote down vote up
private boolean isSingleLine(TextView textView) {
	boolean singleLine;
	try {
		singleLine = Reflect.on(textView).get("mSingleLine");
	} catch (Exception e) {
		singleLine = (textView.getInputType() & EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE) != 0;
	}
	return singleLine;
}