recherche

Maison  >  Questions et réponses  >  le corps du texte

android - Le texte IconMarginSpan ne s'enroule pas. Utilisez les icônes DynamicDrawableSpan et ImageSpan pour n'avoir aucune marge.

IconMarginSpan a très peu de méthodes. La méthode ChooseHeight a-t-elle cet effet ? Comment puis-je la modifier pour définir DynamicDrawableSpan#ALIGN_BASELINE comme DynamicDrawableSpan et ImageSpan afin que le texte suivant puisse être renvoyé à la ligne ?

public void chooseHeight(CharSequence text, int start, int end,
                             int istartv, int v,
                             Paint.FontMetricsInt fm) {
        if (end == ((Spanned) text).getSpanEnd(this)) {
            int ht = mBitmap.getHeight();

            int need = ht - (v + fm.descent - fm.ascent - istartv);
            if (need > 0)
                fm.descent += need;

            need = ht - (v + fm.bottom - fm.top - istartv);
            if (need > 0)
                fm.bottom += need;
        }
    }

Ajoutez un espace. . . . . . C'est tout

ringa_leeringa_lee2821 Il y a quelques jours1439

répondre à tous(1)je répondrai

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-05-24 11:40:14

    Ajouter un espace. . . . . . Ça y est

    répondre
    0
  • Annulerrépondre