예제 #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();
    }
  }
예제 #2
0
        public final void onReceive(Context context, Intent intent)
        {
            List list;
label0:
            {
                if (intent.getAction().equals("android.net.wifi.WIFI_STATE_CHANGED"))
                {
                    a = intent.getIntExtra("wifi_state", 4);
                    if (f.b(d) != null)
                    {
                        f.b(d).b(a);
                    }
                }
                if (intent.getAction().equals("android.net.wifi.SCAN_RESULTS") || intent.getAction().equals("android.net.wifi.WIFI_STATE_CHANGED"))
                {
                    WifiManager wifimanager = f.c(d);
                    list = null;
                    if (wifimanager != null)
                    {
                        list = f.c(d).getScanResults();
                    }
                    if (!intent.getAction().equals("android.net.wifi.WIFI_STATE_CHANGED") || list != null && (list == null || list.size() != 0))
                    {
                        break label0;
                    }
                }
                return;
            }
            if (!c && b != null && b.size() >= 4 && list != null && list.size() <= 2)
            {
                a(list);
                c = true;
                d.a(0L);
                return;
            }
            a(list);
            c = false;
            f.a(d, d. new b(b, System.currentTimeMillis(), a));
            if (f.b(d) != null)
            {
                f.b(d).a(f.d(d));
            }
            d.a(20000L * (long)f.e(d));
        }