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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:13:06+00:00 2026-06-15T16:13:06+00:00

When I comment out counter and run it with message, it works fine. It

  • 0

When I comment out counter and run it with message, it works fine. It will not display an integer though. During my research, I have found no difference between the example code to display a String versus displaying an integer. Perhaps there is a guide somewhere I can review? Or a simple answer would also be appreciated. Thanks.

package com.evorlor.testcode;

import android.app.Activity;
import android.os.Bundle;
import android.text.method.ScrollingMovementMethod;
import android.widget.TextView;

public class SupWorld extends Activity {

    private String message;
    private int counter;

    /**
     * @param args
     */
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO Auto-generated method stub

        message = "Sup world.";
        counter = 123;

        TextView text = new TextView(this);

        text.setTextSize(100);
        text.setMovementMethod(new ScrollingMovementMethod());
        // text.setText(message);
        text.setText(counter);

        setContentView(text);

    }

}
  • 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-15T16:13:07+00:00Added an answer on June 15, 2026 at 4:13 pm

    It is the right way to do it.

    text.setText(Integer.toString(counter)); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I comment out calc1.setOnClickListener(buttonListener); this runs fine, when I allow it to run,
If i comment out the jquery.mobile...js file, this works fine, with it included, everytime
Can I comment out lines which have other comments? /* * comment 1 */
Each of the rules in the file works well if I comment out the
I want to comment out lines in some code I have. I have different
This query runs when I comment out the code above '}else{'. Have done so
PROBLEM This works if I take out the comment //document.getElementById('formtimer').innerHTML = TimeStr; // Shows
I am putting an online counter on a website, and I have run into
## COMMENT OUT below just for reference cursor.execute ( CREATE TABLE yellowpages ( business_id
Is there a way to comment out a single line in HTML using just

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.