Very poor information. Do you heard about debugger? Debug
onListItemClick method. What kind of the exception do you see?

On Aug 15, 11:29 am, Eugene Shmorgun <[email protected]> wrote:
> Good time!
>
> I have Activity for ListView, that are wrapped on whole view:
>
> <?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"
>     >
> <ListView
>    android:id="@android:id/list"
>    android:layout_width="fill_parent"
>    android:layout_height="fill_parent"
>    android:drawSelectorOnTop="false"
> />
> </LinearLayout>
>
> I'm adding items to this ListView from string-array:
>
> <string-array name="list_banks_ua">
>     <item>¿àØÒÐâÑÐÝÚ</item>
>     <item>¿àØÒÐâÑÐÝÚ1</item>
>     <item>¿àØÒÐâÑÐÝÚ2</item>
>     <item>¿àØÒÐâÑÐÝÚ3</item>
>     <item>¿àØÒÐâÑÐÝÚ4</item>
>     <item>¿àØÒÐâÑÐÝÚ5</item>
>     <item>¿àØÒÐâÑÐÝÚ6</item>
> </string-array>
>
> by this code:
>
> public class MainActivity extends ListActivity
> {
>     /** Called when the activity is first created. */
>         public String[] listBanksUA;
>     @Override
>     public void onCreate(Bundle savedInstanceState)
>     {
>         super.onCreate(savedInstanceState);
>         setContentView(R.layout.main);
>
>         listBanksUA =
> getResources().getStringArray(R.array.list_banks_ua);
>         setListAdapter(new
> ArrayAdapter<String>(this,android.R.layout.simple_list_item_1,listBanksUA));
>     }
>
> }
>
> Yeh, that's greate and it works as I want.
>
> But I want to new activity appears after click in item in this
> ListView, What do I for this? Next code:
>
> @Override
> protected void onListItemClick(ListView l, View v, int position, long
> id)
> {
>  Intent intent = new
> Intent(MainActivity.this,ListRegionActivity.class);
> startActivity(intent);
>
> }
>
> So, after click on item in ListView I'm getting the message -
> "Application %app has stopped unexpectedly.Please, try again".
> Of course, new activity is added to manifest.
>
> Help mem please, someone, becouse of I'm in stub...

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

Reply via email to