[android-beginners] Re: switch / if statement, efficiency question

2009-04-29 Thread Steve

This would be a good setup if you were planning on adding more menu
items later, such as About or Settings or whatever.

On Apr 29, 2:22 am, asymmetric  wrote:
> fadden, thanks for your reply.
>
> i'm curious as to why the android devs only used switch statements
> then, if, as you say, an if statement would have been more efficient..
> hmm..
>
> anyway, thank you!
> asymmetric
>
> On Apr 28, 10:37 pm, fadden  wrote:
>
>
>
> > On Apr 28, 4:33 am, asymmetric  wrote:
>
> > > by looking at the Notepad examples, i've noticed that the switch
> > > statement is used even when there's only one case handled, as in:
> > [...]
> > > my question is, which is the most efficient statement? are there any
> > > noticeable differences, enough to justify a refactoring?
>
> > For a single element, an "if" statement will be faster and more
> > compact.
>
> > Unless you're calling it thousands of times per second, it's not going
> > to make a difference in performance.  It's probably using about 20
> > more bytes of Dalvik bytecode than the equivalent "if", so unless you
> > have a bunch of them the size won't matter either.
>
> > Having all of the code look roughly the same may make it easier to
> > understand and maintain.
--~--~-~--~~~---~--~~
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] Re: Cannot create AVD in window XP

2009-05-18 Thread Steve

This is because the Android HelloWorld example:

http://developer.android.com/guide/tutorials/hello-world.html

...points to the download page of the 1.1 SDK, whereas you need the
1.5 SDK to be able to use the 'android' command from the same example!

Download the 1.5 SDK here:

http://developer.android.com/sdk/1.5_r1/index.html

On May 12, 4:19 am, "minht...@gmail.com"  wrote:
> Hi everyone,
>
> When I try to create AVD, I got the message "'android' is notrecognized as an 
> internal or external command,operable program or
> batch file."
>
> Even I typed create command from SDK\tools directory, I got that
> message.
>
> And I also have Java Home in Environment Variable and add java path to
> path of the system.
>
> I would appreciate any suggestion.
>
> Thank you

--~--~-~--~~~---~--~~
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] Re: Cannot create AVD in window XP

2009-05-18 Thread Steve

I have the same problem as this.  There is no 'android' executable in
the tools directory - should there be?  I only have an android.jar
file in the tools' parent folder, but this is not part of my path, and
I'm not sure if this is what is meant to be running.

On May 12, 4:19 am, "minht...@gmail.com"  wrote:
> Hi everyone,
>
> When I try to create AVD, I got the message "'android' is not
> recognized as an internal or external command,operable program or
> batch file."
>
> Even I typed create command from SDK\tools directory, I got that
> message.
>
> And I also have Java Home in Environment Variable and add java path to
> path of the system.
>
> I would appreciate any suggestion.
>
> Thank you

--~--~-~--~~~---~--~~
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] Re: Hello, Android the book

2009-06-05 Thread Steve

I'll second that!  And it packs a lot of very good material in only
200 pages, so a great way to get an intro to Android dev in a short
time.

On Jun 4, 4:43 pm, grakhul  wrote:
> So I went into Borders and bought the book in the subject line. Just
> my way of keeping open source alive by supporting others.  The book is
> great for a novice with none to limited experience in Java and
> Android. I would recommend it to any novice or new user interested in
> Android.
--~--~-~--~~~---~--~~
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] Re: appwidget wictionary cant find words and

2009-06-19 Thread Steve

I had this installed on my ADP for weeks and it was working great
until a few days ago, and then all it was doing was displaying the
same error message you are getting.

So it might be you have done everything correctly, but something
changed at the server's end and now the widget can't find the word.
Just a guess as I didn't look into it.

On Jun 18, 5:55 am, "joare...@googlemail.com"
 wrote:
> The sourcecode of the 
> tutorialhttp://android-developers.blogspot.com/2009/04/introducing-home-scree...
>
> does not work on my emulator.
>
> When I try to add the widget to my desktop the widget only remains in
> the status "Loading word of day..." which is defined in the
> strings.xml.
>
> I made a breakpoint in the onUpdate method of the class WordWidget but
> it never reaches it.
>
> What did I wrong ?
--~--~-~--~~~---~--~~
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] Re: Is learning Java directly on the Android possible or a good idea?

2009-06-23 Thread Steve

I agree with the others that you should learn some Java on the PC
before diving into Android.  Everything you need is in the JDK and
Notepad.

After that, you might find you need to go back and look up a few
things that are not so basic.  Depends on how far you go with Android,
but just reading through their samples in the SDK you will need to
understand interfaces, generics, and constructors.

Head First Java is a good book however it might be a little long if
you are anxious to get going with Android.  Take a look at Java
Demystified which is much shorter and also very good.

Good luck!

On Jun 21, 1:17 am, Pyrofyr  wrote:
> I'll start by explaining my situation, I'm interested in learning to
> develop for mobile phones. My initial interest was the iPhone, however
> I do not own a Mac, and due to my dislike for them I decided to hold
> off pursuing that course of action.
>
> Currently I have my eyes set on two platforms, the BlackBerry and
> Android, however both use Java which I am not familiar with. I have
> some knowledge of C/C++(Had just started on classes where I left off)
> but no knowledge of Java at all. I've got the Android SDK working
> fine, and have started doing the hello world exercise and whatnot, but
> my problem now is,when working with Android, how much changes from
> traditional Java? Am I better off learning the exercises in plain old
> Java and then moving over to working in Android and learning the
> differences, or CAN I (I would rather) learn Java while also learning
> Android. I saw that there were a few books, but I'm not sure that they
> are suited for beginning Java in Android.
>
> Hoping someone can point me in the right direction. I've grabbed a few
> books on Java, and I'm reading through them (not skimming!) in all of
> my spare time. I'm first reading "Java for Dummies". I read that it's
> recommended to read "Head up Java" as a starting place. Since my
> programming knowledge is still very limited, would this be the best
> place to start?
--~--~-~--~~~---~--~~
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] Re: How to redraw the list in ExpandableListViewActivity

2009-07-31 Thread Steve

I've got a very similar app I'm doing now, I replied to your other
post as well, just to point out that I'm also using onActivityResult
however instead of invalidate I just force the activity to launch
again.  I track which tab they were on before they launched the
activity which created the new record so when it comes back to this, I
know which tab to set it to with the setCurrentTab.  It sounds really
inefficient (and it is) but so far with some big lists I am getting
really good results.  And of course, you've already got it where you
don't redraw when there was nothing edited or created.

On Jul 27, 2:48 pm, Beth Mezias  wrote:
> Hi there,
>
> Here is the situation.  In a TabbedView, one of three tabs is an
> ExpandableListViewActivity.  My application is using SQL Lite to store the
> data bound to the ExpandableListView.  When I change the SQL Lite data in
> another activity, I need to refresh the ExpandableListView and show the new
> data.  If I am drawing the tab for the first time after adding new data, the
> list shows correctly after the tab switch.  If I am in the
> ExpandableListViewActivity when I add new data to the list or edit existing
> data, then I do not see the change.  In this case, when I exit the
> application and restart, I see the modified data was stored in SQL Lite as
> expected.  Can anyone suggest how I might get the tab to redraw the list?
>
> The partially working code looks like this:
>     @Override
>     protected void onActivityResult(int requestCode, int resultCode, Intent
> intent) {
>         super.onActivityResult(requestCode, resultCode, intent);
> //stuff deleted
>         if((requestCode == EDITOR) && resultCode==RESULT_OK) {
>             tabs.setCurrentTab(1);
>             tabs.getCurrentView().invalidate();
>
>         }
>
> }
>
> The constructor for the list adapter is where I execute the code to populate
> the groups and children.  Do I want to drop and create a new list adapter?
> That seems like a waste of perfectly good rows.  Is it something I should do
> in the ExpandableListViewActivity, rather than the TabHost?  The fact that
> this is an expandable list is probably irrelevant; I am stuck where an
> object on the screen that has changed is not redrawn automatically.
> Your help is deeply appreciated.
>
> Best regards,
> Beth
> --
>
> Pablo Picasso
> - "Computers are useless. They can only give you answers."

--~--~-~--~~~---~--~~
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] Re: SQL Lite question, can you insert negative numbers (ExpandableListView help needed)

2009-07-31 Thread Steve

I also ran into issues with the cursor and the expandable lists, so I
get the cursor from the db, then load it into a 2-dimensional string
array, and use that for the expandable list adapter.  Clunky but it
works.

On Jul 12, 2:01 pm, Beth  wrote:
> Thanks Mark, content values work great.  I am hoping for a few more
> examples or some direction from the experts today.
>
> I want to get sqlite data into an expandable list view (activity).
> After combing through the user groups and looking at docs and sample
> code, I find nothing that shows a SimpleCursorTreeAdapter for ELV
> holding data from sqlite.  It looks like this adapter is intended for
> use with the OTHER cursor, the one holding data returned from a
> content provider query.  Should I be using a different adapter for
> sqlite data?  If so, which one?
>
> Thanks in advance for any advice.
> Best regards,
> Beth
>
> On Jul 10, 4:08 pm, Mark Murphy  wrote:
>
>
>
> > Beth Mezias wrote:
> > > Hello,
> > > Can I get an (Android) example for getting signed numbers into a SQL
> > > Lite database?  I've been trying many silly things that generate syntax
> > > errors so I thought I could put out the question.  Note that I searched
> > > and searched the groups and (surprisingly) found no history.
>
> > Outside of Android, here's a sqlite3 session:
>
> > SQLite version 3.6.10
> > Enter ".help" for instructions
> > Enter SQL statements terminated with a ";"
> > sqlite> create table foo (numberreal);
> > sqlite> .schema foo
> > CREATE TABLE foo (numberreal);
> > sqlite> insert into foo (number) values (-1);
> > sqlite> select * from foo;
> > -1.0
> > sqlite> .exit
>
> > Inside of Android, you should be able to just put anegativenumberinto
> > your ContentValues that you supply to your insert() call with
> > SQLiteDatabase.
>
> > Can you provide any source code and the syntax errors you are getting?
>
> > --
> > Mark Murphy (a Commons 
> > Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> > Android Development Wiki:http://wiki.andmob.org

--~--~-~--~~~---~--~~
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] Re: ExpandableList With ContextMenu

2009-08-17 Thread Steve

Check for the item that is selected (in onCreateContextMenu).  If it's
a group item, then don't make a context menu for it.  If it's a child
item, then make the context menu.


On Aug 16, 8:22 pm, Jose Ayerdis  wrote:
> How can i add a ContextMenu only to the child in the ExpandableList and not
> to the parent in each???
>
> --
> Atte
>
> [[Jose Luis Ayerdis Espinoza]]http://blognecronet.blogspot.com
--~--~-~--~~~---~--~~
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] Re: TabHost problem with designing Tabs

2009-08-17 Thread Steve
Have you tried using a TabActivity, then you don't have to use a
layout XML file for the tabhost.  Each tab calls its own intent, and
that activity can use its own layout file.

Not sure if that fixes your exact issue, but then you won't have to
worry that you are messing up your overall layout of the tabs, or the
other tab.  You can focus just on the one tab that is giving you
trouble.

On Aug 17, 2:44 am, Stefan  wrote:
> Hi, now I have a new problem. My xml file looks like:
>
> 
> http://schemas.android.com/apk/res/
> android"
>     android:orientation="vertical"
>     android:layout_width="fill_parent"
>     android:layout_height="fill_parent"
>     >
>              android:layout_height="fill_parent"
>         android:layout_width="fill_parent">
>
>                          android:layout_width="fill_parent"
>                 android:layout_height="wrap_content"/>
>
>                          android:layout_height="fill_parent"
>                 android:layout_width="fill_parent"
>                 android:paddingTop="62px">
>
>                                          android:id="@+id/list"
>                         android:layout_height="fill_parent"
>                         android:layout_width="fill_parent"
>                         android:text="List"/>
>
>                                          
> xmlns:android="http://schemas.android.com/apk/res/android";
>                         android:orientation="vertical"
>                         android:layout_width="fill_parent"
>                         android:layout_height="fill_parent"
>                         android:id="@+id/ll">
>
>                                                          
> xmlns:android="http://schemas.android.com/apk/res/
> android"
>                                 android:orientation="vertical"
>                                 android:layout_width="fill_parent"
>                                 android:layout_height="wrap_content"
>                                 android:id="@+id/unten"
>                                 android:layout_alignParentBottom="true">
>
>                                                                          android:id="@+id/imagebutton"
>                                         android:src="@drawable/left"
>                                         android:layout_width="wrap_content"
>                                         android:layout_height="fill_parent"/>
>
>                                                                          android:id="@+id/name"
>                                         android:layout_height="fill_parent"
>                                         android:layout_width="wrap_content"
>                                         android:text="Text"
>                                         android:layout_marginLeft="5px"/>
>                                 
>
>                                                                          android:id="@+id/mapview"
>                                         android:layout_width="fill_parent"
>                                         android:layout_height="wrap_content"
>                                         android:enabled="true"
>                                         android:clickable="true"
>                                         android:apiKey="."
>                                         android:layout_above="@id/unten"
>
>                                 />
>                         
>                 
>         
> 
>
> I want, that the picture is on the lift side of the TextView, but the
> TextView is below the picture?? But the layout_width of the Text- and
> ImageView is "wrap_content"!?! And if i try to change the LinearLayout
> (ID: unten) in a RelativeLayout, i don't see the MapView. What can i
> done??
>
> Regards,
> Stefan
--~--~-~--~~~---~--~~
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] problem with Hello, Gallery R.styleable not resolve

2009-08-29 Thread steve

I've been working through the Hello,Views examples.  They are great
resource - thanks to those that created them.

There is a problem with the setiton on the example using
android.R.sytleable

public ImageAdapter(Context c) {
mContext = c;
TypedArray a = obtainStyledAttributes
(android.R.styleable.Theme);
mGalleryItemBackground = a.getResourceId(
android.R.styleable.Theme_galleryItemBackground, 0);
a.recycle();
}

Eclipse reports that R.styleable cannot be resolved

There are lots of messages on the web about the problem.  Finally I
found one that reported android.R.styleable. is no longer supported in
sdk 1.5

http://mac.softpedia.com/progChangelog/Google-Android-SDK-Changelog-31208.html

If this is officially true, it would really be helpful to people
trying to learn Android programming to have some official notification
in the example and a revised workaround approach.  Otherwise a lot of
people will be wasting a lot of time.

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
-~--~~~~--~~--~--~---



[android-beginners] Installing the SDK alongside Amazon EC2 Tools on Mac

2009-09-08 Thread Steve

Hello,
I recently went to install the Android SDK and noticed a potential
problem.
I have the amazon ec2 tools installed and it uses a the PATH variable
in ~/.bash_profile
the line i have for ec2 tools is: "export PATH=$PATH:$EC2_HOME/bin"
the android sdk wants me to add "export PATH=${PATH}:/
tools" to ~/.bash_profile
i was wondering is there was anyway to use a different variable so i
can have both at the same time or will i have to do what im doing now
and comment out one of the lines to use the other.
thanks in advance
steve mitchell

--~--~-~--~~~---~--~~
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] Re: ImageView.VISIBLE/INVISIBLE

2009-09-25 Thread Steve

I always use VIEW.invisible or VIEW.visible or VIEW.gone  (rather than
ImageView.invisible etc.) and that works for me in any method other
than onCreate where I've tried it..

On Sep 25, 12:49 pm, Kingcrowley  wrote:
> I was wondering how this works,
>
> I can set ImageViews VISIBLE or INVISIBLE in OnCreate, but i can't
> seem to do it anywhere else properly?
> using code like "imgView.setVisibility(ImageView.VISIBLE);"
> any pointers/advice?
>
> Thanks,
>
> David
--~--~-~--~~~---~--~~
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] Re: Creating a Lite and Pro version of an application

2009-10-05 Thread Steve

I don't think the other thread explained how to do this without
creating two package names.  You would either have to re-name your
package each time you published, or you would need two different
projects, wouldn't you?

Another approach is to try to pull out as much common functionality as
you can into a 3rd Java-only project, with each of your projects (paid
and free).  The tough part is that you can't move anything that
references resources into a Java-only project.

On Oct 5, 11:58 am, Justin Anderson  wrote:
> I have already asked the same question, and later the solution on another
> thread.  Just do a quick search for "code base" and you will find out how to
> do this.
>
> If you have done this already, then you can ignore this, but a lot of
> duplicate questions can be eliminated simply by searching for an answer
> before posting a new question...
>
> Thanks,
> Justin
>
> --
> There are only 10 types of people in the world...
> Those who know binary and those who don't.
> --
>
>
>
> On Sun, Oct 4, 2009 at 7:48 PM, jax  wrote:
>
> > I want to crete two seperate android applications.
>
> > 1.  A "Lite" version with limited functionality
> > 2.  A upgrade to the lite version (Pro version) with extended
> > functionality (This will cost money)
>
> > Can someone tell me the best way to approach thisproject setup
> > etc.
--~--~-~--~~~---~--~~
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] Re: Is your Android app on Archos Market ?

2009-10-20 Thread Steve

I tried the Archos emulator on your web site, but can't figure out how
to simulate the BACK button?  Is there a key for it? thanks.

On Oct 20, 1:56 am, arnouf  wrote:
> If you  have developed or if you are developing applications, and they
> are on the Android Market - Great! - But these apps are only
> available for devices that have contracts with Google.
>
> Archos, a major PMP manufacturer, launched its first device on 25th of
> September: the Archos 5 IT. Archos has a real community of fans who
> are waiting for applications for their devices. This device is the
> first of a long product line (the first Archos phone should be
> available soon too!).
>
> It's a new opportunity for your applications to find new fans! 
>
> You can post your apps, for free, on the Archos Market called Appslib
> (http://www.appslib.com).
>
> Today, only free applications are available for distribution on
> AppsLib, but Archos promises the possibility to distribute your paid
> apps soon !
>
> Don't wait : more applications, more users, more fans...and more
> revenue (soon)!
>
> Arnaud
--~--~-~--~~~---~--~~
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] Re: Ad test problem in app with AdMob

2009-10-22 Thread Steve

I always use ADMOB_PUBLISHER_ID as the publisher ID (not "test"), and
since you have 2 errors related to an empty user id, that might be
worth trying.




Also it might be bette to post this question to AdMob's publisher
group at

http://groups.google.com/group/admob-publisher-discuss


On Oct 21, 11:03 am, erick nicolas  wrote:
> Hi,
>
> I've got a problem with my Android app. It doesn't show test ad and I
> don't understand why.
>
> Here is my java code:
>
> package org.ifies.android;
>
> import android.app.Activity;
> import android.graphics.Color;
> import android.os.Bundle;
> import android.widget.TableLayout;
> import android.widget.TableRow;
> import android.widget.TextView;
> import com.admob.android.ads.AdManager;
> import com.admob.android.ads.AdView;
>
> public class AdmobExample extends Activity{
>       private TextView example_message;
>       private AdView example_adview;
>
>   @Override
>   public void onCreate(Bundle savedInstanceState) {
>     super.onCreate(savedInstanceState);
>     this.setContentView(R.layout.main);
>
>     example_adview = (AdView) findViewById(R.id.ad);
>     example_adview.setVisibility(AdView.VISIBLE);
>
>     example_message = (TextView) findViewById(R.id.example_message);
>     example_message.setVisibility(TextView.VISIBLE);
>   //  example_message.setText("This is an example of AdMob for
> Android");
>
>   }
>
> }
>
> Here my xml layout
>
>     xmlns:android="http://schemas.android.com/apk/res/android";
>    xmlns:app="http://schemas.android.com/apk/res/org.ifies.android";
>    android:orientation="vertical"
>    android:layout_width="fill_parent"
>    android:layout_height="fill_parent"
>    android:layout_gravity="bottom">
>
>             android:id="@+id/example_message"
>        android:layout_width="wrap_content"
>        android:layout_height="wrap_content"
>        android:text="TextView"
>        android:layout_weight="1" />
>
>                android:id="@+id/ad"
>           android:visibility="gone"
>           android:layout_width="fill_parent"
>           android:layout_height="wrap_content"
>           android:layout_alignParentBottom="true"
>           app:backgroundColor="#FF"
>           app:textColor="#00"
>           app:keywords="Android game"
>
>           app:testing="true"
>         />
>
> 
>
> Here is the AndroidManifest.xml
>
> 
> http://schemas.android.com/apk/res/android";
>       package="org.ifies.android"
>       android:versionCode="1"
>       android:versionName="1.0">
>     
>                            android:label="@string/app_name">
>             
>                 
>                  android:name="android.intent.category.LAUNCHER" />
>             
>         
>          android:name="Test" />
>     
>     
>     
>
> 
>
> And here is the logcat when app starts
>
> 10-21 17:57:25.064: INFO/AdMob SDK(722): The user ID is null
> 10-21 17:57:25.124: DEBUG/AdMob SDK(722): Publisher ID read from
> AndroidManifest.xml is null
> 10-21 17:57:25.144: ERROR/AdMob SDK(722): Could not read
> ADMOB_PUBLISHER_ID meta-data from AndroidManifest.xml.
> 10-21 17:57:25.144: ERROR/AdMob SDK(722):
> java.lang.NullPointerException
> 10-21 17:57:25.144: ERROR/AdMob SDK(722):     at
> com.admob.android.ads.AdManager.getPublisherId(AdManager.java:157)
> 10-21 17:57:25.144: ERROR/AdMob SDK(722):     at
> com.admob.android.ads.AdRequester.buildParamString(AdRequester.java:
> 184)
> 10-21 17:57:25.144: ERROR/AdMob SDK(722):     at
> com.admob.android.ads.AdRequester.requestAd(AdRequester.java:67)
> 10-21 17:57:25.144: ERROR/AdMob SDK(722):     at
> com.admob.android.ads.AdView$1.run(AdView.java:317)
> 10-21 17:57:25.244: WARN/AdMob SDK(722): Could not get ad from AdMob
> servers.
> 10-21 17:57:25.244: WARN/AdMob SDK(722):
> java.lang.IllegalStateException: Publisher ID is not set!  To serve
> ads you must set your publisher ID assigned fromwww.admob.com.
> Either add it to AndroidManifest.xml under the  tag or
> call AdManager.setPublisherId().
> 10-21 17:57:25.244: WARN/AdMob SDK(722):     at
> com.admob.android.ads.AdRequester.buildParamString(AdRequester.java:
> 188)
> 10-21 17:57:25.244: WARN/AdMob SDK(722):     at
> com.admob.android.ads.AdRequester.requestAd(AdRequester.java:67)
> 10-21 17:57:25.244: WARN/AdMob SDK(722):     at
> com.admob.android.ads.AdView$1.run(AdView.java:317)
> 10-21 17:57:25.264: INFO/AdMob SDK(722): Server replied that no ads
> are available (141ms)
>
> I'm developing with Eclipse, Android SDK 1.5 under Kubuntu.
>
> Can anyone help me please?
>
> 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
-~--~~~~--~

[android-beginners] Exif intrerface not found

2009-12-02 Thread steve
Greetings,

I'm on a HTC Tattoo (Android 1.6) and am trying to use the exif
interface. However it does not appear to be visible. Am I right in
assuming this should be available?

Also I'd be interested in hearing what way poeple here have been
getting exif information from photos.

Thanks,
Steve

-- 
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] Re: Hello Date Picker

2009-12-22 Thread Steve
I am also working through this example but ran into a different
problem.  The lines:

mDateDisplay = (TextView) findViewById(R.id.dateDisplay);
mPickDate = (Button) findViewById(R.id.pickDate);

give the error "R.id can not be resolved".  R is never declared
anywhere.  What is it supposed to be? Eclipse's suggestion is:

public static Object id;
or
public static final String id = null;

-Steve

On Dec 15, 2:45 pm, Justin Anderson  wrote:
> If you are using Eclipse you can do this quickly with the Ctrl+Shift+O
> shortcut... It will automatically add missing imports and remove those you
> don't need.
>
> --
> There are only 10 types of people in the world...
> Those who know binary and those who don't.
> --
>
> On Mon, Dec 14, 2009 at 10:04 AM, Waiter  wrote:
> > ME TOO.
>
> > I'm going through the tutorials one at a time. Very helpful and
> > learning as I go.
>
> > So, I need to import both the Textview and the Button, (and whatever
> > else I'll be using)
>
> > import android.widget.TextView;
> > import android.widget.Button;
>
> > Added this to the imports, worked like a champ.
>
> > Thanks
>
> > Waiter
>
> > On Dec 10, 3:59 pm, "Lee $$$"  wrote:
> > > Nevermind, already figured out what was wrong. As a note to beginners,
> > > always double-check that you are importing all the android packages for
> > the
> > > tutorials. It will save you mountains of time and problems.
>
> > > On Dec 9, 2009 11:58 PM, "LeeGiT"  wrote:
>
> > > I am working through the tutorial for Hello Date Picker. I copied the
> > > code for the HelloDatePicker.java file but I keep getting syntax error
> > > on tokens for the 'int'. Here some code...
>
> > > package com.example.hellodatepicker;
>
> > > import android.app.Activity;
> > > import android.os.Bundle;
> > > import java.util.Calendar;
>
> > > private TextView mDateDisplay; <== Error Here - Syntax error on
> > > these tokens, delete these tokens.
> > > private Button mPickDate;          <== and here
>
> > > private int mYear;                       <== and here
> > > private int mMonth;                    <== and here
> > > private int mDay;                        <== and here.
>
> > > static final int DATE_DIALOG_ID = 0; <== Error Here - Syntax error
> > > on these tokens, AnnotationName expected instead.
>
> > > What is going on here? Is seems all the tutorials are based on Android
> > > 1.5 - 1.6
>
> > --
> > 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

-- 
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: Graphing in Android

2008-12-29 Thread Steve

On Nov 9, 12:51 pm, Mark Murphy  wrote:
> It should be possible to write or port such an API, but most of
> the off-the-shelf solutions for Java graphing on-screen will be assuming
> AWT/Swing and not Android.

Has anyone written a guide for Swing programmers for working with
Android's APIs?

--~--~-~--~~~---~--~~
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] Re: Best way to learn android development?

2009-01-01 Thread Steve

I'm getting a lot out of this book -- it covers a lot of material
pretty quickly and the examples are very useful -- Professional
Android Application Development published by Wrox --

http://tinyurl.com/8sqtd8


On Dec 26 2008, 2:28 pm, Fender  wrote:
> Im just starting to get into mobile development, i know a LITTLE
> javascript, but do know PHP and MySQL, so i know programming.
>
> So my question is, whats the best way to learn about writing for
> android? How did you learn? There are a few books out now on Android.
> Are there any good ones?
>
> Thank you!

--~--~-~--~~~---~--~~
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] How to access LInux shell command from GUI interface with root permission

2009-02-24 Thread steve

Is it a way to access Linux shell command from with the Android SDK? I
would like to do it as a root user

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
-~--~~~~--~~--~--~---



[android-beginners] "Corrupt XML binary file" error when adding a PNG to res/drawable

2009-05-18 Thread Steve Smith

Hi,

I'm seeing an odd error when adding a PNG file to the res/drawable
directory in an otherwise working app:

 I/ActivityManager(  565): Start proc net.haltcondition.android.ex for
activity net.haltcondition.android.ex/.ThreadedXmlList: pid=1237
uid=10018 gids={3003}
W/ResourceType( 1237): Bad XML block: header size 18254 or total size
169478669 is larger than data size 635
D/AndroidRuntime( 1237): Shutting down VM
W/dalvikvm( 1237): threadid=3: thread exiting with uncaught exception
(group=0x4000fe70)
E/AndroidRuntime( 1237): Uncaught handler: thread main exiting due to
uncaught exception
E/AndroidRuntime( 1237): java.lang.RuntimeException: Unable to start
activity ComponentInfo{net.haltcondition.android.ex/
net.haltcondition.android.ex.ThreadedXmlList}:
android.content.res.Resources$NotFoundException: File res/drawable/
androidmarker.png from xml type layout resource ID #0x7f02
E/AndroidRuntime( 1237):at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2268)
E/AndroidRuntime( 1237):at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2284)
E/AndroidRuntime( 1237):at android.app.ActivityThread.access$1800
(ActivityThread.java:112)
E/AndroidRuntime( 1237):at android.app.ActivityThread$H.handleMessage
(ActivityThread.java:1692)
E/AndroidRuntime( 1237):at android.os.Handler.dispatchMessage
(Handler.java:99)
E/AndroidRuntime( 1237):at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 1237):at android.app.ActivityThread.main
(ActivityThread.java:3948)
E/AndroidRuntime( 1237):at java.lang.reflect.Method.invokeNative
(Native Method)
E/AndroidRuntime( 1237):at java.lang.reflect.Method.invoke
(Method.java:521)
E/AndroidRuntime( 1237):at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:782)
E/AndroidRuntime( 1237):at com.android.internal.os.ZygoteInit.main
(ZygoteInit.java:540)
E/AndroidRuntime( 1237):at dalvik.system.NativeStart.main(Native
Method)
E/AndroidRuntime( 1237): Caused by: android.content.res.Resources
$NotFoundException: File res/drawable/androidmarker.png from xml type
layout resource ID #0x7f02
E/AndroidRuntime( 1237):at
android.content.res.Resources.loadXmlResourceParser(Resources.java:
1843)
E/AndroidRuntime( 1237):at
android.content.res.Resources.loadXmlResourceParser(Resources.java:
1798)
E/AndroidRuntime( 1237):at android.content.res.Resources.getLayout
(Resources.java:685)
E/AndroidRuntime( 1237):at android.view.LayoutInflater.inflate
(LayoutInflater.java:318)
E/AndroidRuntime( 1237):at androidview.LayoutInflater.inflate
(LayoutInflater.java:276)
E/AndroidRuntime( 1237):at
com.android.internal.policy.impl.PhoneWindow.setContentView
(PhoneWindow.java:309)
E/AndroidRuntime( 1237):at android.app.Activity.setContentView
(Activity.java:1626)
E/AndroidRuntime( 1237):at
net.haltcondition.android.ex.ThreadedXmlList.onCreate
(ThreadedXmlList.java:34)
E/AndroidRuntime( 1237):at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1123)
E/AndroidRuntime( 1237):at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2231)
E/AndroidRuntime( 1237):... 11 more
E/AndroidRuntime( 1237): Caused by: java.io.FileNotFoundException:
Corrupt XML binary file
E/AndroidRuntime( 1237):at
android.content.res.AssetManager.openXmlAssetNative(Native Method)
E/AndroidRuntime( 1237):at
android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:
471)
E/AndroidRuntime( 1237):at
android.content.res.Resources.loadXmlResourceParser(Resources.java:
1825)
E/AndroidRuntime( 1237):... 20 more

No other changes have been made to the app; removing the file makes
the problem go away.  This is on 1.5_r1.

Any suggestions on what I'm missing here?

Thanks,
Steve

--~--~-~--~~~---~--~~
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] Re: "Corrupt XML binary file" error when adding a PNG to res/drawable

2009-05-18 Thread Steve Smith

Hi,

The file is res/drawable/androidmarker.png (taken from a tutorial).
I'm not referring to it at all; I'm merely placing it in the drawable
directory.  Removing it removes the error.

Thanks,
Steve

2009/5/19 Raphael :
>
> What is the name of the png you are adding and where and how are you
> referring it to?
>
> R/
>
> On Sat, May 16, 2009 at 11:28 PM, Steve Smith  wrote:
>>
>> Hi,
>>
>> I'm seeing an odd error when adding a PNG file to the res/drawable
>> directory in an otherwise working app:
>>
>>  I/ActivityManager(  565): Start proc net.haltcondition.android.ex for
>> activity net.haltcondition.android.ex/.ThreadedXmlList: pid=1237
>> uid=10018 gids={3003}
>> W/ResourceType( 1237): Bad XML block: header size 18254 or total size
>> 169478669 is larger than data size 635
>> D/AndroidRuntime( 1237): Shutting down VM
>> W/dalvikvm( 1237): threadid=3: thread exiting with uncaught exception
>> (group=0x4000fe70)
>> E/AndroidRuntime( 1237): Uncaught handler: thread main exiting due to
>> uncaught exception
>> E/AndroidRuntime( 1237): java.lang.RuntimeException: Unable to start
>> activity ComponentInfo{net.haltcondition.android.ex/
>> net.haltcondition.android.ex.ThreadedXmlList}:
>> android.content.res.Resources$NotFoundException: File res/drawable/
>> androidmarker.png from xml type layout resource ID #0x7f02
>> E/AndroidRuntime( 1237):        at
>> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
>> 2268)
>> E/AndroidRuntime( 1237):        at
>> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
>> 2284)
>> E/AndroidRuntime( 1237):        at android.app.ActivityThread.access$1800
>> (ActivityThread.java:112)
>> E/AndroidRuntime( 1237):        at android.app.ActivityThread$H.handleMessage
>> (ActivityThread.java:1692)
>> E/AndroidRuntime( 1237):        at android.os.Handler.dispatchMessage
>> (Handler.java:99)
>> E/AndroidRuntime( 1237):        at android.os.Looper.loop(Looper.java:123)
>> E/AndroidRuntime( 1237):        at android.app.ActivityThread.main
>> (ActivityThread.java:3948)
>> E/AndroidRuntime( 1237):        at java.lang.reflect.Method.invokeNative
>> (Native Method)
>> E/AndroidRuntime( 1237):        at java.lang.reflect.Method.invoke
>> (Method.java:521)
>> E/AndroidRuntime( 1237):        at com.android.internal.os.ZygoteInit
>> $MethodAndArgsCaller.run(ZygoteInit.java:782)
>> E/AndroidRuntime( 1237):        at com.android.internal.os.ZygoteInit.main
>> (ZygoteInit.java:540)
>> E/AndroidRuntime( 1237):        at dalvik.system.NativeStart.main(Native
>> Method)
>> E/AndroidRuntime( 1237): Caused by: android.content.res.Resources
>> $NotFoundException: File res/drawable/androidmarker.png from xml type
>> layout resource ID #0x7f02
>> E/AndroidRuntime( 1237):        at
>> android.content.res.Resources.loadXmlResourceParser(Resources.java:
>> 1843)
>> E/AndroidRuntime( 1237):        at
>> android.content.res.Resources.loadXmlResourceParser(Resources.java:
>> 1798)
>> E/AndroidRuntime( 1237):        at android.content.res.Resources.getLayout
>> (Resources.java:685)
>> E/AndroidRuntime( 1237):        at android.view.LayoutInflater.inflate
>> (LayoutInflater.java:318)
>> E/AndroidRuntime( 1237):        at androidview.LayoutInflater.inflate
>> (LayoutInflater.java:276)
>> E/AndroidRuntime( 1237):        at
>> com.android.internal.policy.impl.PhoneWindow.setContentView
>> (PhoneWindow.java:309)
>> E/AndroidRuntime( 1237):        at android.app.Activity.setContentView
>> (Activity.java:1626)
>> E/AndroidRuntime( 1237):        at
>> net.haltcondition.android.ex.ThreadedXmlList.onCreate
>> (ThreadedXmlList.java:34)
>> E/AndroidRuntime( 1237):        at
>> android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
>> 1123)
>> E/AndroidRuntime( 1237):        at
>> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
>> 2231)
>> E/AndroidRuntime( 1237):        ... 11 more
>> E/AndroidRuntime( 1237): Caused by: java.io.FileNotFoundException:
>> Corrupt XML binary file
>> E/AndroidRuntime( 1237):        at
>> android.content.res.AssetManager.openXmlAssetNative(Native Method)
>> E/AndroidRuntime( 1237):        at
>> android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:
>> 471)
>> E/AndroidRuntime( 1237):        at
>> android.content.res.Resources.loadXmlResourceParser(Resources.java:
>> 1825)
>> E/AndroidRuntime( 1237):        ... 20 more
>>
>

[android-beginners] Re: "Corrupt XML binary file" error when adding a PNG to res/drawable

2009-05-20 Thread Steve Smith

No worries:

http://code.google.com/p/android/issues/detail?id=2726

Cheers,
Steve

2009/5/21 Raphael :
>
> Can you file a bug at b.android.com with the zip file and your steps below?
> Thanks in advance.
> R/
>
> On Mon, May 18, 2009 at 3:46 PM, Steve Smith  wrote:
>> Hi,
>>
>> I've recreated this with a clean project.  To reproduce:
>>
>> * android create project -k net.haltcondition.ex.Hello -a Hello -t 2 -p hello
>> * ant install
>> * 
>> * mkdir res/drawable
>> * cp /tmp/androidmarker.png res/drawable
>> * ant reinstall
>> * 
>>
>> I've attached the resulting project.
>>
>> Cheers,
>> Steve
>>
>>
>> 2009/5/19 Steve Smith :
>>> Hi,
>>>
>>> The file is res/drawable/androidmarker.png (taken from a tutorial).
>>> I'm not referring to it at all; I'm merely placing it in the drawable
>>> directory.  Removing it removes the error.
>>>
>>> Thanks,
>>> Steve
>>>
>>> 2009/5/19 Raphael :
>>>>
>>>> What is the name of the png you are adding and where and how are you
>>>> referring it to?
>>>>
>>>> R/
>>>>
>>>> On Sat, May 16, 2009 at 11:28 PM, Steve Smith  wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I'm seeing an odd error when adding a PNG file to the res/drawable
>>>>> directory in an otherwise working app:
>>>>>
>>>>>  I/ActivityManager(  565): Start proc net.haltcondition.android.ex for
>>>>> activity net.haltcondition.android.ex/.ThreadedXmlList: pid=1237
>>>>> uid=10018 gids={3003}
>>>>> W/ResourceType( 1237): Bad XML block: header size 18254 or total size
>>>>> 169478669 is larger than data size 635
>>>>> D/AndroidRuntime( 1237): Shutting down VM
>>>>> W/dalvikvm( 1237): threadid=3: thread exiting with uncaught exception
>>>>> (group=0x4000fe70)
>>>>> E/AndroidRuntime( 1237): Uncaught handler: thread main exiting due to
>>>>> uncaught exception
>>>>> E/AndroidRuntime( 1237): java.lang.RuntimeException: Unable to start
>>>>> activity ComponentInfo{net.haltcondition.android.ex/
>>>>> net.haltcondition.android.ex.ThreadedXmlList}:
>>>>> android.content.res.Resources$NotFoundException: File res/drawable/
>>>>> androidmarker.png from xml type layout resource ID #0x7f02
>>>>> E/AndroidRuntime( 1237):        at
>>>>> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
>>>>> 2268)
>>>>> E/AndroidRuntime( 1237):        at
>>>>> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
>>>>> 2284)
>>>>> E/AndroidRuntime( 1237):        at android.app.ActivityThread.access$1800
>>>>> (ActivityThread.java:112)
>>>>> E/AndroidRuntime( 1237):        at 
>>>>> android.app.ActivityThread$H.handleMessage
>>>>> (ActivityThread.java:1692)
>>>>> E/AndroidRuntime( 1237):        at android.os.Handler.dispatchMessage
>>>>> (Handler.java:99)
>>>>> E/AndroidRuntime( 1237):        at android.os.Looper.loop(Looper.java:123)
>>>>> E/AndroidRuntime( 1237):        at android.app.ActivityThread.main
>>>>> (ActivityThread.java:3948)
>>>>> E/AndroidRuntime( 1237):        at java.lang.reflect.Method.invokeNative
>>>>> (Native Method)
>>>>> E/AndroidRuntime( 1237):        at java.lang.reflect.Method.invoke
>>>>> (Method.java:521)
>>>>> E/AndroidRuntime( 1237):        at com.android.internal.os.ZygoteInit
>>>>> $MethodAndArgsCaller.run(ZygoteInit.java:782)
>>>>> E/AndroidRuntime( 1237):        at com.android.internal.os.ZygoteInit.main
>>>>> (ZygoteInit.java:540)
>>>>> E/AndroidRuntime( 1237):        at dalvik.system.NativeStart.main(Native
>>>>> Method)
>>>>> E/AndroidRuntime( 1237): Caused by: android.content.res.Resources
>>>>> $NotFoundException: File res/drawable/androidmarker.png from xml type
>>>>> layout resource ID #0x7f02
>>>>> E/AndroidRuntime( 1237):        at
>>>>> android.content.res.Resources.loadXmlResourceParser(Resources.java:
>>>>> 1843)
>>>>> E/AndroidRuntime( 1237):        at
>>>>> android.content.res.Resources.loadXmlResourceParser(Resources.java:
>&g

[android-beginners] Re: How to redraw the list in ExpandableListViewActivity

2009-08-02 Thread Steve Hall

Hi,
I posted this on another forum it might be of help and you might be
able to answer questions!!

Very pleased  :) with the way ExpandableListView works but am unclear
how to set the clicked view as invalid.

In the onChildClick(ExpandableListView parent, View v, int
groupPosition, int childPosition, long id)
{
I call the Dialog "Enter" and wait for dismiss so:-

Value = new Value_Input(test2.this,0, custno, itemno, day);
Value.show();
Value.setOnDismissListener(new OnDismissListener() {
public void onDismiss(DialogInterface arg0) {
getExpandableListView().invalidateViews();
}
});
}

the invalidateViews() seems a bit heavyweight when I only want to
redraw the clicked view.
(it also has side effects (mine) which I want to avoid. )  :(

the other options are:-

getExpandableListView().invalidate();
getExpandableListView().invalidate(dirty);
getExpandableListView().invalidate(l, t, r, b)
getExpandableListView().invalidateChild(child, dirty)
getExpandableListView().invalidateChildInParent(location, dirty)
getExpandableListView().invalidateDrawable(drawable)

basically how do I get from groupPosition, childPosition to the View
after the event??
or how to use one of the above??

any suggestions would gratefully received!!

Steve

Alas there is more - I have a command to expand the group and move it
to the top of the display:-

case 1:// "Move to Top")
getExpandableListView().setSelectedGroup(groupPosition);
getExpandableListView().expandGroup(groupPosition);
getExpandableListView().invalidateViews();
break;

This does not cause the children to be redrawn indeed there is no
subsequent call to getChildrenCount(int groupPosition)

getExpandableListView().setSelectedGroup(groupPosition); <- I was
hoping this might move group to top of screen!

--~--~-~--~~~---~--~~
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] Two Problems with ExpandableListView

2009-08-03 Thread Steve Hall

Very pleased  :) with the way ExpandableListView works but am unclear
how to set the clicked view as invalid in OnDismiss.

Problem One
---

In the onChildClick(ExpandableListView parent, View v, int
groupPosition, int childPosition, long id)
{
I call the Dialog "Enter" and wait for dismiss so:-

Value = new Value_Input(test2.this,0, custno, itemno, day);
Value.show();
Value.setOnDismissListener(new OnDismissListener() {
public void onDismiss(DialogInterface arg0) {
getExpandableListView().invalidateViews();
}
});

}

the invalidateViews() seems a bit heavyweight when I only want to
redraw the clicked view.

the other options are:-

getExpandableListView().invalidate();
getExpandableListView().invalidate(dirty);
getExpandableListView().invalidate(l, t, r, b)
getExpandableListView().invalidateChild(child, dirty)
getExpandableListView().invalidateChildInParent(location, dirty)
getExpandableListView().invalidateDrawable(drawable)

basically how do I get from groupPosition, childPosition to the View
after the event??
or how to use one of the above??

What I  need is:-

  getExpandableListView().invalidateChild
( groupPosition, childPosition)

Problem Two
--

How do I get the adapter not to draw GONE views.  I have tried the
trick I used in the simple BaseAdapter in both getGroupView and
getChildView but it does not work :-

boolean found=false;
int count = getExpandableListView().getChildCount();
for(int i=0;ihttp://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Help Needed with Opening File

2009-08-06 Thread Steve Hall

Hi,

I am relatiely new to both java and Android.

I assume that files opened in "user.dir" are held in fast battery
backed ram" and that /sdcard/ is a slower rom device.

I am attempting to copy a file of about 450k from the sdcard to the
"user.dir" so that I can have much faster reading/wrting of the file.
CopyfiletoMemory(..) works fine but the subsequent call to open the
file as a
RandomAccessFile in Openfile fails with FileNotFoundException?? any
ideas

public void CopyfiletoMemory(String filename){
try{
FileInputStream in  = new FileInputStream("/sdcard/"+filename);
File temp = File.createTempFile("/"+filename, null );
FileOutputStream out = new FileOutputStream(temp);
// Transfer bytes from in to out
byte[] buf = new byte[1024];
int len;
while ((len = in.read(buf)) > 0) {
out.write(buf, 0, len);
}
out.flush();
in.close();
out.close();
System.out.println("File Copied");
}
catch (Exception e){
System.err.println("File input error");
}
}

public void Openfile(String filename){
try{
String destination = System.getProperty("user.dir")+
filename;
File fileCon = new File(destination);
fstream = new RandomAccessFile(fileCon.getPath
(),"rw");
ReadRoundData();
customer = new t_customer();
}
catch (FileNotFoundException e){
System.out.println( "File not found exception!:" + e.getMessage
());
}
catch (SecurityException e){
System.out.println( "File security problem!:" + e.getMessage
());
}
catch (Exception e){
System.out.println("File input error");
}
}

Any help gratefully received
Steve

--~--~-~--~~~---~--~~
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] Re: Help Needed with Opening File

2009-08-08 Thread Steve Hall

I eventually solved the problem with help of following dicussion

http://www.anddev.org/viewtopic.php?p=25297#25297

my solution is:-

public void CopyfiletoMemory(String filename){
FileOutputStream fos;
DataOutputStream out;
try{
FileInputStream in  = new FileInputStream("/
sdcard/"+filename);
boolean success = new File("/data/data/com.example.test2/
data").mkdir();

if (!success)
System.out.println( "no success");
File file =  new File("/data/data/com.example.test2/
data/"+filename);
file.createNewFile();
if(!file.exists()){
   file.createNewFile();
   System.out.println( "File created...");
}
fos = new FileOutputStream(file);
out=new DataOutputStream(fos);
// Transfer bytes from in to out
byte[] buf = new byte[1024];
int len;
while ((len = in.read(buf)) > 0) {
out.write(buf, 0, len);
}
out.flush();
in.close();
out.close();
listfiles();
System.out.println("File Copied");
}
catch (Exception e){
System.err.println("File input error");
}
}

 private void listfiles(){
FilenameFilter fil=null;
String destination = "/data/data/com.example.test2/data/";
File fileCon[] = new File(destination).listFiles(fil);
for (int n=0;nhttp://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Developer hardware

2009-08-08 Thread Steve Hall

I want to do this as well as a replacement for the Google Developer
Phone seems "too long acoming".
Hurry up Google and make your intentions clear!
Steve

--~--~-~--~~~---~--~~
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] Using ExpandableListView inside a Dialog

2009-08-11 Thread Steve Hall

Hi,

I am new to Android and Java.  The answer is not obvious (to me)
I have been using ExpandableListView inside an activity quite happily.
so...

public class PaymentList extends ExpandableListActivity{

ExpandableListAdapter mAdapter;
 ...
mAdapter = new MyExpandableListAdapter();
setListAdapter(mAdapter);
registerForContextMenu(getExpandableListView());
...etc

I now want PaymentList to be a Dialog so:-

public class PaymentList extends Dialog{

cannot resolve "setListAdapter" or "getExpandableListView".

How do I get over this (provide the getExpandableListView
functionality inside the Dialog) ???

Steve

--~--~-~--~~~---~--~~
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] Re: Using ExpandableListView inside a Dialog

2009-08-11 Thread Steve Hall

Thanks for the prompt reply but the complexity of defining
ContextMenus and setting up the GetViews associated with the
ExpandableList within a Custom Dialog are currently beyond me.

However I have got
Intent i = new Intent(GetFlagSet.this, PaymentList.class);
startActivityForResult(i, 0);

working so I can put back the time when I need to crack creating a
more complex Custom Dialog.

Many thanks Steve

On Aug 11, 4:03 pm, "Balwinder Kaur (T-Mobile)"  wrote:
> Steve,
>
> setListAdapter() and getExpandableListView() are methods that belong
> to the ExpandableListActivity class hence are not available when you
> extend the Dialog class.
>
> You could create a Custom Dialog and Use the ExpandableListView as its
> view.http://developer.android.com/reference/android/widget/ExpandableListV...http://developer.android.com/guide/topics/ui/dialogs.html#CustomDialog
>
> Hope this helps,
> Balwinder Kaur
> Open Source Development Center
> ·T· · ·Mobile· stick together
>
> The views, opinions and statements in this email are those of the
> author solely in their individual capacity, and do not necessarily
> represent those of T-Mobile USA, Inc.
>
> On Aug 11, 7:30 am, Steve Hall  wrote:
>
> > Hi,
>
> > I am new to Android and Java.  The answer is not obvious (to me)
> > I have been using ExpandableListView inside an activity quite happily.
> > so...
>
> > public class PaymentList extends ExpandableListActivity{
>
> >         ExpandableListAdapter mAdapter;
> >          ...
> >         mAdapter = new MyExpandableListAdapter();
> >         setListAdapter(mAdapter);
> >         registerForContextMenu(getExpandableListView());
> > ...etc
>
> > I now want PaymentList to be a Dialog so:-
>
> > public class PaymentList extends Dialog{
>
> > cannot resolve "setListAdapter" or "getExpandableListView".
>
> > How do I get over this (provide the getExpandableListView
> > functionality inside the Dialog) ???
>
> > Steve
>
>
--~--~-~--~~~---~--~~
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] ExpandableList Items click after scroll

2009-09-02 Thread Steve Hall

Hi,
I am working on an ExpandableListView.  It all works fine until I
scroll the current set of views off the screen where upon I cannot
select either Groups or Children. After trying to select a group when
I roll the ball the group I tried to select becomes sellected and all
views within the created view set become selectable.

Any ideas??
--~--~-~--~~~---~--~~
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] Re: Creating a Lite and Pro version of an application

2009-10-05 Thread Steve Oliver
So a user would need to download both the free app, as well as the paid app
(which unlocks features in the free app)?
Is there a way where a user could download just the paid app?

On Mon, Oct 5, 2009 at 1:34 PM, Justin Anderson wrote:

> The method is to have a main application and an application that acts a key
> to "unlock" functionality in the main app.  You can't upload two products
> with the same package to the android market.
>
> Doing it the way I described in the other thread allows the main
> application to contain all the functionality to run in both "lite" and
> "paid" modes.  The mode that the application runs in is determined by
> whether you have the key installed, which of course would have to have a
> separate package name because you are not allowed to upload two projects
> with the same package name.
>
> The application that acts as a key never even has to run... it just has to
> exist. Although, in my case, I have my key program set to just launch my
> main app and quit.
>
> Pulling common stuff out into a separate library would "work" (kind of) but
> it would not be as easy as my method.
>
> Thanks,
> Justin
>
> --
> There are only 10 types of people in the world...
> Those who know binary and those who don't.
> --
>
>
> On Mon, Oct 5, 2009 at 2:19 PM, Steve  wrote:
>
>>
>> I don't think the other thread explained how to do this without
>> creating two package names.  You would either have to re-name your
>> package each time you published, or you would need two different
>> projects, wouldn't you?
>>
>> Another approach is to try to pull out as much common functionality as
>> you can into a 3rd Java-only project, with each of your projects (paid
>> and free).  The tough part is that you can't move anything that
>> references resources into a Java-only project.
>>
>> On Oct 5, 11:58 am, Justin Anderson  wrote:
>> > I have already asked the same question, and later the solution on
>> another
>> > thread.  Just do a quick search for "code base" and you will find out
>> how to
>> > do this.
>> >
>> > If you have done this already, then you can ignore this, but a lot of
>> > duplicate questions can be eliminated simply by searching for an answer
>> > before posting a new question...
>> >
>> > Thanks,
>> > Justin
>> >
>> > --
>> > There are only 10 types of people in the world...
>> > Those who know binary and those who don't.
>> > --
>> >
>> >
>> >
>> > On Sun, Oct 4, 2009 at 7:48 PM, jax  wrote:
>> >
>> > > I want to crete two seperate android applications.
>> >
>> > > 1.  A "Lite" version with limited functionality
>> > > 2.  A upgrade to the lite version (Pro version) with extended
>> > > functionality (This will cost money)
>> >
>> > > Can someone tell me the best way to approach thisproject setup
>> > > etc.
>>
>>
>
> >
>


-- 
Android mobile application development
http://steveoliverc.squarespace.com/

--~--~-~--~~~---~--~~
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] Re: Is your Android app on Archos Market ?

2009-10-20 Thread Steve Oliver
Got it, it's the ESC key (just like all the other emulators).

On Tue, Oct 20, 2009 at 7:48 AM, Steve  wrote:

>
> I tried the Archos emulator on your web site, but can't figure out how
> to simulate the BACK button?  Is there a key for it? thanks.
>
> On Oct 20, 1:56 am, arnouf  wrote:
> > If you  have developed or if you are developing applications, and they
> > are on the Android Market - Great! - But these apps are only
> > available for devices that have contracts with Google.
> >
> > Archos, a major PMP manufacturer, launched its first device on 25th of
> > September: the Archos 5 IT. Archos has a real community of fans who
> > are waiting for applications for their devices. This device is the
> > first of a long product line (the first Archos phone should be
> > available soon too!).
> >
> > It's a new opportunity for your applications to find new fans!
> >
> > You can post your apps, for free, on the Archos Market called Appslib
> > (http://www.appslib.com).
> >
> > Today, only free applications are available for distribution on
> > AppsLib, but Archos promises the possibility to distribute your paid
> > apps soon !
> >
> > Don't wait : more applications, more users, more fans...and more
> > revenue (soon)!
> >
> > Arnaud
> >
>


-- 
Android mobile application development
http://steveoliverc.wordpress.com/

--~--~-~--~~~---~--~~
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] Re: Is your Android app on Archos Market ?

2009-10-20 Thread Steve Oliver
the Menu button is done with the PAGE UP key

On Tue, Oct 20, 2009 at 7:57 AM, Jeffrey Blattman <
jeffrey.blatt...@gmail.com> wrote:

>  and the menu button?
>
> On 10/20/09 7:48 AM, Steve wrote:
>
> I tried the Archos emulator on your web site, but can't figure out how
> to simulate the BACK button?  Is there a key for it? thanks.
>
> On Oct 20, 1:56 am, arnouf  
>  wrote:
>
>
>  If you  have developed or if you are developing applications, and they
> are on the Android Market - Great! - But these apps are only
> available for devices that have contracts with Google.
>
> Archos, a major PMP manufacturer, launched its first device on 25th of
> September: the Archos 5 IT. Archos has a real community of fans who
> are waiting for applications for their devices. This device is the
> first of a long product line (the first Archos phone should be
> available soon too!).
>
> It's a new opportunity for your applications to find new fans!
>
> You can post your apps, for free, on the Archos Market called Appslib
> (http://www.appslib.com).
>
> Today, only free applications are available for distribution on
> AppsLib, but Archos promises the possibility to distribute your paid
> apps soon !
>
> Don't wait : more applications, more users, more fans...and more
> revenue (soon)!
>
> Arnaud
>
>
>  >
>
>
>
> --
>



-- 
Android mobile application development
http://steveoliverc.wordpress.com/

--~--~-~--~~~---~--~~
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] Unable to see Google Map - but eveything else seems to be working....

2009-12-06 Thread Steve Keener
I have an odd problem.  I'm working on my first Maps application.  I'm
using the demo/tutorial code as a baseline to figure this out.

I have the app running, I can see the zoom controlsbut no map
graphic.

I see no errors in the console.

I've set the debug.keystore.  I also have the key for the API set.
I've verified I have them in the right place according to the Eclipse
configuration.

I can even add an overlay with a small graphic with no problem.

But I still only see the "graph paper"-like background for the map.
I'm not sure what's going on.

Using Java 1.6.

Anybody have any ideas?  Thanks!

Steve

-- 
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] Is it necessary to rebuild android platform

2008-12-18 Thread Steve Logue

I've setup my development enviroment on Windows with Eclipse and the
ADT plugin and and build and run the Lunar Lander sample.

I'd like to be able to build the Android Mail application but it's
using a newer version of the framework (for example, it's trying to
import #)

One solution is to rebuild the latest Android platform using the
latest source from GIT. That would mean installing Linux on a VM on my
Windows machine and rebuilding it though, and I can't be bothered.

Is it possible to get the ready-built files (including android.jar for
example) without building from source ?

Thanks

Steve

(Ordered dev phone 2 days ago, can't wait !)

--~--~-~--~~~---~--~~
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] Re: Hello Android!

2009-01-05 Thread Steve Carville

Go into 'Run Configurations' and hit the 'Target' tab.  Change the 'Emulator
Launch Parameters to GPRS for Network speed and Latency.  You could also
tick the 'Wipe User Data' tab. Then all you have to do is run the app and
give the emulator time to boot up (although you can disable the boot
animation too).

Don't know about the other question; I'm a beginner too and the Notepad app
tutorial looks pretty scary!!

Steve

-Original Message-
From: android-beginners@googlegroups.com
[mailto:android-beginn...@googlegroups.com] On Behalf Of Buixa
Sent: 02 January 2009 11:06
To: Android Beginners
Subject: [android-beginners] Hello Android!


Hi!

I'm Buixa from Barcelona (Spain) and It's my first day with Android.

I've done all steps explained in
http://code.google.com/intl/es-ES/android/intro/hello-android.html.

I launch the Android's aplication and then Eclipse executes Android
emulator but I only see the Android emulator with words "ANDROID". It
doesn't run Hello, Android!

Why? and What Have i do to lauch my Android's aplication well?

Buixa




--~--~-~--~~~---~--~~
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] The Widget used for the Main Menu in android Home Screen

2009-02-05 Thread Steve Wong

Hi everyone,

I want to use the widget that is used for the main menu in the Android
Home Screen, but I'm not sure which one it is, or if it's even exposed
to be used in the SDK.  Could anyone provide me details on this?

- Steve

--~--~-~--~~~---~--~~
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] Which View is the Android Main Menu?

2009-02-05 Thread Steve Wong

Hi,

I am interesting in using the view that android has of the sliding
main menu that is on the home screen (where you can drag the tab to
expose the main menu on the screen).  Is this view open to
applications?  If so, which is it?  It's also used for the in-call
dialer I think.

- Steve

--~--~-~--~~~---~--~~
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] Re: Which View is the Android Main Menu?

2009-02-16 Thread Steve Wong

Thanks!

On Feb 7, 4:47 pm, Mark Murphy  wrote:
> >> I am interesting in using the view that android has of the sliding
> >>mainmenuthat is on the home screen (where you can drag the tab to
> >> expose themainmenuon the screen).  Is this view open to
> >> applications?
>
> Not at this time, though it may be made available in future editions of
> Android.
>
> It is called com.android.internal.widget.SlidingDrawer, so you can
> examine the source code for it viahttp://source.android.com.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
>
> Android Training on the Ranch! -- Mar 16-20, 
> 2009http://www.bignerdranch.com/schedule.shtml
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---