ondraw Questions
15
I'm trying to get the real size of an image displayed in an image view. Actually my image is larger than the screen and the imageview is resizing the image to diplay it. I'm looking for this new si...
4
Solved
Here is the code of a simple extension of an ImageView that allow the user to draw with the finger.
public class MyImageView extends ImageView {
List<Point> points = new ArrayList<Point...
6
I am trying to create a rectangle, but this is what happens when I move from starting coordinates towards the end coordinates
, actually I want to show the progress when the user moves from one ...
Foison asked 21/12, 2012 at 9:29
6
Solved
I am new to Android Development and reading the book Hello Android. It uses a Sudoku example, and the code that I am referring to is here.
In this , onTouchScreen, it calls select method, that cal...
Quito asked 9/1, 2014 at 17:32
1
I need to draw a text on a circle path.
I have tried the drawTextOnPath() method. But for texts like "fertile window" in the image attched, the text rotates and is not readable.
Code I have us...
Jello asked 29/7, 2016 at 11:9
6
I put a Log.d() call into the onDraw() of my extended View, so I could see how often and when it's getting called. It gets called upon instantiation of the view, which is not surprising. But then I...
7
Solved
I have two points in the canvas, now I'm able to draw a line between those points like this below image by using
This code canvas.drawLine(p1.x, p1.y, p2.x, p2.y, paint);
I want to draw the arc...
Insatiate asked 21/6, 2012 at 5:24
4
Solved
How to animate gradient from color#1 to color#2? Something similar to
I'm planning to use it as health-bar for unit (so, it will be finit animation starting with green and ending with red)
Beating asked 26/8, 2015 at 10:57
5
Solved
I have a custom view that draws HUD:
Here is my layout:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_w...
Bunkmate asked 27/7, 2013 at 15:33
4
Solved
OnDraw function for my custom View is being called infinitely and is looping !! What could be possible reason??
Here is my custom view:-
public class Balls extends View{
private static final St...
2
I've read over 20 questions/answers but I still can't get what I want. I want to cut a circle inside a rectangle as seen below:
Here is my code:
@Override
protected void onDraw(Canvas canvas) {...
Tripod asked 5/4, 2015 at 14:17
2
I'm trying to draw an arc in android.
In IOS, it's really easy to do it with this method
[path addArcWithCenter: radius: startAngle: endAngle: clockwise:]
In android, I have 3 points (the center...
Sides asked 15/2, 2016 at 15:58
1
Solved
I've created a class that extends Shape in order to draw custom shapes (rectangle with cut off corners) for the background of my buttons. The problem I have is that lines drawn as a diagonal appear...
Cocotte asked 28/9, 2018 at 14:49
4
Solved
i'm attempting to change the background image of a custom View with some success. the image will change but the problem is that i still see traces of the old image. when i attempt to clear the canv...
2
Solved
Here's my OnDraw() method
void onDraw(Canvas canvas) {
mCanvas = canvas;
//invalidate();
int x = 0;
Iterator<Letter> it = mNextUpQueue.iterator();
while(it.hasNext()){
mCanvas.drawBitm...
1
Solved
after few months i finally managed to create my first non trivial app.
Now I want to add some nice animation (not sure it is a proper term), like step-by-step drawing my graph. Gif below explains w...
Nubile asked 10/11, 2017 at 9:59
1
What I want to do:
On mouse hover of Blurry image, it shows unblur same image in square shape like following image. (image is completely blur, on mouse hover unblur image shown in square shape)
...
Automatize asked 6/6, 2017 at 14:0
1
Solved
I'm trying to draw an arc inside a circle to represent the temperature, but I'm having a difficult time achieving that. During my search I found those solutions
This one I couldn't understand what...
Cobbler asked 29/8, 2016 at 12:47
4
As a beginner, I've been building a simple counter application using a simple layout xml and a class called 'Counter', which derives (extends) from the class Activity.
Now, I want to load a bitmap...
Nineteenth asked 19/1, 2014 at 19:39
3
Solved
I'm trying to work with 3 SurfaceViews on one screen, one on top half (BoardView), one on bottom half (StatusView), and the last one as an extra layer above the top half (TileView) (see main.xml).
...
Palmerpalmerston asked 13/4, 2011 at 10:40
2
Solved
I have custom view called ArrowView.
When this view is part of a layout which is part of an ArrayAdapter everything is fine. (It is repainted as the underlying data changes.)
When I use that same...
2
Solved
I have a SweepGradient defined as
circle_paint.setShader(new SweepGradient(getWidth()/2, getHeight()/2, new int[] { circle_start_color, circle_end_color}, new float[] { 0f, 1f}))
applied to a ar...
Contention asked 15/11, 2012 at 18:15
2
Solved
I have an arc and i wish to draw scale marks at 0, 45, 90, 135, 180 degrees, can anyone help me with the math needed to achive the x,y of points 5 and 30 on this sketch?:
here is my code for dra...
Doeskin asked 3/5, 2015 at 13:30
2
Solved
I have the following class:
class SlidingTabStrip extends LinearLayout {
private static final int DEFAULT_BOTTOM_BORDER_THICKNESS_DIPS = 1;
private static final byte DEFAULT_BOTTOM_BORDER_COLO...
1
I have followed the tutorial and succesfully created a Rotatory knob but it rotate full 360 degree. without stoping . I want to rotate it from 150 to 210 degrees as shown by the progress. ..
How ...
Costar asked 31/12, 2014 at 7:7
1 Next >
© 2022 - 2024 — McMap. All rights reserved.