How to use Native Activity and View from Java

by lorydi » Thu, 10 Mar 2011 09:46:32 GMT

Sponsored Links
 I have a game developed in Java with the SDK. Now I have to track the
events from Xperia Play touchpad which are only available in native
code. What is the most simple solution to do this? I want to keep the
Java code and only change the Activity into NativeActivity . The
problem that I face is that I don't know how to make the paint on the
my normal SurfaceView class, the screen remains black.


Re: How to use Native Activity and View from Java

by jaafar zbeiba » Sat, 12 Mar 2011 04:21:55 GMT

 I use a JPasswordField but I have a problem with java.awt.event java.swing
and that can help me
com.example.tuto package;

import javax.swing .*;
import java.awt .*;
import java.awt.event .*;

public class Input extends JFrame implements ActionListener {

JPasswordField pass;
JButton test = new JButton ("get");

public Password () {
JPanel pane = new JPanel ();
test.addActionListener (this);
pane.setLayout (new FlowLayout ());
pane.add (pass = new JPasswordField (15));
pane.add (test);
setContentPane (pane);
setVisible (true);


Sponsored Links

Other Threads

1. Object Recognition


I'd like to know more about Object Recognition. Has anyone got any  
links about how to implement object recognition from the camera in an  
Android application? For example say I wanted to make a barcode  
scanning application, how would I go about doing this; I figure this  
would be a good place to start.

Thanks in advance for any tips.



2. How to install EAP TLS certificates for WiF

No, I did not. Not even calling HTC support...

2009/10/7 Florian Lettner <>


3. Disable network on emulator

4. retrive number of outgong call

5. Trouble with Ringtone.getTitle() in 1.6

6. Streetview not working in 1.6?

7. "unknown socket error " Is anyone know this error??