Esempio n. 1
0
 protected void onCreate(Bundle paramBundle) {
   super.onCreate(paramBundle);
   requestWindowFeature(1);
   setContentView(2130903242);
   try {
     auC = this;
     this.alW = getIntent().getStringExtra("senderUID");
     this.wM = getIntent().getStringExtra("senderName");
     this.message = getIntent().getStringExtra("message");
     this.auB = getIntent().getStringExtra("senderAvt");
     this.nl = a.hn().bs(this.alW);
     if ((this.alW == null) || (this.alW.trim().equals(""))) {
       com.zing.zalo.service.ZaloBackgroundService.Mp = false;
       finish();
       return;
     }
   } catch (Exception localException) {
     com.zing.zalo.service.ZaloBackgroundService.Mp = false;
     finish();
     return;
   }
   com.zing.zalo.service.ZaloBackgroundService.Mp = true;
   this.alT = ((TextView) findViewById(2131297270));
   this.pd = ((TextView) findViewById(2131297273));
   this.pd.setText(this.message);
   this.auA = ((Button) findViewById(2131297276));
   this.auA.setOnClickListener(new ata(this));
   this.alV = ((ImageButton) findViewById(2131297271));
   this.alV.setOnClickListener(new atb(this));
 }
  @Override
  protected void onStart() {
    super.onStart();

    em = new EntityManager();
    MetaEntity.defaultEntityManager = em;
    Game game = new Game(em);

    /** create the surface + thread */
    SurfaceViewThePit surfaceView = new SurfaceViewThePit(this, game);
    RenderSystemSimpleDrawable renderSystem = new RenderSystemSimpleDrawable(em, surfaceView, game);
    MainRunThread runGameThread = new MainRunThread(this, em, surfaceView, renderSystem);
    runGameThread.loadAllCoreSubSystems();

    // runGameThread.setGameResult( gameToStart );
    SubsystemTouchHandler systemTh = new SubsystemTouchHandler(em);
    runGameThread.orderedSubSystems.addLast(systemTh); // MUST be before the Collision Subsystem
    TouchListenerPlayerMovement thv = new TouchListenerPlayerMovement(systemTh);

    SubsystemGhosts systemGhosts = new SubsystemGhosts(em, game);
    runGameThread.orderedSubSystems.addLast(systemGhosts);

    SubsystemMovementAndCollision systemCollision =
        new SubsystemMovementAndCollision(em, renderSystem);
    runGameThread.orderedSubSystems.addLast(systemCollision);

    SubsystemLighting systemLighting = new SubsystemLighting(em, game);
    runGameThread.orderedSubSystems.addLast(systemLighting);

    SubsystemTriggers systemTriggers = new SubsystemTriggers(this, em, game);
    runGameThread.orderedSubSystems.addLast(systemTriggers);

    surfaceView.setOnTouchListener(thv);
    surfaceView.thread = runGameThread;
    Log.i(getClass().getSimpleName(), "initialized thread and surface");

    /**
     * Finally ... tell the game that the ES is now valid, it's ship reference is OK, and it can do
     * game-setup
     */
    game.preSetupGame();
    renderSystem.shiftCanvasToKeepPositionOnScreen(
        new CPosition(
            game.initialPlayerLocation.x,
            game.initialPlayerLocation.y,
            game.mazeCellWidth,
            game.mazeCellHeight));

    // turn off the window's title bar
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow()
        .setFlags(
            WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);

    setContentView(surfaceView);
  }
Esempio n. 3
0
 protected void onPause()
 {
   super.onPause();
   f.hide();
   if ((this.ahD != null) && (this.Ol.booleanValue()))
   {
     unregisterReceiver(this.ahD);
     this.ahD = null;
     this.Ol = Boolean.valueOf(false);
   }
 }
Esempio n. 4
0
 public void onResume()
 {
   super.onResume();
   mB();
   if (!this.Ol.booleanValue())
   {
     if (this.ahD == null)
       this.ahD = new GroupListInfoActivity.UpdateListener(this);
     IntentFilter localIntentFilter = new IntentFilter("com.zing.zalo.ACTION_REFRESH_GROUP_LIST_INFO");
     localIntentFilter.addAction("com.zing.zalo.ACTION_UPDATE_GROUP_INFO");
     registerReceiver(this.ahD, localIntentFilter);
     this.Ol = Boolean.valueOf(true);
   }
 }
  /** Called when the activity is first created. */
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    ArrayList<EntityManager> cachedData =
        (ArrayList<EntityManager>) getLastNonConfigurationInstance();
    if (cachedData != null) {
      Log.i(
          getClass().getSimpleName(),
          "onCreate: ... found a LastNonConfigurationInstance, attempting to load it...");
      em = (EntityManager) cachedData.get(0);

      /** We loaded a cached copy of the ES, so have to manually do this auto-setup */
      MetaEntity.defaultEntityManager = em;
    }

    Log.i("" + this.getClass(), "activity onCreate");
  }
Esempio n. 6
0
 public void onCreate(Bundle paramBundle) {
   h.ac(TAG, "Activity State: onCreate()");
   super.onCreate(paramBundle);
   if (p.d(this)) return;
   p.e(this);
   try {
     this.KH = getResources();
     setContentView(2130903116);
     this.No = ((ImageButton) findViewById(2131296482));
     this.No.setOnClickListener(new iq(this));
     getWindow().setSoftInputMode(3);
     this.adZ = ((IndexableListView) findViewById(2131296893));
     this.adZ.setFastScrollEnabled(true);
     LayoutInflater localLayoutInflater = getLayoutInflater();
     LinearLayout localLinearLayout =
         (LinearLayout) localLayoutInflater.inflate(2130903152, null, false);
     this.ZM = ((TextView) localLinearLayout.findViewById(2131297049));
     this.ZM.setClickable(false);
     this.adZ.addFooterView(localLinearLayout, null, false);
     this.adY = ((LinearLayout) localLayoutInflater.inflate(2130903261, null, false));
     this.ZP = ((CustomEditText) this.adY.findViewById(2131297176));
     this.ZP.addTextChangedListener(this.aec);
     this.adZ.addHeaderView(this.adY);
     this.aeb = new bi(this, this.adZ, this.aea);
     this.adZ.setAdapter(this.aeb);
     this.adZ.setOnItemClickListener(new ir(this));
     this.ZR = findViewById(2131296573);
     this.ZS = ((LinearLayout) findViewById(2131296956));
     this.ZT = ((LinearLayout) findViewById(2131296959));
     this.ZU = ((TextView) findViewById(2131296958));
     this.ZV = ((TextView) findViewById(2131296961));
     bG(2131165370);
     bH(2131165306);
     nt();
     b.eB(TAG);
     return;
   } catch (Exception localException) {
   }
 }
Esempio n. 7
0
 protected void onResume() {
   IntentFilter localIntentFilter = new IntentFilter();
   localIntentFilter.addAction("com.zing.zalo.ui.ZaloUserPopupActivityIntent");
   registerReceiver(this.bS, localIntentFilter);
   super.onResume();
 }
Esempio n. 8
0
 protected void onPause() {
   if (((PowerManager) getSystemService("power")).isScreenOn()) unregisterReceiver(this.bS);
   super.onPause();
 }
Esempio n. 9
0
 protected void onDestroy() {
   com.zing.zalo.service.ZaloBackgroundService.Mp = false;
   super.onDestroy();
 }
 protected void onResume() {
   super.onResume();
 };
Esempio n. 11
0
 public void onCreate(Bundle paramBundle)
 {
   super.onCreate(paramBundle);
   if (p.d(this))
     return;
   p.e(this);
   setContentView(2130903168);
   while (true)
   {
     TextView localTextView;
     try
     {
       this.KH = getResources();
       Intent localIntent = getIntent();
       if (localIntent != null)
       {
         Bundle localBundle = localIntent.getExtras();
         if (localBundle != null)
         {
           if (!localBundle.containsKey("id"))
             break label702;
           str1 = localBundle.getString("id");
           this.abX = str1;
           if (!localBundle.containsKey("uidCurrentChat"))
             break label737;
           str2 = localBundle.getString("uidCurrentChat");
           this.ahC = str2;
         }
         if ((this.abX != null) && (this.abX.length() > 0))
           this.ahB = com.zing.zalo.db.a.hn().bE(this.abX);
       }
       this.ahD = new GroupListInfoActivity.UpdateListener(this);
       this.Kg = new ProgressDialog(this);
       this.Kg.setMessage(getString(2131165349));
       this.Kg.setCancelable(true);
       this.Kg.setCanceledOnTouchOutside(false);
       this.ahs = ((LinearLayout)findViewById(2131296359));
       this.mH = new ArrayList();
       this.aho = ((ListView)findViewById(2131296360));
       this.ahx = ((LinearLayout)getLayoutInflater().inflate(2130903167, null, false));
       this.pw = ((TextView)this.ahx.findViewById(2131297069));
       this.ahy = ((TextView)this.ahx.findViewById(2131297072));
       this.ahF = this.ahx.findViewById(2131297074);
       this.ahG = this.ahx.findViewById(2131297075);
       this.ahH = this.ahx.findViewById(2131297076);
       this.ahI = this.ahx.findViewById(2131297073);
       this.ahF.setOnClickListener(new pu(this));
       this.ahG.setOnClickListener(new pv(this));
       localTextView = (TextView)findViewById(2131297080);
       if ((this.ahB == null) || (this.ahB.gg().contains(com.zing.zalo.g.a.CW)) || (this.ahB.ge().equals(com.zing.zalo.g.a.CW)))
         break label709;
       this.ahH.setVisibility(8);
       this.ahI.setVisibility(0);
       localTextView.setText(2131165775);
       this.ahv = ((LinearLayout)this.ahx.findViewById(2131297077));
       this.ahv.setOnClickListener(new pw(this));
       this.aho.setOnItemClickListener(new px(this));
       this.ahw = ((LinearLayout)this.ahx.findViewById(2131297078));
       this.ahw.setOnClickListener(new py(this));
       this.ahz = ((TextView)this.ahx.findViewById(2131297079));
       this.aho.addHeaderView(this.ahx);
       this.aht = ((TextView)findViewById(2131297081));
       this.ahu = ((ProgressBar)findViewById(2131296550));
       this.ahp = new by(this, this.mH);
       this.aho.setAdapter(this.ahp);
       if (this.ahp.getCount() > 0)
         this.ahs.setVisibility(8);
       this.No = ((ImageButton)findViewById(2131296482));
       this.No.setOnClickListener(new pe(this));
       this.ahA = findViewById(2131296483);
       this.ahA.setOnClickListener(new pf(this));
       ai(this.abX);
       b.eB(this.TAG);
       return;
     }
     catch (Exception localException)
     {
       localException.printStackTrace();
       return;
     }
     label702: String str1 = "";
     continue;
     label709: this.ahH.setVisibility(0);
     this.ahI.setVisibility(8);
     localTextView.setText(2131165774);
     continue;
     label737: String str2 = "";
   }
 }