http://code.google.com/p/android-flowtextview/
Beispiel Nutzung:
<com.pagesuite.flowtext.FlowTextView
android:id="@+id/tv"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:padding="10dip"
android:src="@drawable/android" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginTop="400dip"
android:padding="10dip"
android:src="@drawable/android2" />
</com.pagesuite.flowtext.FlowTextView>
Code:
für Text:
tv = (FlowTextView) findViewById(R.id.tv);
tv.setText("my string"); // using plain text
tv.invalidate(); // call this to render the text
für HTML:
tv = (FlowTextView) findViewById(R.id.tv);
Spanned spannable = Html.fromHtml("<html ... </html>");
tv.setText(spannable); // using html
tv.invalidate(); // call this to render the text
Ich bin Text von webservice bekommen, wie ich diesen Text – Victor
html einstellen können Sie nicht, dass es zu html konvertieren. verwende nicht nur tv.setText (yourtextfromwebservice); – Talha
Wie kann ich diesen Webservice-Text in HTML konvertieren @talhakosen – Victor