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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:35:08+00:00 2026-06-11T02:35:08+00:00

I have made a high score activity for my game. i used table row

  • 0

I have made a high score activity for my game. i used table row for the output of the scores. My question is that how can i change the color of the fonts in my table row because i cannot see what’s the output.

Here’s my layout code:

<TableLayout
        android:id="@+id/data_table"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:visibility="invisible"
        >

        <TableRow android:visibility="invisible" >

            <TextView
                android:layout_marginLeft="65dp"
                android:visibility="invisible"
                android:text="#"
                android:textColor="#000000" />


            <TextView
                android:visibility="invisible"
                android:text="Score"
                android:textColor="#000000" />


            <TextView
                android:visibility="invisible"
                android:text="Player"
                android:textColor="#000000" />

        </TableRow>
    </TableLayout>

Here’s the color of my output in high score activity.

enter image description here

How will i change the gray one to black?

here’s how i add the table:

{
            TableRow tableRow= new TableRow(this);

            ArrayList<Object> row = data.get(position);

            TextView idText = new TextView(this);
            idText.setText(row.get(0).toString());
            tableRow.addView(idText);


            TextView textOne = new TextView(this);
            textOne.setText(row.get(1).toString());
            tableRow.addView(textOne);

            TextView textTwo = new TextView(this);
            textTwo.setText(row.get(2).toString());
            tableRow.addView(textTwo);

            dataTable.addView(tableRow);
        }

Thanks in advance

  • 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-11T02:35:10+00:00Added an answer on June 11, 2026 at 2:35 am

    You need to assign a text color when you create the TextViews programmatically, because Android will use its default (grey) color otherwise. Black is 0xFF000000.

    TextView textOne = new TextView(this);
    textOne.setTextColor(0xFF000000);
    textOne.setText(row.get(1).toString());
    tableRow.addView(textOne);
    

    Note that you may want to use a color resource for this to keep it consistent with your other TextViews.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have implicitly made this a community wiki seeing that the answers can be
I have A game to which I recently added a global high score functionality
I have made a jQuery toggle for a menu that I had in mind.
I have made a code that read data from flash Nand (without filesystem). fd
I have made a flash game for facebook. All happened right expect when I
I have a game server which is made in Java. I want to make
We have a large news-oriented site that has high web traffic. The architecture is
I have a table that stores stock ticks in sql server 2008. It is
We have a data system in which writes and reads can be made in
I just made a simple HTML5 game for mobile webkit. I have made a

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.