@Override protected void onPostCreate(@Nullable Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); // Call deprecated init method only if no fragments have been added through onCreate() or // onStart() if (fragments.size() == 0) { init(null); } // required for triggering onPageSelected and onSlideChanged for first page pager.setCurrentItem(savedCurrentItem); pager.post( new Runnable() { @Override public void run() { handleSlideChanged(null, mPagerAdapter.getItem(pager.getCurrentItem())); } }); slidesNumber = fragments.size(); setProgressButtonEnabled(progressButtonEnabled); initController(); }
@Override protected void onPostCreate(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); if (getIntent().getExtras() != null) { boolean doPlayTrack = getIntent().getExtras().getBoolean("playTrack"); mArtistName = getIntent().getExtras().getString("artist"); ActionBar actionbar = getSupportActionBar(); if (mArtistName != null) { actionbar.setTitle(mArtistName); } else { actionbar.setTitle(""); } if (!mHasRestored) { mPosition = getIntent().getExtras().getInt("position"); ArrayList<TrackInfo> top10tracks = getIntent().getExtras().getParcelableArrayList("top10tracks"); PlayerFragment playerFragment = (PlayerFragment) getFragmentManager().findFragmentById(R.id.ss_player_fragment); playerFragment.initializeTrack(mArtistName, top10tracks, mPosition, doPlayTrack); } } }
@Override protected void onPostCreate(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); drawerList = (ListView) findViewById(R.id.main_lv_menu); addDrawerItems(); drawerList.setOnItemClickListener( new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { switch (position) { // MyProfileActivity case 0: myProfil(); break; // SuchProfil case 1: searchProfil(); break; // FindYourLove case 2: findYourLove(); break; case 3: matchesActivity(); break; // Wenn noch Zeit dann Einstellungen hinzufügen!!! default: break; } } }); }
@Override protected void onPostCreate(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); if (mDrawerToggle != null) { mDrawerToggle.syncState(); } }
@Override protected void onPostCreate(@Nullable Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); // if(savedInstanceState!=null){ /* getSupportFragmentManager().beginTransaction() .add(R.id.view_container2, new DistinctionsFragment()) .commit();*/ // } }
@Override protected void onPostCreate(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); // Trigger the initial hide() shortly after the activity has been // created, to briefly hint to the user that UI controls // are available. delayedHide(10); }
@Override protected void onPostCreate(Bundle savedInstanceState) { // hides the top bar super.onPostCreate(savedInstanceState); mControlsView.setVisibility(View.GONE); ActionBar actionBar = getSupportActionBar(); if (actionBar != null) { actionBar.hide(); } }
@Override protected void onPostCreate(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); // Trigger the initial hide() shortly after the activity has been // created, to briefly hint to the user that UI controls // are available. Log.v(TAG, "Activity post delay ended accurately. Welcome to WhatRU?"); delayedHide(1); splashEndHandler.postDelayed(splashEnd, 4000); }
@Override protected void onPostCreate(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); List<String> list = new ArrayList<>(); for (int i = 0; i < 20; i++) { list.add("Item=" + i); } recyclerView.setLayoutManager(new LinearLayoutManager(this)); recyclerView.setAdapter(new MyAdapter(list)); }
@Override protected void onPostCreate(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); // Sync the toggle state after onRestoreInstanceState has occurred. if (mDrawerToggle != null) { mDrawerToggle.syncState(); if (isDrawerOpen()) { getSupportActionBar().setTitle(R.string.app_name); mDrawerToggle.setDrawerIndicatorEnabled(true); } } }
@Override protected void onPostCreate(@Nullable Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); if (Build.VERSION.SDK_INT >= 21) { Window window = getWindow(); window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); window.setStatusBarColor(ThemeUtils.getColorById(this, R.color.theme_color_primary_dark)); ActivityManager.TaskDescription description = new ActivityManager.TaskDescription( null, null, ThemeUtils.getThemeAttrColor(this, android.R.attr.colorPrimary)); setTaskDescription(description); } }
@Override protected void onPostCreate(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); if (toolbar == null) return; try { setSupportActionBar(toolbar); } catch (NoClassDefFoundError e) { // Workaround for crash on Samsung 4.2 devices. // This should be fixed in support library 24.0.0 // https://code.google.com/p/android/issues/detail?id=78377#c364 // https://github.com/syncthing/syncthing-android/issues/591 Log.w(TAG, e); } //noinspection ConstantConditions getSupportActionBar().setDisplayHomeAsUpEnabled(true); }
@Override protected void onPostCreate(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); if (spinnerAdapter == null) { createCustomActionBarView(); } getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setHomeButtonEnabled(true); // Sync the toggle state after onRestoreInstanceState has occurred. if (drawerToggle != null) { drawerToggle.syncState(); } if (Util.shouldStartOnHeadphones(this)) { Intent serviceIntent = new Intent(); serviceIntent.setClassName(this.getPackageName(), HeadphoneListenerService.class.getName()); this.startService(serviceIntent); } }
@Override public void onPostCreate(Bundle savedInstanceState, PersistableBundle persistentState) { super.onPostCreate(savedInstanceState, persistentState); drawerListner.syncState(); }
@Override public void onPostCreate(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); mDrawerToggle.syncState(); }
@Override protected void onPostCreate(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); SwipeBackHelper.onPostCreate(this); }
@Override public final void onPostCreate(final Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); drawerToggle.syncState(); }
@Override protected void onPostCreate(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); // Sync the toggle state after onRestoreInstanceState has occurred. mDrawerToggle.syncState(); }
@Override public void onPostCreate(Bundle savedInstanceState) { if (mBluetoothAdapter.isEnabled()) { Toast.makeText(getApplicationContext(), "블루투스가 활성화 되어있습니다.", Toast.LENGTH_SHORT).show(); } else { Toast.makeText(getApplicationContext(), "블루투스를 켜주세요.", Toast.LENGTH_SHORT).show(); Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE); startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT); // 시스템에 블루투스 켤 수있는 Alert메시지 요청 } mBroadcastReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); // retrieve : 검색하다. if (BluetoothDevice.ACTION_FOUND.equals(action)) { // 새로운 기기를 찾았을 때... BluetoothDevice devicesFound = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); // 패어링 안되있는 기기 만 찾아서 아이콘을 띄움 if (!isPaired(devicesFound)) { fragment.setDeviceIconFound(devicesFound); } } else if (BluetoothAdapter.ACTION_DISCOVERY_FINISHED.equals(action)) { // 검색이 완료되었을 때... Toast.makeText(PairingActivity.this, "주변 기기 검색이 완료되었습니다", Toast.LENGTH_SHORT).show(); rippleBackground.stopRippleAnimation(); } else if (BluetoothAdapter.ACTION_SCAN_MODE_CHANGED.equals(action)) { // broadcast intent 에는 현재 스캔모드와 이전 스캔 모드가 엑스트라로 포함된다. int preScanMode = intent.getIntExtra(BluetoothAdapter.EXTRA_PREVIOUS_SCAN_MODE, -1); int scanMode = intent.getIntExtra(BluetoothAdapter.EXTRA_SCAN_MODE, -1); Toast.makeText( PairingActivity.this, "스캔모드 체인지/// 이전모드 : " + preScanMode + "\n///현재모드 : " + scanMode, Toast.LENGTH_LONG) .show(); } else if (BluetoothDevice.ACTION_BOND_STATE_CHANGED.equals(action)) { final int state = intent.getIntExtra(BluetoothDevice.EXTRA_BOND_STATE, BluetoothDevice.ERROR); final int prevState = intent.getIntExtra( BluetoothDevice.EXTRA_PREVIOUS_BOND_STATE, BluetoothDevice.ERROR); if (state == BluetoothDevice.BOND_BONDED && prevState == BluetoothDevice.BOND_BONDING) { Toast.makeText(PairingActivity.this, "연결완료", Toast.LENGTH_SHORT).show(); finish(); } else if (state == BluetoothDevice.BOND_NONE && prevState == BluetoothDevice.BOND_BONDED) { Toast.makeText(PairingActivity.this, "UnPaired", Toast.LENGTH_SHORT).show(); } } } }; // BroadCastReceiver를 당연히 먼저 선언해주어야한다. // IntentFilter 이벤트를 모니터링 할 수 있다. IntentFilter deviceFoundFilter = new IntentFilter(BluetoothDevice.ACTION_FOUND); // 새로운 기기를 찾았을 때 IntentFilter deviveDiscoveryFinishedFilter = new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_FINISHED); // 탐색을 끝냈을때 IntentFilter scanModechanged = new IntentFilter(BluetoothAdapter.ACTION_SCAN_MODE_CHANGED); IntentFilter bondStateChanged = new IntentFilter(BluetoothDevice.ACTION_BOND_STATE_CHANGED); // 리시버와 intentfilter를 등록한다. 이는 해당 이벤트를 BroadcastReceiver로 통보하도록 요구! registerReceiver(mBroadcastReceiver, deviceFoundFilter); registerReceiver(mBroadcastReceiver, deviveDiscoveryFinishedFilter); registerReceiver(mBroadcastReceiver, scanModechanged); registerReceiver(mBroadcastReceiver, bondStateChanged); super.onPostCreate(savedInstanceState); }
@Override protected void onPostCreate(Bundle savedInstanceState) { drawerlistener.syncState(); super.onPostCreate(savedInstanceState); }
@Override protected void onPostCreate(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); droid4mizer.onPostCreate(savedInstanceState); }
// NavigationView Listener S @Override public void onPostCreate(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); actiondt.syncState(); }
@Override protected void onPostCreate(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); mHelper.onPostCreate(); }
// for creating setting/hamburger icon on toolbar's left side @Override protected void onPostCreate(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); actionBarDrawerToggle.syncState(); }
@Override protected void onPostCreate(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); delayedHide(100); }