如何在 listview 同一行中放置箭头?

Rıd*_*van 2 android listview android-layout

我做了一个项目,然后?卡在那里。在我的设计论文中在此处输入图片说明

而且我没有像看起来那样放置箭头,所以我可以在文本侧完成。

像那样

在此处输入图片说明

我怎样才能放置箭头?

我的代码是

String[] maddeler = new String[] { "YÖNET?M KURULU BA?KANI F?KR? ÖZTÜRK'ÜN MESAJI", "GENEL MÜDÜR CÜNEYT A?CA ?LE RÖPORTAJ", "21. YILINDA OPET",
        "M?SYONUMUZ V?ZYONUMUZ DE?ERLER?M?Z"};
ArrayList<String> maddelerListe = new ArrayList<String>();
maddelerListe.addAll( Arrays.asList(maddeler) );



listAdapter = new ArrayAdapter<String>(this, R.layout.simplerow, maddelerListe);





mainListView.setAdapter( listAdapter );

mainListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
    @Override
    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {


        switch(position)
        {
            case 0:

                Intent baskanlar =new Intent(getBaseContext(),BaskanlarSplash.class);
                startActivity(baskanlar);

                break;
            case 1:

                Intent baskanlar2=new Intent(getBaseContext(),BaskanlarSplash2.class);
                startActivity(baskanlar2);

                break;

            case 2:
                Toast.makeText(getBaseContext(),"içerik bekleniyor",Toast.LENGTH_LONG).show();
                break;
            case 3:
                Toast.makeText(getBaseContext(),"içerik bekleniyor",Toast.LENGTH_LONG).show();
                break;
        }
    }
});
Run Code Online (Sandbox Code Playgroud)

**我的 simplerow.xml **

<TextView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/rowTextView"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:padding="10dp"
    android:textSize="16sp"
    android:textColor="@color/homeBac"
    >
</TextView> 
Run Code Online (Sandbox Code Playgroud)

这是我的 Listview Normaly

 <ListView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/mainListView">

        </ListView>
Run Code Online (Sandbox Code Playgroud)

如果你能帮助我,我会非常感激:)

小智 5

将行更改为

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal">

    <TextView xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/rowTextView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:padding="10dp"
        android:textColor="@color/colorAccent"
        android:textSize="16sp"
        android:layout_weight="1"></TextView>


    <ImageView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@android:drawable/ic_dialog_info" />
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)

然后将适配器声明更改为

    ArrayAdapter<String> listAdapter = 
new ArrayAdapter<String>(this, R.layout.simplerow,R.id.rowTextView, maddelerListe);
Run Code Online (Sandbox Code Playgroud)