O'Reilly logo

Reactive Android Programming by Tadas Subonis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Updating layouts

As we have readied the object that will carry and persist the tweet status information, we can continue work with the UI.

First of all, we will update the stock_update_item.xml layout file by adding this:

<TextView    android:id="@+id/stock_item_twitter_status"    android:layout_width="wrap_content"    android:layout_height="wrap_content"    android:text="Very long Twitter update that is going     to be displayed as a message"    android:textColor="@android:color/holo_green_dark"    android:textSize="18sp" />

This will contain the Twitter status message. To make it display properly, we will have to add a root component:

<RelativeLayout    android:id="@+id/stock_item_content_block"    android:layout_width="match_parent"    android:layout_height="wrap_content" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required