java - limited number of texts in textview -


first of @ image the picture

i want text near "google" image fill empty area under google image, area under google image (in above pic) empty , text arent filling there.

how can that?

xml file :::

<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:card_view="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:background="@drawable/allbg">   <imageview     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:id="@+id/imageview8"     android:layout_gravity="center_horizontal"     android:background="@drawable/newstop" />  <scrollview     android:layout_width="wrap_content"     android:layout_height="match_parent">  <relativelayout     android:layout_width="match_parent"     android:layout_height="match_parent">     <!-- name label -->     <!-- input name --> <relativelayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@drawable/slidebg" android:id="@+id/slidebg" android:layout_margin="7dp">      <imageview     android:layout_width="match_parent"     android:layout_height="70dp"     android:id="@+id/imgad2"     android:visibility="visible"     android:layout_margintop="9dp"     android:layout_marginbottom="6dp"     android:layout_marginleft="8dp"     android:layout_marginright="6dp"     />  </relativelayout>               <tablelayout android:id="@+id/tablelayout01" android:stretchcolumns="*"         android:layout_height="fill_parent" android:layout_width="fill_parent"         android:layout_centerinparent="true"   android:layout_below="@+id/slidebg"         android:layout_margin="5dp">     <tablerow android:id="@+id/tablerow01"    android:layout_width="fill_parent"         android:layout_height="0px"  android:layout_weight="1" >         <linearlayout android:layout_width="fill_parent"             android:layout_height="wrap_content"             android:orientation="horizontal"> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/btnshare" android:background="@drawable/opbg" android:text="share" android:paddingleft="20dp" android:paddingtop="4dp" android:textsize="19dp" android:textcolor="#cccccc"/>             <textview                 android:layout_width="wrap_content"                 android:layout_height="wrap_content"                 android:id="@+id/btncopy"                 android:background="@drawable/opbg"                 android:text="copy"                 android:paddingleft="20dp"                 android:paddingtop="3dp"                 android:textsize="19dp"                 android:textcolor="#cccccc"/>          </linearlayout>         </tablerow></tablelayout>     <!-- price label -->     <linearlayout android:layout_width="fill_parent"         android:layout_height="wrap_content"         android:orientation="horizontal">         <!-- button create product -->         <button android:id="@+id/btnsave"             android:layout_width="fill_parent"             android:layout_height="wrap_content"             android:text="save changes"             android:layout_weight="1"             android:visibility="gone" />          <!-- button create product -->         <button android:id="@+id/btndelete"             android:layout_width="fill_parent"             android:layout_height="wrap_content"             android:text="delete"             android:layout_weight="1"             android:visibility="gone" />      </linearlayout>      <textview android:layout_width="fill_parent"     android:layout_height="wrap_content"     android:text="price"     android:paddingleft="10dip"     android:paddingright="10dip"     android:paddingtop="10dip"     android:textsize="17dip"     android:visibility="gone" />      <!-- input price --> <edittext android:id="@+id/inputprice"     android:layout_width="fill_parent"     android:layout_height="wrap_content"     android:layout_margin="5dip"     android:layout_marginbottom="15dip"     android:singleline="true"     android:inputtype="numberdecimal"     android:visibility="gone" />  <!-- description label -->  <!-- input description -->          <relativelayout      android:layout_width="fill_parent"     android:layout_height="wrap_content"     android:padding="16dp"     android:layout_centervertical="true"     android:layout_alignparentleft="true"     android:layout_alignparentstart="true"     android:background="@drawable/listrowbg"     android:id="@+id/card_view4"      card_view:cardcornerradius="4dp"     android:layout_centerhorizontal="true"     android:layout_marginleft="5dp"     android:layout_marginright="5dp"     android:layout_margintop="5dp"     android:layout_below="@+id/tablelayout01">  <relativelayout android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/titcon">      <textview         android:id="@+id/tvname"         android:layout_width="fill_parent"         android:layout_height="fill_parent"         android:paddingtop="6dip"         android:paddingleft="6dip"         android:textsize="16dp"         android:textcolor="#fafafa"         android:textdirection="ltr"         android:textstyle="bold"     android:maxwidth="200dp"         android:width="200dp"         android:phonenumber="false"         android:text="abadi - sohmj"         android:layout_margintop="-4dp" />         <imageview android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/newshead" android:id="@+id/titsp"          />  </relativelayout>  <relativelayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@+id/titcon">        <textview         android:layout_width="fill_parent"         android:layout_height="wrap_content"         android:text="این متن خبر تست است!"         android:id="@+id/tvdes"         android:maxlines="90"       android:ellipsize="end"         android:textsize="18dp"             android:singleline="false"         android:textdirection="rtl"         android:textcolor="#fcf8f8f8"         android:layout_weight="0.95"         android:maxlength="20000"          android:layout_alignparentright="true"         android:layout_alignparentend="true"          android:layout_torightof="@+id/linearlayout2"         android:layout_toendof="@+id/linearlayout2"         android:weightsum="1"/>   <linearlayout     android:layout_width="130dp"     android:layout_height="130dp"     android:gravity="left|top"      android:id="@+id/linearlayout2"     android:layout_alignparenttop="true"     android:layout_alignparentleft="true"     android:layout_alignparentstart="true"     android:clickable="false">      <imageview         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:id="@+id/image"  /> </linearlayout>   </relativelayout>    </relativelayout>       <textview         android:layout_width="fill_parent"         android:layout_height="wrap_content"         android:text="تمامی اخبار و نوشته ها حق رپفارسی می باشد و هرگونه کپی پیگرد دارد."         android:id="@+id/textview2"         android:layout_gravity="center_horizontal"         android:layout_below="@+id/card_view4"         android:textcolor="#fff"         android:textsize="14dp"         android:gravity="center"         android:textstyle="bold"         android:layout_margintop="5dp" />  </relativelayout> </scrollview>      </linearlayout> 

use library wrapping text around image..

https://github.com/deano2390/flowtextview


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -