activity onCreate 监听回调 | Activity OnCreate Listener Callback
@param activity 发生onCreate事件的activity | Activity that occurs OnCreate events
@param savedInstanceState 缓存状态数据 | Cached state data
547088
@Override
    public void onActivityCreated(Activity activity, Bundle savedInstanceState) {
        HMSAgentLog.d("onCreated:" + StrUtils.objDesc(activity));
        setCurActivity(activity);
    }
624510
@Override
	public void onCreate(final Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		final RelativeLayout rl = new RelativeLayout(this);

		this.mMapView = new MapView(this);
		this.mMapView.setTilesScaledToDpi(true);
		rl.addView(this.mMapView, new RelativeLayout.LayoutParams(LayoutParams.FILL_PARENT,
				LayoutParams.FILL_PARENT));

		/* Itemized Overlay */
		{
			/* Create a static ItemizedOverlay showing a some Markers on some cities. */
			final ArrayList<OverlayItem> items = new ArrayList<>();
			items.add(new OverlayItem("Hannover", "SampleDescription", new GeoPoint(52.370816, 9.735936)));
			items.add(new OverlayItem("Berlin", "SampleDescription", new GeoPoint(52.518333, 13.408333)));
			items.add(new OverlayItem("Washington", "SampleDescription", new GeoPoint(38.895000, -77.036667)));
			items.add(new OverlayItem("San Francisco", "SampleDescription", new GeoPoint(37.779300, -122.419200)));
			items.add(new OverlayItem("Tolaga Bay", "SampleDescription", new GeoPoint(-38.371000, 178.298000)));

			/* OnTapListener for the Markers, shows a simple Toast. */
			this.mMyLocationOverlay = new ItemizedIconOverlay<>(items,
					new ItemizedIconOverlay.OnItemGestureListener<OverlayItem>() {
						@Override
						public boolean onItemSingleTapUp(final int index, final OverlayItem item) {
							Toast.makeText(
									SampleWithMinimapItemizedoverlay.this,
									"Item '" + item.getTitle() + "' (index=" + index
											+ ") got single tapped up", Toast.LENGTH_LONG).show();
							return true; // We 'handled' this event.
						}

						@Override
						public boolean onItemLongPress(final int index, final OverlayItem item) {
							Toast.makeText(
									SampleWithMinimapItemizedoverlay.this,
									"Item '" + item.getTitle() + "' (index=" + index
											+ ") got long pressed", Toast.LENGTH_LONG).show();
							return true;
						}
					}, getApplicationContext());
			this.mMapView.getOverlays().add(this.mMyLocationOverlay);
		}

		/* MiniMap */
		{
			final MinimapOverlay miniMapOverlay = new MinimapOverlay(this,
					mMapView.getTileRequestCompleteHandler());
			this.mMapView.getOverlays().add(miniMapOverlay);
		}

		/* list of items currently displayed */
		{
			final MapEventsReceiver mReceive = new MapEventsReceiver() {
				@Override
				public boolean singleTapConfirmedHelper(GeoPoint p) {
					return false;
				}

				@Override
				public boolean longPressHelper(final GeoPoint p) {
					final List<OverlayItem> displayed = mMyLocationOverlay.getDisplayedItems();
					final StringBuilder buffer = new StringBuilder();
					String sep = "";
					for (final OverlayItem item : displayed) {
						buffer.append(sep).append('\'').append(item.getTitle()).append('\'');
						sep = ", ";
					}
					Toast.makeText(
							SampleWithMinimapItemizedoverlay.this,
							"Currently displayed: " + buffer.toString(), Toast.LENGTH_LONG).show();
					return true;
				}
			};
			mMapView.getOverlays().add(new MapEventsOverlay(mReceive));

			final RotationGestureOverlay rotationGestureOverlay = new RotationGestureOverlay(mMapView);
			rotationGestureOverlay.setEnabled(true);
			mMapView.getOverlays().add(rotationGestureOverlay);
		}

		this.setContentView(rl);

		// Default location and zoom level
		IMapController mapController = mMapView.getController();
		mapController.setZoom(5.);
		GeoPoint startPoint = new GeoPoint(50.936255, 6.957779);
		mapController.setCenter(startPoint);
	}
