TextView setMaxLines - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for TextView setMaxLines method.

This code example shows how to use the following methods:setGravity, setMaxLines, setPadding, setTextAppearance, setTypeface
This code example shows how to use the following methods:setLayoutParams, addTextChangedListener, setMaxLines, setMinLines, setOnEditorActionListener
		mContainer = ( LinearLayoutIMETrap ) new LinearLayoutIMETrap ( sContext );
		mContainer.setLayoutParams ( new LinearLayout.LayoutParams ( LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT ));
		mContainer.setOrientation ( LinearLayout.VERTICAL );
		mContainer.setMainActivity ( activity );
 
		mKeyInTextView = new EditText ( activity );
 
		mKeyInTextView.setText ( "" );
		mKeyInTextView.setMinLines ( 1 );
		mKeyInTextView.setMaxLines ( 1 );
		 
		mKeyInTextView.addTextChangedListener ( new TextWatcher () {
 
			public void afterTextChanged ( Editable s ) {
 
   				mKeyString = s.toString ();
			} 
 
			public void beforeTextChanged ( CharSequence s, int start, int count, int after ) {
 

9
CodeRank
This code example shows how to use the following methods:setOnKeyListener, setAdapter, setOnItemClickListener, setThreshold, addTextChangedListener
	public StationSelectorAdapter( Context context, AutoCompleteTextView view, StationSearchService service, List<Station> history, ChangeListener listener ) {
		this.context = context;
		this.listener = listener;
		this.history = history;
 
		view.setAdapter( new StationsAdapter( context, service, history ) );
		view.setMaxLines( 1 );
		view.setThreshold( 1 );
		view.addTextChangedListener( this );
		view.setOnItemClickListener( this );
		view.setOnKeyListener( this );
	} 
 
	@Override 
	public void afterTextChanged( Editable paramEditable ) {
		station = null;
		listener.stationChanged();
	} 
 
	@Override 
5
CodeRank
This code example shows how to use the following methods:setMaxLines
	@Override 
	protected View onCreateView(final ViewGroup parent) {
		View v = super.onCreateView(parent);
		TextView tv = (TextView) v.findViewById(android.R.id.summary);
		if (tv != null) {
			tv.setMaxLines(Integer.MAX_VALUE);
		} 
		return v;
	} 
 
	@Override 
	protected void onDialogClosed(final boolean positiveResult) {
		super.onDialogClosed(positiveResult);
		if (positiveResult) {
			this.cv.put(this.getKey(), this.getText());
			if (this.ul != null) {
				this.ul.onUpdateValue(this);
			} 
		} 
	} 
5
CodeRank
This code example shows how to use the following methods:setLayoutParams, setInputType, setMaxLines, setMinLines
This code example shows how to use the following methods:setMaxLines
	@Override 
	protected View onCreateView(final ViewGroup parent) {
		View view = super.onCreateView(parent);
		TextView tv = (TextView) view.findViewById(android.R.id.summary);
		if (tv != null) {
			tv.setMaxLines(Integer.MAX_VALUE);
		} 
		return view;
	} 
 
	@Override 
	protected View onCreateDialogView() {
		this.dp = new DatePicker(this.getContext());
		this.updateDialog();
		return this.dp;
	} 
 
	/** 
	 * Set date and time as unix time stamp. 
	 *  
5
CodeRank
This code example shows how to use the following methods:setMaxLines
	@Override 
	protected View onCreateView(final ViewGroup parent) {
		View v = super.onCreateView(parent);
		TextView tv = (TextView) v.findViewById(android.R.id.summary);
		if (tv != null) {
			tv.setMaxLines(Integer.MAX_VALUE);
		} 
		return v;
	} 
 
	@Override 
	protected View onCreateDialogView() {
		if (this.sm) {
			return super.onCreateDialogView(); 
		} else { 
			View v = LayoutInflater.from(this.getContext()).inflate(R.layout.doubleedit, null);
			this.et1 = (EditText) v.findViewById(android.R.id.text1);
			this.et2 = (EditText) v.findViewById(android.R.id.text2);
			this.et1.setText(this.getText());
			this.et2.setText(this.v2);
5
CodeRank
This code example shows how to use the following methods:setMaxLines
	@Override 
	protected View onCreateView(final ViewGroup parent) {
		View v = super.onCreateView(parent);
		TextView tv = (TextView) v.findViewById(android.R.id.summary);
		if (tv != null) {
			tv.setMaxLines(Integer.MAX_VALUE);
		} 
		return v;
	} 
 
	@Override 
	protected void onDialogClosed(final boolean positiveResult) {
		if (this.m) {
			if (positiveResult) {
				String v = this.storeCheckedArray();
				String ov = this.getValue();
				if (ov == null & v != null || ov != null && !ov.equals(v)) {
					this.setValue(v);
				} 
				this.cv.put(this.getKey(), v);
5
CodeRank
This code example shows how to use the following methods:setInputType, setMaxLines, setText
 
        }else if (id == DIALOG_TYPE_MESSAGE)
        { 
            AlertDialog.Builder builder = new AlertDialog.Builder(this);
            builder.setTitle("Type iBus Message (SDM-Format)");
            final EditText et = new EditText(this);
            et.setText(mLastSendMessage);  
            et.setInputType(InputType.TYPE_TEXT_FLAG_CAP_CHARACTERS | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
            et.setMaxLines(1);
            builder.setView(et);
            builder.setPositiveButton("OK", new DialogInterface.OnClickListener()
            { 
                public void onClick(DialogInterface dialog, int which)
                { 
                    // separate on commas 
                    String[] sdm = et.getText().toString().split( ",\\s*" );
                     
                    // prepare intent parsing the data 
                    if (sdm.length >= 3)
                    { 
6
CodeRank
This code example shows how to use the following methods:setMaxLines
  private void adjustOpacity() { 
 
  } 
 
  private void createToggleButton( CreateOperation operation ) {
    ToggleButton button = new ToggleButton( getActivity() );
    button.setMaxLines( 1 );
    setButtonProperties( button );
    setCheckedChangedListener( button, operation.getTarget() );
    initiateNewView( operation, button );
    setTextOnToggleButton( operation );
  } 
 
  private void createButton( CreateOperation operation ) {
    Button button = new Button( getActivity() );
    setButtonProperties( button );
    initiateNewView( operation, button );
  } 
 
  private void createRadioButton( CreateOperation operation ) {
5
CodeRank

Related TextView setMaxLines Questions & Answers:

setMaxLines Method Overview
Makes the TextView at most this many lines tall.
See Code Examples for other Android TextView Methods: