How to find the row and coloum position of an array of button
<p>i have created an array of button now on click of each buttons i call onClick method...on that method is it possible to the position of button ie row and column position..the code i have written is...</p>

<p>Code for crating Array of buttons..</p>

<pre><code>LinearLayout layoutVertical = (LinearLayout) findViewById(R.id.liVLayout);
            LinearLayout rowLayout=null;

            LayoutParams param = new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT,1);

            //Create Button
            for (i = 0; i&lt;6; i++) 
            {
                rowLayout = new LinearLayout(this);
                rowLayout.setWeightSum(7);
                layoutVertical.addView(rowLayout,param);
                for(j=0;j&lt;7;j++)
                {
                    pBtnDay[i][j]=new Button(this);
                    rowLayout.addView(pBtnDay[i][j],param); 

                    pBtnDay[i][j].setOnClickListener(this); 
                }
            }
            return true;
</code></pre>

<p>code for onClick Method</p>

<pre><code>            Button b = (Button)view;
            txtDate.setText(b.getText());
            boolean bStartDate=false;
</code></pre>

<p>now in onclick method i can getText of each button by using <code>Button b=(Button)view</code>..so is it possible to get the row and column positions..of that particular button..</p>