474048
public void onSaveInstanceState(Bundle outState) {
    if (state != State.IDLE) {
      throw new IllegalStateException("Cannot handle onSaveInstanceState while " + state);
    }
    rootBundle = outState;

    state = State.SAVING;

    // Make a dwindling copy of the services, in case one is deleted as a side effect
    // of another's onSave.
    List<Map.Entry<String, BundleService>> servicesToBeSaved =
        new ArrayList<>(scopedServices.entrySet());

    while (!servicesToBeSaved.isEmpty()) {
      Map.Entry<String, BundleService> entry = servicesToBeSaved.remove(0);
      if (scopedServices.containsKey(entry.getKey())) entry.getValue().saveToRootBundle(rootBundle);
    }

    state = State.IDLE;
  }
1244559
@Override
    protected void onCreate(Bundle savedInstanceState)
    {
        setTheme(SampleList.THEME); //Used for theme switching in samples
        // Be sure to call the super class.
        super.onCreate(savedInstanceState);

        // See assets/res/any/layout/hello_world.xml for this
        // view layout definition, which is being set here as
        // the content of our screen.
        setContentView(R.layout.send_result);

        // Watch for button clicks.
        Button button = (Button)findViewById(R.id.corky);
        button.setOnClickListener(mCorkyListener);
        button = (Button)findViewById(R.id.violet);
        button.setOnClickListener(mVioletListener);
    }
748249
@Override
    public void onCreate(Bundle savedInstanceState) {
        setContentView(R.layout.about);
        TextView tv = (TextView) findViewById(R.id.legal_text);
        tv.setText(readRawTextFile(R.raw.legal));
        tv = (TextView) findViewById(R.id.info_text);
        tv.setText(Html.fromHtml(readRawTextFile(R.raw.info)));
        tv.setLinkTextColor(Color.WHITE);
        Linkify.addLinks(tv, Linkify.ALL);
    }
985524
@Override protected void onRestoreInstanceState(Bundle savedInstanceState) {
    super.onRestoreInstanceState(savedInstanceState);
    recoverDraggablePanelState(savedInstanceState);
    loadLastPlaceClicked(savedInstanceState);
  }
641949
@Override
    public Dialog onCreateDialog(Bundle savedInstanceState) {
        AlertDialog dialog = new AlertDialog.Builder(getActivity(), R.style.EtsyBlurAlertDialogTheme)
                .setIcon(R.drawable.droid)
                .setTitle("Hello")
                .setPositiveButton("OK", null)
                .create();
        return dialog;
    }
789987
@Override
	public void onCreate(Bundle savedInstanceState) {
		
		super.onCreate(savedInstanceState);
		
		INJECTOR_CONFIGURATION = Injector.Configuration.newInstance(this);
	}
994780
@Override @SuppressLint("NewApi")
    public void onCreate(Bundle savedInstanceState) {
        // Set window transition elements
        if(BuildUtils.isLollipop()) {
            getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS);

            TransitionSet transitions = new TransitionSet()
                    .addTransition(new ChangeBounds())
                    .addTransition(new Fade());

            getWindow().setEnterTransition(new Explode());
            getWindow().setExitTransition(new Explode());
            getWindow().setSharedElementEnterTransition(transitions);
            getWindow().setSharedElementExitTransition(transitions);
        }

        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_license);

        // Load UI
        mToolbar = ButterKnife.findById(this, R.id.appbar);
        mRecyler = ButterKnife.findById(this, R.id.recycler);

        // Set the toolbar as the support actionbar
        setSupportActionBar(mToolbar);
        parseExtras(savedInstanceState);

        // Set listeners
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        mToolbar.setNavigationOnClickListener(this);

        mRecyler.setAdapter(mAdapter);
        mRecyler.setLayoutManager(new LinearLayoutManager(this));
        mRecyler.setItemAnimator(new DefaultItemAnimator());
        mRecyler.addItemDecoration(new StickyRecyclerHeadersElevationDecoration(mAdapter));
        mAdapter.setOnItemClickListener(this);

    }
985384
@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        if (getArguments() != null) {
            images = getArguments().getStringArrayList(KEY_IMAGES);
            title = getArguments().getString(KEY_TITLE);
        }

    }
547236
@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_page_objects_home);
    }
606518
@Override
	protected void onCreate(Bundle savedInstanceState) {
		
		long millis = System.currentTimeMillis();
		
		super.onCreate(savedInstanceState);

		millis = System.currentTimeMillis() - millis;
		
		Log.i("INSTRUMENTATION:IckleFragmentActivity", getClass().getSimpleName() + ": " + millis + "ms");
	}
