title: List view should show a text view after click on list item
body: <p>as a beginner I am trying do develope a simple bedtime story app (about 10 to 30 stories for the first on Android.</p>
  
  <p>The idea was to have a listview where each list item shows the title of the story. - I have no idea how to add dynamically a specific title (think the best way would be from the headline of the .txt file), so each list item becomes the name "story" + i (i for the counted list item).</p>
  
  <p>In the next step - if an item (story) is clicked - the app should just show a simple textview were full story (about 200 words) can be read.</p>
  
  <p>As you see the idea i got from the web to get the story texts is to write the stories in a .txt file, put in the assests order and then read it via fileInpitStream.</p>
  
  <p>The text files are named for the first and easy like "story1.txt" "story2.txt" and so on. </p>
  
  <p><strong><em>So my biggest problem is how is it possible to combine every list item with the following matching text file "-.txt" when a list item gets clicked?</em></strong></p>
  
  <p>If you need any further information (XML files - but mostly standard - or other) please tell me. I am very thankful for every answer i get to help me to implement my little idea!</p>
  
  <p>MainActivity:</p>
  
  <pre><code>public class MainActivity extends ActionBarActivity {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);
  
  
  List valueList = new ArrayList&lt;String&gt;();
  
  //filling List Items
  for(int i=1;i &lt;30; i++){
      valueList.add("Story " +i);
  }
  
  //List Adapter
  ListAdapter adapter = new ArrayAdapter&lt;String&gt;(getApplicationContext(),
          R.layout.custom_textview, valueList);  
  final ListView lv = (ListView)findViewById(R.id.listView1);
  
  lv.setAdapter(adapter);
  
  lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
  
  @Override
  public void onItemClick(AdapterView&lt;?&gt; parent, View view, int arg2, long arg3)
  {
  Intent intent = new Intent();
  intent.setClassName(getPackageName(), getPackageName()+".ListViewShow");
  intent.putExtra("selected", lv.getAdapter().getItem(arg2).toString());
  startActivity(intent);
  }
  });
  
  }
  }
  </code></pre>
  
  <p>ListViewShow (where the combination from listview to textview should be):</p>
  
  <pre><code>public class ListViewShow extends Activity {
  
  private static final String TAG = null;
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
      setContentView(R.layout.textview_show);
        AssetManager assetManager = getResources().getAssets();
        InputStream inputStream = null;
  
            try {
                inputStream = assetManager.open("test.txt");
                    if ( inputStream != null)
                        Log.d(TAG, "It worked!");
                } catch (IOException e) {
                    e.printStackTrace();
                }
  
  
  }}
  </code></pre>
  
  <p>LogCat Error Messages:<div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code> 09-27 17:37:56.797: W/dalvikvm(5622): threadid=1: thread exiting with uncaught exception (group=0x4163eba8)
   09-27 17:37:56.827: E/AndroidRuntime(5622): FATAL EXCEPTION: main
   09-27 17:37:56.827: E/AndroidRuntime(5622): Process: fm.de.geschichten, PID: 5622
   09-27 17:37:56.827: E/AndroidRuntime(5622): android.content.ActivityNotFoundException: Unable to find explicit activity class {fm.de.geschichten/fm.de.geschichten.ListViewShow}; have you declared this activity in your AndroidManifest.xml?
   09-27 17:37:56.827: E/AndroidRuntime(5622):  at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1628)
   09-27 17:37:56.827: E/AndroidRuntime(5622):  at android.app.Instrumentation.execStartActivity(Instrumentation.java:1424)
   09-27 17:37:56.827: E/AndroidRuntime(5622):  at android.app.Activity.startActivityForResult(Activity.java:3424)
   09-27 17:37:56.827: E/AndroidRuntime(5622):  at android.app.Activity.startActivityForResult(Activity.java:3385)
   09-27 17:37:56.827: E/AndroidRuntime(5622):  at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:840)
   09-27 17:37:56.827: E/AndroidRuntime(5622):  at android.app.Activity.startActivity(Activity.java:3627)
   09-27 17:37:56.827: E/AndroidRuntime(5622):  at android.app.Activity.startActivity(Activity.java:3595)
   09-27 17:37:56.827: E/AndroidRuntime(5622):  at fm.de.geschichten.MainActivity$1.onItemClick(MainActivity.java:47)
   09-27 17:37:56.827: E/AndroidRuntime(5622):  at android.widget.AdapterView.performItemClick(AdapterView.java:299)
   09-27 17:37:56.827: E/AndroidRuntime(5622):  at android.widget.AbsListView.performItemClick(AbsListView.java:1113)
   09-27 17:37:56.827: E/AndroidRuntime(5622):  at android.widget.AbsListView$PerformClick.run(AbsListView.java:2911)
   09-27 17:37:56.827: E/AndroidRuntime(5622):  at android.widget.AbsListView$3.run(AbsListView.java:3645)
   09-27 17:37:56.827: E/AndroidRuntime(5622):  at android.os.Handler.handleCallback(Handler.java:733)
   09-27 17:37:56.827: E/AndroidRuntime(5622):  at android.os.Handler.dispatchMessage(Handler.java:95)
   09-27 17:37:56.827: E/AndroidRuntime(5622):  at android.os.Looper.loop(Looper.java:136)
   09-27 17:37:56.827: E/AndroidRuntime(5622):  at android.app.ActivityThread.main(ActivityThread.java:5001)
   09-27 17:37:56.827: E/AndroidRuntime(5622):  at java.lang.reflect.Method.invokeNative(Native Method)
   09-27 17:37:56.827: E/AndroidRuntime(5622):  at java.lang.reflect.Method.invoke(Method.java:515)
   09-27 17:37:56.827: E/AndroidRuntime(5622):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
   09-27 17:37:56.827: E/AndroidRuntime(5622):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
   09-27 17:37:56.827: E/AndroidRuntime(5622):  at dalvik.system.NativeStart.main(Native Method)</code></pre>
  </div>
  </div>
  </p>