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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T18:11:18+00:00 2026-06-04T18:11:18+00:00

I have a LinearLayout within a ScrollView in the xml file. I need to

  • 0

I have a LinearLayout within a ScrollView in the xml file. I need to paint and write within the ScrollView so I’ve created a view in the layout and have been able to paint and write inside using: canvas.draw() and canvas.drawText(), my problem comes when writing text with canvas are not clearly the letters, so I need to add a TextView to the layout of the ScrollView from the class, without knowing very well how to do it.
Paste the code:

public class Calendario extends Activity{
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.calendar);        
        LinearLayout layout = (LinearLayout) findViewById(R.id.layout);
        MyView v = new MyView(this);
        layout.addView(v,250,2000);
     }

    private class MyView extends View{
        public MyView(Context context) {
            super(context);
        }
        protected void onDraw(Canvas canvas) {
            onDrawMethod();
            //Here draw and write text//
        }
     }
}

I need only add textviews inside
A picture of what I need: I need only add textviews inside
Thankss

  • 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-04T18:11:20+00:00Added an answer on June 4, 2026 at 6:11 pm

    As I understand you, you want to add those texts programmaticaly, by saying

    so I need to add a TextView to the layout of the ScrollView from the class

    If so, might be this post will help you.

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

Sidebar

Related Questions

I have an xml file right now which has a TableLayout within a LinearLayout.
i have been trying to create an xml file that integrates a relative layout
In an XML layout that is a RelativeLayout I have a nested LinearLayout. Within
Say I have a LinearLayout with some elements in it as an .xml file.
I have LinearLayout in my xml file that I am trying to add a
I have a Scrollview as a parent view, within that i have placed some
I have a ScrollView (and a LinearLayout within it) set as main content. When
I have a LinearLayout with a vertical orientation, within that layout I have three
Hi friends i have set my layout thru TabLayout within LinearLayout but still my
I have a LinearLayout with some other LinearLayouts inside. The children layouts have 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.