Android :: Draw On Screen And Create Multi-layered Paintings With Different Brushes - Colors
Nov 11, 2009
I write graphics apps for the iPhone and I'm looking to port my most recent app, 'Layers,' to the Android platform. Layers is painting app that allows users to draw on the screen and create multi-layered paintings with different brushes, colors, etc... and export to PSD. It's got desktop sync, a smudge tool, lots of good stuff... http://www.layersforiphone.com/
I started looking at the Android platform Monday and I've run into a major problem. I use OpenGL to do all the drawing because it offers the best performance. However, there are several places where I need to render into a texture and then use the texture.
For example:
Use brush texture and a line of sprites to create a black paint stroke in texture A Put brush color+alpha in glColor4f and then draw texture A onto the screen.
On the iPhone, I do this continually as the user's finger moves and I am able to achieve 12-15fps on a 1st gen iPod Touch. It's necessary because applying color and alpha to the individual sprites making up the brush stroke doesn't produce the right result (since sprites overlap and make the stroke too dark).
The android platform supports OpenGL ES 1.0 but seems to omit key functions for dealing with framebuffers. I can't find a way to bind a texture to the framebuffer and draw into it using OpenGL.
Here's how I'd normally go about it on the iPhone:
CODE:....................
Is there anything like this on the Android platform? On the iPhone, OpenGL is significantly faster than software-based drawing and is the only viable solution (trust me - I wrote a CoreGraphics painting app too...). Maybe there's another route I could take on Android? I'm willing to jump through whatever hoops are necessary, but I won't publish the app unless performance is good (10fps+ as you're drawing on the screen).
View 1 Replies
Oct 29, 2010
I'm trying to create a MapView in a service (live wallpaper), but have it hidden so that I can render it to a Bitmap, and then map it to a texture to render in opengl. I have a Canvas and a Bitmap, and I intended to call myMap.draw(myCanvas) in order to get it into the correct bitmap so that I could then bind it as a texture.
When I Initialize I do the following:
myMap = new MapView(ctx, APPSTATICS.MAP_API_KEY);
I get an error:
java.lang.RuntimeException: stub at com.google.android.maps.MapView.<init> (Unknown Source)
Why I can't create a new mapview which I can use to draw to a offscreen bitmap?
View 7 Replies
View Related
Oct 13, 2010
I am wondering what the best way to render a tournament draw (scrollable) might be for android. Since I am new to this, I was not sure whether to invest time creating a ListView sort of thing or dynamically building html pages and rendering them with WebView. Or I could plop everything into a regular scrollable text view, perhaps. The main requirement is that I would need the tournament participants to be individually clickable.
View 1 Replies
View Related
May 30, 2009
ListPreference default is Single-Choice, how to create Multi-Choice?
View 3 Replies
View Related
Sep 18, 2009
I read http://developer.android.com/guide/topics/resources/resources-i18n.html. But it shows how to localize your app for the currently selected locale of the phone. However, I want to add a "language" option into my own app, and allow the user to switch the UI language independent of the phone's locale setting.
My currently solution is to manage a string table myself, and dynamically edit the text string of every UI element. However, this is rather tedious. Is there a better way?
View 2 Replies
View Related
Nov 18, 2010
How can i create an application which support Korean as well as English language?
View 1 Replies
View Related
Dec 29, 2009
what is best way to create app in which I only need to draw simple lines through onTouchEvent? When i use invalidate everytime i draw any line, that erase lines i draw before. But if I use some List structure to store drawed lines it lose performance. Is there any simple way to do it?
View 6 Replies
View Related
Apr 13, 2010
I have a custom-made view that extends the View class. I would like 2 instances of my custom view layered directly on top of each other. How should my layout file look to achieve this?
View 2 Replies
View Related
Oct 31, 2010
Is there a way to draw on or modify the key guard wallpaper programmatically?It looks simple enough for the home wallpaper, you can use WallpaperManager. But how about for the lock screen wallpaper?
View 1 Replies
View Related
Jul 8, 2010
How can I fill the screen with 2 horizontal colors, such that the down one will get 10% of the screen? (like a toolbar)?
I'm trying modify the Linear Layout example to Code...
on the down "panel"(is it a panel?) the text is not shown complete.
View 1 Replies
View Related
Aug 3, 2010
I notice my colors are softer on my screen after the update. I have novatek.
View 3 Replies
View Related
Apr 2, 2009
I am 1) taking a picture and 2) then draw another Bitmap on top of it 3) then I store it
I am doing it as follows and it works on the emulator.
On the device I get a OutOfMemoryError: bitmap size exceeds VM budget android.graphics.Bitmap.nativeCopy(Native Method) android.graphics.Bitmap.copy(Bitmap.java:199) in the line copy the Bitmap to get a mutable Bitmap.
CODE:...........
What I am asking:
a) Is there a better way to do what I am doing? 1) take a picture 2) draw another Bitmap on top of it 3) then I store it
b) What is the best way to create a mutable Bitmap from the picture I just took with the camera?
In my app, resolution is not an issue. If it works better for small photos that would be fine.
View 3 Replies
View Related
Oct 15, 2009
I really want an HTC Hero. My N97 just sucks, plain & simple. I just have a few questions which I hope you guys will be able to help me with. This is the biggest Android community and what better place to start off my Android experience. The only thing I am unsure about is the HTC Hero's 65000 Screen colours as opposed to the 16million of the N97.
View 4 Replies
View Related
Jan 28, 2013
I have a A10 Chinese Tablet with no brand (called DesireTab) and no official firmware, I have try to install cwm with no success and after my tablet no more boot in android but only boot in cwm ... I have try to install ROM from other tablet but the only want to boot is one from LY-F918 ... with no touchscreen and wrong colors (I post a photo of the boot), after I mod a ROM from Cherry Mobility M906(??) And touchscreen and all other hardware works but not the colors ..
P.s. I have open the tablet and disconnected lcd flat And reconnected ... with no luck !
View 3 Replies
View Related
Jun 5, 2010
I have a little app that draws moving animations in a surface view. Cute, useless time waster. I think it could be cuter if it were possible to get a surface view that mapped to the home screen icon for the app and animate that when the app is running and the icon is visible. Is that possible? I remember way back in the days of Windows 3.1, that when your app was minimized, it was possible to draw to the minimized icon as though that were the app window (actually, I guess it may just have been the app window). Anyway if such a thing is possible in Android, I'd like to try it. Anybody know?
View 16 Replies
View Related
May 24, 2010
First of all I'm a newbie when it comes to Android programming. So if this question is totally stupid please delete it ASAP Question: I'm going to draw a grid of 10x10 PNG images. Each image is 32x32 px. All of the images are unique. I'm thinking that the easiest way seems to be to put each image in an ImageView. If adding all ImageView's to the layout would this give me some kind of performance hit?Would there be any smarter way to draw these images?
View 1 Replies
View Related
May 15, 2009
Is it possible to draw on the incoming call screen? I know that a few of the whitepages apps do it, but I would like to know how.
View 3 Replies
View Related
Sep 5, 2010
In my android application I use this method in "draw" Overlay class for draw route on map. Can someone tell me if this method is good (in terms of performance) for route draw on map or I must to put code in Thread ??
I'm new to android.
public synchronized void draw(Canvas canvas, MapView mapView, boolean shadow) {
if (pointsAndTimes.isEmpty()) {
return;
}
Projection projection = mapView.getProjection();
Paint paint = new Paint();
paint.setARGB(250, 255, 0, 0);.............
View 1 Replies
View Related
May 27, 2010
I use Twicca for Twitter, which allows for different colors for the notification LED. I used to have it set for red on my Moto Droid, but it only flashes green on my Incredible. Anyone also use Twicca know what colors I can use?
View 3 Replies
View Related
Apr 13, 2009
Want to draw a line when I touch screen at two points. I can see OnTouch been invoked but after than everything breaks looks, the application crashes
I am using drawLine in Canvas.
CODE:......................
View 5 Replies
View Related
Aug 1, 2009
I've this code:
Java: (http://nopaste.me/4449 )
package com.patrick.games.whackgroundhog; import android.app.Activity;
import android.content.Context; import android.graphics.Canvas;
import android.graphics.Color; import android.graphics.Paint;
import android.os.Bundle; import android.view.MotionEvent; import android.view.View;
public class Game extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); setContentView(new Ground(this));
} class Ground extends View { public Ground(Context context) { super(context);
} public void onDraw(Canvas canvas) { canvas.drawColor(Color.BLACK);
} @Override public boolean onTouchEvent(MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_DOWN) {
//TODO: draw the circle } return true;
} } }
View 2 Replies
View Related
Apr 3, 2014
I have a Star Note N9770 which had a smashed display - daughter knelt on it. The phone still appeared to work, though we couldn't see anything. I bought a "bricked" N9770 on eBay and used the display unit from that (it really was bricked - wouldn't turn on or charge) to replace the smashed unit.
We now have a display and everything appears to work and it charges. Except for the colours on the display - they are very pale/faint/washed out (hard to describe but the full range of colours doesn't appear in the display - just mostly greens and pinks and all a bit grainy). I've tried the brightness and contrast levels, factory reset, hard reset, etc, but it makes no difference.
I'm guessing that this display unit is slightly different from the original, even though all the connections were identical and tbh, it reminds me of a driver issue in a PC.
View 1 Replies
View Related
Apr 5, 2010
I have a custom component which consists of 2 text view and 4 toggle buttons. I want to draw this view at some specific position on the screen. How is that possible?
View 1 Replies
View Related
Feb 27, 2012
I have a couple of tablets but my primary is my Xoom. I'd like to use the HDMI output and the USB to connect to a multitouch screen that I have. I've seen some older hacks that are resistance hardware touch screens that are more hardware. I'm wondering if this is remotely possible in the newer version of android like ICS on the Xoom.
View 2 Replies
View Related
Jul 22, 2010
Can some one show me the sample code to draw a rectangular pulse in android screen. I want to generate a bunch of them on x axis (which I imagine as middle of screen).
View 3 Replies
View Related
Jul 28, 2010
Is it just me or does the call screen (what displays when there is an incoming/active/ended call) look like crap? Ugly colors, minimal layout, contact picture too small, etc... So many other features on the phone are so polished, it just seems odd that the call screen would look so unfinished - it's almost looks like a development placeholder that they never got around to updating.
View 2 Replies
View Related
Sep 1, 2010
I bought 2 Epics last night was so excited! I like the phone except for a couple of things that i have noticed one of them being the wobble oreo effect that I seem to have on both phones and I just noticed I have dead pixels on both phones! I am so disappointed and don't know what to do? The pixels are one to two tiny black specks that can be seen on light background screen colors.
View 7 Replies
View Related
Mar 28, 2010
The Xperia X10 atm, runs at android 1.6, which only recognizes 1 touch at a time on the touchscreen.
If Sony ever gives us an update to 2.1, which supports multi-touch,....Can the X10 screen support multi-touch, but restricted by the android version atm only, or is X10's screen only able to support single touch in the first place, and won't matter if android is updated?
View 12 Replies
View Related
Nov 18, 2009
Is the screen on the Droid not multitouch due to hardware or software. And if it's software is it in such a way that an app couldn't do it?
View 20 Replies
View Related
Nov 3, 2010
I have an existing android app in version 1.5 . I have to make it to support Multi Screen.
View 1 Replies
View Related