[android-developers] registerForContextMenu not working

2010-09-10 Thread JasonMP
Hi everyone, My context menus are not registering when called. In addition setOnItemClickListener is also not working. Any ideas why this is happening? @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setC

[android-developers] ListView contextmenu and onItemClickListener not working

2010-09-09 Thread JasonMP
I have a tab activity with three tabs and I want to display a listview in each tab. The list populates correctly, but for some reason I can not get the context menu or itemclicklistener to recognize gestures on the listviews. Anyone have any ideas why this might be? Below is my onCreate method:

[android-developers] Re: Null pointer exception

2010-01-06 Thread JasonMP
ll > 3. Take a look inside Android source and specifically Activity.java: > 3604 > Just a guess :) > > On Jan 5, 4:02 pm, JasonMP wrote: > > > > > Ok, I tried gino's idea with initializing my arrays differently.  I > > also changed there names so that the

[android-developers] Re: Null pointer exception

2010-01-05 Thread JasonMP
e somewhere is null when it should be instantiated. Perhaps > the intent is started quicker or without the bundle somehow so you get > a nullpointer exception? > > On 31 dec 2009, 15:57, JasonMP wrote: > > > > > yes, Select.class is another one of my files.  throughout my

[android-developers] Re: Null pointer exception

2009-12-31 Thread JasonMP
This is bizarre. It works fine from the OnItemClick() of my OnItemClickListener attached to my ListView. Just not inside the onContextItemSelected. *scratches head* On Dec 31, 9:57 am, JasonMP wrote: > yes, Select.class is another one of my files.  throughout my app there > are a few dif

[android-developers] Re: Null pointer exception

2009-12-31 Thread JasonMP
2) and throughout your code > > Log.d( TAG, DebugText ); > > where TAG is a string that is unique to you, and "DebugText" is something > useful to identify the part of the program you're interested in. > > * > > > > On Wed, Dec 30, 2009 at 11:32 AM, Jas

[android-developers] Re: Null pointer exception

2009-12-30 Thread JasonMP
oon as the new activity receives focus is crashes. On Dec 30, 1:58 pm, JasonMP wrote: > package com.mallet.dtool; > > import android.app.AlertDialog; > import android.app.TabActivity; > import android.app.AlertDialog.Builder; > import android.content.DialogInterface; >

[android-developers] Re: Null pointer exception

2009-12-30 Thread JasonMP
String[] from = new String[]{//DB columns}; int[] to = new int[]{//Layout Elements}; SimpleCursorAdapter items = new SimpleCursorAdapter(this, R.layout.item_row, c, from, to); aList.setAdapter(items); } } On Dec 30, 1:41 pm, JasonMP wr

[android-developers] Re: Null pointer exception

2009-12-30 Thread JasonMP
include more of > your code.  You probably have something special in there you don't want to > share... just make what you post generic enough so we can see the construct > of your whole activity. > > all the best, steve. > > > > On Wed, Dec 30, 2009 at 10:10 AM, Ja

[android-developers] Re: Null pointer exception

2009-12-30 Thread JasonMP
t; > On Dec 30, 8:39 am, JasonMP wrote: > > > > > Anyone know what would cause this error? > > > 12-30 10:26:50.858: ERROR/AndroidRuntime(921): Uncaught handler: > > thread main exiting due to uncaught exception > > > 12-30 10:26:50.928: ERROR/AndroidRunt

[android-developers] Null pointer exception

2009-12-30 Thread JasonMP
Anyone know what would cause this error? 12-30 10:26:50.858: ERROR/AndroidRuntime(921): Uncaught handler: thread main exiting due to uncaught exception 12-30 10:26:50.928: ERROR/AndroidRuntime(921): java.lang.RuntimeException: Unable to stop activity {com.mallet.dtool/ com.mallet.dtool.Sheet}: ja

[android-developers] ListActivity and headers giving me an odd side effect

2009-12-28 Thread JasonMP
Hello, I'm getting some odd side effects when I set a header to my ListActivities. The ListActivity actually allows you to scroll up "behind" the header and click...which sends my app into a fit of errors b/c my Lists are connected to a Cursor and selecting behind the header returns a value of -1

[android-developers] Dynamic Spinners

2009-12-23 Thread JasonMP
Hello, I'm attempting to create and display Spinner view and an EditText view when the user hits a button. I can create these with .addView, and assign Ids with .setId() but then how would I call .getSelectedItem () or .getText() on them? Heres some of my code: attrLayout = (LinearLayout)

[android-developers] Programmatically set EditText to only accept integers

2009-12-22 Thread JasonMP
Hi, Essentially I want to achieve ' android:numeric="signed" ' programmatically. I've looked at the setKeyListener method but feel that I'm missing something and shouldn't have to recreate the wheel here. Is there a simple way to do this? -- You received this message because you are subscribed

[android-developers] Re: Accessing images from gallery

2009-11-24 Thread JasonMP
: > JasonMP wrote: > > Well the console view in eclipse spits this out when I start the > > emulator: > > > ActivityManager: DDM dispatch reg wait timeout > > ActivityManager: Can't dispatch DDM chunk 52454151: no handler defined > > That is not DDMS. That

[android-developers] Re: Accessing images from gallery

2009-11-24 Thread JasonMP
(4015): ... 11 more On Nov 23, 8:46 pm, Mark Murphy wrote: > JasonMP wrote: > > Well the console view in eclipse spits this out when I start the > > emulator: > > > ActivityManager: DDM dispatch reg wait timeout > > ActivityManager: Can't dispatch DDM chunk 5245

[android-developers] Re: Accessing images from gallery

2009-11-23 Thread JasonMP
there. I knew about using the logcat to view errors in the emulator, is there a way to do that when I'm testing on the phone? Its an HTC G1 btw. On Nov 23, 8:13 pm, Mark Murphy wrote: > JasonMP wrote: > > Hi, > > > I'm a mess. > > > I'm using the blow co

[android-developers] Accessing images from gallery

2009-11-23 Thread JasonMP
Hi, I'm a mess. I'm using the blow code to open the gallery and grab an image for an incon im gong to store in a database and access later to populate a listview attached to a simpleCursorAdapter. //inside contextmenu Intent intent = new Intent(); intent.setType("i

[android-developers] Re: binding images from assets to a simpleCursorAdapter

2009-11-23 Thread JasonMP
Well then I am probably doing this the wrong way. Essentially what i want to accomplish is for a user to be able to select a picture from the sdcard as an avatar/logo/profile pic/etc and have that image reference stored in my database. Is there an easy way to do this? On Nov 23, 3:05 pm, Mark Mu

[android-developers] binding images from assets to a simpleCursorAdapter

2009-11-23 Thread JasonMP
Hello, I was poking around in the documentation for the simpleCursorAdapter and I read that if the simpleCursorAdapter doesn't identify your images as resources it will assume they are URIs. My question is how do i retrieve the URI for an image placed into the asset folder of my application? --

[android-developers] Re: MediaStore returning loop of images and not entire directory

2009-11-23 Thread JasonMP
same problem with it. > > > > >> I am still using MediaStore, so you might. It would also be > > > > >> interesting to know what is wrong with the above code. I remember > > > > >> getting the same behavior on the emulator once, but I delet

[android-developers] MediaStore returning loop of images and not entire directory

2009-11-22 Thread JasonMP
Hello, I'm testing some code from a demo found in a forum and I'm getting some strange results. My goal is to be able to allow users to access the pictures on their device to choose an avatar/logo. This code run flawlessly except that I only get a handful of images on the phone. And its not even

[android-developers] Re: storing imageview reference in database, need help retrieving

2009-11-21 Thread JasonMP
Its ImageView.setImageResource(); On Nov 21, 10:01 pm, JasonMP wrote: > Nevermind, got it. > > On Nov 21, 9:56 pm, JasonMP wrote: > > > > > Hi, > > > I'm having trouble retrieving image references from my database and > > then setting them to an

[android-developers] Re: storing imageview reference in database, need help retrieving

2009-11-21 Thread JasonMP
Nevermind, got it. On Nov 21, 9:56 pm, JasonMP wrote: > Hi, > > I'm having trouble retrieving image references from my database and > then setting them to an ImageView.  When I pass R.drawable.icon into > my database its compiled and stored as an Integer.  how would I then

[android-developers] storing imageview reference in database, need help retrieving

2009-11-21 Thread JasonMP
Hi, I'm having trouble retrieving image references from my database and then setting them to an ImageView. When I pass R.drawable.icon into my database its compiled and stored as an Integer. how would I then pull this Integer out and use ImageView.setImageDrawable(); ??? -- You received this m

[android-developers] Re: ListActivity addHeader???

2009-11-20 Thread JasonMP
Mark...I'm offically you're biggest fan haha, j/k. But thanks, seriously. On Nov 20, 7:27 pm, "Mark Murphy" wrote: > > I can add a header to my listview within another activity with: > > > list = (ListView) findViewById(R.layout.list_view); > > > View v = View.inflate(this, R.layout.skill_list_h

[android-developers] ListActivity addHeader???

2009-11-20 Thread JasonMP
Hi, I can add a header to my listview within another activity with: list = (ListView) findViewById(R.layout.list_view); View v = View.inflate(this, R.layout.skill_list_header, null); TextView t = (TextView) v.findViewById(R.id.skillHeader); list.addHeaderView(v); this doesnt wor

[android-developers] Re: TabActivity Lifecycle

2009-11-20 Thread JasonMP
Heres another concern. I previously had 2 separate contextmenus and 2 separate options menus for my first tab and my second tab. Now that they are in the same activity do they have to share the same menus? I'm guessing I can always run a switch statement or something when I open the menu based of

[android-developers] Re: TabActivity Lifecycle

2009-11-20 Thread JasonMP
e onResume(). What am I missing? On Nov 20, 2:02 pm, JasonMP wrote: > Hi, > > Can someone explain to me, or point me to a reference document > describing a TabActivities Lifecycle?  I have a tab that runs an > activity.  When does that activities onCreate, onResume, onPause take > p

[android-developers] Re: Refreshing a ListActivity within a TabView

2009-11-20 Thread JasonMP
Does that go in he onCreate? onResume? On Nov 20, 12:15 pm, Mark Murphy wrote: > JasonMP wrote: > > Hi, > > > I'm running into some issues here with my app.  I have 4 tabs run > > through a tabActivity.  One tab sends an intent and run my > > ListActivi

[android-developers] TabActivity Lifecycle

2009-11-20 Thread JasonMP
Hi, Can someone explain to me, or point me to a reference document describing a TabActivities Lifecycle? I have a tab that runs an activity. When does that activities onCreate, onResume, onPause take place? -- You received this message because you are subscribed to the Google Groups "Android D

[android-developers] Re: RESET SQLite AUTOINCREMENT

2009-11-20 Thread JasonMP
thing that happens often? On Nov 20, 1:46 pm, jotobjects wrote: > On Nov 20, 6:04 am, JasonMP wrote: > > > > > if my autoincrements skips numbers then I can get an error trying to > > update a row that doesn't exist. > > What if you delete a row later?  That will

[android-developers] Refreshing a ListActivity within a TabView

2009-11-20 Thread JasonMP
Hi, I'm running into some issues here with my app. I have 4 tabs run through a tabActivity. One tab sends an intent and run my ListActivity that populates the screen from a simpleCursorAdapter. My problem is that when I change back to this tab, after the first time its run, the list never refre

[android-developers] Re: RESET SQLite AUTOINCREMENT

2009-11-20 Thread JasonMP
do if there wasn't a work around. I had read that deleting the table row from the sqlite_sequence table would reset it, however, this didn't seem to work for me. On Nov 20, 10:11 am, Mark Murphy wrote: > JasonMP wrote: > > I use a do/while that runs through one of my tables ba

[android-developers] Re: RESET SQLite AUTOINCREMENT

2009-11-20 Thread JasonMP
" + i, null); i++; } while(i <= rowCount); if my autoincrements skips numbers then I can get an error trying to update a row that doesn't exist. On Nov 20, 8:47 am, Mark Murphy wrote: > JasonMP wrote: > > I need my rows in my > > database to stay ascendin

[android-developers] RESET SQLite AUTOINCREMENT

2009-11-20 Thread JasonMP
Hello, I have a database that will be editable inside my android app. I'm having an issue where when a row is deleted, its spot in the autoincrement array is still taken, and subsequent entries into that table pick up after that number. This leaves me with a list of rows whos autoincrement id valu

[android-developers] Need help with using multiple views within a Listview

2009-11-14 Thread JasonMP
Hi all, I,m trying to build a custom Listview and Adapter to populate the screen with items from a database. I need to have a checkbox in each view that when clicked will display a number in a textview from the database within that particular Listview item, and then also update the checked status

[android-developers] no reply from android beginners....can anyone help?

2009-10-19 Thread JasonMP
Im trying to fill a spinner with data from a table. That part works fine. What i cant figure out is how to use the selection made through the spinner. if i use : String someString = (String) classSpin.getSelectedItem().toString(); i get some sort of SQL reference. Am i missing a step? Im new

[android-developers] R.java not compiling properly? need help :(

2009-10-09 Thread JasonMP
Im having an issue with Eclipse where it will suddenly not be able to read my R.java file and all of my resource references get errors. Ive tried doing a fresh install of Eclipse and that did not help. Rebuilding apps does not help. Fixing project properties does not help. Here's an example of

[android-developers] Editing Strings.xml from inside .java

2009-10-05 Thread JasonMP
Is it possible to edit a string in my strings.xml from within my java code? I'd like my app_name to be changed dynamically based off of user input. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers"