How to get the identifier of the views that are dynamically added to the layout?
public class Display { static int i; Dynamic_UIActivity dyn; private Context context; View mField= null; TextView text; protected int mYear; protected int mMonth; protected int mDay; LinearLayout ll; Mynewdialog dialognew; public Display(Context mcontext) { context=mcontext; ll = new LinearLayout(mcontext); ll.setOrientation(LinearLayout.VERTICAL); dyn = new Dynamic_UIActivity(); } public void addLabel(String text) { TextView textview = new TextView(context); textview.setText(text); ll.addView(textview); } public void addField(String Type,String Tag) { mField.setId(i); i++; if(Type.equalsIgnoreCase("text")) { mField= new EditText(context); mField.setTag(Tag);
now I want to set the identifier of the views I get by checking its type? How can i do this?
Geetanjali
source share