Android :: Mix 2D Graphics With Layouts

Apr 26, 2009

I'd like to build an activity that is mixing layouts with 2D graphics. So for example, would like to introduce an edittext with an integer value and based on that value the size of a circle is dynamically adjusted and drawn. Any idea how to do this?

For plain graphics I am using this approach here - but how can it be expanded to cover Android layouts (buttons, editboxes, textviews, radiobuttons, etc.)?

CODE:..............

Android :: mix 2D graphics with layouts


Games :: Best Game/graphics Demo To Show Off Android Graphics Engine

Mar 31, 2009

I want to show off how good opengl es can display on my G1. Does anyone know a game with good 3D graphics that I should install for this?

View 13 Replies View Related

Android :: Multiple Activites That Share 75% Of Layout - Layouts Within Layouts?

Sep 6, 2010

I'm creating a game where there's a screen that, for the most part, is shared by four different activites - but a key portion of the screen will be completely different, depending upon which activity is active. Basically, on the left will be an image of the player and along the bottom there will be a row of buttons (let's say for Armour, Weapons, Magic, Skills). This leaves the top-right portion, which will need to dynamically change to represent the button pressed. (So, one moment the top-right portion is the armour selection activity, and the next it's the weapon selection activity, and so on.)

Is this possible? Can I have a layout within a layout and dynamically point the nested layout at a (nested) layout.xml of my choosing? Or, am I looking at just duplicating most of the layout four times (for the four different activities?) Or, am I going to be looking at linking the four activities to a (the top-right) view component, and then having to dynamically construct all of *that* view's child views based on the currently active activity? Well, that's about as much sense as I can make this question make.

View 4 Replies View Related

Android :: Graphics

Feb 26, 2010

I have rectangle white box. on cliking the rectangle I will draw a toolbar beneath the box and also call relayout to accomodate the toolbar ( size+100) ( i used surfaceview and in secondary thread i draw the toolbar) on click again on rectangle box it will disappear the toolbar and also has to resize the layout to original size (ie size-100) this is where I get stuck. I can disappear the toolbar however I cant call relayout either from secondary thread (says cant call from secondary thread). So I created a while loop in onlayout( this is where i create a thread to draw the toolbar) if i call requestlayout after while loop ends it doesnt do anything it doesnt call onmeasure etc.

View 4 Replies View Related

Android :: 2d Graphics

Jan 14, 2010

I created a 2d game in java that runs as an applet, and i am now trying to translate this over to the android. As the android doesnt used paint() methods, i am thinking that i will have to import images of the game instead of drawing it, but i cannot find out how to do this. Anybody know how to add images to the folder and call them in the app? Also, how can i call a screen repaint() in the android?

View 2 Replies View Related

Android :: Use Graphics

May 16, 2009

I want use the methods in android.graphics to draw one board (board chess,)

View 2 Replies View Related

Android :: Layouts On Top Of Each Other

Sep 21, 2010

If I first set the content view to my xml layout using setContentView(R.layout.main); and then add another content view using addContentView(layout, params), the content views overlap each other. I want the second content view to position itself directly under the first one. Is it possible or do I need to combine the xml and the programatically created layouts in some way? Both of the layouts are linear.

View 1 Replies View Related

Android :: Way To Add X-graphics In Editbox

Oct 27, 2010

Is there any way to add the x-graphics in the android Editbox like the of iPhone.So that by clicking on that x graphic it can clear all the values in the Editbox.Is there any way to listen weather i touch a specific part of an edit text

View 1 Replies View Related

Android :: Programs Using Graphics

Sep 1, 2009

I want to do some programs using graphics can anyone send me sample programs about graphics package

View 5 Replies View Related

Android :: Specs For Graphics

Aug 2, 2010

1. What size should graphics intended to promote your app in the Market be designed for?

2. What about the larger graphics that depict screenshots of the app in the Market?

3. What size should app icons for devices be?

View 2 Replies View Related

Android :: App's With 2D Graphics And Animation

Feb 2, 2010

I have doubts while doing some 2D Graphics and animation. Here is what i have done and what i want to do further: An application starts with a 2D object [ball] rotating and execising in a particular fashion, and after a particular point in time the object [ball] scrolls out of vision. After this point i want to invoke a new activity with a different UI. I m stuck up while trying to transit from this View to a new activity.

View 3 Replies View Related

Android :: Orientation Changes For Layouts

Oct 16, 2009

i have a layout folder with 2 layouts. layout1 and layout2 i have another folder layout-land that has layout1 in it. i would like to be able to get to all the layouts so i could create a set of layout like this: {layout1, layout2, layout1(from layout-land folder)}is there any way i can use the existing android mechanisim to do that? if not, what would be the impact of creating my own definition of the layout folder (for example to have under the layout folder layout1, layout2 and layout_land1 and have my code do getOrientation to diffrentiate whcih one should be presented).

View 9 Replies View Related

Android :: Dev - Placing Layouts

Aug 31, 2010

while making my application layout i want a button to remain at the very bottom of the screen while a scroll view is placed above it. I am unable to do this i was using the size of the scroll view as 430dp so that it works but when i change the orientation of the screen this does not work as 400dp is bigger than the screen. how do i make it so that the button stays at the bottom irresepective of the screen orientation ?

View 3 Replies View Related

Android :: Layouts Under Subfolders?

Nov 18, 2010

Is it possible to create subfolders under res/layout and place the layout XML files there so that one can call a view like setContentView(R.layout.questions.create); or setContentView(R.layout.questions/create); ?

View 1 Replies View Related

Android : Animation Across Two Layouts?

Aug 10, 2009

I've met a problem with animation when tried to make a View to perform the animation which should cross 2 layouts, e.g. make a translate animation so a view could move down to the TableRow below. This trick works fine when i try to move a view within a single TableRow but not when i try to move it up or down. I've also discovered that if i create a single RelativeLayout and apply the same animation there, it works fine, but i can't arrange all the components i need on the screen. Could anybody please provide me any hints about it?

View 2 Replies View Related

Android :: How To Know Length Of Character Using Graphics?

Aug 21, 2009

How can I know the length of the each character of word. Actually, I am trying some thing like this:I will show some set of lines on the screen. Later after some time, I would like to set the color to each character in the line at a frequent interval. Now I want to set the color to each and every character of the drawn string.

View 2 Replies View Related

Android :: Size Of Graphics - Picture

Sep 2, 2009

In my application, I will get a instance of android.graphics.picture which is populated by user. Then I use writeToStream to save. After save, I have to check the file size. If the size is too large, then I should delete this file.

I think this save-check-delete operation is not reasonable. I prefer to check the size of android.graphics.picture. If the size is too large, I should not save to local. But I checked android.graphics.picture, it only have getHeight and getWidth member functions.

Could I get the size of android.graphics.picture?

View 2 Replies View Related

Android :: Scaling Transparent Graphics In 2.0.1

Dec 13, 2009

I have some transparent graphics in my game. Up through 2.0.0 they have looked fined. Since Android 2.0.1 though, some parts of the fully transparent regions of the graphics are instead slightly opaque (e.g. a circular gradient that goes to 100% transparency will have a faint halo around it).

I have tried putting my graphics in ../raw/ but that did not help (as described at http://developer.android.com/guide/topics/graphics/2d-graphics.html#d...)

I have also tried exporting the Adobe Illustrator graphics at 16-bit pngs (instead of 8bit), but that did not help either.

View 2 Replies View Related

Android :: Graphics - Tools Recommendation

Oct 13, 2009

I have much experience with Java, and am quickly getting to grips with Android. But I have very little experience with graphics... most of my work has been logical, back end web development. The last time I did any proper screen drawing was in the good old days of Applets (years ago).

I can see that Android has a very complex graphical interface, but I don't know where to start. I've looked at some of the sample apps that come with the SDK, but it's slow progress.

For example, I'm trying to learn by developing a simple rolling ball. Currently I'm using onDraw(Canvas canvas), a paint object, and path.addCircle() to draw a circle, which I then update frequently. However the result is jerky, and slow - I want to see it flying around the screen! Clearly this isn't the right way to go about it.

So two questions I suppose: 1) What graphics tools would you recommend to implement my example? 2) Where can I learn more about the graphics capabilities of android?

View 3 Replies View Related

Android :: Curved Graphics In OpenGL ES

Aug 18, 2009

I was disappointed to discover that OpenGL ES, the flavor of OpenGL implemented in Adroid, doesn't appear to support the usual techniques for drawing graphics involving curves. I'd be happy with either OpenGL's low-level Bezier evaluators, or the more advanced NURBS approach, but AFAICS neither is supported - only straight-line graphics are possible. Does anyone know, am I missing something basic here? Is there a way to generate curves of any sort in Android's OpenGL implementation? I am still fairly new to Android development, so that's certainly possible. Note that I'm not talking about functions related to Canvas - I know about drawOval, for example - but I specifically need 3D.

View 2 Replies View Related

Android :: Graphics Speciall Effects

Jun 12, 2009

When you turn on the phone, after the G1 screen, there's a black screen with the word Android in blue, and a glossy shine running across it. Can you tell me how imitate that effect? Maybe point me in the right direction, like what classes to look at?

View 2 Replies View Related

Android :: Scalable Vector Graphics

Jun 26, 2009

Does the current API support scalable vector graphics? If so which file formats? If not, will it be added in the future? I ask because I'd like my animations to based off of SVGs - in order to better support different screen resolutions while reducing file size.

View 2 Replies View Related

Android :: How To Keep From Running Out Of Memory On Graphics For App

May 10, 2010

I've been working on an Android app in Eclipse, and so far, my program hasn't really grown past midget size. However I've already run into an issue with an Out of Memory error. You see, I've been using graphics comprised solely of bitmaps and PNGs in this program, and recently, when I tried to add a little bit more functionality to the program (mainly including a few more bitmaps and causing an extra sprite to be created), it started crashing in the graphics thread's constructor -> sprite's constructor. When I tracked the problem down, it turned out to be an Out of Memory error that is seemingly caused by adding too many picture files to the program and creating Drawables out of them.

This would be a problem, as I really don't have that many picture resources worked into that program...maybe 20 or so. I haven't even started to include sound yet. These images aren't all that fancy. My questions are this:

1) Are programs for the Android phone really that limited on how much memory they can employ, or is it probably something other than the 20-30 resource pictures causing that error?

2) If the memory for Android apps is so awful it can't even handle 20-30 picture resources being loaded into Drawables that exist at the same time, then how in the world are you supposed to make decent graphics and sound for that thing?

View 4 Replies View Related

Android :: How Can I Minimize Stuttering Of Graphics?

Dec 31, 2009

How can I minimize the stuttering of my graphics?I am using MANY ImageView's in my program (and JUST ImageView's). I change their positions directly, when I need to change them without using "onDraw" to redraw everything. Is it ok, If I do not overwrite onDraw? I have in average 10 objects which I added to the mainscreen-layout.These 10 objects are 5 trees and 5 flowers. The trees and flowers have 5 different states and therefore 5 different ImageViews which I all added to the layout, whose just are invisible. So I have about 50 ImageViews added to my main screen When one of these objects changes its state, I just make its ImageView invisible and the ImageView of the new state visible.Is it ok to do it like that?I realized that if I just use one ImageView for every object and change the ressource of it when its state changes, all objects, which are currently added to the mainscreen-layout, change their position to (0;0). That was the reason, I have so many ImageView's added to the mainscreen-layout.Is there a better solution for that?

View 4 Replies View Related

Android :: How To Put Graphics On Top Of My Camera Preview

Sep 10, 2010

I see a couple of threads on this topic, but none of them seem to answer the question, so, I'm giving it another go...

Very simple idea... I want to some portion of the screen to preview (and shoot) the camera and the other portions of the screen to add my own graphical elements (buttons, colorful frame around the camera preview, etc).

The example that comes with Android fills the screen. The obvious solution (that doesn't seem to be working) is to use my own SurfaceView (rather than the one they do in the example) and have it sitting in my XML. The code (beneath) doesn't crash and reports that it's firing up the camera... it just never renders on the screen.

I have no idea what I'm doing incorrectly. My guess is that it has something to do with the display thread never having the urge to redraw anything after it renders the initial screen, but I even tried adding a button and initiating the camera to render on the surface view upon button click, but that has not provoked it any further.
(most of this code is pulled directly out of the Android sample code, so, I'm sure it's correct. I'm just doing something wrong in how I pull my View in after the fact, I think).

CODE:........................

View 1 Replies View Related

Android : Should Graphics By 480x800 / 480x854?

Aug 27, 2010

I'm wanting to target WVGA (480x800) and FWVGA (480x854) devices with my program. My question is: for my full screen background bitmaps which resolution should I make them?

View 3 Replies View Related

Android : Need To Optimize Some Graphics Calls

Oct 13, 2010

I'm looking for some help optimizing some bitmap drawing code.

Here's my pseudo-code ...

View 5 Replies View Related

Android :: Different Screen Sizes X Different Layouts

Apr 27, 2010

supporting multiple screens (sizes and resolutions). I´ve searched not only this forum but many different websites and the android documentation but I´m probably doing a small mistake so things are not working properly.

Well, my main layout was designed with a HVGA screen, and it works great. When I try the same app on a WVGA, FWVGA, WQVGA or FWQVGA, I always get an unused space in the end of the layout because the screen ´s "heightnes" is proportionally bigger than HVGA´s.

So I consulted the documentation and decided to give a try on resource qualifiers, so I then created a nonsense UI and placed it on layout- large, created a new AVD using the WVGA skin and launched the app. Well, all I got was my old and not well stretched layout. The same happened to a FWVGA AVD.

This is the first problem. The second is: medium high density medium size screens and medium density large screens have the same resolution: how can I create a layout that is loaded for both, but not for (for example) medium size medium density or small size medium density screens?

View 10 Replies View Related

Android :: Listview With Different Rows (layouts)

Aug 13, 2009

I want to make a listview that has different rows (layouts). I will load the data from a webservice and it can be 2 or more layouts i have to generate then. I am creating a social network app and want to show a stream of the users activity. So when he made a comment, make a new friend, this all has to come in the same list.. I load 1 XML file with multiple different child objects (comment, friend) so i can see which layout i have to use........

View 5 Replies View Related

Android :: Rules For Inflating Layouts

Sep 28, 2009

i'm running into some issues inflating layouts and i wonder whether i have something basic wrong.i have a ListView with a custom adapter etc, and of course the item View is custom too. i've been creating the item View in code, and everything works fine, including recycling them and all that. great.but i want to move the View into a resource, where all good Android views live, and weirdness is happening.in the ListView's getView(), i get my inflater and inflate the view by ID. the view itself has its own XML file. i can inflate the top view, but i can't find anything by ID, and when asked for its children, nothing comes back.are there funky rules for inflating views this way? is there a convention for how this should be done inside a ListView?

View 11 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved