Android 在安卓系统中,是否可以先获取图像,再获取字符串,而不是项目符号

Android 在安卓系统中,是否可以先获取图像,再获取字符串,而不是项目符号,android,Android,在字符串之前我有一个字符串值。我想将我的图像作为项目符号来获取?如何做到这一点?您可以这样使用 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <

在字符串之前我有一个字符串值。我想将我的图像作为项目符号来获取?如何做到这一点?

您可以这样使用


<LinearLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="fill_parent"
  android:layout_height="wrap_content"
  android:orientation="horizontal">

<ImageView
    android:id="@+id/img_bullet"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:gravity="right"
    android:layout_marginLeft="5dip"
    android:background="@drawable/bullet"/>   

<TextView
    android:id="@+id/tv_content"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_weight="1"
    android:layout_alignParentRight="true"
    android:gravity="right"
    android:layout_marginRight="5dip"
    android:layout_marginTop="5dip"
    android:text="This is TextView"/>