Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Mobile Development
  3. Android
  4. project

project

Scheduled Pinned Locked Moved Android
androidtutorial
5 Posts 3 Posters 20 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    salkhan786
    wrote on last edited by
    #1

    public class MainActivity extends Activity { ListView lv; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); lv=(ListView)findViewById(R.id.listView1); String[] Wishlist={"VisitTop10beaches","Adventures","Sports","Camp Site","Visit10Beautyfull City","VisitOneOfSevenContients","VisitTopCasinos","OwnadreamCar","VisitSevenWondersOfTheWorld","HolyPalces","UniqueTransportModes"}; ArrayAdapter adapter=new ArrayAdapter(this, android.R.layout.simple_list_item_1,Wishlist); lv.setAdapter(adapter) can anyone hlepme how to code for wen i click on listview its should go to listview b i mean a b c a 1.1 1.2 1.3 b 2.2 2.3 2.4 c 2.4.2.5 all should be in signle screen

    L 1 Reply Last reply
    0
    • S salkhan786

      public class MainActivity extends Activity { ListView lv; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); lv=(ListView)findViewById(R.id.listView1); String[] Wishlist={"VisitTop10beaches","Adventures","Sports","Camp Site","Visit10Beautyfull City","VisitOneOfSevenContients","VisitTopCasinos","OwnadreamCar","VisitSevenWondersOfTheWorld","HolyPalces","UniqueTransportModes"}; ArrayAdapter adapter=new ArrayAdapter(this, android.R.layout.simple_list_item_1,Wishlist); lv.setAdapter(adapter) can anyone hlepme how to code for wen i click on listview its should go to listview b i mean a b c a 1.1 1.2 1.3 b 2.2 2.3 2.4 c 2.4.2.5 all should be in signle screen

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Please stop reposting the same question over and over. If you have more information to add then edit your original.

      Veni, vidi, abiit domum

      S 1 Reply Last reply
      0
      • L Lost User

        Please stop reposting the same question over and over. If you have more information to add then edit your original.

        Veni, vidi, abiit domum

        S Offline
        S Offline
        salkhan786
        wrote on last edited by
        #3

        can any one tell me i have a list 10 items wen i click it goes to another list view but i want wen i click on item it goes to another list view with image n text plz help mail youre reply in this id sallukhan2011@live.com wat code i have done is this main xml beach xml main actvity package com.example.wishfairy; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.Menu; import android.view.View; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.ArrayAdapter; import android.widget.ListView; public class MainActivity extends Activity implements OnItemClickListener { ListView lv; String[] Wishlist={"VisitTop10beaches","Adventures","Sports","Camp Site","Visit10Beautyfull City","VisitOneOfSevenContients","VisitTopCasinos","OwnadreamCar","VisitSevenWondersOfTheWorld","HolyPalces","UniqueTransportModes"}; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); lv=(ListView)findViewById(R.id.listView1); lv.setAdapter(new ArrayAdapter(this, android.R.layout.simple_list_item_1, Wishlist)); lv.setOnItemClickListener(this); }

        L P 2 Replies Last reply
        0
        • S salkhan786

          can any one tell me i have a list 10 items wen i click it goes to another list view but i want wen i click on item it goes to another list view with image n text plz help mail youre reply in this id sallukhan2011@live.com wat code i have done is this main xml beach xml main actvity package com.example.wishfairy; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.Menu; import android.view.View; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.ArrayAdapter; import android.widget.ListView; public class MainActivity extends Activity implements OnItemClickListener { ListView lv; String[] Wishlist={"VisitTop10beaches","Adventures","Sports","Camp Site","Visit10Beautyfull City","VisitOneOfSevenContients","VisitTopCasinos","OwnadreamCar","VisitSevenWondersOfTheWorld","HolyPalces","UniqueTransportModes"}; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); lv=(ListView)findViewById(R.id.listView1); lv.setAdapter(new ArrayAdapter(this, android.R.layout.simple_list_item_1, Wishlist)); lv.setOnItemClickListener(this); }

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          salkhan786 wrote:

          my id is sallukhan2011@live.com

          Enjoy the spam.

          Veni, vidi, abiit domum

          1 Reply Last reply
          0
          • S salkhan786

            can any one tell me i have a list 10 items wen i click it goes to another list view but i want wen i click on item it goes to another list view with image n text plz help mail youre reply in this id sallukhan2011@live.com wat code i have done is this main xml beach xml main actvity package com.example.wishfairy; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.Menu; import android.view.View; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.ArrayAdapter; import android.widget.ListView; public class MainActivity extends Activity implements OnItemClickListener { ListView lv; String[] Wishlist={"VisitTop10beaches","Adventures","Sports","Camp Site","Visit10Beautyfull City","VisitOneOfSevenContients","VisitTopCasinos","OwnadreamCar","VisitSevenWondersOfTheWorld","HolyPalces","UniqueTransportModes"}; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); lv=(ListView)findViewById(R.id.listView1); lv.setAdapter(new ArrayAdapter(this, android.R.layout.simple_list_item_1, Wishlist)); lv.setOnItemClickListener(this); }

            P Offline
            P Offline
            Paul Conrad
            wrote on last edited by
            #5

            Please learn to use the code button as it wraps your code around a styled <pre> tag, as it can make the code more readable. making use of the indent button is helpful as well. Which would you rather read below? protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.beaches); lv=(ListView)findViewById(R.id.listView2); lv.setAdapter(new ArrayAdapter(this, android.R.layout.simple_list_item_1, Wishlist2)); lv.setOnItemClickListener(this); or....

            protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.beaches);
            lv=(ListView)findViewById(R.id.listView2);
            lv.setAdapter(new ArrayAdapter(this,
            android.R.layout.simple_list_item_1, Wishlist2));
            lv.setOnItemClickListener(this);

            "I've seen more information on a frickin' sticky note!" - Dave Kreskowiak

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups