Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm using list view in my app, I want to the font of list view item in marathi, but certain error occurs and app get close. Here is my code:
Java
public View getView(int position, View convertView, ViewGroup parent) {

    View vi=convertView;
    ViewHolder holder;

    if(convertView==null){ 

        /********** Inflate tabitem.xml file for each row ( Defined below ) ************/
        vi = inflater.inflate(R.layout.tabitem, null); 

        /******** View Holder Object to contain tabitem.xml file elements ************/

        holder=new ViewHolder();
        holder.text.setTypeface(Typeface.createFromAsset(vi.getContext().getAssets(), "akshar.ttf"));
        holder.text1.setTypeface(Typeface.createFromAsset(vi.getContext().getAssets(), "akshar.ttf"));
        holder.text=(TextView)vi.findViewById(R.id.text);
        holder.text1=(TextView)vi.findViewById(R.id.text1);
        holder.image=(ImageView)vi.findViewById(R.id.image);

       /************  Set holder with LayoutInflater ************/
        vi.setTag(holder);
    }
Posted
Updated 28-Sep-13 4:01am
v3

1 solution

 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900