[android-beginners] List of Android Apps

2008-10-08 Thread Zachary Becker

Is there a place with a list of Android Applications? Somewhat like
the Apple store. Just somewhere centralized that you can go and look.

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Why isn't this layout file working?

2008-10-04 Thread Zachary Becker
You want to use the XML attribute *android:layout_weight=1* so that the
element will take up as much space as it can. I edited your layout and
posted a working version below.

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


   TableLayout
   android:layout_width=fill_parent
   android:layout_height=wrap_content
   
   TableRow
   TextView
   android:layout_width=wrap_content
   android:layout_height=wrap_content
   android:text=Artist
   android:padding=10sp
   /
   EditText
   android:layout_weight=1
   android:layout_height=wrap_content
   android:layout_marginRight=10sp
   android:singleLine=true
   /
   /TableRow

   TableRow
   TextView
   android:layout_width=wrap_content
   android:layout_height=wrap_content
   android:text=Title
   android:padding=10sp
   /
   EditText
   android:layout_weight=1
   android:layout_height=wrap_content
   android:layout_marginRight=10sp
   android:singleLine=true
   /
   /TableRow
   /TableLayout

/LinearLayout

On Sat, Oct 4, 2008 at 10:25 AM, Znupi [EMAIL PROTECTED] wrote:


 Here's what I want: two simple input fields, one labeled Artist and
 one Title. Basically:
 Artist   [ input ]
 Title[ input ]
 The two input fields (EditTexts) need to be aligned on a vertical
 axis, so that the application looks good. Thus, I used the TableLayout
 View. Unfortunately, it seems I just can't get the table cells to
 expand all the way. So here's how my layout looks like (the |
 represends the margin of the screen):
 Artist   [ input ]   |
 Title[ input ]   |
 But I want the input fields to expand all the way. I could probably do
 it with a fixed width, but I don't think that's a good idea. Here's my
 main.xml file:
 
 ?xml version=1.0 encoding=utf-8?
 LinearLayout xmlns:android=http://schemas.android.com/apk/res/
 android
android:orientation=vertical
android:layout_width=fill_parent
android:layout_height=fill_parent
 

TableLayout
android:layout_width=fill_parent
android:layout_height=wrap_content

TableRow android:layout_width=fill_parent
TextView
android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=@string/artist
android:padding=10sp
/
EditText
android:layout_width=fill_parent
android:layout_height=wrap_content
android:layout_marginRight=10sp
android:singleLine=true
/
/TableRow

TableRow android:layout_width=fill_parent
TextView
android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=@string/title
android:padding=10sp
/
EditText
android:layout_width=fill_parent
android:layout_height=wrap_content
android:layout_marginRight=10sp
android:singleLine=true
/
/TableRow
/TableLayout

 /LinearLayout
 
 BTW, I know the LinearLayout is not currently needed, but I'll have
 to add some things below the table.

 Thanks,
 Felix.
 


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

[android-beginners] Re: Using the Log class

2008-10-03 Thread Zachary Becker
Wow I am awake now, I spent 20 minutes trying to figure that out and it
isn't even in a function. Ok time for bed.

On Thu, Oct 2, 2008 at 11:41 PM, Zachary Becker [EMAIL PROTECTED] wrote:

 I am trying to debug this activity. And so far I have tried to avoid using
 the debugger features in Eclipse because I can't figure out how they work. I
 can step through my activity untill it crashes but it doesn't tell me what
 line of code is causing the error or anything. So, I was going to try
 sending messages to the Log thingy that is there when you are debugging.

 From what I gather you do that using Log class.

 Such as Log.d(myApp, my message);

 But when I use that Eclipse tells me I have a syntax error.

 It is getting late so I might just be tired and totally missing something.
 But I figured id ask if anyone could help.

 Here is a screeny of the message.

 http://zrbecker.com/error.jpg

 Thanks in advanced.


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Using the Log class

