Für Textview, fügen Sie einfach Polsterung und Hintergrund achive diese :) Try this:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="#BBBBBB"
tools:context="xyz.mhuy.myapplication.MainActivity">
<RelativeLayout
android:id="@+id/relativeLayout1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@android:color/black" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="HelloWorld"
android:padding="10dp"
android:textColor="#ffffff"
android:gravity=""/>
<TextView
android:id="@+id/button2"
android:padding="10dp"
android:background="#ff0000"
android:textColor="#ffffff"
android:textStyle="bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="next"
android:layout_alignParentRight="true"/>
</RelativeLayout>
</LinearLayout>
Oben ist, was du meinst? das Ergebnis ist:
Verwendung Textview und otherTextView in linear-Layout mit Ausrichtung horizontal ... – sushildlh
Ihren XML-Code einfügen hier –
ich Rechtecken farbig haben muß, um den Quellcode – Mark023