Ejemplo n.º 1
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.cx_fa_activity_tabloid);

    mBackBtn = (Button) findViewById(R.id.cx_fa_activity_title_back);
    mTitleInfo = (TextView) findViewById(R.id.cx_fa_activity_title_info);

    mBackBtn.setText(getString(R.string.cx_fa_navi_back));
    mBackBtn.setBackgroundResource(R.drawable.cx_fa_back_btn);
    mBackBtn.setOnClickListener(buttonListener);

    mTitleInfo.setText(getString(R.string.cx_fa_tabloid_activity_title));

    cateListView = (ListView) findViewById(R.id.tabloid_cate_listView);

    Handler handler =
        new Handler() {
          public void handleMessage(Message msg) {
            init();
            super.handleMessage(msg);
          }
        };
    handler.sendEmptyMessage(0);
  }
Ejemplo n.º 2
0
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.cx_fa_activity_image_detail);
    try {
      mPosition = this.getIntent().getIntExtra(CxGlobalConst.S_KID_SELECTED_ORDER, -1);
    } catch (Exception e) {
      CxLog.e("", "" + e.getMessage());
    }

    mTitle = (TextView) findViewById(R.id.cx_fa_activity_title_info);
    mDisposeBtn = (Button) findViewById(R.id.cx_fa_activity_title_back);
    mDisposeBtn.setText(getString(R.string.cx_fa_navi_back));

    mSaveBtn = (Button) findViewById(R.id.cx_fa_activity_title_more);
    mSaveBtn.setText(getString(R.string.cx_fa_delete_text));
    mSaveBtn.setVisibility(View.VISIBLE);
    mSaveBtn.setOnClickListener(mBtnListener);
    mDisposeBtn.setOnClickListener(mBtnListener);

    pager = (ViewPager) findViewById(R.id.zone_image_viewpager);

    if (-1 == mPosition) {
      mPosition = 0;
    }

    options =
        new DisplayImageOptions.Builder()
            .showImageForEmptyUri(R.drawable.chatview_imageloading)
            .showImageOnFail(R.drawable.chatview_imageloading)
            .resetViewBeforeLoading(true)
            .cacheOnDisc(true)
            .imageScaleType(ImageScaleType.EXACTLY)
            .bitmapConfig(Bitmap.Config.RGB_565)
            .displayer(new FadeInBitmapDisplayer(300))
            .build();
    mImagePagerAdapter = new ImagePagerAdapter();
    pager.setAdapter(mImagePagerAdapter);
    pager.setCurrentItem(mPosition);

    pager.setOnPageChangeListener(
        new ViewPager.OnPageChangeListener() {

          @Override
          public void onPageSelected(int arg0) {
            mPosition = arg0;
            mTitle.setText(
                (mPosition + 1) + "/" + CxKidParam.getInstance().getAddPhotosPath().size());
          }

          @Override
          public void onPageScrolled(int arg0, float arg1, int arg2) {}

          @Override
          public void onPageScrollStateChanged(int arg0) {}
        });

    if ((null != CxKidParam.getInstance().getAddPhotosPath())
        && (mPosition < CxKidParam.getInstance().getAddPhotosPath().size())) {
      mTitle.setText((mPosition + 1) + "/" + CxKidParam.getInstance().getAddPhotosPath().size());
      pager.setCurrentItem(mPosition);
    }
  }
Ejemplo n.º 3
0
 @Override
 protected void onPause() {
   overridePendingTransition(R.anim.tran_pre_in, R.anim.tran_pre_out);
   super.onPause();
 }