Start Intent in Adapter

前端 未结 8 1757
清酒与你
清酒与你 2021-02-02 13:32

I want to start a new activity from this base adapter.

public class EfficientAdapter extends BaseAdapter {

    private Activity activity;
    private ArrayList         


        
8条回答
  •  旧巷少年郎
    2021-02-02 13:53

    Set an intent for the class u need to open.In manifest file . Eg:

    
     
     
     
     
     
    

    Then

                @Override
                public void onClick(View v) {
                    // TODO Auto-generated method stub
               Intent i=new Intent("android.intent.action.OPEN");
               StartActivity(i);
                      }
    

提交回复
热议问题