Tabnine Logo
BidiFormatter
Code IndexAdd Tabnine to your IDE (free)

How to use
BidiFormatter
in
android.text

Best Java code snippets using android.text.BidiFormatter (Showing top 11 results out of 315)

origin: square/assertj-android

public BidiFormatterAssert hasRtlContext() {
 isNotNull();
 assertThat(actual.isRtlContext()) //
   .overridingErrorMessage("Expected RTL context but was not.") //
   .isTrue();
 return this;
}
origin: geniusgithub/AndroidDialer

/**
 * Joins a list of {@link CharSequence} into a single {@link CharSequence} seperated by a
 * localized delimiter such as ", ".
 *
 * @param resources Resources used to get list delimiter.
 * @param list List of char sequences to join.
 * @return Joined char sequences.
 */
public static CharSequence join(Resources resources, Iterable<CharSequence> list) {
  StringBuilder sb = new StringBuilder();
  final BidiFormatter formatter = BidiFormatter.getInstance();
  final CharSequence separator = resources.getString(R.string.list_delimeter);
  Iterator<CharSequence> itr = list.iterator();
  boolean firstTime = true;
  while (itr.hasNext()) {
    if (firstTime) {
      firstTime = false;
    } else {
      sb.append(separator);
    }
    // Unicode wrap the elements of the list to respect RTL for individual strings.
    sb.append(formatter.unicodeWrap(
        itr.next().toString(), TextDirectionHeuristics.FIRSTSTRONG_LTR));
  }
  // Unicode wrap the joined value, to respect locale's RTL ordering for the whole list.
  return formatter.unicodeWrap(sb.toString());
}
origin: geniusgithub/AndroidDialer

private Intent getCreateDocIntent() {
  final Intent intent = new Intent(Intent.ACTION_CREATE_DOCUMENT);
  intent.addCategory(Intent.CATEGORY_OPENABLE);
  intent.setType(VCardService.X_VCARD_MIME_TYPE);
  intent.putExtra(Intent.EXTRA_TITLE, mBidiFormatter.unicodeWrap(
      getString(R.string.exporting_vcard_filename), TextDirectionHeuristics.LTR));
  return intent;
}
origin: wasdennnoch/AndroidN-ify

        getContext().getResources().getString(R.string.phone_type_and_phone_number),
        mContact.getPhoneType(),
        BidiFormatter.getInstance().unicodeWrap(mContact.getPhoneNumber(),
            TextDirectionHeuristics.LTR));
setSummary(summary);
origin: geniusgithub/AndroidDialer

final String displayNumberStr = mBidiFormatter.unicodeWrap(displayNumber,
    TextDirectionHeuristics.LTR);
origin: geniusgithub/AndroidDialer

} else {
  menu.setHeaderTitle(PhoneNumberUtilsCompat.createTtsSpannable(
      BidiFormatter.getInstance().unicodeWrap(number, TextDirectionHeuristics.LTR)));
origin: geniusgithub/AndroidDialer

text = ContactDisplayUtils.getTtsSpannedPhoneNumber(resources,
    R.string.search_shortcut_call_number,
    mBidiFormatter.unicodeWrap(number, TextDirectionHeuristics.LTR));
drawableId = R.drawable.ic_search_phone;
break;
origin: square/assertj-android

 public BidiFormatterAssert doesNotHaveRtlContext() {
  isNotNull();
  assertThat(actual.isRtlContext()) //
    .overridingErrorMessage("Expected not to be RTL context but was.") //
    .isFalse();
  return this;
 }
}
origin: geniusgithub/AndroidDialer

final String displayNumberStr = mBidiFormatter.unicodeWrap(
    displayNumber.toString(), TextDirectionHeuristics.LTR);
origin: com.squareup.assertj/assertj-android

public BidiFormatterAssert hasRtlContext() {
 isNotNull();
 assertThat(actual.isRtlContext()) //
   .overridingErrorMessage("Expected RTL context but was not.") //
   .isTrue();
 return this;
}
origin: com.squareup.assertj/assertj-android

 public BidiFormatterAssert doesNotHaveRtlContext() {
  isNotNull();
  assertThat(actual.isRtlContext()) //
    .overridingErrorMessage("Expected not to be RTL context but was.") //
    .isFalse();
  return this;
 }
}
android.textBidiFormatter

Most used methods

  • unicodeWrap
  • getInstance
  • isRtlContext

Popular in Java

  • Making http post requests using okhttp
  • setContentView (Activity)
  • setScale (BigDecimal)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • BoxLayout (javax.swing)
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now