2008-10-03 Thread Zachary Becker
I am trying to debug this activity. And so far I have tried to avoid using
the debugger features in Eclipse because I can't figure out how they work. I
can step through my activity untill it crashes but it doesn't tell me what
line of code is causing the error or anything. So, I was going to try
sending messages to the Log thingy that is there when you are debugging.

From what I gather you do that using Log class.

Such as Log.d(myApp, my message);

But when I use that Eclipse tells me I have a syntax error.

It is getting late so I might just be tired and totally missing something.
But I figured id ask if anyone could help.

Here is a screeny of the message.

http://zrbecker.com/error.jpg

Thanks in advanced.

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Hardware

2008-10-02 Thread Zachary Becker
I don't believe Google has any say on how individual phones are sold. Just
like Ubuntu doesn't have much say on how Dell sells computers on how they
sell Ubuntu computers. At least that is my understanding. If you want to be
mad at anyone for the 2 year contract be mad at T-mobile. But as Mark said
the 2 year contract is typical of buying almost any mobile phone.

On Thu, Oct 2, 2008 at 4:00 AM, Mark Murphy [EMAIL PROTECTED] wrote:


 Ron Pinkas wrote:
  What gives? How could you advocate freedom, open source, etc., when
  you try to force your clients into 2 years conracts with an exclusive
  provider?

 HTC and T-Mobile are welcome to do what they want; it's a part of
 free-market economies.

 It is fairly common in the US for phones to be subsidized and,
 therefore, SIM-locked and tied to a two-year contract. Off the top of my
 head, I'm not aware of any major US wireless carrier that *doesn't* work
 this way.

 HTC is welcome to sell un-badged/unlocked HTC Dream phones, if their
 contract with T-Mobile allows it. I have no idea if it does or not --
 the terms of HTC's and T-Mobile's contract are (presumably) private to
 their firms. Again, welcome to the free-market economy. I get the
 impression that HTC's typical contracts don't allow them to directly
 sell such devices in the US market, but that they can sell them
 elsewhere, allowing resellers to bring them stateside. Watch the sites
 of your favorite mobile device resellers, or watch eBay.

 Also, there may be markets that Deutsche Telekom/T-Mobile enter that
 require unlocked phones. Not every country supports the US phone
 distribution model. So it may be that, where you are, you will be able
 to get one unlocked and without a contract from the start.

 Also also, I've heard that T-Mobile will unlock your G1 for you after 90
 days, but I don't recall seeing a definitive statement from T-Mobile
 confirming that point.

 So, rolling back to your original point, if you have proof that HTC and
 T-Mobile wanted to buck tradition and sell unsubsidized/unlocked phones
 in the US market, and Google forced them at gunpoint to do otherwise,
 please post a link!

  While I understand that more phones from more vendors may ultimately
  become available, this does not change the fact that the only hardware
  currently available is not at all availble in the true meaning of
  the word.

 This is an issue for HTC, and secondarily T-Mobile. Google is more
 involved than, say, the Apache Foundation, but the whole *point* of
 Android is to create an open source mobile operating system that firms
 could use with no strings attached. No strings attached means just that
 -- and in the US market, requiring unsubsidized/unlocked phones would be
 considered a substantial string.

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com

 Android Training on the Ranch! -- Mar 16-20, 2009
 http://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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Using the gravity attribute

2008-10-02 Thread Zachary Becker
Another option would be to put your title in a LinearLayout with weight 1 so
that it takes up all the vertical space except for the space the button
takes up.

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

   LinearLayout android:layout_width=fill_parent
  android:layout_height=fill_parent
  android:layout_weight=1

  TextView android:layout_width=fill_parent
 android:layout_height=wrap_content
 android:text=This is a Title /

   /LinearLayout

   Button android:layout_width=wrap_content
  android:layout_height=wrap_content
  android:layout_gravity=bottom
  android:id=@+id/Submit
  android:text=Button 1 /

/LinearLayout

On Thu, Oct 2, 2008 at 8:36 AM, Cadge [EMAIL PROTECTED]wrote:


 Ok I understand now,

 Thanks a lot.

 On Oct 2, 4:27 pm, Romain Guy [EMAIL PROTECTED] wrote:
  layout_gravity=bottom works only in horizontal LinearLayouts. In your
  case, you should use a RelativeLayout. Then, on your TextView, use
  android:layout_alignParentTop=true and on the Button, use
  android:layout_alignParentBottom=true.
 
 
 
  On Thu, Oct 2, 2008 at 8:22 AM, Cadge [EMAIL PROTECTED]
 wrote:
 
   Ok I tired as you suggested replacing the line
 
   ---
android:gravity=bottom
   ---
 
   with
 
   ---
android:layout_gravity=bottom
   ---
 
   with the rest of the code staying as it was. But it still hasn't
   changed anything and the button still apears at the top.
 
   Any ideas?
 
   Cheers.
 
   On Oct 2, 1:46 pm, Mark Murphy [EMAIL PROTECTED] wrote:
   Cadge wrote:
I have a (extremely) simple app that shows some text and a button
which does nothing just now. As it stands the text appears with
 button
imediately below this.
 
What I want to do is keep the text at the top but move the button to
the bottom of the screen.
 
   snip
 
As you can see I have the following line in the Button tag
 
---
android:gravity=bottom

 
I thought this would move the button to the bottom but it still
appears at the top of the screen under the text.
 
   You probably want android:layout_gravity=bottom. It's documented in
   LinearLayout.LayoutParams in the SDK docs.
 
   --
   Mark Murphy (a Commons Guy)http://commonsware.com
 
   Android Training on the Ranch! -- Mar 16-20, 2009
 http://www.bignerdranch.com/schedule.shtml
 
  --
  Romain Guywww.curious-creature.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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Using the gravity attribute

2008-10-02 Thread Zachary Becker
I put the LinearLayout there because I assumed he would be adding items
between the title and the button.

Thanks, for the advice on weight though. Not totally comfortable with
relative layouts yet. =\ Getting there. =)

On Thu, Oct 2, 2008 at 8:58 AM, Romain Guy [EMAIL PROTECTED] wrote:

 There is no need at all for a second linear layout. The weight can be set
 directly on the text view. Also, your example is wrong because a weight is
 meaningless when the dimension is fill_parent. Last but not least, using
 weight causes linear layout to do two measurement passes. In a case like
 this were weight can be avoided, it's better to do so.

 On Oct 2, 2008 8:48 AM, Zachary Becker [EMAIL PROTECTED] wrote:

 Another option would be to put your title in a LinearLayout with weight 1
 so that it takes up all the vertical space except for the space the button
 takes up.

 ?xml version=1.0 encoding=utf-8?

 LinearLayout xmlns:android=http://schemas.android.com/apk/res/android;
android:orientation=ve...
LinearLayout android:layout_width=fill_parent

   android:layout_height=fill_parent
   android:layout_weight=1

   TextView android:layout_width=fill_parent
 android:layout_height=wrap_content
  android:text=This is a Title /

/LinearLayout

 Button android:layout_width=wrap_content
 android:layout_height=wrap_content
   android:layout_gravity=bottom
   android:id=@+id/Submit
   android:text=Button 1 /

 /LinearLayout

  On Thu, Oct 2, 2008 at 8:36 AM, Cadge [EMAIL PROTECTED]
 wrote:Ok I understa...

 


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: With no previous programming knowledge / experience, how do I get started creating an app?

2008-09-30 Thread Zachary Becker
The eclipse plugin does a lot of things.

It lets you set up a run configuration so that it will load your program in
the android emulator when you are testing it.
It updates your resources class whenever you add new stuff.
It sets up a basic template program for you to start with.

And I am sure a bunch of other things that I probably take for granted, due
to the fact I haven't tried programming android without it. However, I am
sure I would be lost without it.

