Below is the view that I have created dynamically and I have added two rows but I can't get the position of that particular row, so I could I get it. I have created four textviews with one view, but how can I get the position of that particular view?

[![enter image description here](https://i.stack.imgur.com/4Ru4w.png)](https://i.stack.imgur.com/4Ru4w.png)

On click of a button I have added the code mentioned below,

```
private LinearLayout llAddMember;
llAddMember = (LinearLayout) findViewById(R.id.llAddMember);
AddFamilyMemberModel familyMemberModel = new AddFamilyMemberModel();
                familyMemberModel.setStrMemberName(strMemberName);
                familyMemberModel.setStrGender(strGender);
                familyMemberModel.setStrMemberRelation(strMemberRelation);
                familyMemberModel.setStrMemberAge(strMemberAge);
                arrAddFamilyMember.add(familyMemberModel);

                LayoutParams lparams = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
                llAddMember.setBackgroundColor(getResources().getColor(android.R.color.white));

                TextView txtResMemberName = new TextView(RegistrationPatientActivity.this);
                txtResMemberName.setLayoutParams(lparams);
                txtResMemberName.setText("Member Name: " +familyMemberModel.getStrMemberName());
                txtResMemberName.setTypeface(Typeface.createFromAsset(getAssets(),"Roboto-Regular.ttf"));
                txtResMemberName.setTextSize(14);
                txtResMemberName.setTextColor(Color.parseColor("#9C9C9C"));
                txtResMemberName.setSingleLine(true);
                llAddMember.addView(txtResMemberName);
                lparams.setMargins(50, 5, 40, 0);

                View view1 = new View(RegistrationPatientActivity.this);
                LayoutParams lparamsView1 = new LayoutParams(LayoutParams.WRAP_CONTENT, 2);
                view1.setLayoutParams(lparamsView1);
                view1.setBackgroundColor(Color.parseColor("#DEDDDA"));
                llAddMember.addView(view1);
                lparamsView1.setMargins(50, 10, 0, 0);

                TextView txtResGender = new TextView(RegistrationPatientActivity.this);
                txtResGender.setLayoutParams(lparams);
                txtResGender.setText("Member Gender: " +familyMemberModel.getStrGender());
                txtResGender.setTypeface(Typeface.createFromAsset(getAssets(), "Roboto-Regular.ttf"));
                txtResGender.setTextSize(14);
                txtResGender.setTextColor(Color.parseColor("#9C9C9C"));
                llAddMember.addView(txtResGender);
                lparams.setMargins(50, 10, 0, 0);

                View view2 = new View(RegistrationPatientActivity.this);
                LayoutParams lparamsView2 = new LayoutParams(LayoutParams.WRAP_CONTENT, 2);
                view2.setLayoutParams(lparamsView2);
                view2.setBackgroundColor(Color.parseColor("#DEDDDA"));
                llAddMember.addView(view2);
                lparamsView2.setMargins(50, 10, 0, 0);

                TextView txtResMemberRelation = new TextView(RegistrationPatientActivity.this);
                txtResMemberRelation.setLayoutParams(lparams);
                txtResMemberRelation.setText("Member Relation: " +familyMemberModel.getStrMemberRelation());
                txtResMemberRelation.setTypeface(Typeface.createFromAsset(getAssets(), "Roboto-Regular.ttf"));
                txtResMemberRelation.setTextSize(14);
                txtResMemberRelation.setTextColor(Color.parseColor("#9C9C9C"));
                llAddMember.addView(txtResMemberRelation);
                lparams.setMargins(50, 10, 0, 0);

                View view3 = new View(RegistrationPatientActivity.this);
                LayoutParams lparamsView3 = new LayoutParams(LayoutParams.WRAP_CONTENT, 2);
                view3.setLayoutParams(lparamsView3);
                view3.setBackgroundColor(Color.parseColor("#DEDDDA"));
                llAddMember.addView(view3);
                lparamsView3.setMargins(50, 10, 0, 0);

                TextView txtResMemberAge = new TextView(RegistrationPatientActivity.this);
                txtResMemberAge.setLayoutParams(lparams);
                txtResMemberAge.setText("Member Age: " +familyMemberModel.getStrMemberAge());
                txtResMemberAge.setTypeface(Typeface.createFromAsset(getAssets(), "Roboto-Regular.ttf"));
                txtResMemberAge.setTextSize(14);
                txtResMemberAge.setTextColor(Color.parseColor("#9C9C9C"));
                llAddMember.addView(txtResMemberAge);
                lparams.setMargins(50, 10, 0, 0);

                View view = new View(RegistrationPatientActivity.this);
                LayoutParams lparamsView = new LayoutParams(LayoutParams.WRAP_CONTENT, 4);
                view.setLayoutParams(lparamsView);
                view.setBackgroundColor(Color.parseColor("#006D67"));
                llAddMember.addView(view);
                lparamsView.setMargins(0, 10, 0, 0);

```