Adding a button which opens another screen

by Justin Anderson » Sat, 26 Jun 2010 01:23:34 GMT


Sponsored Links
 > Thank you for that, so the other screen doing what I want it to do
would be a whole other Java File?
*
The other screen would be a completely separate Activity, which would be a
separate java file.

*> How do I set up a listener on the button as there is already a
listener on the gallery?
*
Look at the documentation for Button... It gives this very example right at
the top of the page:
http://developer.android.com/reference/android/widget/Button.html

*> Sorry if this soulds basic, but I am just learning ;-)*

We all have to start somewhere... Most start with basic. ;-)

----------------------------------------------------------------------
There are only 10 types of people in the world...
Those who know binary and those who don't.
----------------------------------------------------------------------


On Fri, Jun 25, 2010 at 9:35 AM, Justin <justinbrett1...@gmail.com> wrote:

> > >



Adding a button which opens another screen

by Justin Anderson » Tue, 29 Jun 2010 04:35:07 GMT


 irst, make sure you add the new activity to your application's manifest
file. If it is not there you will not be able to launch it.

Second, the Intent class (which is used to start the second activity) has
methods for storing and retrieving certain types of data. You can store the
id in the intent and retrieve it in the second activity to display the
appropriate image.

Hope that helps,
Justin

----------------------------------------------------------------------
There are only 10 types of people in the world...
Those who know binary and those who don't.
----------------------------------------------------------------------


On Sat, Jun 26, 2010 at 9:12 AM, Justin <justinbrett1...@gmail.com> wrote:

>


Sponsored Links


Other Threads

1. Animation for Bitmap

Hi list

i'm developing a small game and for that purpose i extended
SurfaceView and override the onDraw() method to draw Bitmap objects on
the x/y coordinates i like:

public void onDraw(Canvas canvas) {

                fCanvas = canvas;

                fCanvas.drawColor(Color.rgb(0, 0, 255));

                if (!pausing) {
                        GameObject[][] gameObjs = level.getLevel();

                        for (int x = 0; x < gameObjs.length; x++) {
                                for (int y = 0; y < gameObjs.length; y++) {
                                        if (gameObjs[x][y] != null) {
                                                gameObjs[x][y].drawObject();
                                        }
                                }
                        }
                }

here the drawObject() method

getCanvas().drawBitmap(getBitmapCache().get(bitmapRef), x, y, null);

this works great, but now i like to rotate or fade out the bitmap im
drawing. for this purpose i create an animation but the problem is,
there is no method Bitmap.startAnimation() or something like that. how
can i do this nevertheless? any hints??

thanks

-- 

2. QoS Control in Android

Hi,

I am new here. I will like to know whether it is possible in Android
to specify the QoS requirement for cellular network connection
establishment?  if yes, where could I find more details?

I tried to search QoS in Android.com, nothing comes out...

thank you.

rgds.

Ji Hui

-- 

3. Support for AES-GCM encryption

4. How to get USSD interactive option using Android device simulator

5. source code for Voice Search application

6. Installation date of an application in a device

7. Repeating an AsyncTask