How to fill the empty spaces with content below the Image in android

前端 未结 2 474
Happy的楠姐
Happy的楠姐 2020-12-04 17:18

I have one ImageView and a TextView in my xml layout. I want to show the text below that i got by webservice on the right side of the ImageView. Can i show that text by usin

2条回答
  •  渐次进展
    2020-12-04 17:50

    https://github.com/deano2390/flowtextview

    screenshot

    Example usage:

     
    
         
    
         
    
    
    

    your code:

    for Text:

    tv = (FlowTextView) findViewById(R.id.tv);                  
    tv.setText("my string"); // using plain text    
    tv.invalidate(); // call this to render the text
    

    for HTML:

    tv = (FlowTextView) findViewById(R.id.tv);              
    Spanned spannable = Html.fromHtml("");
    tv.setText(spannable);  // using html
    tv.invalidate(); // call this to render the text
    

提交回复
热议问题