86

Вопрос по android – Как вы подчеркиваете текст в Android XML?

Error: User Rate Limit ExceededtextStyle.

  • Error: User Rate Limit Exceeded<u> теги не работают, например иногда, если вы используете собственный шрифт. Тем не менее, программноUnderlineSpanError: User Rate Limit Exceeded

    от
  • Вам не нужно устанавливать текст на Java. Просто используйте<u>Error: User Rate Limit Exceeded<\u>Error: User Rate Limit Exceeded

    от
  • Error: User Rate Limit Exceeded

    от Michael Zeuner
  • Error: User Rate Limit Exceeded

    от
  • Error: User Rate Limit Exceeded

    от
  • Error: User Rate Limit Exceeded

    от
  • Error: User Rate Limit ExceededUnderlineSpan.

    от
  • Error: User Rate Limit Exceeded

    от
  • Error: User Rate Limit Exceeded

    от
  • Error: User Rate Limit Exceeded

    от
  • Error: User Rate Limit Exceededstyle="text-decoration: underline;"

    от ρяσѕρєя K
  • Error: User Rate Limit Exceeded

    от Michael Zeuner
  • Error: User Rate Limit ExceededtextView.setText(Html.fromHtml("<u>"+"testest"+"</u>"));

    от ρяσѕρєя K
9 ответов
  • 3

    Error: User Rate Limit Exceeded

        <resource>
            <string name="your_string_here">This is an <u>underline</u>.</string>
        </resources>
    

  • 19

    Error: User Rate Limit Exceeded

    <resource>
        <string name="your_string_here">This is an <u>underline</u>.</string>
    </resources>
    

    <resource>
    <string name="your_string_here">This is an &lt;u>underline&lt;/u>.</string>
    

    TextView textView = (TextView) view.findViewById(R.id.textview);
    textView.setText(Html.fromHtml(getString(R.string.your_string_here)));
    

  • 1

    Error: User Rate Limit Exceeded

    Button btnClickMe= (Button) findViewById(R.id.btn_click_me);
    btnClickMe.setPaintFlags(btnClickMe.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
    

  • 51

    Error: User Rate Limit Exceeded

    TextView txt = (TextView) findViewById(R.id.Textview1);
    txt.setPaintFlags(txt.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
    

  • 0

    Error: User Rate Limit Exceeded

    ((TextView) findViewById(R.id.tv_cgu)).setText(Html.fromHtml(getString(R.string.upload_poi_CGU)));
    
    <string name="upload_poi_CGU"><![CDATA[ J\'accepte les <a href="">conditions générales</a>]]></string>
    

  • 2

    Error: User Rate Limit Exceeded

    package com.myapp.components;
    
    import android.content.Context;
    import android.support.v7.widget.AppCompatTextView;
    import android.text.SpannableString;
    import android.text.style.UnderlineSpan;
    import android.util.AttributeSet;
    
    public class LinkTextView extends AppCompatTextView {
        public LinkTextView(Context context) {
            this(context, null);
        }
    
        public LinkTextView(Context context, AttributeSet attrs) {
            super(context, attrs);
        }
    
        @Override
        public void setText(CharSequence text, BufferType type) {
            SpannableString content = new SpannableString(text);
            content.setSpan(new UnderlineSpan(), 0, content.length(), 0);
    
            super.setText(content, type);
        }
    }
    

    <com.myapp.components.LinkTextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Hello World!" />
    

  • 144

    Error: User Rate Limit Exceeded

    <b> </b>, <i> </i><u> </u>.

    <resources>
        <string name="your_string_here">
            This is an <u>underline</u>.
        </string>
    </resources>
    

    TextView tv = (TextView) view.findViewById(R.id.tv);
    SpannableString content = new SpannableString("Content");
    content.setSpan(new UnderlineSpan(), 0, content.length(), 0);
    tv.setText(content);
    

  • 0

    Error: User Rate Limit Exceeded

    1.<u>This is my underlined text</u>

    I just want to underline <u>this</u> word
    

    `textView.setPaintFlags(textView.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);`
    

    SpannableString text = new SpannableString("Voglio sottolineare solo questa parola");
    text.setSpan(new UnderlineSpan(), 25, 6, 0);
    textView.setText(text);
    

  • 1

    Error: User Rate Limit Exceeded

    textAllCapstrue

    <resource>
        <string name="my_string_value">I am <u>underlined</u>.</string>
    </resources>
    


    Note