将Textview drawable和text对齐到基线底部?

时间:2018-05-08 05:34:24

标签: android

我有As per below query , I able to get not null columns at row-level col1,col3 and col4. Query : select 'col1' as "Name",col1 from temp where exists (select 1 from temp group by to_char(col1) having (count(to_char(col1)))> 0) union all select 'col2' as "Name",to_char(col2) from temp where exists (select 1 from temp group by to_char(col2) having (count(to_char(col2)))> 0) union all select 'col3' as "Name" , to_char(col3) from temp where exists (select 1 from temp group by to_char(col3) having (count(to_char(col3)))> 0) union all select 'col4'as "Name" , to_char(col4) from temp where exists (select 1 from temp group by to_char(col4) having (count(to_char(col4)))> 0) union all select 'col5' as "Name" , to_char(col5) from temp where exists (select 1 from temp group by to_char(col5) having (count(to_char(col5)))> 0) union all select 'col6' as "Name" , to_char(col6) from temp where exists (select 1 from temp group by to_char(col6) having (count(to_char(col6)))> 0) output: col1 A col1 B col1 C col1 D col3 10 col3 20 col3 - col3 10 col4 12 col4 23 col4 34 col4 43 I tried to make this output of rows to columns but I couldn't make it in single query ... Hope this will be helpful ... 的图片和文字,我想将文字与图片的基线对齐。我正在尝试但无法做到这一点。我怎样才能做到这一点?提前致谢。

textView

Textview with image

我想像这样的文字和图像,它们共享相同的基线:

enter image description here

1 个答案:

答案 0 :(得分:-1)

尝试下面的内容:

使用android:drawableTop将图片设置在顶部。

 <TextView
        android:id="@+id/news_detail"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:ellipsize="end"
        android:maxLines="3"
        android:drawableTop="@drawable/progress_image"
        android:textColor="@color/black"
        android:text="Below Text"
        android:textSize="10sp" />