how to display currency format in textview
<p>I want to display the currency format in textview.
for example, if in the database is 2000
then it will be 2.000</p>

<p>here is that I've tried:</p>

<pre><code>    public class ItemAdapter extends BaseAdapter {

    ArrayList&lt;HashMap&lt;String, String&gt;&gt; data;
    private Context context;
    private ArrayList&lt;ModelItems&gt; arraylistitem;

    LayoutInflater inflater;
    ItemsActivity main;

    public ItemAdapter(ItemsActivity main, List&lt;ModelItems&gt; itemsModel) {
        this.main = main;
    }

    public ItemAdapter(Context context,
                       ArrayList&lt;HashMap&lt;String, String&gt;&gt; arraylist, List&lt;ModelItems&gt; populationlist) {
        this.context = context;
        this.main.itemsModel = populationlist;
        data = arraylist;
        this.arraylistitem = new ArrayList&lt;ModelItems&gt;();
        this.arraylistitem.addAll(populationlist);
    }

    @Override
    public int getCount() {
        return main.itemsModel.size();
    }

    @Override
    public Object getItem(int position) {
        return null;
    }

    @Override
    public long getItemId(int position) {
        return 0;
    }

    static class ViewHolderItem {
        TextView nameItem;
        TextView priceItem;
        ImageView imageItem;
    }

    public View getView(final int position, View convertView, ViewGroup parent) {

        ViewHolderItem holder = new ViewHolderItem();
        if (convertView == null) {
            LayoutInflater inflater = (LayoutInflater) main.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            convertView = inflater.inflate(R.layout.list_item, null);

            holder.nameItem = (TextView) convertView.findViewById(R.id.item_name);
            holder.priceItem = (TextView) convertView.findViewById(R.id.item_price);
            holder.imageItem = (ImageView) convertView.findViewById(R.id.imgItem);

            convertView.setTag(holder);
        } else {
            holder = (ViewHolderItem) convertView.getTag();
        }

        Locale locale = new Locale("id", "id");
        NumberFormat fmt = NumberFormat.getCurrencyInstance(locale);
        holder.priceItem.setText(fmt.format(this.main.itemsModel.get(position).getPrice()));
        holder.priceItem.setText(this.main.itemsModel.get(position).getPrice());
        holder.nameItem.setText(this.main.itemsModel.get(position).getName());
        return convertView;
    }

}
</code></pre>

<p>But it is still error.
Can you help me, since I am beginning in Android</p>