LinearLayout cLinearLayout = (LinearLayout) findViewById(R.id.col_linearlayout);
cLinearLayout.setOnCreateContextMenuListener(new View.OnCreateContextMenuListener()
{
public void onCreateContextMenu(ContextMenu menu, View v,ContextMenuInfo menuInfo) {
if (v == cLinearLayout) {
System.out.println("CompID1::" + menu.size());
System.out.println("Rowcount:"+ cLinearLayout.getChildCount());
}
});
}
在这段代码中,我只能获得线性布局 ID。我想获取在该线性布局内创建的编辑框的 ID,我该怎么做?