Error in arrayadapter
<p>Please help me friends. What is wrong in this program. I cant use LayoutInflater here. how To solve this problem.</p>

<pre><code>public class MyListAdapter extends ArrayAdapter&lt;MyData&gt; implements
        OnClickListener {

    private ArrayList&lt;MyData&gt; items;
    Context context;

    public MyListAdapter(Context context, int textViewResourceId,
            ArrayList&lt;MyData&gt; items) {
        super(context, textViewResourceId, items);
        this.items = items;
        this.context = context;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        View v = convertView;
        if (v == null) {
            LayoutInflater vi = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            v = vi.inflate(R.layout.row, null);
        }

        MyData myData = items.get(position);
        if (myData != null) {
            TextView textViewTwo = (TextView) v
                    .findViewById(R.id.text_view_two);
            if (textViewTwo != null) {
                textViewTwo.setText(myData.getText());
                // put the id to identify the item clicked
                textViewTwo.setTag(myData.getId());
                textViewTwo.setOnClickListener(this);
            }
        }
        return v;
    }

    public void onClick(View v) {
        // TODO Auto-generated method stub
        Log.d("Sample", "Clicked on tag: " + v.getTag());
        Toast.makeText(context, "", Toast.LENGTH_SHORT).show();

    }

}
</code></pre>

<p>Error is : The method getSystemService(String) is undefined for the type MyListAdapter. </p>

<p>Thanks in advance.</p>
