Android :: How Does PostScale Affect Translation Part Of Matrix?

Aug 7, 2010

Ive been trying to implement a limit to prevent the user from scaling the image too much in my multitouch zoom app. Problem is, when i set the max zoom level by dumping the matrix, the image starts to translate downward once the overall scale of the image hits my limit. I believe it is doing this because the matrix is still being affected by postScale(theScaleFactorX,theScaleFactorY,myMidpointX,myMidpointY) where theScaleFactorX/Y is the amount to multiply the overall scale of the image (so if the theScaleFatorX/Y is recorded as 1.12, and the image is at .60 of its origional size, the overall zoom is now .67). It seems like some sort of math is going on thats creating this translation, and was wondering if anyone knew what it was so i can prevent it from translating, and only allow the user to zoom back out.

Android :: how does postScale affect translation part of matrix?


Android :: Canvas And Its Transformation Matrix Have Different Translation Values

Aug 31, 2010

I might be completely off-base here, but I've spent the last two days trying to figure this out and, without success, you're my only hope.What I'm doing is simple:

* I have a canvas where I draw a circle with center on (10, 10), with radius = 5;

* Then, I obtain the canvas transformation matrix

* And then I create a new rectangle, I map it using the matrix and I use the canvas to draw it.

My problem: basically, the rectangle is being drawn in a different position along the Y-axis.I outputed the transformation matrix and, by default, it is translated by zero in the X-axis and by 25.0 in the Y-axis. Please note that I made NO transformations, either translate, scale or rotate. I am unable to understand why this is happening and how to avoid it.

View 3 Replies View Related

Android :: Translation Tools Available?

Sep 25, 2010

I am just going through a translation of resource files and I am wondering if there is additional support. At the moment I have both the base strings.xml and the localised version opened parallel in Eclipse. This quite works, but I am thinking of the following tools: - Showing both (or more) versions of a key together - Showing missing keys in a version - Integrating a lookup service (Google Translate, Wikipedia). I didn't find anything like this, is such a tool available?

View 3 Replies View Related

Android :: J2ME Converting/translation

Apr 25, 2010

I want to know if exists a converter for a j2me source-code to android. Listen, itīs not a runner, like a midp runner for android, it īs a converter for a source code. A tool for translate a source code for a new plataform, from j2me to android.

View 6 Replies View Related

Android :: Translation App Use In Europe Without Connection?

Jul 9, 2010

I understand EVO 4G is CDMA thus can't be used roaming in European countries say in Germany (mostly GSM I believe).
Is there a way to still use "Google Translate" without connection? (is there another translation app, which can be completely downloaded to SD Card and can be used without 3g or wifi ?)

View 1 Replies View Related

Android :: Translation App That Works Offline?

Aug 19, 2010

Google Translate is great, but it's crippling fault is that it needs a data connection to work. Obviously the only time I am going to need language translation tools, is the same time I don't want to pay for roaming data access!!

Are there any good (and preferably free, or minimal cost) language apps for Android that work offline? I need English > Italian initially, but the major languages would need to be supported too.

View 1 Replies View Related

Android :: Have Translation Service In Droid App?

Feb 24, 2010

How can a translation service be called in an Android app? Can we have an app that can translate multiple languages into another?

View 3 Replies View Related

Android :: Translation Animation In Code?

Jun 23, 2010

I was able to get the animation to work on the emulator -- however my problem is that it animates for a second, but then then goes back to its original posistion right after it finishes animating. How can I stop this for happening.

This is how I animate my objects:

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

View 2 Replies View Related

Android :: Instant Dictionary Translation Interface

Jun 27, 2010

Is there such a thing in Android...? For example, I'm writing an email and would like to lookup a word, but don't want to switch to the other app, is there an app which can invoke the dictionary within another app...?

View 3 Replies View Related

Android :: Getting Transformation Matrix Of An Animation

Apr 1, 2010

I would like to obtain the transformation matrix of an animation to calculate the position of the view that was animated.It seems the Animation class has a method called getTransformation that can be used to obtain the transformation applied to the view.However, if I use getTransformation before starting the animation I obtain the identity matrix.The program enters an infite loop because getTransformation seems to trigger onAnimationEnd (why?).How should I use getTransformation to obtain the transformation matrix of an animation? Is there another way to do this?

View 1 Replies View Related

Android :: Efficient Matrix Library

Jun 21, 2010

Is there any efficient linear algebra library for android? I need to compute matrices of different sizes(also bigger than 4x4) and rectangular too.

View 1 Replies View Related

Android :: How Would I Create Equivalent Matrix Using Sdk?

Aug 20, 2010

Suppose I initialize an AffineTransform as below:AffineTransform af = new AffineTransform(2, 3, 4, 5, 6, 7); How would I create an equivalent Matrix using android's sdk?

View 1 Replies View Related

Android :: AR Get Rotation Matrix / Camera Overlay?

Feb 23, 2010

I spend two weeks now trying to get this working with no success. Here is what I want to do: I have several geo points around the user and his phone. I want to display this point overlaying them on the input from the camera (kind of standard AR (Augmented Reality) app). Part of my requirements are that the user can use the phone in either landscape or portrait mode.My plan was like this.
1. Register for Sensor.TYPE_ACCELEROMETER, Sensor.TYPE_MAGNETIC_FIELD 2. Pass the result to Sensor Manager.getRotationMatrix(), getting back the R matrix that should be telling me how to translate points from the Phone coordinate system (defined here: http://developer.android.com/reference/android/hardware/SensorEvent.html) to World coordinate system (x -> East, y -> North, z -> Sky) 3. I want to translate points from World to Phone so I take the inverse of R (I'm using Matrix.invertM()) to get R_In 4. Using the GPS I translate the geo points I want to display on the camera to points in the World coordinate system and then I run them through the R_In matrix to get their coordinates in the Phone system. 5. Draw the points in the screen only if the have (phone coordinates) z < 0 and x and y such that they are visible. This is my grand plan... however I have problems quite early (2). I do get the R matrix back and it looks good when I align the phone to the world coordinate system ( I get the identity matrix ). However when I try to translate an imaginary point from the Phone coordinate system say (0, 1, 0) to the World coordinate system I don't get the numbers I expect.

View 2 Replies View Related

Android :: Matrix.rotateM Does Heap Allocations

Sep 24, 2010

Are you meticulous in removing all per-frame heap allocations from your game? (At least the allocations that you can control and that have practical alternatives.)

While trying to reduce per-frame heap allocations from my running game, I found that method

android.opengl.Matrix rotateM(float[] m, int mOffset, float a, float x, float y, float z)

Does a heap allocation. This means maybe 10 or so extra heap allocations per frame and is the only per-frame allocation left in my application (well, the only one that I can directly control). I am thinking of replacing this with my own version - one that does not do any heap allocations.

I also had some lists that I replaced with my own list implementation because I found that some standard list iterations would create new iteration objects, putting more pressure on the heap and forcing more frequent garbage collection.

I know that I can't eliminate all the heap allocations. In particular, input seems to trigger a bunch of allocations.

I can't help but think that anything reasonable I can do to reduce pressure on the heap will improve the user's experience (if garbage collection is going to stall my game). Obviously there are diminishing returns at some point, so ultimately I have to make a judgement call.

View 8 Replies View Related

Android :: Drawing Canvas With Given Matrix Transformation?

Aug 2, 2009

I got this code from another post and modified it to work for me as a TextView. I tried using the code below but no transformation is happening? I trying to draw the canvas of the TextView with the given Matrix transformation.

import android.content.Context; import android.graphics.Canvas; import android.graphics.Matrix; import android.util.AttributeSet; import android.view.MotionEvent; import android.widget.TextView;
public class CTextView extends TextView { private Matrix mForward = new Matrix(); private Matrix mReverse = new Matrix(); private float[] mTemp = new float[2];
public CTextView(Context context) { super(context); mForward.postRotate(90); mForward.invert(mReverse); } public CTextView(Context context, AttributeSet attrs) { super(context, attrs);
mForward.postRotate(90); mForward.invert(mReverse); } public CTextView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle);
mForward.postRotate(90); mForward.invert(mReverse); }
@Override protected void dispatchDraw(Canvas canvas) { canvas.save(); canvas.concat(mForward); canvas.restore(); super.dispatchDraw(canvas); }
@Override public boolean dispatchTouchEvent(MotionEvent event) { final float[] temp = mTemp; temp[0] = event.getX(); temp[1] = event.getY();
mReverse.mapPoints(temp); event.setLocation(temp[0], temp[1]); return super.dispatchTouchEvent(event); }

View 3 Replies View Related

Android :: Kernel / Userland Input Events Translation Process

Oct 22, 2009

I am now learning how android handles linux input events from kernel raw input events to the userland level KeyEvent and so on. And I want to handle input events in native language. I've do some experiments on handling events using NDK but the touch screen events are very hard to handle(when I touch the screen, It generates a lot of kernel events).

I've read the eventhub class in framework base dir in the android source repo. And I now I know how android collects linux kernel raw events using eventhub class by reading from /dev/input/event* , but I still have no idea how it translates these raw events into the userland logic input events like KeyEvent. The file keyinput service only wrappers eventhub to JNI functions but there are no translation. So please give me some hints on the kernel event and userland event translation process.

View 3 Replies View Related

Android :: Use An OpenCV Rotation And Translation Vector With OpenGL ES In Droid?

Sep 14, 2010

I'm am working on a basic augmented reality application on Android. What I did so far is detect a square with opencv and then using cvFindExtrinsicCameraParams2() I calculated a rotation and translation vector. For this I used 4 object points, which are just the corners of a square around (0,0,0) and the 4 corners of the square in the image.

This yields me a pretty good rotation and translation matrix. I also calculated the rotation matrix with cvRodrigues2() since using this is easier than the rotation vector. As long as I use these to draw some points in the image everything works fine. My next step is however to pass these vectors and the matrix back to java and then use them with OpenGL to draw a square in an OpenGLView. The square should be exactly around the square in the image which is displayed behind the OpenGLView.

My problem is that I cannot find the correct way of using the rotation matrix and translation vector in OpenGL. I started of with exactly the same object points as used for the openCV functions. Then I applied the rotation matrix and translation vector in pretty much any possible way I could think of. Sadly none of these approaches produce a result which is anyway near what I hoped for. So my question is can anyone tell me how to use them correctly?

So far the "closest" results I have gotten, was when randomly multiplying the whole matrix with -1. But most of the time the squares still look mirror inverted or rotated for 180 degrees. So I guess it was just a lucky hit, but not the right approach.

View 1 Replies View Related

Android :: Build A Language Translation Tool For Smart Phones?

Nov 8, 2010

I am implementing a language conversion tool, to convert Spanish to English, on a variety of smart phones: Android, BlackBerry, iPhone, Windows Phone 7.

How do I implement language conversions? Searching, I am not finding a tutorial about this, and I don't having any experience with this.

View 1 Replies View Related

General :: No Menu In Translation App?

May 18, 2013

I have the Google Translate app on my Samsung Galaxy Tablet (running ICS) and it works great, including the offline. I also have it on my Samsung Galaxy Ace phone (running Gingerbread 2.3.7) but I cannot even see a menu option (whichis needed to use the offline facility) on the phone version. I have downloaded the latest verions from Google Play. Review of Google Translate say the offline bit shuld work with Android 2.3 and later..

View 2 Replies View Related

Android :: OpenGL Works Incorrectly When Projection Matrix Is Set To Identity?

Jun 23, 2010

I have an OpenGL app that manipulates it's geometry in screen space to acheive some effects, and therefore bypasses OpenGL's matrices by setting modelview and projection to identity. For some reason, Android's OpenGL implementation seems to be unhappy with this, and doesn't draw anything. The same app, compiled from the same code base, works fine on windows and on iPhone. If I load the app's projection matrix into GL's matrix, and multiply it's inverse with the final geometry prior to drawing it (which is effectively a no-op) it displays correctly.

View 6 Replies View Related

General :: HTC Legend - Twitter And Translation Functionality?

Jan 26, 2012

I'm interested in having a Twitter app in my HTC legend in order to translate some tweets, if possible Japanese tweets.

Last year I was using TweetDeck wich translated the tweets, even from Japanese in English, but I know don't why, since september i'm unable to translate them anymore.Twitter app on Android with the translation functionality ? (To translate from Japanese if possible)

