Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9091249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T22:33:56+00:00 2026-06-16T22:33:56+00:00

I am trying to implement fragment using android 4.0. I have added the three

  • 0

I am trying to implement fragment using android 4.0.
I have added the three items in list fragment in my DummyContent.java file

static {
    // Add 3 sample items.
    addItem(new DummyItem("1", "Videos"));
    addItem(new DummyItem("2", "Images"));
    addItem(new DummyItem("3", "Story"));
}

These Videos,Images,Story are appearing on left side of fragment on click of each it item shows details information on detail fragment in right hand side.

I want to change the font of these list views but problem is list fragment uses systems textview as below

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // TODO: replace with a real list adapter.
    setListAdapter(new ArrayAdapter<DummyContent.DummyItem>(getActivity(),
            android.R.layout.simple_list_item_activated_1,
            android.R.id.text1, DummyContent.ITEMS));
}

Which is not allowing me to apply Typeface to android.R.id.text1

Please help me

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T22:33:58+00:00Added an answer on June 16, 2026 at 10:33 pm

    One way to is to extend ArrayAdapter and override the getView method to get a hold of the TextView:

    public class MyArrayAdapter<T> extends ArrayAdapter<T> {
    
        public MyArrayAdapter(Context context, List<T> items) {
    
            super(context, android.R.layout.simple_list_item_activated_1, android.R.id.text1, items);
        }
    
        public MyArrayAdapter(Context context, T[] items) {
    
            super(context, android.R.layout.simple_list_item_activated_1, android.R.id.text1, items);
        }
    
        @Override
        public View getView(int position, View convertView, ViewGroup parent) {
    
            View view = super.getView(position, convertView, parent);
            TextView textView = (TextView) view.findViewById(android.R.id.text1);
            textView.setTypeface(Typeface.createFromAsset(getContext().getAssets(), "font/segoeuil.tff"));
    
            return view;
        }
    }
    

    You would then set your adapter like so:

    setListAdapter(new MyArrayAdapter<DummyContent.DummyItem>(getActivity(), DummyContent.ITEMS);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was trying to implement lisadapter in a fragment, but Java does not allow
I have been using Jake Wharton's ViewPagerIndicator and I am currently trying to implement
I'm trying to implement a simple fragment in android. I've tried various approaches and
I am trying to implement Fragments in my Project using the https://github.com/JakeWharton/Android-ViewPagerIndicator plugin. My
I have a fragment that I am trying to test using Robolectric (and Mockito)
I am trying to implement a MessageBodyWriter for List. with this implementation i have
I am trying to implement three ListFragments in the main activity. The third list
Currently, I'm trying to create a file manager app on Android, using fragments for
I am trying to implement a fragment layout. I have an activity that servers
Im trying to implement a destructor for the objects of linked-list Iv created. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.