1363690
@Override
    public void onCreate(SQLiteDatabase db) {
        try {
            if(builder.tables == null){
                throw new SQLiteHelperException("The array of String tables can't be null!!");
            }
            executePragma(db);

            builder.onCreateCallback.onCreate(db);
        } catch (SQLiteHelperException e) {
            Log.e(this.getClass().toString(), Log.getStackTraceString(e), e);
        }
    }
758971
static void onActivityCreated(Activity activity) {
        // make sure we have at least the default instance created here.
        if (instances == null) {
            CleverTapAPI.createInstanceIfAvailable(activity, null);
        }

        if (instances == null) {
            Logger.v("Instances is null in onActivityCreated!");
            return;
        }

        boolean alreadyProcessedByCleverTap = false;
        Bundle notification = null;
        Uri deepLink = null;
        String _accountId = null;

        // check for launch deep link
        try {
            Intent intent = activity.getIntent();
            deepLink = intent.getData();
            if (deepLink != null) {
                Bundle queryArgs = UriHelper.getAllKeyValuePairs(deepLink.toString(), true);
                _accountId = queryArgs.getString(Constants.WZRK_ACCT_ID_KEY);
            }
        } catch (Throwable t) {
            // Ignore
        }

        // check for launch via notification click
        try {
            notification = activity.getIntent().getExtras();
            if (notification != null && !notification.isEmpty()) {
                try {
                    alreadyProcessedByCleverTap = (notification.containsKey(Constants.WZRK_FROM_KEY) && Constants.WZRK_FROM.equals(notification.get(Constants.WZRK_FROM_KEY)));
                    if (alreadyProcessedByCleverTap){
                        Logger.v("ActivityLifecycleCallback: Notification Clicked already processed for "+ notification.toString() +", dropping duplicate.");
                    }
                    if (notification.containsKey(Constants.WZRK_ACCT_ID_KEY)) {
                        _accountId = (String) notification.get(Constants.WZRK_ACCT_ID_KEY);
                    }
                } catch (Throwable t) {
                    // no-op
                }
            }
        } catch (Throwable t) {
            // Ignore
        }

        if (alreadyProcessedByCleverTap && deepLink == null) return;

        for (String accountId: CleverTapAPI.instances.keySet()) {
            CleverTapAPI instance = CleverTapAPI.instances.get(accountId);

            boolean shouldProcess = false;
            if (instance != null) {
                shouldProcess = (_accountId == null && instance.config.isDefaultInstance()) || instance.getAccountId().equals(_accountId);
            }

            if (shouldProcess) {
                if (notification != null && !notification.isEmpty() && notification.containsKey(Constants.NOTIFICATION_TAG)) {
                    instance.pushNotificationClickedEvent(notification);
                }

                if (deepLink != null) {
                    try {
                        instance.pushDeepLink(deepLink);
                    } catch (Throwable t) {
                        // no-op
                    }
                }
                break;
            }
        }
    }
57242
@Override
    protected void onPostCreate(Bundle savedInstanceState) {
        super.onPostCreate(savedInstanceState);
        // Sync the toggle state after onRestoreInstanceState has occurred.
        if(pulsante != null )
            pulsante.syncState();
    }
725327
@Override
	public final void onCreate(SQLiteDatabase db) {
		ConnectionSource cs = getConnectionSource();
		/*
		 * The method is called by Android database helper's get-database calls when Android detects that we need to
		 * create or update the database. So we have to use the database argument and save a connection to it on the
		 * AndroidConnectionSource, otherwise it will go recursive if the subclass calls getConnectionSource().
		 */
		DatabaseConnection conn = cs.getSpecialConnection(null);
		boolean clearSpecial = false;
		if (conn == null) {
			conn = new AndroidDatabaseConnection(db, true, cancelQueriesEnabled);
			try {
				cs.saveSpecialConnection(conn);
				clearSpecial = true;
			} catch (SQLException e) {
				throw new IllegalStateException("Could not save special connection", e);
			}
		}
		try {
			onCreate(db, cs);
		} finally {
			if (clearSpecial) {
				cs.clearSpecialConnection(conn);
			}
		}
	}
930977
public synchronized void setActivityInstanceStatus(ActivityInstance actInst,
            Integer status, String statusMessage)
            throws SQLException {
        if (cache_activity_transition==CACHE_ONLY) {
            actInst.setStatusCode(status);
            actInst.setMessage(statusMessage);
        } else {
            edadb.setActivityInstanceStatus(actInst, status, statusMessage);
        }
    }