Android. set different fonts to each item of ListView -


I have a ListView. I want to set different fonts for each item in ListView. Who can help me with a candidate? I want something like

Do something similar in the get-view of the list adapter

  Public Class MyAdapter ArrayAdapter and lt; JSONObject & gt; {Reference mContext; Private LayoutsInfoLtter; Public MyAdapter (reference references, list & lt; JSONObject & gt; list) {super (references, 0, list); This.mContext = context; Inflater = (layout infographic) mContext.getSystemService (Reference. LEOUT_INFLATER_SERVICE); } @ Override public view getView (integer status, seeviewview, ViewGroup parent) {Final Viewholder holder; Last typeface type 1 = typeface.getAssets (), "myFancyFont.ttf"); Final Typeface Type 2 = typeface.satset (getAssets (), "DroidSans.ttf"); If (convertView == empty) {convertView = inflater.inflate (R.layout.item_feed, guardian, incorrect); Holder = new viewholder (); Holder.TexView = (TextView) ConvertViewFindVBIID (RIDLabel_title); } And {holder = (seeholder) ConvertView.gettag (); } If (position == 0) {holder.textview.setTypeface (type1); } And {holder.texview .SetPrint (type 2); } Holder Textview.setText ("Items with Status." + Status) View Refund Convert; } Class viewer {TextV TextWave; }}  

In addition to this, you can define anywhere else typefaces as static finals.


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -