android-graphics

how to set a footer at top layer of the app in android?

i want set my footer at the top layer of my app. it should not have any shakes and moves while the activity navigation or showing up the keyboard. it should always settled in the bottom of the screen. how to do that? any ideas plz. ...

How to place a drawing inside a layout element in android

I'm just starting with android programming. I have a canvas which I've drawn on, and now I'd like it to appear inside a container in a layout. How do I do that? I've tried making a class that extends a View object and I can get it to draw on the entire screen, but I don't know how to get it to draw just inside the ImageView container in ...

When has the Activity finished drawing itself?

This maybe somewhat of a strange question but I just can`t figure it out. Basically I have a class that extends View and overrides the onDraw method so it draws a bitmap what it is called. What I want to do is when by choosing a picture from a gallery, send it through and intent and draw that on the View. The problem is that I can`t get...

move an object follow a user-defined path on Android

What algorithm or technique should I use to make an object follow the path that the user's drawing on the screen? ...

How to draw a bitmap in FRONT of a layout in OnDraw

I have a layout that I have defined in an xml file which contains a number of ImageView's, RelativeLayout's, etc. In OnCreate() I have the following code public void onCreate(Bundle savedInstanceState) { super.onCreate( savedInstanceState ); setContentView( R.layout.main ); In my override for the view, I have the following co...

canvas different on android emulator compared to phone

Should there be any difference between a canvas on the emulator and a canvas on a real device (HTC Incredible)? On my canvas for the emulator I have this: canvas.drawRect(x*cell_size + 1, y*cell_size + 1, x*cell_size+cell_size, y*cell_size+cell_size, pWalls); (this is a grid type game) and it works and looks fine but on my real device...

Designing a videogame for android

I'm trying to develop an RPG for Android, so I need to paint a scenario where i'll move my character. My idea is to do it 2D. I've developed 3D games and Java games for desktop, but in Android i don't get how to star the scenario. Coul'd it be developed whith a matrix of information, so I coul'd know where my character steps? Thank yo...

How does color depth and/or compression level of images affect UI performance?

To what extend do color depth and compression level of the original jpg and/or png images used as drawables have an effect on the app's UI performance, given the fact that all images are converted to bitmaps internally anyway. Especially considering i.e. images in list views for example. Same question goes for png vs. xml shapes as dra...