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 7438845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:36:59+00:00 2026-05-29T10:36:59+00:00

I have code like: SpecialAdapter adapter = new SpecialAdapter( this, list, R.layout.list_display_item, from, to

  • 0

I have code like:

SpecialAdapter adapter = new SpecialAdapter(
                                this, 
                                list, 
                                R.layout.list_display_item, 
                                from, 
                                to );

        myTextListView.setAdapter(adapter); 

.
.
.
.

public class SpecialAdapter extends SimpleAdapter
 {
        public SpecialAdapter(Context context, List<HashMap<String, 
String>> items, int resource, String[] from, int[] to) {
            super(context, items, resource, from, to);
        }

        @Override

        public View getView(
int position, View convertView, ViewGroup parent)
 {
          View view = super.getView(position, convertView, parent);
                }
    }

and list_display_item.xml

<?xml version="1.0" encoding="utf-8"?>

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/myDisplayItemLinearLayout"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" 
        android:orientation="vertical">

        <TextView
            android:id="@+id/arabicTextView"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:gravity="right|center_vertical"
            android:lineSpacingMultiplier="3"
            android:text="Arabic"
            android:textSize="30dp"/>

        <TextView
            android:id="@+id/translationTextView"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="English" 
            android:gravity="left|center_vertical"
            android:textSize="30dp"/>

    </LinearLayout> 

I just want to set my own arabic font to android:id=”@+id/arabicTextView” and english font to android:id=”@+id/translationTextView”.

In getView() function of SpecialAdapter class i get View view = super.getView(position, convertView, parent) and view.getId() is actually the id of linearlayout android:id=”@+id/myDisplayItemLinearLayout”

I just want to get inner textviews of this linearLayout to set seperate fonts to each using typeface here… how can i get these textViews there??

Is it correct way to set my fonts here or it should be done in someother way???? 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-05-29T10:37:00+00:00Added an answer on May 29, 2026 at 10:37 am

    Use the findViewById method of View and the setTypeface method of TextView

    public View getView(int position, View convertView, ViewGroup parent)
    {
        View view = super.getView(position, convertView, parent);
    
        //assuming you've put your arabic font file in your assets directory
        ((TextView)view.findViewById(R.id.arabicTextView)).setTypeface(Typeface.createFromAsset(view.getContext().getAssets(), "yourarabicfont.otf"));
    
        //assuming you've put some custom english font in your assets directory
        ((TextView)view.findViewById(R.id.translationTextView)).setTypeface(Typeface.createFromAsset(view.getContext().getAssets(), "yourenglishfont.otf"));
    
        return view;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have code like this: public class DatabaseHelper extends SQLiteOpenHelper { private static final
I have code like this: public class test { public string aa { get;
I have code like this: namespace N { class B { public: virtual void
I have code like this: public class Thingy { private final Lock lock =
I have code like this... class Time { public: Time(int, int, int); void set_hours(int);
I have code like this: var newMsg = new Msg { Var1 = var1,
I have code like this: string uriString = @C:\Temp\test.html; Uri uri = new Uri(uriString);
I have code like this: MediaElement me = myPlayer.MediaElement; WriteableBitmap wb = new WriteableBitmap(me.NaturalVideoWidth,
I have code like this: Book.list().each { // real code actually does something more
I have code like this: private Box mCurBox; public Box CurBox { get {

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.