You might use Bundle of extras to pass information from one activity to
another activity.

On Mon, Mar 15, 2010 at 2:26 PM, ReyLith <[email protected]> wrote:

> Thank for you respond.
>
> I am already using intent for moving from one activity to another and
> I have declared it in the androidmanifest. The code that I am using is
> the following:
>
> public void onCreate(Bundle savedInstanceState)
>    {
>        super.onCreate(savedInstanceState);
>        setContentView(R.layout.main);
>
>        Gallery g = (Gallery) findViewById(R.id.Gallery);
>        g.setAdapter(new ImageAdapter(this));
>
>        g.setOnItemClickListener(new OnItemClickListener()
>        {
>                public void onItemClick(AdapterView parent, View v, int
> position, long id)
>                {
>                        //Toast.makeText(Editor.this, "" + position,
> Toast.LENGTH_SHORT).show();
>                }
>        });
>
>        ImageButton abrir = (ImageButton)
> findViewById(R.id.ImageButton01);
>        abrir.setOnClickListener(abrirImagen);
>
>        ImageButton cerrar = (ImageButton)
> findViewById(R.id.ImageButton01);
>        cerrar.setOnClickListener(cerrarPrograma);
>    }
>
>   /*private OnClickListener abrirImagen = new OnClickListener()
>    {
>       public void onClick(View v)
>       {
>           Intent intent = new Intent();
>           intent.setClass(Editor.this, Rotar.class);
>           startActivity(intent);
>           finish();
>       }
>    };*/
>
>   private OnItemClickListener seleccionImagen = new
> OnItemClickListener()
>    {
>       public void onItemClick(AdapterView parent, View v, int
> position, long id)
>       {
>           Intent intent = new Intent();
>           intent.setClass(Editor.this, Rotar.class);
>           startActivity(intent);
>           finish();
>       }
>    };
>
> The commented function is where I use the botton and the non-commented
> funcion is where I want to go to another activity. If someone wants I
> can put the complete code but I think that there isn't neccesary. As
> you can see I use intents for open the other activity but I don't know
> how I can pass the selected image.
>
> Greetings.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to