[android-developers] Run app in full resolution?

2010-07-10 Thread Deren
I have an application which is basically a surfaceview, where height/ width is set to fill_parent. I run it on a htc desire, but when I check the size of the view (or the canvas I obtain), it says 340x533, so some kind of scaling seems to be done. Also, I load a bitmap, which seems to be scaled.

[android-developers] Re: Run app in full resolution?

2010-07-10 Thread Deren
, Dianne Hackborn hack...@android.comwrote: Or just android:targetSdkVersion=4 or greater. On Sat, Jul 10, 2010 at 11:36 AM, Mark Murphy mmur...@commonsware.comwrote: Add the appropriate supports-screens element to your manifest. On Sat, Jul 10, 2010 at 2:28 PM, Deren adam.d0...@gmail.com

[android-developers] binding widgets with AppWidgetManager.bindAppWidgetId

2010-02-20 Thread Deren
I've successfully built a small sample app where the user can add a appwidget, using the AppWidgetPicker, using the action AppWidgetManager.ACTION_APPWIDGET_PICK. When I do this, the AppWidgetPicker takes care of binding my appwidget-id to a provider. However, now I'd like to load some widgets

[android-developers] Draw fullscreen alpha-image is too slow

2009-12-15 Thread Deren
What I'm trying to achieve is quite simple: I want to draw a fullscreen image (RGB_565). On top of it, I'd like to draw a fullscreen image with an alpha channel. My problem is that I get terrible performance, around 30 fps. Is there any way to speed things up? I use a HTC Hero, shouldn't the

[android-developers] Question about drawing caches in the new SDK

2009-10-05 Thread Deren
I have a ViewGroup where I re-layout the children very often (using child.layout since I need to change the size). Now, of course I'd like to use drawing-cache to speed things up. I noted, in the new SDK, that View.getDrawingCache has an autoscale argument, which will be invoked with

[android-developers] Re: Question about drawing caches in the new SDK

2009-10-05 Thread Deren
I guess my real question is: Can I keep the drawing cache for my View, even if I call onLayout on it? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to

[android-developers] Making an advanced layout with moving/scaling

2009-09-02 Thread Deren
I need a layout where the children are moving and scaled dynamically when I move my finger (almost like a Listview, but simply offsetting the childrens' x/y coordinates won't suffice, they need to be scaled aswell). Right now I'm calling layout(...) on each child every frame. I think the

[android-developers] Faded edges on View

2009-08-31 Thread Deren
I have a custom ViewGroup. Now I'd like it to have faded edges (like ListViews when you scroll them and such). How can this be done? (assuming that the View-class supports this). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

[android-developers] Re: Faded edges on View

2009-08-31 Thread Deren
I solved this by using setFadingEdgeLength and setVerticalFadingEdgeEnabled. I also had to override getBottomFadingEdgeStrength/getTopFadingEdgeStrength. Is this the correct way of doing it? My ViewGroup handles scrolling internally, so I cannot use the fact the Views get faded edges on regular

[android-developers] Force the height of a view

2009-08-26 Thread Deren
Im currently implementing my own ViewGroup. I send a certain size (with measurespec mode == EXACTLY) to the children, but they seem to ignore it. The children are TextViews. I try to force them to have a height of 30px, but they are 34px instead. Is there any way I can force them to accept the

[android-developers] Render OpenGL to regular View (not GLSurfaceView)

2009-08-19 Thread Deren
I've noticed that OpenGLContext is removed from 1.5. Everybody says that GLSurfaceView should be used instead. Does this mean that there is no way to render OpenGL graphics into a regular View? --~--~-~--~~~---~--~~ You received this message because you are

[android-developers] Re: Render OpenGL to regular View (not GLSurfaceView)

2009-08-19 Thread Deren
I'd like to have a regular UI, with regular layouts and views (like linear layouts and buttons and some custom layouts). Then, when something happens, I'd like to get the cache bitmap of my application and use it as a texture. One application would be to create a cube effect to switch between

[android-developers] Re: Problem with TranslateAnimation

2009-08-06 Thread Deren
Hm, exactly what is your question? :) An animation doesnt actually move the object permanently, it just translates the Canvas during the Animation. I assume you want your View to stay where the animation left it? Why do you put the v.setLayoutParams from a separate Thread? Is that really needed?

[android-developers] TranslateAnimation leaves traces

2009-08-01 Thread Deren
I have a small problems with animations. I have a custom ViewGroup inside of a FrameLayout. Im animating one of the children of my custom ViewGroup with a TranslateAnimation. The problem is that the View that I'm animating leaves traces, so it's like the entire screen isn't redrawn during the

[android-developers] getDrawingCache() returns null!

2009-07-06 Thread Deren
Im trying to use the drawing cache functionality for Views, but View.getDrawingCache() returns null! I have a View, which stores a couple of other Views (note that I am Not using a Viewgroup, I store the Views in an ArrayList). I make sure that measure(...) and layout (...) is called on the

[android-developers] Change drawing order of children

2009-06-21 Thread Deren
Why isn't is possible to manually set the drawing order of views? It seems like a pretty big restriction. Is there any thought behind this or is it just not implemented yet? (to set the FLAG_USE_CHILD_DRAWING_ORDER). Not being able to set the drawing order is too bad when it comes to animations

[android-developers] Get transformation from Animation

2009-06-20 Thread Deren
I have an animation, from which I'd like to get a transform. Im not letting the animation play by itself, I just want to get the current transform. The reason for this is that I want to animate a View as I move my finger across the screen. So I enabled static transformations for children and

[android-developers] Re: Difference between invalidate() and postInvalidate()

2009-06-19 Thread Deren
Yeah but why isn't the View redrawn if I call invalidate() from computeScroll()? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to

[android-developers] Access protected member variables in Android classes

2009-06-18 Thread Deren
When I extend a View, I cannot access the protected member variables from my code. Eclipse just says that there exists no variable with that name (for instance mScrollX). Why is that? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

[android-developers] Difference between invalidate() and postInvalidate()

2009-06-18 Thread Deren
What is the difference between invalidate() and postInvalidate(), except the obvious (I know that postInvalidate post an invalidate- request on the UI-thread, while a call to invalidate() invalidates the View immediately). I've done a ViewGroup with some scrolling- animations, and to redraw the

[android-developers] Custom ViewGroup with animated View inside

2009-06-17 Thread Deren
I want to have a ViewGroup with another View in it. The user should be able to move the other View around the ViewGroup, and fling it away. However, the inner View shouldnt only move, it should also scale and so on (so we dont restrain ourselves to just movements). I don't really know the best

[android-developers] Questions about how animations work / are implemented

2009-06-16 Thread Deren
I've been looking around in the framework source and I can get my head around some things. For instance, in the ScrollView, the animated scrolling is done by using computeScroll(). To make the screen redraw (and thus call computeScroll() again), postInvalidate() is used. Why is that one used,

[android-developers] Re: Questions about how animations work / are implemented

2009-06-16 Thread Deren
Okay, thanks! But what about the question regarding invalidate()/ postInvalidate()? Because I tried to experiment with scrolling, and simply calling invalidate() from computeScroll() wasn't sufficient, I had to call postInvalidate, even though computeScroll() runs on the UI thread?

[android-developers] Switch to SurfaceView

2009-03-25 Thread Deren
Im creating a simple game using a SurfaceView for drawing the Graphics. It works fine, but now I tried to add a title screen, which is (for now) only a LinearLayout and a Start-button, specified in XML. However, when I click this button and try to switch to my SurfaceView (By doing