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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:27:49+00:00 2026-06-17T09:27:49+00:00

We can draw approximately all things in canvas in onDraw method of a customview.Also

  • 0

We can draw approximately all things in canvas in onDraw method of a customview.Also Docs say:

When you want to dynamically draw some two-dimensional graphics, a
ShapeDrawable object will probably suit your needs.

My question is simple,when we have to use custom view and when ShapeDrawable?Or it is best we combine them?if it is true,What is the strengths and weaknesses of these options?

  • 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-17T09:27:49+00:00Added an answer on June 17, 2026 at 9:27 am

    Well, i think ShapeDrawable is easier to use, cause you can use it in Selector, for example, and create button with custom background and click animation without writing any code at all (just using XML). On the other hand, this drawables are pretty limited, and if you need your own control with non-standart tuch interception you defenatelly must create your own custom View.

    So i think it’s better to combine them, because somtimes you need something simple and ShapeDrawables is real fast and good solution for it, but if you want something real speccial OR something that you can archive using shapes, here you must write your own View.

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

Sidebar

Related Questions

If clipToBounds = YES then you can draw all you want, but you only
I can draw many things using this : NSString *imagePath = [[NSBundle mainBundle] pathForResource:@dummy2.png
i can draw a string/image... with drawInRect/drawAtPoint. but how about if i want to
How I can draw bezier curve in canvas. I have only start point and
I want to have a View where i can draw when the user touches
So, lets assume I can draw in paint: Say I have a class A
I'm developing a JApplet in which the user can draw some lines over an
How I can draw a sine wave on canvas inside an Image View in
You can draw arcs and you can draw images on a canvas using javascript,
I have this application where the user can draw some custom QGraphicsItems in 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.