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. Problem with Cursor Adapter

I have a cursor adapter .The list which is getting populated from the
cursor,has got an imageView in each of its item.Tapping that imageVIew
updates a boolean field in database and changes the colour of the
imageView from grey o yellow and vice versa.

Sometimes(not everytime) tapping a first Item's Image updates last
Item's image and database corresponding to that item as well.
This ambiguous behavior is consistent in its ambiguity i.e., first
item is mapped with last,second item is mapped with second last,third
with third last.Why is it happening so?
Please enlighten


2. drag and drop only between views in the same layout?

Hi all,

A question about drag & drop in Honeycomb, is it available between two app
widgets or fragments on homescreen? or it is only available between views in
the same activity. Thanks.


3. Extended MapView

4. change background color of particular line in textview or edittext

5. android graphs

6. [bionic-c-lib] SIGSEGV on free()

7. About Rendering