title: intent putextra does not working on adapter
body: <p>I am new to Android programming.
  I get a problem when I want to send the data to the intent putextra to new activity in my listview adapter.
  This code my adapter</p>
  
  <pre><code>    package com.app.amusa.library;
  
  import java.util.ArrayList;
  import java.util.HashMap;
  import java.util.List;
  
  import com.app.amusa.FragOrangtua;
  import com.app.amusa.R;
  import com.app.amusa.ViewDetailAnak;
  
  import com.android.volley.toolbox.ImageLoader;
  import com.android.volley.toolbox.NetworkImageView;
  import android.app.Activity;
  import android.content.Context;
  import android.content.Intent;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.View.OnClickListener;
  import android.view.ViewGroup;
  import android.widget.BaseAdapter;
  import android.widget.ImageView;
  import android.widget.TextView;
  
  public class FroListAnakAdapter extends BaseAdapter {
      Activity activity;
      Context context;
      LayoutInflater inflater;
      List&lt;Anak&gt; AnakList;
      private String id_anak;
  
      public FroListA
  
  nakAdapter(Activity activity, List&lt;Anak&gt; AnakList) {
          this.activity = activity;
          this.AnakList = AnakList;
      }
  
  @Override
  public int getCount() {
      return AnakList.size();
  }
  
  @Override
  public Object getItem(int location) {
      return AnakList.get(location);
  }
  
  @Override
  public long getItemId(int position) {
      return position;
  }
  
  public View getView(final int position, View convertView, ViewGroup parent) {
      if (inflater == null)
          inflater = (LayoutInflater) activity
                  .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      if (convertView == null)
          convertView = inflater.inflate(R.layout.list_row_anak, null);
      TextView nama = (TextView) convertView.findViewById(R.id.nama);
      TextView username = (TextView) convertView.findViewById(R.id.username);
      TextView anak_ke = (TextView) convertView.findViewById(R.id.anak_ke);
  
      final Anak a = AnakList.get(position);
  
      nama.setText(a.getnama());
      username.setText(a.getusername());
      anak_ke.setText("Anak Ke : " + String.valueOf(a.getanak_ke()));
      final int idanak = a.getid_anak();
  
      convertView.setOnClickListener(new OnClickListener() {
  
          @Override
          public void onClick(View arg0) {
  
              Intent intent = new Intent(activity, ViewDetailAnak.class);
              intent.putExtra("id_anak",String.valueOf(idanak));
              activity.startActivity(new Intent(intent));
  
          }
      });
      return convertView;
      }
  
  }
  </code></pre>
  
  <p>and here is ViewDetailAnak Oncreate</p>
  
  <pre><code>    public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.single_item_anak);
      final ActionBar actionBar = getActionBar();
      actionBar.setDisplayHomeAsUpEnabled(true);
      streamer = new Streamer();
      Intent i = getIntent();
      idanak = i.getStringExtra("id_anak");
      //id
      Toast.makeText(getApplicationContext(), idanak, Toast.LENGTH_LONG).show();
      new Asyncronous().execute();
  }
  </code></pre>
  
  <p>for nama, username, and anak_ke, the value of successfully filled in TextView.
  perhaps also in idanak successfully filled idanak.
  but when in ViewDetailAnak. The idanak returns 0
  and I tried to change the value idanak with getanak_ke ()
  but the value remains 0 when the value of getanak_ke is 1</p>
  
  <p>if I had to put it in the main activity? if yes, how?
  or whether there is something wrong with my code?</p>