to go.
On Tuesday, March 5, 2013 6:57:24 AM UTC+2, momo wrote:
I have a widget that potentially uses many Views. In looking at the
source for other view-intensive widgets (like ListView), I understand that
it's a fairly computationally expensive process to instantiate Views. I
see they're
I have a widget that potentially uses many Views. In looking at the source
for other view-intensive widgets (like ListView), I understand that it's a
fairly computationally expensive process to instantiate Views. I see
they're recycling children - creating them on demand, then caching them,
just having the parent layout having the same size as the child
layout (basically both have wrap_content on width and height)... why do you
need a custom class for that?
On Saturday, March 2, 2013 8:10:17 AM UTC+2, momo wrote:
I have a custom ViewGroup that's only ever managing the size
I have a custom ViewGroup that's only ever managing the size and position
of one child. I've override onMeasure and onLayout so that LayoutParams
are never examined, yet it fails unless I do provide LayoutParams. Here
are abbreviated summaries of the relevant portions of the class:
public
This question has been asked several times in various forms but I haven't
found a definitive answer.
I need to be able to get dimensions and positions of descendant Views after
the initial layout of a container (a contentView). The dimensions required
in this case are of a View(Group) that
I've got a component that I want to make various changes to content and
display when touched, and revert when the finger goes back up. The
following works in general, but if the user's finger wanders out off the
component itself before lifting, ACTION_UP never fires, so it never reverts
to
... and the answer is ACTION_CANCEL...
every time i post to this list I find the answer 10 minutes later.
sorry!
--
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@googlegroups.com
To
I have to believe there's a way to clear image data from memory once it's
no longer required, but despite exhaustive searching I can't find a
solution. Both this list and stack are full of questions regarding OOM
errors, specifically bitmap size exceeds VM budget, but I still don't see
a
I've been looking at the source for several open-source image loaders, and
am comparing the approaches. Looks like when processing the image data,
most involve URL.openStream, but from there it looks like there are a
couple different ways of decoding that stream to a Bitmap:
1.
The Android FW event model is a little confusing. Since we're generally
limited to a single listener, I've run into a couple issues I'm not sure
how to handle correctly. In both cases, I was able to eventually get the
net result to work, but generally with some hacky workarounds. I wonder if
It looks like returning super.onTouchEvent(event); works.
--
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@googlegroups.com
To unsubscribe from this group, send email to
Here's the basics of the tabhost:
public class ChooserView extends TabHost {
public FrameLayout tabContent;
public TabWidget tabs;
public ChooserView(Context context) {
super(context);
setId(android.R.id.tabhost);
setBackgroundResource(R.drawable.cobblestone);
LinearLayout ll = new
I wrote a small app for a colleague, that uses a TabHost widget. He said
he upgraded his phone's OS recently and the app now crashes when attempting
to access the Activity containing the TabHost. After some remote support,
I was able to get little of the log:
Caused by:
I've got a container that allows 2-d scrolling, fling, pinch etc. This has
several layers within it - a viewgroup for image tiles, another for path
drawing, another for markers, etc.
This all works fine. However, in one particular implementation I have
several invisible buttons to indicate
Thanks for the reply. Imagine that over 75% of the scrollable area was
covered by these hotspots - I need the ACTION_DOWN to return true so that
the click event does fire when the finger goes up (on that same child
view), but *also* pass the event to the scrolling container's onTouchEvent
-
I'm rewriting a simple translation app with a SQLite db. There is an
extreme hit to performance between two queries, but only on certain devices.
One query lists the english words in a ListView, the other lists the
secondary language in a list view. The data is structured differently, and
is
that was it - i had forgotten to pk one id column in one of the join tables
- adding that and it's night-and-day - under 1 second, compared with ~30
before. thanks all for reinforcing that concept. very glad i didn't try
to convert the whole thing to a Java model.
--
You received this
So the solution to adding a new layer via WindowManager is pretty simple:
WindowManager.LayoutParams wlp = new WindowManager.LayoutParams();
// ... position, dimension, ets
WindowManager wm = (WindowManager) getSystemService(window);
wm.addView(someView, wlp);
However, I'm unable to apply any
And animating child views is similarly limited?
--
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@googlegroups.com
To unsubscribe from this group, send email to
I'm creating a component that needs to appear above (and separate from) the
existing UI, similar to the Dialog, PopupWindow and ContextMenu widgets.
I'd like it to be modular and portable (again like those widgets I just
mentioned), so pre-supposing a particular type of layout for the
long to populate the ListView. You are
probably doing
work on the UI thread that takes more than a few seconds.
On Mar 16, 7:34 pm, momo dun...@gmail.com wrote:
I debug with a Samsung Galaxy SII, running 2.3.6. I created an app that
runs fine, every time, even under stress, on this device
I think the only real chance of success is for me to go find the device
locally.
More generally, do you see anything especially problematic with this:
1. a single sqlite query joining 2 tables via a 3rd bridge table, selecting
2 colums with an order by and collate unicode, that'll return
thanks all - good info.
--
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@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
I debug with a Samsung Galaxy SII, running 2.3.6. I created an app that
runs fine, every time, even under stress, on this device. I uploaded for a
colleague in another state, using a device with 2.3.7 (I believe it's a
Nexus One).
On his device, the app gives a Not responding - Force Close
I've got a tiled pan-n-zoom component that uses several FrameLayouts to
position image tiles (that scale), markers (that move, but don't scale) and
controls (which neither move nor scale). It works fine.
Markers are positioned in a FrameLayout with topMargin and leftMargin. So
far so good.
the answer is to manage positioning by override onLayout of the containing
ViewGroup, rather than the View itself.
E.g.,
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
int count = getChildCount();
for (int i = 0; i count; i++) {
View child =
I've got a custom layout for positioning tooltips on a pan-n-zoom tiled map
(also custom), in reaction to touch events. The tooltips should appear
above and centered to the marker that fired it.
Everything works perfectly when using normal Views (ImageView, TextView) as
children. However, when
In a custom component that displays a small-scale tiled map (similar
to iOS CATiledLayer), I'm rendering tiles on-demand based on the scale
level the user has supplied (via pinch events or zoom controls).
I'm using an AsyncTask to load up the bitmaps and rendering them with
publishProgress. This
I would like to debug on my device while it's attached to a docking
station, but ADB does not recognize the device when connected that
way. ADB works fine when the device is connected directly to my
computer.
Is there a workaround?
TYIA.
--
You received this message because you are subscribed
I hadn't heard of it until your reply - I googled it and found an app
for it - installed but when I tried to run it, said my phone must be
rooted. Is there a way to do what you're describing without the
above?
On Feb 21, 1:29 pm, Chrystian Vieyra chrys.vie...@gmail.com wrote:
Have you tried
je besoin d'une application qui me permet d'envoyer des message de Pc
vers Android :)
--
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@googlegroups.com
To unsubscribe from this group,
On Feb 11, 4:35 am, skink psk...@gmail.com wrote:
forgot to mention that built-in animations run with no delay - in
short they just call invalidate() in drawing phase in order to make
next frame of animation
pskink
interesting - before reading this, i spent some time looking around
for the
hey pskink,
i tried that pure-Handler approach you first suggested, and it works a
treat - in fact i was able to omit the delay entirely, just
sendEmptyMessage (and use a simple time keeper class to determine the
delta) - very smooth, very simple. thanks a lot for your help.
--
You received
i had tried something very similar:
package com.whatever.tests;
import android.view.animation.Animation;
import android.view.animation.Transformation;
public class MapScaleAnimation extends Animation {
private OnUpdateListener onUpdateListener;
public void
hmm, seems OK to me, anyway you have working (not bad) solution w/
Handler :)
what i like in Animation approach is that interpolatedTime [0..1] but
if it doesn't work... tough luck
pskink
I just created a custom class to get interpolatedTime...
package com.whatever.utils;
public class
On Feb 11, 4:35 pm, Kostya Vasilyev kmans...@gmail.com wrote:
This is not a multithreaded environment you've got here.
Your code most likely creates the Handler object on the UI thread, and
if so, that's where it receives messages. This is correct, since the
Android UI framework is not
I'm working on a custom tween effect targeting Android 2.2. This is
not a straight View animation (many things are happening based on the
progress of the tween), so the Animation classes available in 2.2
aren't sufficient (apparently Animator does this but is not
available).
I've implemented the
thanks for the reply. you'd suggest just using sendMessageDelayed? Would
you call each interval as a reaction in handleMessage, or just send a
batach of delayedMessages at once with the delay incremented? Would you
expect the performance gains to be significant enough to compare to the
awesome, i'll look into both approaches. thanks for the info
--
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@googlegroups.com
To unsubscribe from this group, send email to
Sorry about the poor title - it's hard to summarize the issue in one
line.
I'm working on a map tiling system for small-scale maps (imagine
building interiors), with zoom and pan functionality. Most of this is
working properly, but after a scale operation I try to limit the
scrollable area using
I think Android has a ton of functionalities and that's definitely
wonderful. I am not trying to be overally critical since I know the
Android team has been working hard and this is highly appreciated.
However in all systems, there are rooms for improvement and here are a
few areas where I think
I can't agree more. Release beta SDKs for each of your releases for
developers or any developers who already has an application in the
Market. As changes are being implemented, update the beta SDKs to new
versions. This way developers are GIVEN MORE TIME to verify that
their apps work.
Sigh
Maybe make another API call that allows killing the service,
notifications, and etc of an application except for alarms? I think
other applications are affected the most by their alarms getting
totally wiped out by another application.
Too many task killing applications are using this API call.
I have a small piece of code that does this
Process process = Runtime.getRuntime().exec(COMMAND);
InputStream in = process.getInputStream();
InputReader inr = new InputStreamReader(in);
BufferedReader br = new BufferedReader(inr);
Then I go through a while loop to read the content of the
44 matches
Mail list logo