[android-beginners] Re: Whats the current View?

2010-05-04 Thread ScCrow
My code follows the exmple at the android site,
 
http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/ExpandableList3.html.

The only change to the sample is code to retrieve data from a db
instead of hardcoding it.  So, assuming that you are correct, what in
this code defines the view.  Or rather, what can I use so I can
register my list for a context menu, which has a parm of type View?

-- 
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: Whats the current View?

2010-05-04 Thread ScCrow
Well, I found the answer, prior to reading your reply.  So thanks
anyway.

And no, I had not tried it because I didnt know it existed, ergo the
post, I was trying to find this method.

The Answer is
registerForContextMenu(getExpandableListView());




-- 
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] Whats the current View?

2010-05-03 Thread ScCrow
Im sure a dumb question, but how do I get the current view?

I have implemented an expandedList from a sample, but it does not use
an .xml file to define the view. It works, but now Im trying to add a
context menu for a long press.  I need to pass the current view into
the registerForContextMenu(view)   method.

Some of the code ...

public class HomePage  extends ExpandableListActivity {
private ExpandableListAdapter mAdapter;
...  load some data to arrays 
mAdapter = new SimpleExpandableListAdapter( 

setListAdapter(mAdapter);
.

Since there was no xml,  there was no  R.layout.x.

-- 
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] Top of form is hidden under the Application name

2010-05-02 Thread ScCrow
Ok...its a minor problem.My activity uses wrap_content and it
centes, so it sizes as needed.  The problem is that when I put 10
EditText boxes on the screen, the top two are off screen top side, and
you cant scroll to them.  I can scroll to the bottom with no
problems.  I added a padding on the top to get data to show, but the
window is still off the top.

I can live with my fix, but would like to know how to  correct the
problem. The window should have a little margin around all sides.  It
works fine if I have less data.  And, if I type enough data into an
EditBox, it expands to fill the window as expected.  I tried setting
margins, but that didnt work.

Hers is my stat code for the view.. the myShape file just sets the
corners
*
ScrollView
  android:id =@+id/ScrollView01
  android:layout_width= wrap_content
  android:layout_height   = wrap_content
  android:layout_gravity  = center
  android:scrollbars   = none
  xmlns:android   = http://schemas.android.com/apk/res/android; 
  RelativeLayout
xmlns:android=http://schemas.android.com/apk/res/android;
android:id  =@+id/ItemViewID
android:orientation =horizontal
android:layout_width=wrap_content
android:layout_height   =wrap_content
android:layout_gravity  =center
android:background  =@drawable/myshape
android:paddingLeft =5dp
  android:paddingRight  =5dp
  android:paddingTop=625dp
  android:paddingBottom =5dp
 

-- 
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 to open a new activity when an expandableList row is clicked ?

2010-04-28 Thread ScCrow
I have my expandable list working.  The data in my database will be
Group for the main level, then the expanded items will have a subGroup
and an itemName.

When I click on a row, I want to open an edit window for the data on
that row.  Since the information I need to access it is Group,
Subgroup, and ItemName, I thought I should be able to retrieve that
information from the list.  I see that I can return the group positon
and subgroup position, but I have not found how to retrieve the data.

I coded an onClick which is working, but the information seems strange
to me.
 public boolean onChildClick(ExpandableListView parent, View v,
   int groupPosition,
   int childPosition,
long id){
   Toast.makeText(this, v.getId() +  /n + groupPosition +  /n
+ childPosition,
Toast.LENGTH_LONG).show();
return false;
 }

Going down the child rows over different groups, I get
-1/n0/n0  ...Group 1  Child 1
-1/n1/n0  ...Group 2  Child 1
-1/n2/n0  ...Group 3  Child 1
-1/n3/n0  ...Group 3  Child 2
-1/n4/n0  ...Group 3  Child 1
To me it looks like group is reporting the child position and
childPosition is reporting nothing.

I see that there is a getChildView, but it is not clear to me as to
how it is used.

So, Im looking for a simple sample.

ScCrow

-- 
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: How to open a new activity when an expandableList row is clicked ?

2010-04-28 Thread ScCrow
I would still like to see an answer,but I have at least coded
a way to get the job done.  Duh,  Im using an array to store the
information, then using the subGroup to index into my array.  Not what
I wanted, but it will at least work.

Also, the information in my Toast now seems to be working properly, so
Im not sure what occurred there. Made no code changes that would have
affected them that I know of. Both the Group and the subGroup are not
incrementing as expected.

-- 
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] ERROR: Unable to get nature of project ... and others

2010-04-24 Thread ScCrow
I have been working on my project in Eclipse and have started getting
errors.

Below is a very condensed list of what Im getting.  Each one occurs
up to 20+ times.

The first two are messages about Projects that I have deleted in
Eclipse on Vista.
If I add them back, I still get the errors same errors.
I cant compile or run any projects because these errors exist
This is twice its happened.  The first time...I dont know what I
did to clear it up, but one day later, its happening again.

I really dont want to do an uninstall/install.  It was a pain the
first time.  And Im not sure that would correct the problem anyway.

I have done the get Software Updates, and that didnt help.  Just says
that everthing is up to date.  I have not updated anything in the Sdk
and Avd manager.

Looking for suggestions


ERROR LOG condensed .. its too big to include

   Unable to get nature of project 'Notepadv3'.
   Resource '/Notepadv3' does not exist.

   Same errors for ExpandableList ...
 
org.eclipse.wst.jsdt.web.ui.internal.hyperlink.script.JSPJavaHyperlinkDetector'
extension from plug-in 'org.eclipse.wst.jsdt.web.ui' to the
'org.eclipse.ui.workbench.texteditor.hyperlinkDetectors' extension
point will be ignored because it contains invalid attributes.


   No repository found at file:/D:/!Android/KeyTool/keytool.

  Keybinding conflicts occurred.  They may interfere with normal
accelerator operation.

-- 
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] Unable to open database

2010-04-19 Thread ScCrow
Sorry, I know this is a rookie question and probably been asked
before, but I did not find an answer doing searches.

I have created a SqlLite database and copied it to my projects Assets
driectory.  It shows up in Eclipse package explorer.  There are two
files   AndroidDbXXX and XXXDB.  Not sure why, but I assume both were
created by SqlLiteStudio.

In my dbHelper class I have the following (XXX is the project Name)
private static String DB_PATH = /data/data/com.site.XXX/
databases/;
private static String DB_NAME = XXXDB;

My open of the database fails (unable to open database) and I think
its because its not finding it.

Im confused.
Do I need to make a databases directory in assets and put my files
there?
Or am I just getting the db path incorrect?
Or something else like I put the files in the wrong place?
Or sounds like I did the right things, must be something else?


One last possiblility... the package name is
   package com.site.XXX;
But the Project name has a space as in X XX.
Is it possible that I need the space in the DB_Path?
  just tried it with the space..didnt help.  Still, dont know
which is correct.







-- 
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] Create and write to bitmap (clipping)

2009-12-06 Thread ScCrow
I have a game grid.  On any given move there it is possible that any
of several hundred items may move and move multiple times (this is not
a continuous animation,  one move ... results and wait) .  In windows,
I  created a bitmap.  For any move I would restore and draw as
required.  Then when it was done, display the new bitmap on the
screen.  The original was a Windows game.

I think I need to do this for Androd as well.  One problem I had was
memory.  I dont think having hundreds of objects stored in memory
would be good with the available memory in Android.

All the examples I find seem to create a new view, canvas, or bitmap
or whatever for each item.  I have not found the proper example for
what I want.

So if someone has a link or code, I would appreciate seeing an short
sweet example.  Or suggestion.  Im a rookie, so the shorter the
better.

Thanks  ScCrow

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.
To post to this group, send email to android-beginners@googlegroups.com
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] Emmulator with Keypad doing Asian text

2009-11-05 Thread ScCrow
I have recently Eclipse, the environment,etc.  So Im trying one of the
first little code samples, the Relative Layout.   Basically I just
want to do a simple Logon screen, so I thought this would be a start.

I created the project, cut and paste the code in and it runs.

However, it is adding a keyboard to the screen and when I type in
chars, its being translated to some Asian text.

The only thing that I have added (cut and paste) is the xml to the
main.xml.  I dont see anything in the xml to cause this. Oh yes, this
did not happen in the Hello World.

Obviously, Ive done something, I just dont know what.

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.
To post to this group, send email to android-beginners@googlegroups.com
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] Keytool - Vista - Signing

2009-03-01 Thread ScCrow

I have installed Eclipse, and the 1.1 android sdk.  (Vista)  All is
working.  Now I am trying to to a google map sample.  It seems that I
have to generate a sign, since the app wont run.  I sort of expected
this, I suppos the environment varialbe needs to be set and dont see
where to set it or maybe its already set.

My real problem, however, I cannot find the keytool app.   Ive looked
everywhere that the doc tells me to look.  It does not seem to be
anywhere on the pc. Perhaps Im just mis-understanding something.

 I do find the the suggested location
   C:\Users\keith\AppData\Local\Android
and there is a file there named debug.keystore located there,
but no keytool

Ive done searches to find keytool,,and its nowhere to be found.

So..what am I missing ...  or other suggestions.

Thanks




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Beginners group.
To post to this group, send email to android-beginners@googlegroups.com
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
-~--~~~~--~~--~--~---