Android Radio Buttons issue
<p>I am  using ListView which include one TextView and one Radio Button.. I use Custom Adapter Method to Inflate View..</p>

<p>I am having one Radio Button for each List....First i select Radio Button in List 1 then i select Radio Button of List 2.. If i select Radio Button of List 2 previous selection should be disabled.. Also i want to get the Position of radio Button selected which is inside the List..</p>

<p>My UI will be in this way:</p>

<hr>

<p>LIST 1:</p>

<h2>TextView                     RadioButton</h2>

<p>LIST :2</p>

<h2>TextView                     Radio Button</h2>

<p>MY code:</p>

<p>class MultiLine extends BaseAdapter implements RadioGroup.OnCheckedChangeListener
        {</p>

<pre><code>        LayoutInflater mInflater;       
        String name;
        String TAG = "MultiLine";
        int i = -1;
        int j = -1;
        int k = -1;
        String[] VAL_CardNumber;

        public MultiLine(Context context, String[] value1) {
            try {

                mInflater = LayoutInflater.from(context);
                VAL_CardNumber = value1;


            } catch (Exception e) {
                Log.v(TAG, "dom" + e);
            }

        }

        public int getCount() {

            return VAL_CardNumber.length;
        }

        public Object getItem(int arg0) {
            return arg0;
        }

        public long getItemId(int arg0) {
            return arg0;
        }

    public View getView(int position, View convertView, ViewGroup arg2) {

        if (convertView == null) {
            convertView = mInflater.inflate(R.layout.credit_card_list_view,null);
            holder = new ViewHolder();
            holder.text = (TextView) findViewById(R.id.credit_card_listtext);
            //holder.mRadioGroup=(RadioGroup)convertView.findViewById(R.id.menu);

            //holder.icon = (ImageView) convertView.findViewById(R.id.deal_icon);

            convertView.setTag(holder);
        } else {
            holder.text = (TextView) convertView.findViewById(R.id.deal_title);
            //holder.mRadioGroup=(RadioGroup)convertView.findViewById(R.id.menu);
        }


        holder.text.setText(VAL_CardNumber[position]);

        //holder.mRadioGroup.setOnCheckedChangeListener(this);


         iconContextMenu.setOnClickListener(new IconContextMenu.IconContextMenuOnClickListener() {
                @Override
                public void onClick(int menuId) {
                    switch(menuId) {
                    case MENU_ITEM_1_ACTION:

                        Toast.makeText(getApplicationContext(), "You've clicked on menu item 1", 1000).show();
                        credit_card_edit=true;
                        Log.v("Test", "YES BOSS COMING INSIDE A");
                           //startActivity(new Intent(Credit_Card_List.this,Credit_Card_Main.class));
                        break;
                    case MENU_ITEM_2_ACTION:
                        Toast.makeText(getApplicationContext(), "You've clicked on menu item 2", 1000).show();
                        credit_card_delete=true;
                        Log.v("Test", "YES BOSS COMING INSIDE B");
                         // startActivity(new Intent(Credit_Card_List.this,Credit_Card_Main.class));
                        break;
                    case MENU_ITEM_3_ACTION:
                        credit_card_change=true;
                        Log.v("Test", "YES BOSS COMING INSIDE C");
                         // startActivity(new Intent(Credit_Card_List.this,Deal_Purchase_Checkout.class));
                        break;
                    case MENU_ITEM_4_ACTION:

                        break;  

                    }
                }
            });



        return convertView;
    }

    @Override
    public void onCheckedChanged(RadioGroup arg0, int arg1) {
        // TODO Auto-generated method stub

        list_selected_position=arg1;
        credit_card_list.getPositionForView(arg0);
        credit_card_list.getCheckedItemPosition();
        Log.v("test",""+credit_card_list.getSelectedItemPosition());
        Log.v("tes1111",""+credit_card_list.getCheckedItemPosition());

    }




    }
</code></pre>
