Пример #1
0
  /**
   * (�� Javadoc,��д�ķ���) @Title: onCreate @Description: ����Activity�����Ҹ��ֳ�ʼ��
   *
   * @param savedInstanceState
   * @see android.app.Activity#onCreate(android.os.Bundle)
   */
  @Override
  protected void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);
    // �����ޱ���
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    // ����ȫ��
    getWindow()
        .setFlags(
            WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);

    setContentView(R.layout.photo_viewfilpper);

    // ��ȡintent��Ϣ,ͨ��Intent���ݵ����
    Intent intent = getIntent();
    currentNum = intent.getIntExtra("currentpic", 0);
    albumArray = intent.getStringArrayExtra("albumArray");
    photoPath = intent.getStringExtra("photopath");
    AlbumName = intent.getStringExtra("AlbumName");

    detector = new GestureDetector(this);
    flipper = (ViewFlipper) findViewById(R.id.ViewFlipper);

    try {
      // ��ʼ����������ͱ���
      initCompenents();
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
  /**
   * (�� Javadoc,��д�ķ���) @Title: onCreate @Description:
   *
   * @param savedInstanceState
   * @see android.app.Activity#onCreate(android.os.Bundle)
   */
  @Override
  protected void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);
    // �����ޱ���
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.grid);

    Intent intent = getIntent(); // ��ȡintent ��Ϣ
    AlbumName = intent.getStringExtra("albumname");
    albumArray = intent.getStringArrayExtra("albumArray");
    setTitle("����" + "/" + AlbumName); // ����

    // ��ʼ���������
    initComponents();

    tLocalAlbum = new Thread(rLocalAlbum); // ����һ�����߳�
    tLocalAlbum.start();
  }