2011-09-06 60 views
0

我是一名Android開發人員。我必須在列表視圖中添加一些用戶點擊位置的更多視圖。例如,在用戶點擊的項目位置添加兩個按鈕。是否有可能與onItemClicklistener我使用此代碼如何在Android中使用onItemClicklistener在List視圖中動態添加按鈕?

public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) { 
    // TODO Auto-generated method stub 
    LayoutInflater inflater=((Activity) getApplicationContext()).getLayoutInflater(); 

    inflater.inflate(R.layout.row, null); 

    Button but=(Button)findViewById(R.id.button1); 
    but.setVisibility(0); 

} 

添加視圖列表我在列表視圖中已經添加按鈕,並設置其知名度off.Can任何機構幫助我任何幫助將是非常可觀的。

回答

相關問題