[android-developers] Re: Google Maps API hidden maps and opengl

2010-11-14 Thread Nicholas Albion
There's an opensource port of Android on GitHub which includes a
(slightly dated) implementation of the Google maps API.  It supports
OpenStreetMap and a couple of other map sources.  I managed to adapt
it to support Bing maps.

On Nov 14, 7:14 pm, Adam Hammer adamhamm...@gmail.com wrote:
 I have a class I wrote that uses the maps and works in a activity, but
 still returns the stub error when I attempt to instantiate it in a
 live wallpaper.

 It's supposed to be in a MapActivity, but I figured since Google uses
 maps in a live wallpaper I could use it as well, although I know this
 is not always the case.

 I've learnt the hard way that just because Google does something with
 android doesn't mean they expose those methods to the developers.

 Adam


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


[android-developers] Re: Device's User-Agent from Application

2010-07-15 Thread Nicholas Albion
Although systems like WURFL use the user agent to identify mobile
devices and their capabilities, it's actually an identifier of the
browser, not the device.  Your PC may be a Mac, or a Windows box
running on an AMD, Intel 486 or i7 - the user agent isn't going to
reveal a lot about this - perhaps the OS and a rough indicator of the
age of the PC.  It will tell you whether it's IE, Firefox, Chrome etc.

If you're writing your own HTTP client then it's up to you to create
your own user agent to provide your server with any application-
specific it needs (Android/iPhone, version number...).  You might want
to add some of the fields from  
http://developer.android.com/reference/android/os/Build.html.
Screen size is something you can also code into your user agent.

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


[android-developers] Re: Best practice to pass persistent objects from an activity to another activity

2010-07-04 Thread Nicholas Albion
You could cache objects in your Application subclass and pass the DB
pk or Preferences key in the intent.  If you've already got the object
in memory, just grab the cached instance, otherwise you can load it
from the DB or Preferences (if your application has been killed and
restarted)

On Jul 4, 10:34 pm, Thomas Frick frick...@gmail.com wrote:
 Dear All,

 I have two activities.
 Activity A creates an object and stores some data in this object.
 After that, activity B ist started. In activity B I have to use the
 object created in activity A.

 What is the best way to pass the object from activity A to B?

 I think it is not possible to store an object in the
 SharedPreferences, isn't it?

 Is it a good way to call the object in activity A directly from
 activity B?

 Thanks for your help.
 Thomas

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


[android-developers] Re: How to Draw route on Google map? not to use DrawPath

2010-06-24 Thread Nicholas Albion
Try one of these links to decode the polyline

http://facstaff.unca.edu/mcmcclur/googlemaps/encodepolyline/
http://jeffreysambells.com/posts/2010/05/27/decoding-polylines-from-google-maps-direction-api-with-java/

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


[android-developers] Re: Mapping (x,y) to (latitude,longitude)

2010-06-24 Thread Nicholas Albion
What's showing on your map?  What coordinates to you expect?

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


[android-developers] Re: MapView does not work in HTC Hero

2010-05-03 Thread Nicholas Albion
Do you have a Google maps API key that coresponds to MD5 certificate
fingerprint used to sign the app?

http://code.google.com/android/add-ons/google-apis/mapkey.html
http://code.google. com/android/maps-api-signup.html

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


[android-developers] Re: The emulator running terrible slow in win2008r2 64bit with 4G RAM

2010-04-28 Thread Nicholas Albion
Every time I start the emulator, I open Windows Task Manager, right-
click the emulator process and set the affinity to all processors.

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


[android-developers] Re: How to warn user when back button is pressed to navigate out of my application?

2010-04-27 Thread Nicholas Albion
My first thought was to suggest that you rethink if you really need to
do this - maybe your app isn't going to be as important to your users
as you may think.

But then, I been frustrated in the past by games which exit in the
middle of the game if you press too far right...

Maybe you should provide an option (which you'd only ever ask once):
Always confirm before exiting

 I can find some posts on how to warn user when the back button is
 pressed to 'quit' the application.

 The common answer is to catch the key down event by onKeyDown, or use
 startActivityForResult().

 My approach is to restart the activity in onStop().
 Is it a better choice?

 Please help to check if there's anything inappropriate.

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


[android-developers] Re: XmlPullParserException: expected: START_TAG

2010-02-03 Thread Nicholas Albion
If you determine that the problem is that the XML (or HTML!) is badly
formatted and you have no control over it, you can do something like:

int n;
while( (n = xpp.getNext()) != END_DOCUMENT ) {
  try {
 // do your parsing element-by-element
  } catch( org.xmlpull.v1.XmlPullParserException e ) {} // ignore the
exception
  } catch( Throwable e ) {
 log.warning(error while parsing file:  + e.getMessage();  //
you may want to catch any other exceptions and do something about them
  }
}

It might not be the most efficient practice to perform the try/catch
within the loop, but if somebody else is sending you dodgy XML there
might not be anything you can do.

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


[android-developers] Re: ADC2 Results?

2009-12-01 Thread Nicholas Albion
 I would definitely focus on simplicity and polish if there's another ADC.

Yes, so perhaps it should be renamed from a Challenge to a Gimmick
Fest?

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


[android-developers] Re: ADC2 Results?

2009-11-30 Thread Nicholas Albion
Why are there not URLs provided for _any_ of the winning apps?  I'd
like to get in contact with the developers of AnyStop but the google
search results are full of blogs which are basically cut-and-pasted
from the ADC2 results.

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


[android-developers] Re: Dynamic pin overlays in MapView.

2009-10-29 Thread Nicholas Albion

No, you can add/remove, but if you insert or remove you need to set
the last selected index to -1.

On Oct 30, 8:45 am, Tim tdh...@gmail.com wrote:
 Hi,

 I've been reading the (shoddy) documentation for the Google Maps API
 (MapActivity et al), and I think I have roughly worked out how it
 works. It seems that if you want to add a marker overlay you can use
 ItemizedOverlay easily, but you have to add all your markers at once.
 There doesn't seem to be any way to remove them.

 What I want to do is query markers from an online database as the user
 pans around (in the same way the actual map tiles are fetched). Is
 there a simple way to do this?

 As far as I can tell I need to subclass Overlay and implement the draw
 method, but where is the best place to put the code that fetches new
 markers when the map is panned? There doesn't seem to be an
 onMapChanged() method anywhere. My best guess is MapController.onKey()
 but that seems wrong.

 Any suggestions?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: ADC 2 rating

2009-10-26 Thread Nicholas Albion

Unfortunately, I seem to have made a fatal mistake of placing a
mandatory user registration form as one of the first Activities.  I
only had 50 people actually register (some with fake email addresses
which I'm actually okay with, given the circumstances), and out of
those only 3 or 4 people actually spent longer than a couple of
seconds looking at the application.  Only by the 5th Activity does my
application get really interesting (an editable map overlay which can
snap to predefined points) but only those 3 or 4 judges would have
even seen that.  I'm very disappointed - how can 96 people claim to
have judged my application if they haven't even interacted with it?

  About 140 users for ours.  I agree it's a pretty small sample, not
  sure why they couldn't have left the first round open for a while
  longer.

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



[android-developers] Re: ADC2: Low volume of judges

2009-09-27 Thread Nicholas Albion

 36 visits (80 hits) for page 1's audio.

My application requires that users register using the application
before they can use it (probably a mistake as far as the competition
goes, but unavoidable in practice).

I've had about 15 people register, and only one of those has bothered
to progress past the 3rd Activity within the application, so I would
not consider the others to be in a position where they can fairly
judge my application.

I wonder how many of the users judging the applications have submitted
their own applications and are just voting other applications down to
improve their own chances of winning...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: MapView with itemizedOverlay still don't work

2009-09-07 Thread Nicholas Albion

You need to call:
mapOverlays.add( itemizedOverlay );

also, if you're adding/removing overlay items to/from ItemizedOverlay,
you may need to call setLastFocusedIndex(-1) (or whatever the method
is).  I think in your case you won't need to worry with this as you
only call addOverlay and populate once.

On Sep 7, 6:34 pm, sweet brou...@gmail.com wrote:
 I've try to make a mapview with itemized overlay and it's not work.
 I share my code if anyone see anything :

 java class mapview:

 import java.util.List;
 import android.content.Intent;
 import android.graphics.drawable.Drawable;
 import android.os.Bundle;
 import android.view.Menu;
 import android.view.MenuInflater;
 import android.view.MenuItem;
 import android.widget.LinearLayout;
 import android.widget.ZoomControls;
 import com.google.android.maps.GeoPoint;
 import com.google.android.maps.MapActivity;
 import com.google.android.maps.MapView;
 import com.google.android.maps.Overlay;
 import com.google.android.maps.OverlayItem;

 public class Map extends MapActivity {
         ListOverlay mapOverlays;
         Drawable drawable;
         NewItemizedOverlay itemizedOverlay;
         LinearLayout linearLayout;
         MapView mapView;
         ZoomControls mZoom;

         @Override
     public void onCreate(Bundle savedInstanceState) {

                 super.onCreate(savedInstanceState);
                 setContentView(R.layout.map);
                 mapView = (MapView) findViewById(R.id.mapview);
                 mapView.setBuiltInZoomControls(true);
                 mapView.setSatellite(true);

                 mapOverlays = mapView.getOverlays();

                 drawable = this.getResources().getDrawable
 (R.drawable.androidmarker);
                 itemizedOverlay = new NewItemizedOverlay(drawable);

                 GeoPoint point = new GeoPoint(1924,-9912);
                 OverlayItem overlayitem = new OverlayItem(point, , );
                 itemizedOverlay.addOverlay(overlayitem);

     }
         protected boolean isRouteDisplayed() {
                 return false;
         }

 java ItemizedOverlay class:

 import java.util.ArrayList;
 import android.graphics.drawable.Drawable;
 import com.google.android.maps.ItemizedOverlay;
 import com.google.android.maps.OverlayItem;

 public class NewItemizedOverlay extends ItemizedOverlay {

         private ArrayListOverlayItem mOverlays = new ArrayListOverlayItem
 ();

         public NewItemizedOverlay(Drawable defaultMarker) {
                 super(boundCenterBottom(defaultMarker));
                 // TODO Auto-generated constructor stub
         }
         public void addOverlay(OverlayItem overlay) {
             mOverlays.add(overlay);
             populate();
         }

         @Override
         protected OverlayItem createItem(int i) {
           return mOverlays.get(i);
         }

         @Override
         public int size() {
                 return mOverlays.size();
         }

 }

 xml mapview file :

 ?xml version=1.0 encoding=utf-8?
 LinearLayout xmlns:android=http://schemas.android.com/apk/res/
 android
     android:orientation=vertical
     android:layout_width=fill_parent
     android:layout_height=fill_parent
     com.google.android.maps.MapView
         android:id=@+id/mapview
         android:layout_width=fill_parent
         android:layout_height=fill_parent
         android:clickable=true
         android:apiKey=0G***fwcg/
         LinearLayout
     android:id=@+id/zoomview
     android:layout_width=wrap_content
     android:layout_height=wrap_content
     android:layout_alignBottom=@id/mapview
     android:layout_centerHorizontal=true/
 /LinearLayout

 Thanks for your help
 Sweet
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Too many PNGs in res/drawable?

2009-09-06 Thread Nicholas Albion

Doesn't the API have a method something like getDrawable( int
state )

You could return a custom subclass of Drawable or Bitmap

On Sep 5, 8:17 am, markh23 mr.markhop...@gmail.com wrote:
 Hey Necholas,

 How would I be able to use the super-imposed transparent images in
 code?  I've thought about that, but I wasn't able to figure it out.

 Thanks.

 On Sep 2, 10:08 pm, Nicholas Albion nalb...@gmail.com wrote:

  Can you use transparent images, super-imposed to refactor your 5000
  images to (for example) 5 + 10 + 10 + 10 = 35 rather than 5 * 10 * 10
  * 10 = 5000?

  On Sep 3, 11:48 am, markh23 mr.markhop...@gmail.com wrote:

   Thanks for the help guys.  I appreciate the time you took, Dianne, to
   write out that response.

   And Zod, I just wanted to make a (large) counter for the status bar.
   Nothing fancy.

   Sorry about the delay.

   On Aug 27, 3:58 pm, Zod zsolt.ba...@gmail.com wrote:

Hi mark23,

I'm just curious. What do you want to do which requires sooo
incredible amount of icon states ?

I completely aggree with Dianne about the totally unreasonable thing
to do part.
Wasting memory in a desktop application is a bad thing, however nobody
may notice a leak of a few tens of megabytes ram. However ram is a
pretty precious resource in an embedded environment like a mobile
phone, and it should not be wasted carelessly.

Bye,
   Zsolt

On Aug 27, 6:15 am, markh23 mr.markhop...@gmail.com wrote:

 Hello,

 I have a notification icon in the status bar with thousands (5000+) of
 states, and each state has a different corresponding icon.  Right now
 I'm using a level-list xml file to switch between all these
 different images.

 It seems to be working right now (it takes a little longer to install/
 uninstall from the emulator however), but does someone see any
 problems with this that I'm not catching?  Is it possible to havetoo
manyitems in the res/drawable folder?  Will there be a huge
 performance hit by having an icon with somanystates?

 Thanks.

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



[android-developers] Re: Too many PNGs in res/drawable?

2009-09-02 Thread Nicholas Albion

Can you use transparent images, super-imposed to refactor your 5000
images to (for example) 5 + 10 + 10 + 10 = 35 rather than 5 * 10 * 10
* 10 = 5000?

On Sep 3, 11:48 am, markh23 mr.markhop...@gmail.com wrote:
 Thanks for the help guys.  I appreciate the time you took, Dianne, to
 write out that response.

 And Zod, I just wanted to make a (large) counter for the status bar.
 Nothing fancy.

 Sorry about the delay.

 On Aug 27, 3:58 pm, Zod zsolt.ba...@gmail.com wrote:

  Hi mark23,

  I'm just curious. What do you want to do which requires sooo
  incredible amount of icon states ?

  I completely aggree with Dianne about the totally unreasonable thing
  to do part.
  Wasting memory in a desktop application is a bad thing, however nobody
  may notice a leak of a few tens of megabytes ram. However ram is a
  pretty precious resource in an embedded environment like a mobile
  phone, and it should not be wasted carelessly.

  Bye,
     Zsolt

  On Aug 27, 6:15 am, markh23 mr.markhop...@gmail.com wrote:

   Hello,

   I have a notification icon in the status bar with thousands (5000+) of
   states, and each state has a different corresponding icon.  Right now
   I'm using a level-list xml file to switch between all these
   different images.

   It seems to be working right now (it takes a little longer to install/
   uninstall from the emulator however), but does someone see any
   problems with this that I'm not catching?  Is it possible to havetoo
  manyitems in the res/drawable folder?  Will there be a huge
   performance hit by having an icon with somanystates?

   Thanks.

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



[android-developers] Re: ADC 2 Submission Site -- Now live

2009-08-31 Thread Nicholas Albion

Me too!

I uploaded it, filled out the description and pressed save.  The
developer console site said that it was uploaded but not submitted.
I then checked that my profile details were right, cancelled out of
that and went back to submit.

The developer's console site says No applications uploaded but then
if I try to re-upload the same non-modified apk it says that an
application already exists on the market (which it doesn't) or ADC2
(which I'm confused about because of the lack of confirmation).

I read on here that we'd be able to modify the application (and I
would assume we'd be able to visually confirm that it had been
submitted to the comp)

(I'm not registered with the Market if that makes any difference)

On Aug 27, 12:08 pm, Wesley sit06...@gmail.com wrote:
 hi All,

 I have problem of submit my app...
 1st times I try to upload it to ADC...
 so I start browse my apk...
 then the site will auto upload I think...
 but before I click save button, suddenly my browser got problem or I mistype
 some shortcut key or what... my browser quit...

 then I open my browser back try to upload again, it said I already uploaded,
 and ask me to upgrade the copy I upload at others application, but I can't
 find any others application to continue my unsaved entries...
 so what should I do???

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



[android-developers] Re: Test on a real HTC Magic via the web

2009-08-30 Thread Nicholas Albion

How do you install an application on the Perfecto remote devices?  Do
you have to install from android Market?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Changes to ItemizedOverlay

2009-08-08 Thread Nicholas Albion

What are the best practices with regards to modifying the elements
within an ItemizedOverlay after calling populate()?

I noticed that it doesn't seem to handle removals of items from the
middle of the list as I had hoped.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Australian Android Developers - Drop me a line

2009-07-30 Thread Nicholas Albion

I googled for Sydney Android Developers User Group and it came up
with nothing but this post.

Do you have a link?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] CustomButton

2009-06-01 Thread Nicholas Albion

I'm trying to create a simple on a black background view with 2 (maybe
3) clickable images which toggle between 2 graphics each depending on
whether they are clicked or not.  My code is below, I have the
following issues:

1) Using StateListDrawable, I can get the buttons to change state
when user navigates up/down, but they do not seem to respond to touch
screen events (standard Button and ImageButtons do).
2) I haven't figured out yet how to handle button click events (but
ignore navigating from one to the other by up/down key presses)
3) The background is not all black
4) I want the buttons to be centered vertically, currently the first
one is right at the top of the screen.


class CustomImageButton extends Button { // View { //ImageButton {
public CustomImageButton(Context context, Bitmap imgSelected, Bitmap
imgInactive ) {
super(context);
Drawable dSelected = new BitmapDrawable(imgSelected);
Drawable dInactive = new BitmapDrawable(imgInactive);

StateListDrawable images = new StateListDrawable();
images.addState(Button.ENABLED_FOCUSED_STATE_SET, dSelected);
//images.addState(Button.PRESSED_SELECTED_STATE_SET, dSelected);
images.addState(Button.PRESSED_ENABLED_SELECTED_STATE_SET,
dSelected);
images.addState(Button.EMPTY_STATE_SET, dInactive);
setBackgroundDrawable( images );

this.setWidth( imgSelected.getWidth() );
this.setHeight( imgSelected.getHeight() );
//setBackgroundColor(0);
//this.setFocusableInTouchMode(true);
}
}

class MyCanvas extends LinearLayout {
public MyCanvas(Context context) { //throws IOException {
super(context);
this.setOrientation(VERTICAL);
setBackgroundColor(0);


Bitmap image = 
BitmapFactory.decodeResource(context.getResources(),
R.drawable.combinedImages);
int width = image.getWidth() / 3;
int height = image.getHeight();

splash = Bitmap.createBitmap( image, image.getWidth()-width, 0,
width, height );

height = 1;
View button1 = new CustomImageButton(context, true,
Bitmap.createBitmap( image, 0, 0, width, height 
),
Bitmap.createBitmap( image, width, 0, width, 
height ) );
addView( button1 );

View button2 = new CustomImageButton(context, false,
Bitmap.createBitmap( image, width, height, 
width, height ),
Bitmap.createBitmap( image, 0, height, width, 
height ) );
addView( button2 );
}
}

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