Hi,
Hey man you have to use different xml layout for row of listview. see this
carefully you will understand what ou are doing wrong.
http://developer.android.com/resources/tutorials/views/hello-listview.html

--
Thanks & Regards,
Kapil Lokhande | Dexter Advisory Pvt. Ltd. <http://dexterltd.com/> | Android
Developer
[image: dexterlogo.jpg]


On Tue, Apr 19, 2011 at 11:15 PM, fixus <dpacholc...@gmail.com> wrote:

> Hi List,
>  I`m new in developing android apps.
>
> Unfortunatly I have probles from start :(
>
> I`ve created code like this:
>
> package fix.main;
>
> import android.app.Activity;
> import android.os.Bundle;
> import android.widget.ArrayAdapter;
> import android.widget.ListView;
>
> public class Starter extends Activity {
>        protected String[] items = {"jeden", "dwa", "trzy"};
>
>    /** Called when the activity is first created. */
>    @Override
>    public void onCreate(Bundle savedInstanceState) {
>        super.onCreate(savedInstanceState);
>        setContentView(R.layout.main);
>        ListView lv = (ListView)findViewById(R.id.listView1);
>        lv.setAdapter(new ArrayAdapter<String>(this, R.layout.main,
> items));
>    }
> }
>
> When I start it in the emulator I ALWAYS get a error that force me to
> make "force close"
>
> I have this with every example of ListView from web.
>
> The standard HelloWorld works fine. What is wrong with this code ?
>
> Best regards,
> Dawid "Fixus" Pacholczyk
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

<<dexterlogo.jpg>>

Reply via email to