I have a TextView which height is dynamic. I want to set that the last line wouldnt be visible if it cannot be fully drawn.
screenshot
The reason why height is dynamic is that it is used in an AppWidget, and the size of an appwidget is not the same on different devices. Because of this you cannot measure the TextView or cannot use a subclass of a TextView.
link
This is what I use now basically. When I put a long text into the TextView the last line looks ugly.
<LinearLayout
android:id="@+id/widgetContent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<TextView
android:id="@+id/sg"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
Try this