View 1 Replies View Related

HTC Incredible :: PenTile Matrix Confirmed

Apr 29, 2010

Just wanted to let folks know I put my Incredible under an inspection scope today and confirmed the PenTile matrix layout is present on the AMOLED screen, similar to the Nexus One. Not a big surprise since it's probably the same stock screen acquired from Samsung, but I thought I'd let everyone know for certain. If you're not familiar with the PenTile matrix arrangement:I'll try to get some real high mag pictures, but it's basically as shown in the first link.Picture of the Incredible's AMOLED screen under high mag.

View 2 Replies View Related

General :: How To Root Matrix 2 On MacBook Pro

Apr 22, 2012

I am super new and I want to root my matrix 2 on my MacBook pro any

View 2 Replies View Related

Sprint HTC Hero :: Launcher From Matrix Rom Not Installing?

Apr 7, 2010

I'm using Matrix 0.6 rom,and it's AOSP based, so it had landscape launcher and android keyboard. I was successfully able to pull the .apk for the keyboard, and install it on a different rom, but for the launcher, it failed. Anyone have any ideas?

View 6 Replies View Related

HTC Hero :: How Cool Is Matrix Live Wallpaper?

Apr 24, 2010

its very cool and its free in market.. think you need villain 5.3 to run live wallpaper though.

View 6 Replies View Related

General :: D7030 - Matrix Tablet Firmware?

Jan 7, 2014

I recently bought tablet Matrix d7030. where to download latest firmware for it or if I could use firmware of another device. how to root this specific tablet?

View 1 Replies View Related

General :: Exclamation Mark When Powering On - Matrix One

Dec 25, 2012

I'm having with my Matrix One tablet. I'm getting an exclamation mark inside of a triangle, inside of a battery icon. The issue started after I let the battery completely die out. I can't get past that screen. When pressing power the battery icon shows up and the tablet shuts down a second later. I tried all button combinations to get into recovery, nothing worked. I've also tried charging the tablet.

There was one thing I managed to do, that was get the tablet to show up on my computer. I held down the update button with a needle and then held the power button until a blue light indicating the tablet was on showed up. The screen was black but my computer detected a new device. My computer didn't find any drivers for the tablet, so I went in search of them myself and couldn't find any. My tablet is A10 compatible, but none of the A10 drivers I found seem to work on my tablet when I go to manually update it through device manager, neither does the PDAnet method I found online.

I was able to find a recovery that works on my device, one that will allow me to reset my tablet, if I'm able to boot into recovery after I get it on my tablet. Now in order to even test the other recovery I need drivers for my device so ADB can detect it and I can push the recovery. My device is already rooted with Superuser updated to the latest build.

I'll add that I've even taken the liberty of opening up the tablet to see if I can disconnect the battery from the board to cut all power, as I'm unable to do that because the batteries are connected by soldered red and black cables.

View 1 Replies View Related

Android :: OnStop Does Not Affect MediaPlayer

Oct 12, 2010

I have a mediaplayer object inside an activity that plays from mp3 files situated in the res/raw folder. The MediaPlayer.create(Context context, int resid) method is used to create and return a mediaPlayer object to play this track. What I have noticed is that when the activity is obscured by another activity and hence the "onStop()" method is called , the music continues to play. Can anyone explain why this occurs? I though that onStop would essentially freeze any actions taking place by objects associated with the activity, except for services etc

View 1 Replies View Related

Android :: How Will WAC Affect Droid App Development?

Feb 16, 2010

I like the idea of the Alliance, it is very logical. It raises a question for me though. How do they intend to run apps seamlessly across multiple operating systems? Will the apps all have to be developed in something like Java? I am studying mobile app development, targeting the Android OS, and using Java. I was about to order a load of books(eg hello android) on developing apps for Android today, but I worry the new Alliance platform/technology might render these books and my initial studies obsolete in some way.

View 3 Replies View Related

Android :: How To Add Superscript Affect To String?

Feb 10, 2009

I would like to write m2 (m to the power of 2, 2 should be on top of m in lower case).

View 6 Replies View Related







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