Tabnine Logo
DynamicLayout.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
android.text.DynamicLayout
constructor

Best Java code snippets using android.text.DynamicLayout.<init> (Showing top 8 results out of 315)

origin: KeepSafe/TapTargetView

debugLayout = new DynamicLayout(debugText, debugTextPaint, getWidth(), Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);
origin: melvinjlobo/Dash-Spinner

@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
  super.onSizeChanged(w, h, oldw, oldh);
  // Initialize the values;
  initializeValues();
  // Build a new Dynamic Layout with the available width since we can only provide width when the dynamic layout is created
  mDynamicLayout = new DynamicLayout(mStringBuilder, mStringBuilder, mTextPaint, w, Layout.Alignment.ALIGN_CENTER, 1.0f, 1.0f, true);
}
origin: jruesga/timeline-chart-view

new DynamicLayout(spannable, mTickLabelFgPaint,
  (int) mBarItemWidth, Layout.Alignment.ALIGN_CENTER, 1.0f, 1.0f, false));
origin: square1-io/rich-text-android

private DynamicLayout makeLayout(int width){
  DynamicLayout result = new DynamicLayout(mText,
      mAppearance.textPaint(null),
      width,
      Layout.Alignment.ALIGN_NORMAL,
      mAppearance.getSpacingMult(),
      mAppearance.getLineSpacingAdd(),
      false);
  return result;
}
origin: jruesga/timeline-chart-view

if (layout == null) {
  layout = new DynamicLayout(spannable, mTickLabelFgPaint,
      (int) mBarItemWidth, Layout.Alignment.ALIGN_CENTER, 1.0f, 1.0f, false);
  mTickTextLayouts[tickFormat].put(text.length(), layout);
origin: razerdp/PraiseWidget

private Layout createWorkingLayout(String workingText, int textTotalWidth) {
  /**
   *  float spacingmult:相对行间距,相对字体大小,1.5f表示行间距为1.5倍的字体高度。
   *  float spacingadd:在基础行距上添加多少
   */
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
    LineSpacingMultiplier = getLineSpacingMultiplier();
    LineSpacingExtra = getLineSpacingExtra();
  } else {
    if (LineSpacingMultiplier == 0.0f && LineSpacingExtra == 0.0f) {
      try {
        Field Multiplier = TextView.class.getDeclaredField("mSpacingMult");
        Multiplier.setAccessible(true);
        LineSpacingMultiplier = Multiplier.getFloat(this);
        Field SpacingExtra = TextView.class.getDeclaredField("mSpacingAdd");
        SpacingExtra.setAccessible(true);
        LineSpacingExtra = SpacingExtra.getFloat(this);
      } catch (Exception e) {
        e.printStackTrace();
        LineSpacingMultiplier = 1.0f;
        LineSpacingExtra = 3.0f;
      }
    }
  }
  return new DynamicLayout(workingText, getPaint(),
    (textTotalWidth == 0 ? getScreenPixWidth(mContext) : textTotalWidth),
    Layout.Alignment.ALIGN_NORMAL, LineSpacingMultiplier, LineSpacingExtra, false);
}
origin: henrichg/PhoneProfilesPlus

debugLayout = new DynamicLayout(debugText, debugTextPaint, getWidth(), Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);
origin: Carbs0126/ExpandableTextView

switch (mCurrState){
  case STATE_SHRINK: {
    mLayout = new DynamicLayout(mOrigText, mTextPaint, mLayoutWidth, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);
    mTextLineCount = mLayout.getLineCount();
      return mOrigText;
    mLayout = new DynamicLayout(mOrigText, mTextPaint, mLayoutWidth, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);
    mTextLineCount = mLayout.getLineCount();
android.textDynamicLayout<init>

Popular methods of DynamicLayout

  • draw
  • getHeight
  • getWidth
  • getLineForVertical
  • getOffsetForHorizontal
  • getLineBottom
  • getLineBounds
  • getLineForOffset
  • getLineTop
  • getPrimaryHorizontal

Popular in Java

  • Updating database using SQL prepared statement
  • startActivity (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • onCreateOptionsMenu (Activity)
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Best IntelliJ 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