Esempio n. 1
0
 /**
  * 重写监听事件 点击跳转activity并将Id通过intent传递到新的activity
  *
  * @param v
  */
 @Override
 public void onClick(View v) {
   Intent intent = new Intent();
   intent.setClass(MyApplication.getContext(), NewsActivity.class);
   intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
   intent.putExtra("id", (Integer) v.getTag());
   MyApplication.getContext().startActivity(intent);
 }
Esempio n. 2
0
 public RecyclerViewAdapter(Context context) {
   mLayoutInflater = LayoutInflater.from(context);
   aCache = ACache.get(MyApplication.getContext());
   this.lruCache = MyApplication.getLruCache();
 }