On Tue, Sep 30, 2008 at 9:24 PM, Morisato13 [EMAIL PROTECTED] wrote:


 I'm sorry, but what exactly does the eclipse plugin do? There's a
 tidbit about it in the FAQs stating that it makes creating apps for
 Android easier, but what does it actually do that makes it easier? Is
 it the conversion tool that converts Java to Dalvik? Is it a GUI that
 does coding in Java without actually typing out Java code (kind of
 like VB where you have windows and such and you move them around and
 set value having it do the real coding behind the scenes)? Or is it
 something completely different?

 On Sep 30, 9:38 am, David Farler [EMAIL PROTECTED] wrote:
  You are correct. First, your files are compiled as true java class files.
  The Java bytecode gets converted to the dex format by the dx utility.
 So,
  while it's not technically Java at the end, all of the rules of
  programming java should apply. This is why using Eclipse is such a huge
  plus. It's Java language integration is very good.
  If you want to get on a Java forum, you can try Sun's Java forum:
 
  Java Beginners:http://forums.sun.com/forum.jspa?forumID=54
 
  Java Programming in General:http://forums.sun.com/forum.jspa?forumID=31
 
  Cheers,
  David
 
  On Tue, Sep 30, 2008 at 3:50 AM, Morisato13 [EMAIL PROTECTED]
 wrote:
 
   Thanks. I'm reading #4 right now.
 
   Now I was watching the featured video on the andriod home page with
   Jason Chen, and one of the questions in the QA section of the video
   made Jason clarify that Android is not Java, applications are written
   in Java programming language, but Android is Dalvic bicode... now,
   with that said, is there anything that I would learn while learning
   Java that does not or can not be applied to programming applications
   for Android? I'm guessing no because from my guess, what happens is
   you code in Java and it gets baked into whatever Dalvic bicode is for
   android to recognize it... but I just want someone who knows to
   answer.
 
   Also, are there any forums that specifically help noobs with noob java/
   programming questions? I'd ask them here but it seems this forum is
   really for Android related questions.
 
   On Sep 29, 3:52 am, David Farler [EMAIL PROTECTED] wrote:
Hi Morisato,
Since you'll be programming in Java for Android, I recommend you
 start
practicing with it. Java is a good place to start in many cases.
 Check
   out
the following books from your library or college library:
 
1. Absolute Java by Walter Savitch (3rd edition)
2. Java Foundations: Introduction to Program Design and Data
 Structures
   by
John Lewis
3. Also check out this free online course offered by MIT (you don't
 have
   to
register):
Introduction to Computer Science and Programming
  http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science.
 ..
4. A free online book: Thinking in Java by Bruce Eckel:
  http://www.mindview.net/Books/TIJ/
5. And don't forget the official Java API:
  http://java.sun.com/javase/6/docs/api/
 
All of these resources should get you started. Remember that
 programming
   is
more than just memorization. Try to use first principles by
 understanding
how a computer (or virtual machine in this case) is doing its job.
 Once
   you
understand the core of it, you can program in any language.
 
All of the suggestions above assume no previous knowledge (except
 number
   5,
but take a look at it anyway). Don't get discouraged. Programming can
 be
hard, but remember that sometimes people make it hard because they
 don't
remember what it's like to be a beginner. You should feel lucky that
   Google
has done such a good job on documenting how to get started. Try to
 have
   fun.
 
 The first two books can be expensive (try to buy used) but they are
   pretty
good. Don't forget to check your local library and ask if they have a
state-wide book sharing program. Maybe another library will lend it
 to
   them.
If you have trouble and can't get a book, get in touch with me. I'll
 be
happy to send you one of mine, I have extra copies.
 
My most important advice: DOCUMENT CLEARLY AND ALWAYS PLACE COMMENTS
 IN
   YOUR
CODE.
 
Best of luck,
David
 
On Mon, Sep 29, 2008 at 2:21 AM, Morisato13 [EMAIL PROTECTED]
   wrote:
 
 Hello, I'm a COMPLETE NOOB when it comes to programming. When I was
 younger I was interested in programming and read a few Visual Basic
 books, but my knowledge is 

[android-beginners] Re: What will be the next Android phone after G1?

2008-09-29 Thread Zachary Becker
I am sure there will be many phones to follow, but none have been annouced
yet. Well not as far as I have heard.

On Sun, Sep 28, 2008 at 12:58 PM, [EMAIL PROTECTED] 
[EMAIL PROTECTED] wrote:


 Hi guys,

 I am quite excited about android phones, but I think the first phone
 to reach the market is a bit behing the competition. I was wondering
 if anyone knows here some other company creating a new phone for
 Android, hopefully something like HTC HD, but running android instead
 (and Multi-Touch, maybe??).

 Cheers

 


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Background Image for a (semi-transparent) List

2008-09-29 Thread Zachary Becker
I am having a similar issue.

I tried you suggestion but my list just shows up empty.

I think my problem might be in my XML.


Here is my code

simplelist.java
===
package zach.test.simplelist;

import android.app.ListActivity;
import android.os.Bundle;
import android.widget.ArrayAdapter;

public class SimpleList extends ListActivity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

String[] StringArray = { Hello, World!, Foo Bar, Blah Blah
Blah };
ArrayAdapterString StringAdapter = new ArrayAdapterString(this,
R.layout.row, StringArray);
// setListAdapter(StringAdapter);// crashes program on startup
getListView().setAdapter(StringAdapter);// program starts fine,
but list shows empty

setContentView(R.layout.main);
}
}

main.xml
===
?xml version=1.0 encoding=utf-8?
LinearLayout xmlns:android=http://schemas.android.com/apk/res/android;
  android:layout_width=wrap_content
  android:layout_height=wrap_content
ListView android:id=@+id/android:list
  android:layout_width=wrap_content
  android:layout_height=wrap_content /
TextView android:id=@+id/android:empty
  android:layout_width=wrap_content
  android:layout_height=wrap_content
  android:text=No Items! /
/LinearLayout

row.xml
=
?xml version=1.0 encoding=utf-8?
TextView xmlns:android=http://schemes.android.com/apk/res/android;
  android:id=@+id/text1
  android:layout_width=wrap_content
  android:layout_height=wrap_content /

On Mon, Sep 29, 2008 at 11:12 AM, David Farler [EMAIL PROTECTED] wrote:

 Hi Sascha,
 I'm not an expert yet at this, but I did look into your problem. Perhaps
 you are forgetting to use the ListActivity's own ListView? Code below should
 work.


 package com.android.hello;

 import android.app.ListActivity;
 import android.os.Bundle;
 import android.widget.ArrayAdapter;

 public class HelloAndroid extends ListActivity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

String[] someStringArrayThatShouldWork = {Test1, Test2,
 Test3};

ArrayAdapterString aAdapter = new ArrayAdapterString(this,
 android.R.layout.simple_list_item_1, someStringArrayThatShouldWork);
getListView().setAdapter(aAdapter);
}
 }



 Hope this helps,
 David






 On Mon, Sep 29, 2008 at 11:09 AM, [EMAIL PROTECTED] 
 [EMAIL PROTECTED] wrote:


 Hi fellows,

 first of all, please don't hit me for asking stupid question. :) I'm
 quite a novice when it comes to Java (J2EE, J2ME, J2SE), but I'm a
 totally n00b when it comes to android. The tutorials are very helpful
 although I needed several tries to get a ListActivity working (using a
 ListAdapter)... my approach to just display an array of Strings didn't
 work... That should have been the easiest solution, since I have a
 fixed number of items to display in the list...

 This is what I did:

 private String[] someStringArrayThatShouldWork = {Test1, Test2};

 in the onCreate method:

 setListAdapter(new ArrayAdapterString(this,
android.R.layout.simple_list_item_1,
 someStringArrayThatShouldWork));
 getListView().setTextFilterEnabled(true);

 I received an exception whenever I wanted to start the app. Is there
 anything else I need? That exception was something like need ID for
 TextView or something...

 But basically I'd like to have something like that:

 A list, which is semi-transparent printed on a background image! That
 background image should change when ever the device is rotated to it's
 widescreen outfit. You should see the background image and also the
 list entrie about it. (65% opacity)

 Can someone give me some hints where to start... I've already checked
 the API demos... But I didn't even get the simple List (String Array
 example) to work... :)

 Regards and thank you very much in advance,

 Sascha




 


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Background Image for a (semi-transparent) List

2008-09-29 Thread Zachary Becker
Ah ouch, spelt schemas wrong. lol.

Thanks for the help. Seems to work now =D

On Mon, Sep 29, 2008 at 5:17 PM, David Farler [EMAIL PROTECTED] wrote:

 Actually, Zach, I pasted everything you sent me and I also got your No
 Items! message. The problem is with your row.xml.
 Try this:

 row.xml:
 TextView xmlns:android=http://schemas.android.com/apk/res/android;
 android:id=@android:id/text1 android:paddingTop=2dip
  android:paddingBottom=3dip android:layout_width=fill_parent
 android:layout_height=wrap_content /
 :

 This is similar to Android's simple_list_item_1 layout.
 Then, remove the line:

 setContentView(R.layout.main);

 The content view is already being set when connecting this class to the
 ArrayAdapter. Resetting it to main will make it blank.

 Hope this helps,
 David




 On Mon, Sep 29, 2008 at 3:43 PM, Zachary Becker [EMAIL PROTECTED] wrote:

 I am having a similar issue.

 I tried you suggestion but my list just shows up empty.

 I think my problem might be in my XML.


 Here is my code

 simplelist.java
 ===
 package zach.test.simplelist;

 import android.app.ListActivity;
 import android.os.Bundle;
 import android.widget.ArrayAdapter;

 public class SimpleList extends ListActivity {
 /** Called when the activity is first created. */
 @Override
 public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);

 String[] StringArray = { Hello, World!, Foo Bar, Blah Blah
 Blah };
 ArrayAdapterString StringAdapter = new
 ArrayAdapterString(this, R.layout.row, StringArray);
 // setListAdapter(StringAdapter);// crashes program on startup
 getListView().setAdapter(StringAdapter);// program starts
 fine, but list shows empty

 setContentView(R.layout.main);
 }
 }

 main.xml
 ===
 ?xml version=1.0 encoding=utf-8?
 LinearLayout xmlns:android=http://schemas.android.com/apk/res/android;
   android:layout_width=wrap_content
   android:layout_height=wrap_content
 ListView android:id=@+id/android:list
   android:layout_width=wrap_content
   android:layout_height=wrap_content /
 TextView android:id=@+id/android:empty
   android:layout_width=wrap_content
   android:layout_height=wrap_content
   android:text=No Items! /
 /LinearLayout

 row.xml
 =
 ?xml version=1.0 encoding=utf-8?
 TextView xmlns:android=http://schemes.android.com/apk/res/android;
   android:id=@+id/text1
   android:layout_width=wrap_content
   android:layout_height=wrap_content /


 On Mon, Sep 29, 2008 at 11:12 AM, David Farler [EMAIL PROTECTED] wrote:

 Hi Sascha,
 I'm not an expert yet at this, but I did look into your problem. Perhaps
 you are forgetting to use the ListActivity's own ListView? Code below should
 work.


 package com.android.hello;

 import android.app.ListActivity;
 import android.os.Bundle;
 import android.widget.ArrayAdapter;

 public class HelloAndroid extends ListActivity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

String[] someStringArrayThatShouldWork = {Test1, Test2,
 Test3};

ArrayAdapterString aAdapter = new ArrayAdapterString(this,
 android.R.layout.simple_list_item_1, someStringArrayThatShouldWork);
getListView().setAdapter(aAdapter);
}
 }



 Hope this helps,
 David






 On Mon, Sep 29, 2008 at 11:09 AM, [EMAIL PROTECTED] 
 [EMAIL PROTECTED] wrote:


 Hi fellows,

 first of all, please don't hit me for asking stupid question. :) I'm
 quite a novice when it comes to Java (J2EE, J2ME, J2SE), but I'm a
 totally n00b when it comes to android. The tutorials are very helpful
 although I needed several tries to get a ListActivity working (using a
 ListAdapter)... my approach to just display an array of Strings didn't
 work... That should have been the easiest solution, since I have a
 fixed number of items to display in the list...

 This is what I did:

 private String[] someStringArrayThatShouldWork = {Test1, Test2};

 in the onCreate method:

 setListAdapter(new ArrayAdapterString(this,
android.R.layout.simple_list_item_1,
 someStringArrayThatShouldWork));
 getListView().setTextFilterEnabled(true);

 I received an exception whenever I wanted to start the app. Is there
 anything else I need? That exception was something like need ID for
 TextView or something...

 But basically I'd like to have something like that:

 A list, which is semi-transparent printed on a background image! That
 background image should change when ever the device is rotated to it's
 widescreen outfit. You should see the background image and also the
 list entrie about it. (65% opacity)

 Can someone give me some hints where to start

[android-beginners] Re: Installing ADT

2008-09-27 Thread Zachary Becker
Thanks,

I guess that actual problem was I just wasn't waiting long enough. I left it
while I was at work and it eventually installed. Was really weird it took so
long though. There was one time I left it and took a shower and came back
and it was still at the screen I mentioned. It works fine now though. =)

On Fri, Sep 26, 2008 at 10:00 AM, Jerry Elizondo
[EMAIL PROTECTED]wrote:

 Hello Zachary:

 I just went through the same problem and found I have trouble because some
 other plugins were out of date or not present. BEFORE you install the SDK /
 PlugIn you must do the following. Please make sure your Firewall is
 configured to let eclipse.exe access the Internet.

 If you donĀ“t have the JAVA SDK, install it first. (
 http://java.sun.com/javase/downloads/index.jsp) I used JDK 6 Update 7.

 - Donwload Eclipse (I used Ganymede)
 - Go to Windows / Preferences, select Install / Update and then click on
 the link for Automatic Updates, change the settings to:
Look for updates each time the platform is started
Search for updates and notify me when they are available
Notify me once about updates

 Click on apply and then Ok.

 Restart Eclipse, let the auto-update run. Then go to Help / Software
 Updates; check Show Only the Latest Versions of Available Software. Then
 check http://download.eclipse.org/releases/ganymede and select the
 following packages:

   Java Development
  Web and Java EE Development

 Click Install and wait for the updates to be downloaded / installed.
 Restart Eclipse when asked.

 Now close Eclipse. Unpack the SDK in a directory. Start Eclipse, go to Help
 / Software Update, click on Add Site, enter the URL

 https://dl-ssl.google.com/android/eclipse/


 Click on Install. It should work as advertised!

 Cheers,




 On Thu, Sep 25, 2008 at 10:49 AM, Zachary Becker [EMAIL PROTECTED]wrote:


 I am trying to install ADT onto Eclipse.

 When I click the Install button a progress bar comes up and says
 Calculating requirements and dependencies. Then it just sits there
 and doesn't do anything. I've tried leaving it there for some time,
 but nothing changes.

 I have tried downloading the package and installing it locally too,
 but I got the same issue.

 Also, I have tried redownloading different versions of Eclipse, but
 that didn't seem to help either. 

 I am new to Eclipse and Android so any help would be greatly
 appreciated.

 Thanks,

 Zach.




 


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---