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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:41:48+00:00 2026-05-28T05:41:48+00:00

Currently on a view I have a ImageView and A custom class that draws

  • 0

Currently on a view I have a ImageView and A custom class that draws a circle on the view. It will draw the circle on the view but it is hidden behind the image view. I know its there because when the radius is big enough I can see a small section that isn’t behind the imageview. What code would bring it to the front?

EDIT: Found out that the above issue is not the problem. It seems that it is only drawing it on the portion that is reserved for the seekbar I have on the view?

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.image_process);
     mDraw = new Draw(this);

    addContentView(mDraw, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));

    seekBar1 = (SeekBar) findViewById(R.id.seekBar1);
    b = (Button) findViewById(R.id.button1);
    seekBar1.setMax(500);

     seekBar1.setOnSeekBarChangeListener(new OnSeekBarChangeListener(){

        public void onProgressChanged(SeekBar arg0, int arg1, boolean arg2) {
             mDraw.setCords(500, 500, seekBar1.getProgress());
        }

        public void onStartTrackingTouch(SeekBar seekBar) {
             mDraw.setCords(500, 500, seekBar1.getProgress());              
        }

        public void onStopTrackingTouch(SeekBar seekBar) {
             mDraw.setCords(500, 500, seekBar1.getProgress());              
        }

     });



}

Here is the Draw class:

  package org.DTS.boltsize;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Rect;
import android.view.View;

public class Draw extends View {
     private int x = 1;
     private int y = 1;
     private int r = 1;


    public Draw(Context context) {

            super(context);

            // TODO Auto-generated constructor stub

    }

public void setCords(int mx, int my, int mr ){
    x = mx;
    y = my;
    r = mr;
}


    protected void onDraw(Canvas canvas) {

            // TODO Auto-generated method stub

System.out.println("Drew :)");


            Paint paint = new Paint();

            paint.setStyle(Paint.Style.FILL);

            paint.setColor(Color.RED);

canvas.drawCircle(x, y, r, paint);
            super.onDraw(canvas);

    }

    public void DrawCirlce(Canvas canvas, int x, int y, int r){
        Paint paint = new Paint();
        paint.setStyle(Paint.Style.STROKE);
        paint.setColor(Color.GREEN);
        canvas.drawCircle(x, y, r, paint);
        super.onDraw(canvas);
    }





}

Here is what it looks like. That red circle should cover the entire screen.
enter image description here

  • 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-05-28T05:41:49+00:00Added an answer on May 28, 2026 at 5:41 am

    Solved by converting source to bitmap, then drawing a circle on that bitmap and sending that final bitmap to the imageview.

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

Sidebar

Related Questions

We currently have a View that queries active directory info. I was wondering if
I currently have a product view page that contains an MVCContrib HTML Grid with
I currently have a simple list view adapter that holds two rows of text.
Currently I have a ListView (using the Details View). I would like to implement
I currently have a list view which has several rows of data and I
I have created an Eclipse plugin which creates a view in Eclipse. Currently it
1.I have a user that wants to view the current items version history on
I have this layout that works correctly, a relative layout with a text view
I am developing an application that currently has a View Controller (call it ViewControllerX).
I have a UIViewController whose view has a custom subview. This custom subview needs

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.