Example usage for android.view View TEXT_ALIGNMENT_VIEW_START

List of usage examples for android.view View TEXT_ALIGNMENT_VIEW_START

Introduction

In this page you can find the example usage for android.view View TEXT_ALIGNMENT_VIEW_START.

Prototype

int TEXT_ALIGNMENT_VIEW_START

To view the source code for android.view View TEXT_ALIGNMENT_VIEW_START.

Click Source Link

Document

Align to the start of the view, which is ALIGN_LEFT if the view’s resolved layoutDirection is LTR, and ALIGN_RIGHT otherwise.

Usage

From source file:com.android.contacts.common.list.ContactListItemView.java

/**
 * Returns the text view for the search snippet, creating it if necessary.
 *//*from  www.  j  a v a2s . co  m*/
public TextView getSnippetView() {
    if (mSnippetView == null) {
        mSnippetView = new TextView(getContext());
        mSnippetView.setSingleLine(true);
        mSnippetView.setEllipsize(getTextEllipsis());
        mSnippetView.setTextAppearance(getContext(), android.R.style.TextAppearance_Small);
        mSnippetView.setTextAlignment(View.TEXT_ALIGNMENT_VIEW_START);
        mSnippetView.setActivated(isActivated());
        addView(mSnippetView);
    }
    return mSnippetView;
}

From source file:com.android.contacts.common.list.ContactListItemView.java

/**
 * Returns the text view for the status, creating it if necessary.
 *//*  ww  w .j a  v a  2  s  .  c o m*/
public TextView getStatusView() {
    if (mStatusView == null) {
        mStatusView = new TextView(getContext());
        mStatusView.setSingleLine(true);
        mStatusView.setEllipsize(getTextEllipsis());
        mStatusView.setTextAppearance(getContext(), android.R.style.TextAppearance_Small);
        mStatusView.setTextColor(mSecondaryTextColor);
        mStatusView.setActivated(isActivated());
        mStatusView.setTextAlignment(View.TEXT_ALIGNMENT_VIEW_START);
        addView(mStatusView);
    }
    return mStatusView;
}