2016-10-01 7 views
0

Android Annotationでインテントを通じてArrayListを送受信しようとしています。それをどうすれば実現できますか?あなたのActivityAndroid AnnotationでインテントでArrayListを送受信する方法

grid.setOnItemClickListener(new AdapterView.OnItemClickListener() { 

      @Override 
      public void onItemClick(AdapterView<?> parent, View view, 
            int position, long id) { 
       SubcriptionAddPage_.intent(activity).startForResult(REQUEST_CODE); 
       overridePendingTransition(R.anim.activity_in, R.anim.activity_out); 
      } 
     }); 

答えて

0

、あなたはこのようなIntent余分注入することができる:

@EActivity 
public class SubcriptionAddPage extends Activity { 

    @Extra 
    ArrayList<String> arrayListExtra; 

    @AfterInject 
    void afterInject() { 
    // you can use the injected extra here 
    } 

} 

SubcriptionAddPage_.intent(activity) 
    .arrayListExtra(list) // pass the extra to the generated builder 
    .startForResult(REQUEST_CODE) 
    .withAnimation(R.anim.activity_in, R.anim.activity_out); // you can use this instead of calling overridePendingTransition() 
関連する問題