Exemplo n.º 1
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    MobclickAgent.onError(this);
    UMFeedbackService.enableNewReplyNotification(this, NotificationType.AlertDialog);

    setContentView(R.layout.activity_main);

    mGoodsAdapter =
        new GoodsItemAdapter(this, R.id.imageView1, GoodsItemManager.instance().getGoodsItems());

    // mAdapter = new SGVAdapter(this);
    mSGV = (StaggeredGridView) findViewById(R.id.grid);
    // mSGV.setColumnCount(-1);
    // mSGV.setAdapter(mAdapter);
    mSGV.setAdapter(mGoodsAdapter);
    // mSGV.setAdapter(new EndlessGoodsItemAdapter(this, mGoodsAdapter, R.id.textView1));
    mSGV.setItemMargin(10);
    mGoodsAdapter.notifyDataSetChanged();

    mProgress = (ProgressBar) findViewById(R.id.progress);

    mGaInstance = GoogleAnalytics.getInstance(this);
    mGaTracker = mGaInstance.getTracker("UA-39513550-1");
  }