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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T02:21:26+00:00 2026-06-06T02:21:26+00:00

A need to draw an X in a View using Shapes , but the

  • 0

A need to draw an “X” in a View using Shapes, but the X’s edges must be anchored on left, top, right and bottom of the view.

Something like this:

sample image

  • 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-06T02:21:32+00:00Added an answer on June 6, 2026 at 2:21 am

    It would be much easier to do it by creating a custom View and overriding the onDraw method. Ie.

    public class XView extends View {
    
        @Override
        public void onDraw(Canvas canvas) {
            float width = getMeasuredWidth();
            float height = getMeasuredHeight();
            Paint paint = new Paint();
            paint.setColor(Color.RED);
            canvas.drawLine(0,0,width,height,paint);
            canvas.drawLine(width,0,0,height,paint);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to draw a counter onto an OpenGL view. Here is my source
I need to draw text in the middle of a view, the text can
I need to draw text onto a window HDC along a circular path using
im trying to create a overlay view using a ui view and need to
I need to use a custom NSView subclass to draw some content, but it
I've got a custom view in which I need to draw two bitmaps, one
I need to draw 3d projections and i am using opengl wrapper for JAVA.
I need to draw a lot of lines. I'm using UIBezierPath for drawing lines
So in my custom view, I'm trying to draw a white/gray gradient using Core
I need to draw text to a canvas (of a custom view), and need

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.