[android-beginners] Google map in Emulator?

2010-05-25 Thread Gauri Deshpande
Hi all,
I am trying the MapView tutorial at
http://developer.android.com/resources/tutorials/views/hello-mapview.html. I
did exactly as mentioned in the tutorial but it doesn't display the map, it
just displays the grey grid.

I tried this on 1.5 sdk and also on 2.1 and 2.2 sdk (using Google APIs avd).
Still no luck.

I have got the debug key - 0FnFCLa8suMm5-kc3giDvproCRgPpOkpFLX3Ang which I
updated in the main.xml file.

- I also added INTERNET permission in Manifest file.
- Also have added uses-library android:name=com.google.android.maps / in
Manifest.

The app launches but doesn't display the graph.

Another thing, the pre-built Maps application in the emulator also doesn't
show the Map. It just shows this application requires a working data
connection.

My windows computer has internet connectivity. Am I missing something? Do I
need any other settings?

Thanks
Gauri

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Synchronous activity?

2010-05-25 Thread tim
In the following: 
http://developer.android.com/guide/topics/manifest/intent-filter-element.html

android:priority
...
*It controls the order in which broadcast receivers are
executed to receive broadcast messages. Those with higher priority
values are called before those with lower values. (The order applies
only to synchronous messages; it's ignored for asynchronous messages.)

I thought intents are asynchronous and hence we cannot start activity
synchronously? Can we start(and how?) activity synchronously? What are
examples of synchronous messages?

Thanks

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Getting On-Device Debugging to work

2010-05-25 Thread Justin Anderson
Are you using Windows?  If so, had you EVER connected your phone to your
device without USB debugging enabled?  I know this used to cause problems
but I thought they had fixed it...

I gave some steps a while back that might help you out:

http://groups.google.com/group/android-beginners/browse_thread/thread/bd9f0690e0171ffd/71292b2e7d98d9a1?lnk=gstq=samsung+galaxy#71292b2e7d98d9a1

Hope that helps,
Justin

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


On Mon, May 24, 2010 at 5:39 PM, Ubuntu Explorer
ubuntuexplo...@gmail.comwrote:

 Hi,
 I tried the instructions given in
 http://developer.android.com/guide/developing/device.html

 to setup Samsung Galaxy Spica.

 However, the device does not show up in the adb devices list.

 I have enabled USB debugging on device as well.

 I use vendor ID = 04e8 for Samsung.

 Regards,
 UE.

 --
 You received this message because you are subscribed to the Google
 Groups Android Beginners group.

 NEW! Try asking and tagging your question on Stack Overflow at
 http://stackoverflow.com/questions/tagged/android

 To unsubscribe from this group, send email to
 android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-beginners?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] can i re-install an app without shutting down the emulator?

2010-05-25 Thread eudokija
And there's also
adb reinstall foo.apk
which is the same as adb install -r

24.05.2010 23:32 пользователь Donnie Myers d3myer...@gmail.com написал:

I am not sure about the command line options but with the IDEs (such as
netbeans) after every change you make, when you select to run the app on
your emulator, it uninstalls the old apk and installs your latest
automatically. It does do this while your emulator is running. After the
uninstall and then the new install, the app launches. But maybe I
misunderstood what you are doing.

Donnie



On May 24, 2010, at 5:22 AM, Robert P. J. Day rpj...@crashcourse.ca
wrote:


  if i want to ...

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Re: ListView Selection Help

2010-05-25 Thread Justin Anderson
Can you give a little more detail about how the workflow of your application
is supposed to work?  We might be able to give some better suggestions on
how best implement it.

Seems to me like you have two different options, but they are drastically
different and the one you would want to choose would depend on how your app
works:

   1. Switch to a new Activity.  You do this by creating a new intent and
   passing in the class of the new Activity in the constructor.  You then call
   startActivity from the current context (most likely an Activity) and that
   will launch the new Activity.  However, you have to set up your activities
   with the correct behavior when you do this... e.g. when you go to the new
   activity should it replace the current one on the Activity stack or should
   the user go back to it if they hit the back button? See
   http://developer.android.com/guide/topics/intents/intents-filters.htmlfor
more info on Intents...
   2. Use some mechanism to store a setting (most likely using
   SharedPreferences but there are other methods available as well) and read
   that setting in the onCreate method of your activity to determine which
   layout to load.  This would require the user to exit out of the application
   and restart it to see the new layout though... (but I have seen this
   mechanism used in quite a few apps, just put a note or something saying that
   changing the setting requires a restart). See
   http://developer.android.com/guide/topics/data/data-storage.html for more
   info on storing data...

I'm sure there are many other ways to go about this but these seem like the
most intuitive to me off the top of my head.  Again, if you were to walk us
through the entire user experience we might be able to give some more
precise advice/feedback...

Hope that helps somewhat,
Justin


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


On Mon, May 24, 2010 at 5:48 PM, chris_green1...@yahoo.com 
chris_green1...@yahoo.com wrote:

 How would you do it via Switching the Activity

 On May 24, 7:34 pm, Justin Anderson janderson@gmail.com wrote:
  Hmmm... that may be possible but I'm not sure exactly how to do it.  I
 know
  there have been lots of people who have tried but I'm not sure if they
 have
  come up with a solution...
 
  If you can't figure it out you can always set it up so that the layout
  changes requires a restart of your app...  You can then save a setting
 and
  use that at startup to determine which layout to load.
 
  On May 24, 2010 5:18 PM, chris_green1...@yahoo.com 
 
  chris_green1...@yahoo.com wrote:
 
  On May 24, 7:02 pm, Justin Anderson janderson@gmail.com wrote:
 
   Typically you would want to...
   On Mon, May 24, 2010 at 4:16 PM, chris_green1...@yahoo.com 
 
   chris_green1...@yahoo.com wrote:
 
On May 24, 5:15 pm, TreKing treking...@gmail.co...
 android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.comandroid-beginners%2Bunsubscr
 i...@googlegroups.comandroid-beginners%2Bunsubscr
 
  i...@googlegroups.com
 
 For more options, visit this group athttp://
groups.google.com/group/android-beginners?hl=...
android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.comandroid-beginners%2Bunsubscr
 i...@googlegroups.comandroid-beginners%2Bunsubscr
 
  i...@googlegroups.com
 
For more options, visit this group at
   http://groups.google.com/group/android-beginners?hl=en
 
  ...
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Beginner...
 
  Im trying to click an item on the list that will load a new layout,
  but when I use setContentView it errors out
 
  --
 
  You received this message because you are subscribed to the Google
  Groups Android Beginners group
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Beginners group.
 
  NEW! Try asking and tagging your question on Stack Overflow athttp://
 stackoverflow.com/questions/tagged/android
 
  To unsubscribe from this group, send email to
  android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com
  For more options, visit this group athttp://
 groups.google.com/group/android-beginners?hl=en

 --
 You received this message because you are subscribed to the Google
 Groups Android Beginners group.

 NEW! Try asking and tagging your question on Stack Overflow at
 http://stackoverflow.com/questions/tagged/android

 To unsubscribe from this group, send email to
 android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-beginners?hl=en


-- 
You received this message because you are 

Re: [android-beginners] Where Clause

2010-05-25 Thread Justin Anderson
Well, what is strSet?

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


On Mon, May 24, 2010 at 8:27 PM, Kevin Brooks bear35...@gmail.com wrote:

 I am trying to pull a group of records based on the value in one of the
 fields.  This is what I have tried but it is returning 0 results:

private String[] From = {Cardfront};
private String Where = SetID +  = ?;
private int setId;


   Cursor cursor = db.query(TABLE_NAME2, From, Where, strSet, null, null,
 null);

 What am I doing wrong?

 Kevin

 --
 You received this message because you are subscribed to the Google
 Groups Android Beginners group.

 NEW! Try asking and tagging your question on Stack Overflow at
 http://stackoverflow.com/questions/tagged/android

 To unsubscribe from this group, send email to
 android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-beginners?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Synchronous activity?

2010-05-25 Thread Justin Anderson
http://developer.android.com/reference/android/content/BroadcastReceiver.html

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


On Tue, May 25, 2010 at 12:55 AM, tim timyt...@gmail.com wrote:

 In the following:
 http://developer.android.com/guide/topics/manifest/intent-filter-element.html

 android:priority
 ...
*It controls the order in which broadcast receivers are
 executed to receive broadcast messages. Those with higher priority
 values are called before those with lower values. (The order applies
 only to synchronous messages; it's ignored for asynchronous messages.)

 I thought intents are asynchronous and hence we cannot start activity
 synchronously? Can we start(and how?) activity synchronously? What are
 examples of synchronous messages?

 Thanks

 --
 You received this message because you are subscribed to the Google
 Groups Android Beginners group.

 NEW! Try asking and tagging your question on Stack Overflow at
 http://stackoverflow.com/questions/tagged/android

 To unsubscribe from this group, send email to
 android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-beginners?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Finger swipe in Android API level 3 (OS 1.5) ?

2010-05-25 Thread Justin Anderson
I know this is late, but hopefully it will help you and others out there
still programming stuff to be compatible with 1.5...  This is a simplified
version of a class that I use to detect a vertical swipe on a Gallery
object.  To see it in action and test it out you can take a look at
AppSwipe! on the market (It's free...)

In order to get the swipe working exactly the way you want it to you may
have to fiddle around with the three integers used for detecting a swipe.

public class GallerySwipeUpDetector extends SimpleOnGestureListener
implements OnTouchListener
{
private Gallery m_gallery;
GestureDetector m_detector;
int m_swipeMaxOffPath; //Maximum horizontal tolerance for detecting a
vertical swipe
int m_swipeMinDistance; //Minimum distance in order to detect a vertical
swipe
int m_swipeMinVelocity; //Minimum velocity (pixels/second) in order to
detect a vertical swipe

public GallerySwipeUpDetector(Gallery gallery)
{
m_gallery = gallery;
m_detector = new GestureDetector(this);
m_swipeMaxOffPath = 25;
m_swipeMinDistance = 10;
m_swipeMinVelocity = 10;
}

@Override
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
float velocityY)
{
if (Math.abs(e1.getX() - e2.getX())  m_swipeMaxOffPath 
e1.getY() - e2.getY() = m_swipeMinDistance 
Math.abs(velocityY) = m_swipeMinVelocity)
{
int pos = m_gallery.pointToPosition((int)e1.getX(),
(int)e1.getY());
int firstPos = m_gallery.getFirstVisiblePosition();
int viewablePos = pos - firstPos;
View swipedView = m_gallery.getChildAt(viewablePos);

if (swipedView != null)
executeSwipeUpAction(pos);

return true;
}

return false;
}

protected void executeSwipeUpAction(int pos)
{
//Do stuff
}

@Override
public boolean onTouch(View v, MotionEvent event)
{
return m_detector == null ? false : m_detector.onTouchEvent(event);
}
}

I would then use this class as follows:

Gallery myGallery = (Gallery) findViewById(R.id.myGalleryID);
myGallery.setOnTouchListener(new GallerySwipeUpDetector(myGallery));

There may be a better way to do this, but this worked for me.  If someone
else has another solution that works better then I would be interested as
well.  I really don't like having to call a method on my gallery and pass it
in as an argument to my listener (I think it's ugly and probably a poor
design), but that was the only thing I could think of to do and it works.

Hope this helps,
Justin

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


On Fri, May 21, 2010 at 3:31 PM, Justin Anderson magouyaw...@gmail.comwrote:

 It is admittedly difficult to get it to work in 1.5...

 I have implemented it for my app on the market (AppSwipe!) but it was not
 easy.  It might be a day or two before I have a chance to sit down and look
 at my code but as soon as I can, I will post something here to at least
 point you in the right direction.

 Thanks,

 Justin

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


 On Tue, May 18, 2010 at 11:58 AM, Chris Ross 
 cross+goo...@distal.comcross%2bgoo...@distal.com
  wrote:


  Hi there.  When searching for information about how to code up
 recognition of a finger swipe across the screen, I find most references to
 the Gesture API added in API level 4 (OS 1.6).  However, there are still
 quite a few devices (The HTC Droid Eris, for example.  And the ole G1.) that
 are running 1.5.

  The rest of my app is working just fine requiring only API level 3, but I
 would like to add swipe recognition.  The home screens on the
 afore-mentioned OS 1.5 devices detect swipes to go across pages, so it must
 be possible in there somewhere.  It is just that it's really hard before the
 API level 4 Gesture code came in, or is it really effectively not possible?

  Can anyone tell me how to detect swipes (just a directional swipe left or
 right across the screen) in OS 1.5 (API  level 3, or below) ?

  Thanks...

  - Chris


 --
 You received this message because you are subscribed to the Google
 Groups Android Beginners group.

 NEW! Try asking and tagging your question on Stack Overflow at
 http://stackoverflow.com/questions/tagged/android

 To unsubscribe from this group, send email to
 android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-beginners?hl=en




Re: [android-beginners] Getting On-Device Debugging to work

2010-05-25 Thread Chi Kit Leung
USB debugging enabled always cause me problem

On Tue, May 25, 2010 at 5:13 PM, Justin Anderson janderson@gmail.comwrote:

 Are you using Windows?  If so, had you EVER connected your phone to your
 device without USB debugging enabled?  I know this used to cause problems
 but I thought they had fixed it...

 I gave some steps a while back that might help you out:


 http://groups.google.com/group/android-beginners/browse_thread/thread/bd9f0690e0171ffd/71292b2e7d98d9a1?lnk=gstq=samsung+galaxy#71292b2e7d98d9a1

 Hope that helps,
 Justin

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



 On Mon, May 24, 2010 at 5:39 PM, Ubuntu Explorer ubuntuexplo...@gmail.com
  wrote:

 Hi,
 I tried the instructions given in
 http://developer.android.com/guide/developing/device.html

 to setup Samsung Galaxy Spica.

 However, the device does not show up in the adb devices list.

 I have enabled USB debugging on device as well.

 I use vendor ID = 04e8 for Samsung.

 Regards,
 UE.

 --
 You received this message because you are subscribed to the Google
 Groups Android Beginners group.

 NEW! Try asking and tagging your question on Stack Overflow at
 http://stackoverflow.com/questions/tagged/android

 To unsubscribe from this group, send email to
 android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-beginners?hl=en


  --
 You received this message because you are subscribed to the Google
 Groups Android Beginners group.

 NEW! Try asking and tagging your question on Stack Overflow at
 http://stackoverflow.com/questions/tagged/android

 To unsubscribe from this group, send email to
 android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-beginners?hl=en




-- 
Regards,
Michael Leung
http://www.itblogs.info
http://www.michaelleung.info

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Path Finder

2010-05-25 Thread Ali Murtaza
Hi
I want to prepare a path finder application and i still unable how to create
it.. If any body has a tutorial please reffer me.

-- 
Ali Murtaza

BCSF06M021
Research Assistant
Data Virtulization Ware House
PUCIT, Lahore, Pakistan
ali.murt...@pucit.edu.pk

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Where Clause

2010-05-25 Thread bear35805
It is the string representation of a number which is the SetID I want.

On Tue, May 25, 2010 at 2:29 AM, Justin Anderson janderson@gmail.comwrote:

 Well, what is strSet?


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


 On Mon, May 24, 2010 at 8:27 PM, Kevin Brooks bear35...@gmail.com wrote:

 I am trying to pull a group of records based on the value in one of the
 fields.  This is what I have tried but it is returning 0 results:

private String[] From = {Cardfront};
private String Where = SetID +  = ?;
private int setId;


   Cursor cursor = db.query(TABLE_NAME2, From, Where, strSet, null, null,
 null);

 What am I doing wrong?

 Kevin

 --
 You received this message because you are subscribed to the Google
 Groups Android Beginners group.

 NEW! Try asking and tagging your question on Stack Overflow at
 http://stackoverflow.com/questions/tagged/android

 To unsubscribe from this group, send email to
 android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-beginners?hl=en


  --
 You received this message because you are subscribed to the Google
 Groups Android Beginners group.

 NEW! Try asking and tagging your question on Stack Overflow at
 http://stackoverflow.com/questions/tagged/android

 To unsubscribe from this group, send email to
 android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-beginners?hl=en




-- 
Kevin
Proverbs 21:6

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] easy to join

2010-05-25 Thread t mal
Everyone,
check out this new online site, its going to be bigger in future. New
shopping model will make you save more money while you shop
online….how good is that ??
http://www.shoppingreps.com?SourceId=11221
Simply register, that’s free, and start to pick up some fantastic
bargains, but don't forget to use the “refer your friends” button to
spread the word.

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Re: Getting On-Device Debugging to work

2010-05-25 Thread Ubuntu Explorer
I am using Ubuntu 10.04.

Regards
UE


On May 25, 9:07 pm, Chi Kit Leung michaelchi...@gmail.com wrote:
 USB debugging enabled always cause me problem

 On Tue, May 25, 2010 at 5:13 PM, Justin Anderson 
 janderson@gmail.comwrote:



  Are you using Windows?  If so, had you EVER connected your phone to your
  device without USB debugging enabled?  I know this used to cause problems
  but I thought they had fixed it...

  I gave some steps a while back that might help you out:

 http://groups.google.com/group/android-beginners/browse_thread/thread...

  Hope that helps,
  Justin

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

  On Mon, May 24, 2010 at 5:39 PM, Ubuntu Explorer ubuntuexplo...@gmail.com
   wrote:

  Hi,
  I tried the instructions given in
 http://developer.android.com/guide/developing/device.html

  to setup Samsung Galaxy Spica.

  However, the device does not show up in the adb devices list.

  I have enabled USB debugging on device as well.

  I use vendor ID = 04e8 for Samsung.

  Regards,
  UE.

  --
  You received this message because you are subscribed to the Google
  Groups Android Beginners group.

  NEW! Try asking and tagging your question on Stack Overflow at
 http://stackoverflow.com/questions/tagged/android

  To unsubscribe from this group, send email to
  android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-beginners?hl=en

   --
  You received this message because you are subscribed to the Google
  Groups Android Beginners group.

  NEW! Try asking and tagging your question on Stack Overflow at
 http://stackoverflow.com/questions/tagged/android

  To unsubscribe from this group, send email to
  android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-beginners?hl=en

 --
 Regards,
 Michael Leunghttp://www.itblogs.infohttp://www.michaelleung.info

 --
 You received this message because you are subscribed to the Google
 Groups Android Beginners group.

 NEW! Try asking and tagging your question on Stack Overflow 
 athttp://stackoverflow.com/questions/tagged/android

 To unsubscribe from this group, send email to
 android-beginners+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://groups.google.com/group/android-beginners?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Finger swipe in Android API level 3 (OS 1.5) ?

2010-05-25 Thread Chris Ross

  Thanks much.  I had found something similar elsewhere in my searching, and as 
you ended up making a subclass of SimpleOnGestureListener.  As it happens, I 
made that class inside of my primary Activity class, so I didn't have to pass 
the object into the instantiator like you did, but the same have to work back 
into the main object effectively applies, and I see your point.

  If I get to a point where I'm willing to ignore the 1.5 OS revision, I'll see 
what else can be done with the new gestures support added in API level 4...

  - Chris

On May 25, 2010, at 3:50 AM, Justin Anderson wrote:

 I know this is late, but hopefully it will help you and others out there 
 still programming stuff to be compatible with 1.5...  This is a simplified 
 version of a class that I use to detect a vertical swipe on a Gallery object. 
  To see it in action and test it out you can take a look at AppSwipe! on 
 the market (It's free...)
 
 In order to get the swipe working exactly the way you want it to you may have 
 to fiddle around with the three integers used for detecting a swipe.
 
 public class GallerySwipeUpDetector extends SimpleOnGestureListener 
 implements OnTouchListener
 {
 private Gallery m_gallery;
 GestureDetector m_detector;
 int m_swipeMaxOffPath; //Maximum horizontal tolerance for detecting a 
 vertical swipe
 int m_swipeMinDistance; //Minimum distance in order to detect a vertical 
 swipe
 int m_swipeMinVelocity; //Minimum velocity (pixels/second) in order to 
 detect a vertical swipe
 
 public GallerySwipeUpDetector(Gallery gallery)
 {
 m_gallery = gallery;
 m_detector = new GestureDetector(this);
 m_swipeMaxOffPath = 25;
 m_swipeMinDistance = 10;
 m_swipeMinVelocity = 10;
 }
 
 @Override
 public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, 
 float velocityY)
 {
 if (Math.abs(e1.getX() - e2.getX())  m_swipeMaxOffPath  
 e1.getY() - e2.getY() = m_swipeMinDistance  
 Math.abs(velocityY) = m_swipeMinVelocity)
 {
 int pos = m_gallery.pointToPosition((int)e1.getX(), 
 (int)e1.getY());
 int firstPos = m_gallery.getFirstVisiblePosition();
 int viewablePos = pos - firstPos;
 View swipedView = m_gallery.getChildAt(viewablePos);
 
 if (swipedView != null)
 executeSwipeUpAction(pos);
 
 return true;
 }
 
 return false;
 }
 
 protected void executeSwipeUpAction(int pos)
 {
 //Do stuff
 }
 
 @Override
 public boolean onTouch(View v, MotionEvent event) 
 {
 return m_detector == null ? false : m_detector.onTouchEvent(event);
 }
 }
 
 I would then use this class as follows:
 
 Gallery myGallery = (Gallery) findViewById(R.id.myGalleryID);
 myGallery.setOnTouchListener(new GallerySwipeUpDetector(myGallery));
 
 There may be a better way to do this, but this worked for me.  If someone 
 else has another solution that works better then I would be interested as 
 well.  I really don't like having to call a method on my gallery and pass it 
 in as an argument to my listener (I think it's ugly and probably a poor 
 design), but that was the only thing I could think of to do and it works.
 
 Hope this helps,
 Justin
 
 --
 There are only 10 types of people in the world...
 Those who know binary and those who don't.
 --
 
 
 On Fri, May 21, 2010 at 3:31 PM, Justin Anderson magouyaw...@gmail.com 
 wrote:
 It is admittedly difficult to get it to work in 1.5...
 
 I have implemented it for my app on the market (AppSwipe!) but it was not 
 easy.  It might be a day or two before I have a chance to sit down and look 
 at my code but as soon as I can, I will post something here to at least point 
 you in the right direction.
 
 Thanks,
 
 Justin
 
 --
 There are only 10 types of people in the world...
 Those who know binary and those who don't.
 --
 
 
 On Tue, May 18, 2010 at 11:58 AM, Chris Ross cross+goo...@distal.com wrote:
 
  Hi there.  When searching for information about how to code up recognition 
 of a finger swipe across the screen, I find most references to the Gesture 
 API added in API level 4 (OS 1.6).  However, there are still quite a few 
 devices (The HTC Droid Eris, for example.  And the ole G1.) that are running 
 1.5.
 
  The rest of my app is working just fine requiring only API level 3, but I 
 would like to add swipe recognition.  The home screens on the afore-mentioned 
 OS 1.5 devices detect swipes to go across pages, so it must be possible in 
 there somewhere.  It is just 

[android-beginners] Problem getting a linearlayout to be scrollable

2010-05-25 Thread Mike Topper
Hey,

I'm having problems with a layout I'm currently working with.
Everything looks fine with it in portrait mode, but when i switch to
landscape, the linearlayout that encompasses the textviews and
edittexts go below the end of the screen and you can't see/edit them.

I tried wrapping that linearlayout in a scrollview, but it didn't seem
to do anything.

below is the xml, i'm trying to wrap that first linear layout in a scrollview.

any help would be greatly appreciated.


?xml version=1.0 encoding=utf-8?
RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android;
android:orientation=vertical android:layout_width=fill_parent
android:layout_height=fill_parent
LinearLayout android:orientation=vertical
android:layout_width=fill_parent
android:layout_alignParentTop=true
android:layout_height=wrap_content


TextView android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=@string/customer_id /
LinearLayout android:orientation=horizontal
android:layout_width=fill_parent
android:layout_height=wrap_content
EditText android:id=@+id/customerid_field
  android:layout_width=wrap_content
  android:layout_height=wrap_content
  android:layout_weight=1
  android:hint=@string/customer_id
  android:singleLine=true /
Button android:id=@+id/customerSelectButton
  android:text=@string/button_get_customers
android:layout_width=wrap_content
android:layout_height=wrap_content
android:bufferType=editable
/
/LinearLayout
TextView android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=@string/po_number /
EditText android:id=@+id/ponumber_field
  android:layout_width=fill_parent
android:layout_height=wrap_content
android:layout_weight=1
android:hint=@string/po_number
android:singleLine=true /

TextView android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=@string/packet /
EditText android:id=@+id/packet_field
  android:layout_width=fill_parent
android:layout_height=wrap_content
android:layout_weight=1
android:hint=@string/packet
android:singleLine=true /

TextView android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=@string/email /
EditText android:id=@+id/email_field
  android:layout_width=fill_parent
android:layout_height=wrap_content
android:layout_weight=1
android:hint=@string/email
android:singleLine=true /



/LinearLayout

LinearLayout
style=@android:style/ButtonBar

android:layout_width=fill_parent
android:layout_height=wrap_content
android:gravity=bottom
android:layout_alignParentBottom=true
android:orientation=horizontal

Button
android:id=@+id/saveOrderButton
android:text=@string/button_create_order
android:layout_height=wrap_content
android:layout_width=wrap_content
android:layout_weight=1
android:enabled=true/

Button
android:id=@+id/deleteOrderButton
android:text=@string/button_delete_order
android:layout_height=wrap_content
android:layout_width=wrap_content
android:layout_weight=1
android:visibility=gone
android:enabled=false/
/LinearLayout

/RelativeLayout

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] last modified time Contact

2010-05-25 Thread Aivlis
Hi guys,
how can i get the last modified time of a Contact ( Android 2.1)?

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Re: Get data to android app from mysql server

2010-05-25 Thread cellurl
Here's an OS Android project that does similar.  (search for new
URL)
http://code.google.com/p/speedlimit/source/browse/Sean/src/org/wikispeedia/backseatdriverVI/TranslateTask.java

The php (web) side is the following:
http://www.wikispeedia.org/a/marks_bb.php.txt

IMHO, synchronizing sqlite and mysql is tough. I wish tools existed to
help, but I have found none.
You have sports scores which must update quickly I imagine.
I have slower update stuff, so I am seriously considering just a bulk
ftp load daily.
Each app is different...

jim



-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Re: Problem getting a linearlayout to be scrollable

2010-05-25 Thread Mike Topper
Ok It looks like the problem isn't anything to do with the scrollbar,
since when I add another element, the scroll appears.  the problem is
that it seems like the last element is somewhat hidden behind the
other linearlayout buttonbar in landscape mode.

any idea how I can have it so that the first linearlayout will always
sit on top of the second one (that holds the button bar)?

here is a screenshot that shows the issue.  In it you can see that
some of the email textview and all of the email_field is hidden
behind the button bar.


http://i45.tinypic.com/2dt7qmt.jpg


On Tue, May 25, 2010 at 10:32 AM, Mike Topper top...@gmail.com wrote:
 Hey,

 I'm having problems with a layout I'm currently working with.
 Everything looks fine with it in portrait mode, but when i switch to
 landscape, the linearlayout that encompasses the textviews and
 edittexts go below the end of the screen and you can't see/edit them.

 I tried wrapping that linearlayout in a scrollview, but it didn't seem
 to do anything.

 below is the xml, i'm trying to wrap that first linear layout in a scrollview.

 any help would be greatly appreciated.


 ?xml version=1.0 encoding=utf-8?
 RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android;
        android:orientation=vertical android:layout_width=fill_parent
        android:layout_height=fill_parent
        LinearLayout android:orientation=vertical
                android:layout_width=fill_parent
                android:layout_alignParentTop=true
                android:layout_height=wrap_content


                TextView android:layout_width=wrap_content
                        android:layout_height=wrap_content
                        android:text=@string/customer_id /
                LinearLayout android:orientation=horizontal
                        android:layout_width=fill_parent
                        android:layout_height=wrap_content
                        EditText android:id=@+id/customerid_field
                          android:layout_width=wrap_content
                          android:layout_height=wrap_content
                          android:layout_weight=1
                          android:hint=@string/customer_id
                          android:singleLine=true /
                        Button android:id=@+id/customerSelectButton
                          android:text=@string/button_get_customers
                                android:layout_width=wrap_content
                                android:layout_height=wrap_content
                                android:bufferType=editable
                                /
                /LinearLayout
                TextView android:layout_width=wrap_content
                        android:layout_height=wrap_content
                        android:text=@string/po_number /
                EditText android:id=@+id/ponumber_field
                  android:layout_width=fill_parent
                        android:layout_height=wrap_content
                        android:layout_weight=1
                        android:hint=@string/po_number
                        android:singleLine=true /

                TextView android:layout_width=wrap_content
                        android:layout_height=wrap_content
                        android:text=@string/packet /
                EditText android:id=@+id/packet_field
                  android:layout_width=fill_parent
                        android:layout_height=wrap_content
                        android:layout_weight=1
                        android:hint=@string/packet
                        android:singleLine=true /

                TextView android:layout_width=wrap_content
                        android:layout_height=wrap_content
                        android:text=@string/email /
                EditText android:id=@+id/email_field
                  android:layout_width=fill_parent
                        android:layout_height=wrap_content
                        android:layout_weight=1
                        android:hint=@string/email
                        android:singleLine=true /


        /LinearLayout

    LinearLayout
        style=@android:style/ButtonBar

        android:layout_width=fill_parent
        android:layout_height=wrap_content
        android:gravity=bottom
        android:layout_alignParentBottom=true
        android:orientation=horizontal

        Button
                        android:id=@+id/saveOrderButton
                    android:text=@string/button_create_order
            android:layout_height=wrap_content
            android:layout_width=wrap_content
            android:layout_weight=1
            android:enabled=true/

        Button
                        android:id=@+id/deleteOrderButton
                    android:text=@string/button_delete_order
            android:layout_height=wrap_content
            android:layout_width=wrap_content
            android:layout_weight=1
            android:visibility=gone
   

Re: [android-beginners] Installing and running app on HTC Incredible

2010-05-25 Thread Justin Anderson
Try following the steps I outlined in this thread:

http://groups.google.com/group/android-beginners/browse_thread/thread/bd9f0690e0171ffd/71292b2e7d98d9a1?lnk=gstq=samsung+galaxy#71292b2e7d98d9a1

Hope that helps,
Justin

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


On Tue, May 25, 2010 at 10:20 AM, AZ Golfer sethw...@gmail.com wrote:

 I have followed all of the instructions on the android devloper's
 website for developing on a device but I have been unsuccessful.  I
 have an HTC Incredible android phone and I set it to debug mode, then
 I added the code ' android:debuggable=true 'to my manifest.xml
 file.  I downloaded the latest Windows drivers and when I plugged in
 the Incredible to my USB port, there were 2 disk drives recognized on
 the Incredible and then it asked for the ADB driver, which I pointed
 to the downloaded drivers folder.  I got a Windows error saying it
 could not install the hardware.

 Can anyone help me???

 --
 You received this message because you are subscribed to the Google
 Groups Android Beginners group.

 NEW! Try asking and tagging your question on Stack Overflow at
 http://stackoverflow.com/questions/tagged/android

 To unsubscribe from this group, send email to
 android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-beginners?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] building the entirety of android 2.2 on ubuntu 10.04

2010-05-25 Thread Robert P. J. Day

  strictly for the entertainment value, i decided to follow the
instructions here for 64-bit ubuntu:

  http://source.android.com/source/download.html

  as i have a perfectly stock install of ubuntu 10.04, i had to make a
couple tweaks -- some of the packages in the required list have been
slightly renamed and, since i didn't feel like regressing my java 6 to
java 5, i cavalierly ripped out the test for the version of java that
would normally cause the build to fail and typed make.

  a couple hours later, it finished:

...
Generated: (out/target/product/generic/android-info.txt)
Target system fs image:
out/target/product/generic/obj/PACKAGING/systemimage_unopt_intermediates/system.img
Install system fs image: out/target/product/generic/system.img
Target ram disk: out/target/product/generic/ramdisk.img
Target userdata fs image: out/target/product/generic/userdata.img
Installed file list: out/target/product/generic/installed-files.txt
$

  am i to assume then that i successfully built the entire code base
using java 6?  other than numerous compilation warnings, i didn't
notice any build errors.

rday

-- 


Robert P. J. Day   Waterloo, Ontario, CANADA

Linux Consulting, Training and Kernel Pedantry.

Web page:  http://crashcourse.ca
Twitter:   http://twitter.com/rpjday


-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] sql or webservice

2010-05-25 Thread Arlen
How can I feed the android grid with my sql Data through my website?
Does I need a direct connection to my server or can I use
webservices ?
Is there any example of that ?

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] string to double

2010-05-25 Thread Faust Nijhuis
Hello,

Is there an function to change an string with a comma to a double.

example code;

stripline1.Z0 = 123.45 (with point)

DecimalFormat df = new DecimalFormat(#.##);
strip_Z0.setText(df.format(stripline1.Z0));

The value in the textEdit entry will be with a comma or point, depending on
the locale setting.

If  I convert the string, with comma, directly to a double I get a force
close.

How do I transform a string with comma to a string with point.

Faust

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] string to double

2010-05-25 Thread TreKing
On Tue, May 25, 2010 at 3:22 PM, Faust Nijhuis faustnijh...@gmail.comwrote:

 How do I transform a string with comma to a string with point.


By taking 2 seconds to look at the documentation for String. Your answer is
right there. Just try looking.

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Re: Getting On-Device Debugging to work

2010-05-25 Thread Ubuntu Explorer
After lot of searching, I tried the adb binary posted on this site.

http://www.samsungmomentforum.com/samsung-moment-rooting/getting-adb-to-recgonize-moment-under-ubuntu-karmic/?PHPSESSID=31f89574f5ccc1c57cf5cdc2e9591785

And with this binary I am able to detect the Samsung device under adb
devices.

Is there any issue with the adb that I need to update?

Regards,
UE

On May 25, 11:22 pm, Ubuntu Explorer ubuntuexplo...@gmail.com wrote:
 I am using Ubuntu 10.04.

 Regards
 UE

 On May 25, 9:07 pm, Chi Kit Leung michaelchi...@gmail.com wrote:



  USB debugging enabled always cause me problem

  On Tue, May 25, 2010 at 5:13 PM, Justin Anderson 
  janderson@gmail.comwrote:

   Are you using Windows?  If so, had you EVER connected your phone to your
   device without USB debugging enabled?  I know this used to cause problems
   but I thought they had fixed it...

   I gave some steps a while back that might help you out:

  http://groups.google.com/group/android-beginners/browse_thread/thread...

   Hope that helps,
   Justin

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

   On Mon, May 24, 2010 at 5:39 PM, Ubuntu Explorer ubuntuexplo...@gmail.com
wrote:

   Hi,
   I tried the instructions given in
  http://developer.android.com/guide/developing/device.html

   to setup Samsung Galaxy Spica.

   However, the device does not show up in the adb devices list.

   I have enabled USB debugging on device as well.

   I use vendor ID = 04e8 for Samsung.

   Regards,
   UE.

   --
   You received this message because you are subscribed to the Google
   Groups Android Beginners group.

   NEW! Try asking and tagging your question on Stack Overflow at
  http://stackoverflow.com/questions/tagged/android

   To unsubscribe from this group, send email to
   android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-beginners?hl=en

    --
   You received this message because you are subscribed to the Google
   Groups Android Beginners group.

   NEW! Try asking and tagging your question on Stack Overflow at
  http://stackoverflow.com/questions/tagged/android

   To unsubscribe from this group, send email to
   android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-beginners?hl=en

  --
  Regards,
  Michael Leunghttp://www.itblogs.infohttp://www.michaelleung.info

  --
  You received this message because you are subscribed to the Google
  Groups Android Beginners group.

  NEW! Try asking and tagging your question on Stack Overflow 
  athttp://stackoverflow.com/questions/tagged/android

  To unsubscribe from this group, send email to
  android-beginners+unsubscr...@googlegroups.com
  For more options, visit this group 
  athttp://groups.google.com/group/android-beginners?hl=en

 --
 You received this message because you are subscribed to the Google
 Groups Android Beginners group.

 NEW! Try asking and tagging your question on Stack Overflow 
 athttp://stackoverflow.com/questions/tagged/android

 To unsubscribe from this group, send email to
 android-beginners+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://groups.google.com/group/android-beginners?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Null Pointer when trying to access Drawable resources

2010-05-25 Thread Philip H.
I'm brand new to developing for android, so this has been driving me
crazy all day even though I'm sure it's simple.

I'm going through the Hello Form Stuff tutorial and it seems like it
can't find a button resource in the drawable folder.  I've tried
placing the three icons and the XML file in the 'drawable' folder and
all three pixel density variants (ie: '-hdpi').  I've run 'Clean...'
on the project many times and it finds the correct R class, but it's
just not finding the button I've defined.

Here are the relevant parts (almost a straight copy/paste from the
tutorial)
/res/layout/main.xml:
LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:orientation=vertical
android:layout_width=fill_parent
android:layout_height=fill_parent 
Button android:id=@+id/button
android:layout_width=wrap_content
android:layout_height=wrap_content
android:padding=10dp
android:background=@drawable/android_button /
/LinearLayout

/res/drawable/android_button.xml:
selector xmlns:android=http://schemas.android.com/apk/res/android;
item android:drawable=@drawable/android_pressed
android:state_pressed=true /
item android:drawable=@drawable/android_focused
android:state_focused=true /
item android:drawable=@drawable/android_normal /
/selector

HelloFormStuff.java:
final Button button = (Button) findViewById(R.id.button);
Log.v(HelloForms, button.getClass().toString());
button.setOnClickListener(new OnClickListener() { ... }


It was breaking on the line with button.setOnClickListener() so I put
the log command in there and now it breaks on that line instead (I
assume because you can't call getClass() on a null object).

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Where Clause

2010-05-25 Thread Justin Anderson
The code itself looks ok and it looks like some stuff I have in my own
app... which does work.  So the problem has got to lie somewhere else...
Are you sure there are entries in the table?

What happens if you run this statement:
Cursor cursor = db.query(TABLE_NAME2, null, null, null, null, null, null);

This should return every row in table TABLE_NAME2...

Thanks,
Justin

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


On Tue, May 25, 2010 at 7:22 AM, bear35805 bear35...@gmail.com wrote:

 It is the string representation of a number which is the SetID I want.


 On Tue, May 25, 2010 at 2:29 AM, Justin Anderson 
 janderson@gmail.comwrote:

 Well, what is strSet?


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


 On Mon, May 24, 2010 at 8:27 PM, Kevin Brooks bear35...@gmail.comwrote:

 I am trying to pull a group of records based on the value in one of the
 fields.  This is what I have tried but it is returning 0 results:

private String[] From = {Cardfront};
private String Where = SetID +  = ?;
private int setId;


   Cursor cursor = db.query(TABLE_NAME2, From, Where, strSet, null, null,
 null);

 What am I doing wrong?

 Kevin

 --
 You received this message because you are subscribed to the Google
 Groups Android Beginners group.

 NEW! Try asking and tagging your question on Stack Overflow at
 http://stackoverflow.com/questions/tagged/android

 To unsubscribe from this group, send email to
 android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-beginners?hl=en


  --
 You received this message because you are subscribed to the Google
 Groups Android Beginners group.

 NEW! Try asking and tagging your question on Stack Overflow at
 http://stackoverflow.com/questions/tagged/android

 To unsubscribe from this group, send email to
 android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-beginners?hl=en




 --
 Kevin
 Proverbs 21:6

  --
 You received this message because you are subscribed to the Google
 Groups Android Beginners group.

 NEW! Try asking and tagging your question on Stack Overflow at
 http://stackoverflow.com/questions/tagged/android

 To unsubscribe from this group, send email to
 android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-beginners?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Null Pointer when trying to access Drawable resources

2010-05-25 Thread Justin Anderson
I don't think it has to do with android_button.xml... Have you called
setContentView() prior to calling findViewById()?  Also, what is
HelloFormStuff.java... is it an Activity?

Thanks,
Justin

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


On Tue, May 25, 2010 at 5:46 PM, Philip H. philiph...@gmail.com wrote:

 I'm brand new to developing for android, so this has been driving me
 crazy all day even though I'm sure it's simple.

 I'm going through the Hello Form Stuff tutorial and it seems like it
 can't find a button resource in the drawable folder.  I've tried
 placing the three icons and the XML file in the 'drawable' folder and
 all three pixel density variants (ie: '-hdpi').  I've run 'Clean...'
 on the project many times and it finds the correct R class, but it's
 just not finding the button I've defined.

 Here are the relevant parts (almost a straight copy/paste from the
 tutorial)
 /res/layout/main.xml:
 LinearLayout xmlns:android=http://schemas.android.com/apk/res/
 android
android:orientation=vertical
android:layout_width=fill_parent
android:layout_height=fill_parent 
Button android:id=@+id/button
android:layout_width=wrap_content
android:layout_height=wrap_content
android:padding=10dp
android:background=@drawable/android_button /
 /LinearLayout

 /res/drawable/android_button.xml:
 selector xmlns:android=http://schemas.android.com/apk/res/android;
item android:drawable=@drawable/android_pressed
android:state_pressed=true /
item android:drawable=@drawable/android_focused
android:state_focused=true /
item android:drawable=@drawable/android_normal /
 /selector

 HelloFormStuff.java:
final Button button = (Button) findViewById(R.id.button);
Log.v(HelloForms, button.getClass().toString());
button.setOnClickListener(new OnClickListener() { ... }

 
 It was breaking on the line with button.setOnClickListener() so I put
 the log command in there and now it breaks on that line instead (I
 assume because you can't call getClass() on a null object).

 --
 You received this message because you are subscribed to the Google
 Groups Android Beginners group.

 NEW! Try asking and tagging your question on Stack Overflow at
 http://stackoverflow.com/questions/tagged/android

 To unsubscribe from this group, send email to
 android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-beginners?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Re: Null Pointer when trying to access Drawable resources

2010-05-25 Thread Philip H.
OK, so before I posted this, I did a few more things to make sure I
wasn't posting a stupid question and it turns out it was a stupid
mistake.  I'd found a couple questions that may have been the same
issue but none of them were solved.  Since I'd already written this
all up I figured I'd post it anyway just so that anyone else with this
problem could find the answer a little easier.

It occurred to me that the tutorial said to add the OnClickListener
code at the BOTTOM of the onCreate method.  I overlooked this and put
it just before the   setContentView(R.layout.main);   line.  Coming
from the web world where you set your layout last (in certain
frameworks), this made sense.  But once I realized what setting the
layout does, it suddenly clicked that of course the button won't be
defined until you tell android to use the layout that includes it.

Hope this wasn't a waste.

On May 25, 4:46 pm, Philip H. philiph...@gmail.com wrote:
 I'm brand new to developing for android, so this has been driving me
 crazy all day even though I'm sure it's simple.

 I'm going through the Hello Form Stuff tutorial and it seems like it
 can't find a button resource in the drawable folder.  I've tried
 placing the three icons and the XML file in the 'drawable' folder and
 all three pixel density variants (ie: '-hdpi').  I've run 'Clean...'
 on the project many times and it finds the correct R class, but it's
 just not finding the button I've defined.

 Here are the relevant parts (almost a straight copy/paste from the
 tutorial)
 /res/layout/main.xml:
 LinearLayout xmlns:android=http://schemas.android.com/apk/res/
 android
         android:orientation=vertical
         android:layout_width=fill_parent
         android:layout_height=fill_parent 
         Button android:id=@+id/button
                 android:layout_width=wrap_content
                 android:layout_height=wrap_content
                 android:padding=10dp
                 android:background=@drawable/android_button /
 /LinearLayout

 /res/drawable/android_button.xml:
 selector xmlns:android=http://schemas.android.com/apk/res/android;
         item android:drawable=@drawable/android_pressed
                 android:state_pressed=true /
         item android:drawable=@drawable/android_focused
                 android:state_focused=true /
         item android:drawable=@drawable/android_normal /
 /selector

 HelloFormStuff.java:
         final Button button = (Button) findViewById(R.id.button);
         Log.v(HelloForms, button.getClass().toString());
         button.setOnClickListener(new OnClickListener() { ... }

 
 It was breaking on the line with button.setOnClickListener() so I put
 the log command in there and now it breaks on that line instead (I
 assume because you can't call getClass() on a null object).

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Re: Null Pointer when trying to access Drawable resources

2010-05-25 Thread Philip H.
I wish I'd asked the question sooner, you figured out my problem in
like 2 minutes.  Instead I wasted a few hours :)

Yes, HelloFormStuff is the main activity.

On May 25, 4:57 pm, Justin Anderson janderson@gmail.com wrote:
 I don't think it has to do with android_button.xml... Have you called
 setContentView() prior to calling findViewById()?  Also, what is
 HelloFormStuff.java... is it an Activity?

 Thanks,
 Justin

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

 On Tue, May 25, 2010 at 5:46 PM, Philip H. philiph...@gmail.com wrote:
  I'm brand new to developing for android, so this has been driving me
  crazy all day even though I'm sure it's simple.

  I'm going through the Hello Form Stuff tutorial and it seems like it
  can't find a button resource in the drawable folder.  I've tried
  placing the three icons and the XML file in the 'drawable' folder and
  all three pixel density variants (ie: '-hdpi').  I've run 'Clean...'
  on the project many times and it finds the correct R class, but it's
  just not finding the button I've defined.

  Here are the relevant parts (almost a straight copy/paste from the
  tutorial)
  /res/layout/main.xml:
  LinearLayout xmlns:android=http://schemas.android.com/apk/res/
  android
         android:orientation=vertical
         android:layout_width=fill_parent
         android:layout_height=fill_parent 
         Button android:id=@+id/button
                 android:layout_width=wrap_content
                 android:layout_height=wrap_content
                 android:padding=10dp
                 android:background=@drawable/android_button /
  /LinearLayout

  /res/drawable/android_button.xml:
  selector xmlns:android=http://schemas.android.com/apk/res/android;
         item android:drawable=@drawable/android_pressed
                 android:state_pressed=true /
         item android:drawable=@drawable/android_focused
                 android:state_focused=true /
         item android:drawable=@drawable/android_normal /
  /selector

  HelloFormStuff.java:
         final Button button = (Button) findViewById(R.id.button);
         Log.v(HelloForms, button.getClass().toString());
         button.setOnClickListener(new OnClickListener() { ... }

  
  It was breaking on the line with button.setOnClickListener() so I put
  the log command in there and now it breaks on that line instead (I
  assume because you can't call getClass() on a null object).

  --
  You received this message because you are subscribed to the Google
  Groups Android Beginners group.

  NEW! Try asking and tagging your question on Stack Overflow at
 http://stackoverflow.com/questions/tagged/android

  To unsubscribe from this group, send email to
  android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-beginners?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Re: Null Pointer when trying to access Drawable resources

2010-05-25 Thread Justin Anderson
* I wish I'd asked the question sooner, you figured out my problem in
 like 2 minutes.  Instead I wasted a few hours :)
*
Been there. Done that.  ;-)

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


On Tue, May 25, 2010 at 6:01 PM, Philip H. philiph...@gmail.com wrote:

 I wish I'd asked the question sooner, you figured out my problem in
 like 2 minutes.  Instead I wasted a few hours :)

 Yes, HelloFormStuff is the main activity.

 On May 25, 4:57 pm, Justin Anderson janderson@gmail.com wrote:
  I don't think it has to do with android_button.xml... Have you called
  setContentView() prior to calling findViewById()?  Also, what is
  HelloFormStuff.java... is it an Activity?
 
  Thanks,
  Justin
 
  --
  There are only 10 types of people in the world...
  Those who know binary and those who don't.
  --
 
  On Tue, May 25, 2010 at 5:46 PM, Philip H. philiph...@gmail.com wrote:
   I'm brand new to developing for android, so this has been driving me
   crazy all day even though I'm sure it's simple.
 
   I'm going through the Hello Form Stuff tutorial and it seems like it
   can't find a button resource in the drawable folder.  I've tried
   placing the three icons and the XML file in the 'drawable' folder and
   all three pixel density variants (ie: '-hdpi').  I've run 'Clean...'
   on the project many times and it finds the correct R class, but it's
   just not finding the button I've defined.
 
   Here are the relevant parts (almost a straight copy/paste from the
   tutorial)
   /res/layout/main.xml:
   LinearLayout xmlns:android=http://schemas.android.com/apk/res/
   android
  android:orientation=vertical
  android:layout_width=fill_parent
  android:layout_height=fill_parent 
  Button android:id=@+id/button
  android:layout_width=wrap_content
  android:layout_height=wrap_content
  android:padding=10dp
  android:background=@drawable/android_button /
   /LinearLayout
 
   /res/drawable/android_button.xml:
   selector xmlns:android=http://schemas.android.com/apk/res/android;
  item android:drawable=@drawable/android_pressed
  android:state_pressed=true /
  item android:drawable=@drawable/android_focused
  android:state_focused=true /
  item android:drawable=@drawable/android_normal /
   /selector
 
   HelloFormStuff.java:
  final Button button = (Button) findViewById(R.id.button);
  Log.v(HelloForms, button.getClass().toString());
  button.setOnClickListener(new OnClickListener() { ... }
 
   
   It was breaking on the line with button.setOnClickListener() so I put
   the log command in there and now it breaks on that line instead (I
   assume because you can't call getClass() on a null object).
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Beginners group.
 
   NEW! Try asking and tagging your question on Stack Overflow at
  http://stackoverflow.com/questions/tagged/android
 
   To unsubscribe from this group, send email to
   android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com
 android-beginners%2bunsubscr...@googlegroups.comandroid-beginners%252bunsubscr...@googlegroups.com
 
   For more options, visit this group at
  http://groups.google.com/group/android-beginners?hl=en

 --
 You received this message because you are subscribed to the Google
 Groups Android Beginners group.

 NEW! Try asking and tagging your question on Stack Overflow at
 http://stackoverflow.com/questions/tagged/android

 To unsubscribe from this group, send email to
 android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-beginners?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] How do I draw onto an app using an XML layout?

2010-05-25 Thread T1000
How do I draw shapes in an app that uses an XML layout? All of the 
examples that I've found only draw the shapes without using XML!
On the android site 
here,http://developer.android.com/guide/topics/graphics/index.html

it says:

If you'll be drawing some simple graphics (images, shapes, colors, 
pre-defined animations, etc.), then you should probably just draw to 
the background of a View or to the content of an ImageView in your layout.


How do I do that? Is there some example code somewhere on how to do 
this? Something like the Hello Android with the code to draw a circle 
on an ImageView? HELP! Thanks.



--
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en