ここでの初心者の質問誰かが私を正しい方向に向けることができるのだろうか. 各アイテムにテキストビューが含まれる「アカウント」のリストビューと、事前設定された量から選択するスピナーが必要なので、各アイテムは次のようになります。
 ________________________
|TextView---------Spinner|
|________________________|
これが私がこれまでに持っているものです:
 
activity_topup.xmlこれはアクティビティのメイン xml です
<ListView 
         android:id="@+id/topup_accounts_listview" 
         android:layout_width="match_parent"
         android:layout_height="0dp"
         android:layout_weight="1"
         android:background="@color/stq_grey"
         android:divider="@android:color/transparent"
         android:dividerHeight="20.0sp"/>
そして、私のJavaファイルでTopUpActivity.java
String[] listAccounts = { "Acc1", "Acc2", "Acc3"};        
accountListAdapter = new ArrayAdapter<String>(this, R.layout.listview_item_accounts, R.id.accounts_list_tv, listAccounts);
        listView = (ListView)findViewById(R.id.topup_accounts_listview);
        listView.setAdapter(accountListAdapter);
listview_item_accounts.xmlには、各アイテムのコンテンツ (テキスト ビューとスピナー) が含まれています。
 <TextView
    android:id="@+id/accounts_list_tv"
    android:layout_width="150dp"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_toLeftOf="@+id/accounts_list_amt_spinner"
    android:background="@drawable/list_item_selector_grey"
    style="@style/ListText" />
 <Spinner
    android:id="@id/accounts_list_amt_spinner"
    android:layout_width="96dp"
    android:layout_height="wrap_content"
    android:layout_alignParentRight="true"
    android:prompt="@string/topup_amt_prompt"
    android:background="@drawable/list_item_selector_blue"
    style="@style/ListText"  />
私は正しい軌道に乗っていますか?! 結果はある程度正しいですが、スピナーを設定する方法がよくわかりません。この方法を使用してテキストビューを設定できるのは、私が思うだけです。これをJavaファイルに追加して、スピナーにもデータを入力しようとしましたが、スピナーは空のままです:
//Inflate the listview items
LayoutInflater inflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View vi = inflater.inflate(R.layout.listview_item_accounts, null);
//Get the spinner
amt = (Spinner)vi.findViewById(R.id.accounts_list_amt_spinner);
//Add the values to the spinner by setting this adapter
ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,
                R.array.topup_amts, android.R.layout.simple_spinner_item);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
amt.setAdapter(adapter);